-
Notifications
You must be signed in to change notification settings - Fork 80
/
setup.py
73 lines (65 loc) · 2.29 KB
/
setup.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/python3
import os
import subprocess
from main.tools import banner,colors
#import cyberonix
def is_module_installed(module_name):
try:
pip_result = subprocess.run(['pip', 'show', module_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if pip_result.returncode == 0 and pip_result.stdout:
return True
apt_result = subprocess.run(['apt', 'list', module_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if apt_result.returncode == 0 and module_name in apt_result.stdout:
return True
else:
os.system("pip install dnspython==2.3.0")
except Exception as e:
print(f"An error occurred: {e}")
return False
def exit_program():
os.system("clear")
banner.main()
print("\033[38;5;105m","[+] Thanks visit again".title())
exit()
try:
def main():
os.system("clear")
banner.main()
banner.attack("Setup")
is_module_installed('dnspython')
os.system("pip install -r requirements.txt")
os.system("pip install selenium")
os.system("sudo apt install golang -y")
os.system("go env -w GO111MODULE=on")
os.system("apt install php")
os.system("mkdir output")
create_symlink()
def create_symlink():
proc = subprocess.Popen([f"pwd"], stdout=subprocess.PIPE, shell=True)
#there keyfor success output and noththere for error output
(there, notthere) = proc.communicate()
there=there.decode()
there=there.split()
f = open("run.sh", "w")
f.write("#!/bin/bash")
f.write("\n")
f.write(f'cd {there[0]} && python3 cyberonix.py "$@"')
f.close()
os.system("chmod +x *")
os.system("sudo mv run.sh /usr/bin/cyberonix")
os.system("sudo mv cyberonix.1 /usr/local/man/man1/")
finish()
def finish():
os.system("clear")
banner.main()
banner.attack("Setup Completed")
os.system("python3 cyberonix.py")
if __name__ == "__main__":
main()
except KeyboardInterrupt:
exit_program()
except Exception as err:
os.system("clear")
banner.main()
banner.attack(f"{colors.red}ERROR{colors.reset}")
banner.description(f"{colors.red}{err}{colors.reset}")