Exploit databaseDownload repository ZIP
GH-dfa40e11caf2513b79c56b046217b6ce
thatonesecguy/wordpress-vulnerability-identification-scripts
Sources for CVE-2023-32243
7 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files4
thatonesecguy/wordpress-vulnerability-identification-scriptsRevision afb8ad338a95
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
wp_spoofing_vuln_identifier.py
Python · 2,263 bytesimport concurrent.futures
import requests
import re
def check_wordpress(domain):
url = f"http://{domain}"
try:
response = requests.get(url)
if "wp-content" in response.text:
version = extract_version(response.text)
if is_valid_version(version):
return domain, version
return None
except requests.exceptions.RequestException:
return None
def extract_version(html):
pattern = r"Version (\d+\.\d+\.\d+)"
match = re.search(pattern, html)
if match:
return match.group(1)
return None
def is_valid_version(version):
if version:
major, minor, patch = version.split(".")
major = int(major)
minor = int(minor)
patch = int(patch)
if (major == 6 and minor >= 0 and minor <= 4) or (major == 5 and minor >= 9 and minor <= 9):
return True
return False
file_path = "domains.txt" # Replace with the path to your domain names file
with open(file_path, "r") as file:
domains = file.read().splitlines()
wordpress_domains = []
total_domains = len(domains)
processed_domains = 0
with concurrent.futures.ThreadPoolExecutor() as executor:
print("Checking domains for WordPress applications within the specified versions...")
# Submit the domain checks to the executor
future_to_domain = {executor.submit(check_wordpress, domain): domain for domain in domains}
# Process the completed futures
for future in concurrent.futures.as_completed(future_to_domain):
result = future.result()
processed_domains += 1
if result is not None:
domain, version = result
wordpress_domains.append((domain, version))
print(f"Domain {processed_domains}/{total_domains} ({processed_domains / total_domains * 100:.2f}%) processed - WordPress {version} found.")
else:
print(f"Domain {processed_domains}/{total_domains} ({processed_domains / total_domains * 100:.2f}%) processed - Not a WordPress application.")
print("\nWordPress domains within the specified versions:")
for domain, version in wordpress_domains:
print(f"Domain: {domain} - WordPress {version}")