Skip to content

Commit 976ccf4

Browse files
Lukas-Heindlsebix
authored andcommitted
fix wrong returned botnet_status
1 parent 7f406ca commit 976ccf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

intelmq/bin/intelmqctl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,11 +578,13 @@ def botnet_stop(self, group=None):
578578
# give the bots some time to terminate
579579
time.sleep(sleep_time)
580580
# update the botnet_status
581+
for bot_id in stopped_but_still_running_bots:
582+
botnet_status[bot_id] = self.bot_status(bot_id)[1]
581583
# only keep bots in the list which are not stopped already
582584
stopped_but_still_running_bots = [
583585
bot_id
584586
for bot_id in stopped_but_still_running_bots
585-
if self.bot_status(bot_id)[1] not in ['stopped', 'disabled']
587+
if botnet_status[bot_id] not in ['stopped', 'disabled']
586588
]
587589

588590
# check if all bots are stopped -> no need to wait further

0 commit comments

Comments
 (0)