Skip to content

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

Bug fix.

Steve438068ea382e
diff --git a/modules/sfp_censys.py b/modules/sfp_censys.py
index 111d3e7f..1ccb0253 100644
--- a/modules/sfp_censys.py
+++ b/modules/sfp_censys.py
@@ -146,9 +146,10 @@ class sfp_censys(SpiderFootPlugin):
self.sf.debug("Record found but too old, skipping.")
continue
if 'location' in rec:
- dat = rec['location']['country']
- e = SpiderFootEvent("GEOINFO", dat, self.__name__, event)
- self.notifyListeners(e)
+ dat = rec['location'].get('country')
+ if dat:
+ e = SpiderFootEvent("GEOINFO", dat, self.__name__, event)
+ self.notifyListeners(e)
if 'headers' in rec:
dat = rec['headers']