-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
75 lines (53 loc) · 2.02 KB
/
main.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
74
from dboperations import DbOperator
import sys,utils,progressbar
green = "\033[32m"
red = "\033[31m"
reset = "\033[0m"
print("""\r
888 888 8888888b. 888
888 888 888 Y88b 888
888 888 888 888 888
88888b.d88b. 888 888 888 d88P 888
888 "888 "88b 888 888 8888888P" 888
888 888 888 888 888 888 T88b 888
888 888 888 Y88b. .d88P 888 T88b 888
888 888 888 "Y88888P" 888 T88b 88888888
""")
print("""Check your browsing health on the {}malformed/malware{} sites.""".format(red,reset))
db = DbOperator()
sys.stdout.write("{}[\]{} Database checking for first launch.".format(red, reset))
sys.stdout.flush()
if db.dbCheck() == False:
db.connector()
db.tableCreator()
sys.stdout.write("\r{}[+]{} Database created for first launch.\n".format(green,reset))
sys.stdout.flush()
sys.stdout.write("\r{}[+]{} Database checking completed.".format(green, reset))
sys.stdout.flush()
sys.stdout.write("{}[?]{} Will check abuse source file.".format(red,reset))
sys.stdout.flush()
if utils.abuseCheck():
sys.stdout.write('\r{}[*]{} Sources file have same content.'.format(green,reset))
sys.stdout.flush()
else:
sys.stdout.write("\r{}[-]{} Sources file doesn't equal the new temp file.Please wait for updates".format(red,reset))
sys.stdout.flush()
utils.abuse()
sys.stdout.write("\r{}[+]{} Updates completed.\n".format(green, reset))
sys.stdout.flush()
sys.stdout.write("Starting the connection test\n")
count = db.dbCount()
print("\t"*1+"Found URL: {}".format(count))
bar = progressbar.ProgressBar(max_value=count)
for i in range(1,count):
url = db.returnItem(i)
if url== False:
pass
else:
utils.checkConnection(url)
bar.update(i)
sys.stdout.write('{}[-]{} Test completed and report will generate as soon'.format(red,reset))
sys.stdout.flush()
utils.reportCreator()
sys.stdout.write('\r{}[+]{} Reports generated in project folder'.format(green,reset))
sys.stdout.flush