-
Notifications
You must be signed in to change notification settings - Fork 2
/
jqueryv2.py
71 lines (66 loc) · 2.89 KB
/
jqueryv2.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
### 0xSHALL
### Recoded By HaxorWorld
### SeoBarBar
### Usage: python file.py list.txt
import requests
import sys
from multiprocessing.dummy import Pool
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
listSite = sys.argv[1]
op = [i.strip() for i in open(listSite, "r").readlines()]
# ANSI escape sequences for colors
class colors:
CYAN = '\033[96m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
def check(site):
try:
r = requests.get(site + "/upload/server/php/", verify=False, timeout=10)
ff = open("vuln.txt", "a+")
if '{"files":[{"name":"' in r.text:
print(colors.GREEN + site + "/upload/server/php/ -> Vuln" + colors.ENDC)
ff.write(site + "/upload/server/php/\n")
else:
c = requests.get(site + "/admin/server/php/", verify=False, timeout=10)
if '{"files":[{"name":"' in c.text:
print(colors.GREEN + site + "/admin/server/php/ -> Vuln" + colors.ENDC)
ff.write(site + "/admin/server/php/\n")
else:
b = requests.get(site + "/fileupload/server/php/", verify=False, timeout=10)
if '{"files":[{"name":"' in b.text:
print(colors.GREEN + site + "/fileupload/server/php/ -> Vuln" + colors.ENDC)
ff.write(site + "/fileupload/server/php/\n")
else:
k = requests.get(site + "/server/php/", verify=False, timeout=10)
if '{"files":[{"name":"' in k.text:
print(colors.GREEN + site + "/server/php/ -> Vuln" + colors.ENDC)
ff.write(site + "/server/php/\n")
else:
rx = requests.get(site + "/admin/tools/assets/jquery-file-upload/server/php/", verify=False, timeout=10)
ff = open("vuln.txt", "a+")
if '{"files":[{"name":"' in rx.text:
print(colors.GREEN + site + "/admin/tools/assets/jquery-file-upload/server/php/ -> Vuln" + colors.ENDC)
ff.write(site + "/admin/tools/assets/jquery-file-upload/server/php/\n")
else:
fx = requests.get(site + "/assets/jquery-file-upload/server/php/", verify=False, timeout=10)
ff = open("vuln.txt", "a+")
if '{"files":[{"name":"' in fx.text:
print(colors.GREEN + site + "/assets/jquery-file-upload/server/php/ -> Vuln" + colors.ENDC)
ff.write(site + "/assets/jquery-file-upload/server/php/\n")
else:
z = requests.get(site + "/assets/plugins/jquery-file-upload/server/php/", verify=False, timeout=10)
ff = open("vuln.txt", "a+")
if '{"files":[{"name":"' in z.text:
print(colors.GREEN + site + "/assets/plugins/jquery-file-upload/server/php/ -> Vuln" + colors.ENDC)
ff.write(site + "/assets/plugins/jquery-file-upload/server/php/\n")
else:
print(colors.YELLOW + site + " -> Not Vuln" + colors.ENDC)
except:
print(colors.RED + site + " -> Unknow Error" + colors.ENDC)
tod = Pool(200)
tod.map(check, op)
tod.close()
tod.join()