Skip to content

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

List creation can be rewritten by list literal

Gormogon166da74299d1
diff --git a/modules/sfp_portscan_tcp.py b/modules/sfp_portscan_tcp.py
index 69d50106..f8876e5b 100644
--- a/modules/sfp_portscan_tcp.py
+++ b/modules/sfp_portscan_tcp.py
@@ -187,8 +187,7 @@ class sfp_portscan_tcp(SpiderFootPlugin):
else:
self.sendEvent(self.tryPortWrapper(ipAddr, portArr), event)
i = 1
- portArr = []
- portArr.append(port)
+ portArr = [port]
# Scan whatever is remaining
self.sendEvent(self.tryPortWrapper(ipAddr, portArr), event)