Skip to content

Commit 479c279

Browse files
authored
Create setup.py
1 parent 599c4b2 commit 479c279

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env python3
2+
import subprocess
3+
import time
4+
5+
try:
6+
import netfilterqueue
7+
import scapy.all as scapy
8+
except ModuleNotFoundError:
9+
print("Installing missing dependencies...")
10+
time.sleep(3)
11+
subprocess.call("apt-get update", shell=True)
12+
subprocess.call("apt-get install python3-pip git apache2 tcpdump libnfnetlink-dev libnetfilter-queue-dev -y",
13+
shell=True)
14+
subprocess.call("pip3 install scapy --quiet", shell=True)
15+
subprocess.call("pip3 install -U git+https://github.com/kti/python-netfilterqueue --quiet", shell=True)
16+
finally:
17+
subprocess.call("clear", shell=True)

0 commit comments

Comments
 (0)