SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
sfp_blocklistde: Add support for IPv6 (#1425)
bcolese4d7243b4ce7
diff --git a/modules/sfp_blocklistde.py b/modules/sfp_blocklistde.pyindex d46b88c8..18fd4bd9 100644--- a/modules/sfp_blocklistde.py+++ b/modules/sfp_blocklistde.py@@ -76,9 +76,13 @@ class sfp_blocklistde(SpiderFootPlugin):def watchedEvents(self):return ["IP_ADDRESS",+ "IPV6_ADDRESS","AFFILIATE_IPADDR",+ "AFFILIATE_IPV6_ADDRESS","NETBLOCK_MEMBER",- "NETBLOCK_OWNER"+ "NETBLOCKV6_MEMBER",+ "NETBLOCK_OWNER",+ "NETBLOCKV6_OWNER",]# What events this module produces@@ -153,7 +157,7 @@ class sfp_blocklistde(SpiderFootPlugin):ip = ip.strip()if ip.startswith('#'):continue- if not self.sf.validIP(ip):+ if not self.sf.validIP(ip) and not self.sf.validIP6(ip):continueips.append(ip)@@ -176,20 +180,20 @@ class sfp_blocklistde(SpiderFootPlugin):self.results[eventData] = True- if eventName == 'IP_ADDRESS':+ if eventName in ['IP_ADDRESS', 'IPV6_ADDRESS']:targetType = 'ip'evtType = 'MALICIOUS_IPADDR'- elif eventName == 'AFFILIATE_IPADDR':+ elif eventName in ['AFFILIATE_IPADDR', 'AFFILIATE_IPV6_ADDRESS']:if not self.opts.get('checkaffiliates', False):returntargetType = 'ip'evtType = 'MALICIOUS_AFFILIATE_IPADDR'- elif eventName == 'NETBLOCK_OWNER':+ elif eventName in ['NETBLOCK_OWNER', 'NETBLOCKV6_OWNER']:if not self.opts.get('checknetblocks', False):returntargetType = 'netblock'evtType = 'MALICIOUS_NETBLOCK'- elif eventName == 'NETBLOCK_MEMBER':+ elif eventName in ['NETBLOCK_MEMBER', 'NETBLOCKV6_MEMBER']:if not self.opts.get('checksubnets', False):returntargetType = 'netblock'