Skip to content

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

Bug fix to include more data.

smicallefdeff5a0fa7b9
diff --git a/modules/sfp_shodan.py b/modules/sfp_shodan.py
index a97dc4f8..3450d000 100644
--- a/modules/sfp_shodan.py
+++ b/modules/sfp_shodan.py
@@ -237,51 +237,41 @@ class sfp_shodan(SpiderFootPlugin):
if port is not None:
# Notify other modules of what you've found
cp = addr + ":" + port
- if cp in ports:
- continue
- else:
+ if cp not in ports:
ports.append(cp)
- evt = SpiderFootEvent("TCP_PORT_OPEN", cp,
- self.__name__, pevent)
- self.notifyListeners(evt)
+ evt = SpiderFootEvent("TCP_PORT_OPEN", cp,
+ self.__name__, pevent)
+ self.notifyListeners(evt)
if banner is not None:
- if banner in banners:
- continue
- else:
+ if banner not in banners:
banners.append(banner)
- # Notify other modules of what you've found
- evt = SpiderFootEvent("TCP_PORT_OPEN_BANNER", banner,
- self.__name__, pevent)
- self.notifyListeners(evt)
+ # Notify other modules of what you've found
+ evt = SpiderFootEvent("TCP_PORT_OPEN_BANNER", banner,
+ self.__name__, pevent)
+ self.notifyListeners(evt)
if product is not None:
- if product in products:
- continue
- else:
+ if product not in products:
products.append(product)
- evt = SpiderFootEvent("SOFTWARE_USED", product,
- self.__name__, pevent)
- self.notifyListeners(evt)
+ evt = SpiderFootEvent("SOFTWARE_USED", product,
+ self.__name__, pevent)
+ self.notifyListeners(evt)
if asn is not None:
- if asn in asns:
- continue
- else:
+ if asn not in asns:
asns.append(asn)
- evt = SpiderFootEvent("BGP_AS_MEMBER", asn.replace("AS", ""),
- self.__name__, pevent)
- self.notifyListeners(evt)
+ evt = SpiderFootEvent("BGP_AS_MEMBER", asn.replace("AS", ""),
+ self.__name__, pevent)
+ self.notifyListeners(evt)
if vulns is not None:
for vuln in vulns.keys():
- if vuln in vulnlist:
- continue
- else:
+ if vuln not in vulnlist:
vulnlist.append(vuln)
- evt = SpiderFootEvent('VULNERABILITY', vuln,
- self.__name__, pevent)
- self.notifyListeners(evt)
+ evt = SpiderFootEvent('VULNERABILITY', vuln,
+ self.__name__, pevent)
+ self.notifyListeners(evt)
return None
# End of sfp_shodan class