Explorar o código

Fix #17: Determine open ports while port scanning correctly

Carlos Garcia %!s(int64=7) %!d(string=hai) anos
pai
achega
09178070a5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      code/Attack/PortscanAttack.py

+ 1 - 1
code/Attack/PortscanAttack.py

@@ -122,7 +122,7 @@ class PortscanAttack(BaseAttack.BaseAttack):
             reply_ether = Ether(src=mac_destination, dst=mac_source)
             reply_ip = IP(src=ip_destination, dst=ip_source, flags='DF')
 
-            if str(dport) in self.get_param_value(Param.PORT_OPEN):  # destination port is OPEN
+            if dport in self.get_param_value(Param.PORT_OPEN):  # destination port is OPEN
                 # target answers
                 reply_tcp = TCP(sport=dport, dport=sport, seq=0, ack=1, flags='SA', window=29200,
                                 options=[mss])