Skip to content

Commit 592393c

Browse files
committed
Fix into simple_dos
1 parent ebb194b commit 592393c

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

dhalsim/network_attacks/simple_dos_attack.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,10 @@ def setup(self):
6666
self.logger.info(f"NFqueue Bound periodic ARP Poison between {self.target_plc_ip} and "
6767
f"{self.intermediate_attack['gateway_ip']}")
6868

69-
#self.launch_periodic_poison(self.ARP_POISON_PERIOD, 0)
70-
71-
#self.launch_mitm()
72-
self.run_thread = True
73-
_thread.start_new_thread(self.launch_periodic_poison, (self.ARP_POISON_PERIOD, 0))
74-
#self.launch_mitm()
75-
self.logger.info(f"Configured periodic ARP Poison between {self.target_plc_ip} and "
69+
self.launch_mitm()
70+
self.logger.info(f"Configured ARP Poison between {self.target_plc_ip} and "
7671
f"{self.intermediate_attack['gateway_ip']}")
7772

78-
def launch_periodic_poison(self, period, delay):
79-
while self.run_thread:
80-
self.launch_mitm()
81-
time.sleep(period)
82-
8373
def launch_mitm(self):
8474
# Launch the ARP poison by sending the required ARP network packets
8575
launch_arp_poison(self.target_plc_ip, self.intermediate_attack['gateway_ip'])
@@ -96,7 +86,6 @@ def capture(self, packet):
9686
packet.drop()
9787

9888
def teardown(self):
99-
self.run_thread = False
10089
restore_arp(self.target_plc_ip, self.intermediate_attack['gateway_ip'])
10190
if self.intermediate_yaml['network_topology_type'] == "simple":
10291
for plc in self.intermediate_yaml['plcs']:

0 commit comments

Comments
 (0)