Skip to content

Commit

Permalink
Added a 10 minute autoshutoff for python script
Browse files Browse the repository at this point in the history
  • Loading branch information
fribbels committed Feb 26, 2021
1 parent 00e2cfd commit e0ad7a3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion data/py/scanner.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from scapy.all import *
import io,sys,json
import io,sys,json,os
import threading
import time

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit e0ad7a3

Please sign in to comment.