From e0ad7a395e57b1a2f50d11ab76b811eceb6e9734 Mon Sep 17 00:00:00 2001 From: fribbels Date: Fri, 26 Feb 2021 04:37:40 -0800 Subject: [PATCH] Added a 10 minute autoshutoff for python script --- data/py/scanner.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/py/scanner.py b/data/py/scanner.py index dc86a747..ce98a675 100644 --- a/data/py/scanner.py +++ b/data/py/scanner.py @@ -1,5 +1,5 @@ from scapy.all import * -import io,sys,json +import io,sys,json,os import threading import time @@ -56,6 +56,12 @@ def thread_sniff(i, index): except: pass +def terminate(): + os._exit(0) + +t = threading.Timer(600.0, terminate) +t.start() + loop = True while loop: line = sys.stdin.readline()