Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Handle fromatting for empty location JSON property

bcoles9d58ea82ea26
diff --git a/modules/sfp_numverify.py b/modules/sfp_numverify.py
index 1f59200c..0d30e587 100644
--- a/modules/sfp_numverify.py
+++ b/modules/sfp_numverify.py
@@ -129,8 +129,12 @@ class sfp_numverify(SpiderFootPlugin):
evt = SpiderFootEvent("RAW_RIR_DATA", str(data), self.__name__, event)
self.notifyListeners(evt)
- if data.get('location') is not None and data.get('country_code') is not None:
- location = data.get('location') + ', ' + data.get('country_code')
+ if data.get('country_code') is not None:
+ if data.get('location') == '':
+ location = data.get('country_code')
+ else:
+ location = data.get('location') + ', ' + data.get('country_code')
+
evt = SpiderFootEvent("GEOINFO", location, self.__name__, event)
self.notifyListeners(evt)
else: