-
Notifications
You must be signed in to change notification settings - Fork 52
/
install.py
53 lines (44 loc) · 1.59 KB
/
install.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python3
import os
import config
def read_deps_file(deps_file):
with open(deps_file) as fd:
return " ".join([ line.strip() for line in fd ])
if __name__ == "__main__":
try:
if input("Do you want update your package list ('apt-get update')? [y/N]").lower() == "y":
print("[*] Downloading package lists from repositories")
os.system("apt-get update -y")
print("[*] Installing Rogue's software dependencies...")
os.system("apt-get install -y %s" % read_deps_file(config.software_dep))
print("[*] complete!")
print("[*] Installing Rogue's Python dependencies...")
os.system("python3 -m pip install -r %s" % config.pip_dep)
print("[*] complete!")
# Check if required directories exist
print("[*] Checking if rogue's temporary directory exists")
try:
os.stat(config.working_dir)
except:
print("[+] Creating rogue's temporary directory")
os.mkdir(config.working_dir)
print("[*] Checking if rogue's log directory exists")
try:
os.stat(config.logdir)
except:
print("[+] Creating rogue's log directory")
os.mkdir(config.logdir)
print("[*] Checking if sslsplit's temporary directory exists")
try:
os.stat(config.sslsplit_tmp)
except:
print("[+] Creating rogue's temporary sslsplit directory")
os.mkdir(config.sslsplit_tmp)
print("[*] Checking if sslsplit's jail directory exists")
try:
os.stat(config.sslsplit_jail)
except:
print("[+] Creating rogue's sslsplit jail directory")
os.mkdir(config.sslsplit_jail)
except KeyboardInterrupt:
exit(0)