Skip to content

Commit 707a679

Browse files
committed
fixed
1 parent 3ead667 commit 707a679

File tree

1 file changed

+46
-32
lines changed

1 file changed

+46
-32
lines changed

setup.py

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,56 @@
11
#!/usr/bin/python3
22
import os
33
import subprocess
4-
from main.tools import banner
4+
from main.tools import banner,colors
55

6-
def main():
6+
def exit_program():
77
os.system("clear")
88
banner.main()
9-
banner.attack("Setup")
10-
os.system("pip install -r requirements.txt")
11-
os.system("sudo apt install golang -y")
12-
os.system("go env -w GO111MODULE=on")
13-
os.system("apt install php")
14-
create_symlink()
15-
def create_symlink():
16-
proc = subprocess.Popen([f"pwd"], stdout=subprocess.PIPE, shell=True)
17-
#there keyfor success output and noththere for error output
18-
(there, notthere) = proc.communicate()
19-
there=there.decode()
20-
there=there.split()
21-
f = open("run.sh", "w")
22-
f.write("#!/bin/bash")
23-
f.write("\n")
24-
f.write(f'cd {there[0]} && python3 cyberonix.py "$@"')
25-
f.close()
26-
os.system("chmod +x *")
27-
os.system("sudo mv run.sh /usr/bin/cyberonix")
28-
os.system("sudo mv cyberonix.1 /usr/local/man/man1/")
29-
finish()
30-
def finish():
9+
print("\033[38;5;105m","[+] Thanks visit again".title())
10+
exit()
11+
try:
12+
def main():
13+
os.system("clear")
14+
banner.main()
15+
banner.attack("Setup")
16+
os.system("pip install -r requirements.txt")
17+
os.system("sudo apt install golang -y")
18+
os.system("go env -w GO111MODULE=on")
19+
os.system("apt install php")
20+
create_symlink()
21+
def create_symlink():
22+
proc = subprocess.Popen([f"pwd"], stdout=subprocess.PIPE, shell=True)
23+
#there keyfor success output and noththere for error output
24+
(there, notthere) = proc.communicate()
25+
there=there.decode()
26+
there=there.split()
27+
f = open("run.sh", "w")
28+
f.write("#!/bin/bash")
29+
f.write("\n")
30+
f.write(f'cd {there[0]} && python3 cyberonix.py "$@"')
31+
f.close()
32+
os.system("chmod +x *")
33+
os.system("sudo mv run.sh /usr/bin/cyberonix")
34+
os.system("sudo mv cyberonix.1 /usr/local/man/man1/")
35+
finish()
36+
def finish():
37+
os.system("clear")
38+
banner.main()
39+
banner.attack("Setup Completed")
40+
try:
41+
subprocess.run('cyberonix',shell=True, check = True)
42+
except Exception as err:
43+
os.system("python3 cyberonix.py")
44+
exit()
45+
if __name__ == "__main__":
46+
main()
47+
except KeyboardInterrupt:
48+
exit_program()
49+
except Exception as err:
3150
os.system("clear")
3251
banner.main()
33-
banner.attack("Setup Completed")
34-
try:
35-
subprocess.run('cyberonix',shell=True, check = True)
36-
except Exception as err:
37-
os.system("python3 cyberonix.py")
38-
exit()
52+
banner.attack(f"{colors.red}ERROR{colors.reset}")
53+
banner.description(f"{colors.red}{err}{colors.reset}")
54+
3955

40-
if __name__ == "__main__":
41-
main()
4256

0 commit comments

Comments
 (0)