-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathburp-ss-split-multithread.py
51 lines (41 loc) · 1.22 KB
/
burp-ss-split-multithread.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
import os
from pprint import pprint as pp
import shutil
from PIL import Image
import pytesseract as pyt
from threading import Thread
from queue import Queue
from subprocess import check_output
listfiles = os.listdir('EXP')
def identified(filename):
text = pyt.image_to_string(filename)
if('Host' in text or 'Accept' in text or 'POST /' in text or 'GET /' in text or 'Agent ' in text or '/json ' in text):
return True
else:
return False
try:
os.mkdir("BURP")
os.mkdir("NONBURP")
except:
pass
passwords = Queue()
for filename in listfiles:
passwords.put(filename)
def worker(filename):
while not passwords.empty():
filename = passwords.get()
if(identified('EXP/'+filename) == True):
shutil.copyfile('EXP/'+filename, 'BURP/'+filename)
print(passwords.qsize(), filename, ' ', 'BURP')
else:
shutil.copyfile('EXP/'+filename, 'NONBURP/'+filename)
print(passwords.qsize(), filename, ' ', 'Non BURP')
threads = []
# threads 32
for i in range(1, 32):
thread = Thread(target=worker, args=(i, ), daemon=True)
thread.start()
threads.append(thread)
# wait all thread to completed
for thread in threads:
thread.join()