This repository has been archived by the owner on Apr 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsetup.py
executable file
·74 lines (58 loc) · 2.79 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
71
72
73
#!/usr/bin/python
# -*- encoding: utf-8 -*-
import subprocess
import platform
# detect OS type ###############
if "Linux" in platform.uname():
os_type = "linux"
else:
os_type = "windows"
# color codes ###########
red = "\033[1;32;31m"
green = "\033[1;32;32m"
yellow = "\033[1;32;33m"
blue = "\033[1;32;34m"
cyan = "\033[1;32;36m"
black = "\033[1;32;30m"
r = "\x1b[0m"
banner = yellow + """
██████╗░██╗░░░██╗██████╗░░█████╗░░█████╗░██╗░░██╗
██╔══██╗╚██╗░██╔╝██╔══██╗██╔══██╗██╔══██╗██║░██╔╝
██████╔╝░╚████╔╝░██████╦╝███████║██║░░╚═╝█████═╝░
██╔═══╝░░░╚██╔╝░░██╔══██╗██╔══██║██║░░██╗██╔═██╗░
██║░░░░░░░░██║░░░██████╦╝██║░░██║╚█████╔╝██║░╚██╗
╚═╝░░░░░░░░╚═╝░░░╚═════╝░╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝
Installation Script
===================
Created by: 7h3w4lk3r
https://github.com/7h3w4lk3r
Email : bl4ckr4z3r@gmail.com\n\n
""" + r
error_banner = red,"""
\n\n
[-] installation failed [-]
please make sure:
1. python 2 is installed correctly
2. you have a working network connection for pip
3. there are no mismatches in python packages
""",r
try:
if os_type == "linux":
subprocess.call("clear",shell=True)
print banner
print green, "\n[+] Local system type: LINUX [+]\n",r
print yellow, "\n[*] Installing requirements using pip [*]\n\n",r
subprocess.call("pip install -r requirements/linux_requirements.txt", shell=True)
else:
subprocess.call("cls",shell=True)
print banner
print green, "\n[+] Local system type: WINDOWS [+]\n\n",r
print yellow, "[*] Installing requirements using pip [*]\n\n",r
subprocess.call("pip install -r requirements\\windows_requirements.txt", shell=True)
print green,"""\n\n
[+] Installation completed successfully [+]
run config.py to generate new settings or run the CNC\n\n""",r
except KeyboardInterrupt:
exit(0)
except:
print error_banner