-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyRobots.py
62 lines (58 loc) · 1.42 KB
/
pyRobots.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
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys, os, time
from modules.stylesheet import bc, sd, menu
from modules.quickScan import quick
banner = sd.banner.logo
help = menu.helper
eBan = sd.eBan
iBan = sd.iBan
sBan = sd.sBan
try:
os.mkdir('Pulled-Data')
except FileExistsError:
pass
except Exception:
os.system('clear')
print(banner)
print(eBan + bc.RC + ' ERROR: ' + bc.BC + 'Failed to create ' + bc.RC + '/Pulled-Data/' + bc.BC + ' Directory\n')
quit()
os.system('clear')
print(banner)
print(help)
def robotMenu():
try:
host = str(input(bc.BC + " URL: " + bc.GC))
if(host == ''):
os.system('clear')
print(banner)
print(eBan + bc.RC + ' ERROR: ' + bc.BC + 'URL value cannot be empty\n')
quick()
elif(host.startswith('http://') or host.startswith('https://')):
if(host.endswith('/')):
host = host
else:
host = host + '/'
quick(host)
else:
os.system('clear')
print(banner)
print(eBan + bc.RC + ' ERROR: ' + bc.BC + 'Invalid URL value\n')
quick()
except ValueError:
os.system('clear')
print(banner)
print(menu)
print(eBan + bc.RC + "ERROR: " + bc.BC + 'Value must be INTEGER [' + bc.GC + '0-3' + bc.BC + ']\n')
robotMenu()
except KeyboardInterrupt:
os.system('clear')
print(banner)
print(bc.BC + ' Clearing Cache...')
os.system('rm -rf modules/__pycache__/')
time.sleep(0.5)
os.system('clear')
print(banner)
quit()
if __name__ == '__main__':
robotMenu()