-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathmain.py
44 lines (33 loc) · 1.13 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
# Date: 01/02/2019
# Author: Mohamed
# Description: SQL Vulnerability Scanner
from lib.sql import SQL
from lib.display import Display
from argparse import ArgumentParser
class Engine(object):
def __init__(self, dork, write_over):
self.dork = dork
self.display = Display()
self.sql = SQL(dork, write_over)
def start(self):
self.display.banner()
self.display.primary('Dork: ' + self.dork)
try:
self.sql.start()
except KeyboardInterrupt:
pass
finally:
self.stop()
def stop(self):
if self.sql:
self.sql.stop()
else:
self.display.shutdown()
def args():
args = ArgumentParser()
args.add_argument('-d', '--dork', required=True, help='dork to search example: product.php?id=')
args.add_argument('-w', '--write-over', dest='writeover', default=False, action='store_true', help='write over the existing log file')
return args.parse_args()
if __name__ == '__main__':
arugments = args()
Engine(arugments.dork, arugments.writeover).start()