mirror of
https://github.com/ivre/masscanned.git
synced 2025-10-02 06:38:21 +00:00
Use SIGINT and remove unecessary terminate
This commit is contained in:
parent
81e6100713
commit
e85f527ca6
1 changed files with 5 additions and 8 deletions
|
@ -20,6 +20,7 @@ import atexit
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
from signal import SIGINT
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
@ -193,20 +194,16 @@ except AssertionError:
|
||||||
result = -1
|
result = -1
|
||||||
|
|
||||||
# terminate masscanned
|
# terminate masscanned
|
||||||
masscanned.send_signal(2)
|
masscanned.send_signal(SIGINT)
|
||||||
masscanned.terminate()
|
|
||||||
masscanned.wait()
|
masscanned.wait()
|
||||||
# terminate capture
|
# terminate capture
|
||||||
if TCPDUMP:
|
if TCPDUMP:
|
||||||
tcpdump.send_signal(2)
|
tcpdump.send_signal(SIGINT)
|
||||||
tcpdump.terminate()
|
|
||||||
tcpdump.wait()
|
tcpdump.wait()
|
||||||
if ZEEK_PASSIVERECON:
|
if ZEEK_PASSIVERECON:
|
||||||
zeek.send_signal(2)
|
zeek.send_signal(SIGINT)
|
||||||
zeek.terminate()
|
|
||||||
zeek.wait()
|
zeek.wait()
|
||||||
if P0F:
|
if P0F:
|
||||||
p0f.send_signal(2)
|
p0f.send_signal(SIGINT)
|
||||||
p0f.terminate()
|
|
||||||
p0f.wait()
|
p0f.wait()
|
||||||
sys.exit(result)
|
sys.exit(result)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue