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

25
dbg_issues.py Normal file
View File

@@ -0,0 +1,25 @@
"""Debug: what does search/issues actually return for a key-prefix dork?"""
import json
import requests
TOKENS = [l.strip() for l in open('gh_tokens.txt', encoding='utf-8') if l.strip().startswith('ghp_')][:5]
r = requests.get(
"https://api.github.com/search/issues",
params={"q": "sk-ant-api03-", "per_page": 5, "sort": "updated", "order": "desc"},
headers={"Authorization": f"Bearer {TOKENS[0]}",
"Accept": "application/vnd.github.text-match+json",
"User-Agent": "keyfarm"},
timeout=30)
print("HTTP", r.status_code)
data = r.json()
print("total_count:", data.get("total_count"))
for it in data.get("items", [])[:3]:
print("---", it.get("html_url", "?")[:70])
print(" title:", (it.get("title") or "")[:60])
body = it.get("body") or ""
print(" body[:200]:", body[:200].replace("\n", " "))
tm = it.get("text_matches", [])
print(" text_matches:", len(tm))
for t in tm[:2]:
print(" frag:", (t.get("fragment") or "")[:120].replace("\n", " "))