KeyHunter parser v10 + 18 scanners + tests (synthetic fixtures only, no keys/db/tokens)

This commit is contained in:
2026-10-20 07:50:07 +00:00
commit a5008d837b
178 changed files with 36909 additions and 0 deletions

21
dbg_cb.py Normal file
View File

@@ -0,0 +1,21 @@
import requests, time
from requests.adapters import HTTPAdapter, Retry
s = requests.Session()
s.headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/128"
s.mount("https://", HTTPAdapter(max_retries=Retry(total=3, backoff_factor=1,
status_forcelist=[429, 500, 502, 503])))
fn = "felixonmars/dnsmasq-china-list"
for attempt, (url, params) in enumerate([
(f"https://codeberg.org/api/v1/repos/{fn}/raw/README.md", {"ref": "master"}),
(f"https://codeberg.org/api/v1/repos/{fn}/contents/README.md", {"ref": "master"}),
]):
try:
r = s.get(url, params=params, timeout=25)
print(url.split("/v1/")[-1], "->", r.status_code, len(r.content))
if r.status_code == 200:
print(r.text[:150])
except Exception as e:
print(url.split("/v1/")[-1], "-> ERR", str(e)[:100])
time.sleep(2)