forked from abhi-r3v0/Adhrit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller.py
72 lines (57 loc) · 2.52 KB
/
installer.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
# !/usr/bin/env python
import os
from sys import platform
class dep_installer():
def ins(self):
if platform == "linux" or platform == "linux2":
# linux
print "\n[+] Installing necessary tools on Linux"
try:
os.system('sudo apt-get install toilet')
print "\n[+] Installation of dependencies complete"
except OSError as ose:
print "\n[!] Error installing dependency"
print "\n[+] Installing ARM dependencies"
try:
os.system('sudo apt-get install libc6-armel-cross libc6-dev-armel-cross')
os.system('sudo apt-get install binutils-arm-linux-gnueabi')
os.system('sudo apt-get install libncurses5-dev')
print "\n[+] Installation of ARM tools complete"
except OSError as ose:
print "\n[!] Error installing ARM dependencies"
print "\n[+] Installing Android debug tools "
try:
os.system('sudo apt-get install android-tools-adb')
print "\n[+] Installation of Android tools complete"
except OSError as ose:
print "\n[!] Error installing Android tools"
elif platform == "darwin":
print "\n[+] Installing necessary tools on MAC"
try:
os.system('brew install toilet')
print "\n[+] Installation of dependencies complete"
except OSError as ose:
print "\n[!] Error installing dependency"
print "\n[+] Installing ARM dependencies"
try:
os.system('brew tap osx-cross/arm')
os.system('brew install arm-gcc-bin')
os.system('brew install binutils')
os.system('brew install ncurses')
print "\n[+] Installation of ARM tools complete"
except OSError as ose:
print "\n[!] Error installing ARM dependencies"
print "\n[+] Installing Android debug tools "
try:
os.system('brew cask install android-platform-tools')
print "\n[+] Installation of Android tools complete"
except OSError as ose:
print "\n[!] Error installing Android tools"
elif platform == "win32":
#TO-DO Windows
print "\n[+] Installing necessary tools on Windows"
def main():
dep = dep_installer()
dep.ins()
if __name__ == '__main__':
main()