Skip to content

Commit 62e3ce4

Browse files
committed
Fix some bugs and extend mapping
1 parent 5395bef commit 62e3ce4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Facebook2MISP.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def convertTEtoMISP(self, teevent):
263263
# Enrich description
264264
if "description" in teevent.keys():
265265
mispevt.info = mispevt.info + " - %s" % teevent["description"]
266-
if "owner" in teevent.keys() and "name" in teevent["owner"].keys():
266+
if ("owner" in teevent.keys()) and ("name" in teevent["owner"].keys()) and ("email" in teevent["owner"].keys()):
267267
owner = teevent["owner"]["name"]
268268
email = teevent["owner"]["email"].replace("\\u0040", "@")
269269
mispevt.info = mispevt.info + " - by %s (%s)" % (owner, email)
@@ -336,6 +336,7 @@ def loadMapping(self, mapfile="./mapping.json"):
336336
except Exception as e:
337337
print("IMPOSSIBLE TO LOAD MAPPINGS from %s" % mapfile)
338338
print(e)
339+
sys.exit(0)
339340
return
340341

341342
# --------------------------------------------------------------------------- #

mapping.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"Type": {
2929
"DOMAIN": "domain",
3030
"IP_ADDRESS": "ip-dst",
31-
"URI": "url"
31+
"URI": "url",
32+
"REGISTRY_KEY" : "regkey"
3233
}
3334
}

0 commit comments

Comments
 (0)