-
Notifications
You must be signed in to change notification settings - Fork 63
/
main.py
48 lines (35 loc) · 1019 Bytes
/
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
import queue
import threading
import sys
from sqliscanner import sqliScannerClass
from waybackmachine import waybackMachineClass
class sqliWaybackClass():
def __init__(self):
self.urls = []
self.q = queue.Queue()
def getWaybackUrls(self,domain):
self.urls = []
wbm = waybackMachineClass(domain)
waybackJson = wbm.getUrls()
for row in waybackJson:
self.urls.append(row[0])
def checkSqli(self,url):
ss = sqliScannerClass()
ss.createSqliUrl(url)
def worker(self):
while 1:
url = self.q.get()
self.checkSqli(url)
self.q.task_done()
def run(self,domain):
self.getWaybackUrls(domain)
#Spin up workers
for i in range(50):
t = threading.Thread(target=self.worker)
t.daemon = True
t.start()
for url in self.urls:
self.q.put(url)
self.q.join()
sw = sqliWaybackClass()
sw.run(sys.argv[1])