mirror of https://github.com/MISP/misp-modules
removed the bug
parent
84ecb424d1
commit
00f1af5c59
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue