removed the bug

pull/618/head
Usama015 2023-06-20 11:32:10 +05:00
parent 84ecb424d1
commit 00f1af5c59
1 changed files with 12 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def handle_ip(apiKey, ip, attribute):
ipObject = MISPObject('ip-api-address')
# Correct
mapping = get_mapping().json()
mapping = get_mapping()
for field, relation in mapping.items():
ipObject.add_attribute(relation, results[field])
misp_event.add_object(ipObject)
@ -100,3 +100,14 @@ def introspection():
def version():
moduleinfo['config'] = moduleconfig
return moduleinfo
# def main():
# attribute = {
# 'type' : 'ip-src',
# 'value' : '20.20.12.154'
# }
# handle_ip('efe037a76a17432fad2dbdca8299d559','21.02.15.123', attribute)
# if __name__ == '__main__':
# main()