Skip to content

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

Bug fixes.

Steve Micallef4ee1e72462ab
diff --git a/modules/sfp_portscan_tcp.py b/modules/sfp_portscan_tcp.py
index d7e703bc..8e792823 100644
--- a/modules/sfp_portscan_tcp.py
+++ b/modules/sfp_portscan_tcp.py
@@ -15,6 +15,7 @@ from netaddr import IPAddress, IPNetwork
import socket
import random
import threading
+import time
from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
@@ -124,6 +125,7 @@ class sfp_portscan_tcp(SpiderFootPlugin):
if not found:
running = False
+ time.sleep(0.25)
return self.portResults
diff --git a/sflib.py b/sflib.py
index ae35b614..3fcd3ccf 100644
--- a/sflib.py
+++ b/sflib.py
@@ -564,19 +564,20 @@ class SpiderFoot:
def targetType(self, target):
targetType = None
- regexToType = {
- "^\d+\.\d+\.\d+\.\d+$": "IP_ADDRESS",
- "^\d+\.\d+\.\d+\.\d+/\d+$": "NETBLOCK_OWNER",
- "^.*@.*$": "EMAILADDR",
- "^\".*\"$": "HUMAN_NAME",
- "\d+": "BGP_AS_OWNER",
- ".*\..*": "INTERNET_NAME"
- }
+ regexToType = [
+ {"^\d+\.\d+\.\d+\.\d+$": "IP_ADDRESS"},
+ {"^\d+\.\d+\.\d+\.\d+/\d+$": "NETBLOCK_OWNER"},
+ {"^.*@.*$": "EMAILADDR"},
+ {"^\".*\"$": "HUMAN_NAME"},
+ {"\d+": "BGP_AS_OWNER"},
+ {".*\..*": "INTERNET_NAME"}
+ ]
# Parse the target and set the targetType
- for rx in regexToType:
+ for rxpair in regexToType:
+ rx = rxpair.keys()[0]
if re.match(rx, target, re.IGNORECASE|re.UNICODE):
- targetType = regexToType[rx]
+ targetType = rxpair.values()[0]
break
return targetType