def signal_handler(sig, frame):
"""Handles signals sent by the user.
In the case the SIGINT signal is received, child processes will be stopped.
"""
if sig == signal.SIGINT:
print(bcolors.OKBLUE + "\n[-] The program is stopping..." + bcolors.ENDC)
procs = psutil.Process().children(recursive=True)
try:
for p in procs:
p.terminate()
gone, still_alive = psutil.wait_procs(psutil.Process().children(recursive=True), timeout=3)
for p in still_alive:
p.kill()
except:
pass
sys.exit(0)
dynamic_analysis.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录