SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Add validIpNetwork to sflib
bcoles77819d06b7e6
diff --git a/sflib.py b/sflib.pyindex f691b374..66478e94 100644--- a/sflib.py+++ b/sflib.py@@ -777,6 +777,16 @@ class SpiderFoot:def validIP6(self, address):return netaddr.valid_ipv6(address)+ # Simple way to verify netblock.+ def validIpNetwork(self, cidr):+ try:+ if '/' in str(cidr) and netaddr.IPNetwork(str(cidr)).size > 0:+ return True+ else:+ return False+ except:+ return False+# Clean DNS results to be a simple listdef normalizeDNS(self, res):ret = list()