abuse: полный пересчёт индекса только по явному вызову (env не тормозит scan)
Some checks failed
ci / test (3.10) (push) Has been cancelled
ci / test (3.11) (push) Has been cancelled
ci / test (3.12) (push) Has been cancelled

This commit is contained in:
Vlad Gothbreach
2026-10-27 01:21:01 +03:00
parent d0b2187319
commit 42a864419b
12 changed files with 1844 additions and 983 deletions

33
.local/diag2.py Normal file
View File

@@ -0,0 +1,33 @@
import sys, json, re
sys.path.insert(0, '.')
from concurrent.futures import ThreadPoolExecutor
from omni import net, feeds
from omni.sources import Source
TG = ["thehackernews", "true_secator", "cybersecuritynews", "ransomwatch", "ransomware_news", "leakbase",
"CVEnew", "cvefeed", "hackernews", "cyberdefensemagazine", "securityweek", "therecord",
"ciscotalos", "unit42", "projectzero", "huntress", "sentinelone", "recordedfuture",
"threatmon", "kalilinux", "darkwebinformer", "darkwebinformer_ru", "breachdetector",
"databreach", "ruhack", "expl0it", "infosec_ru", "securitylab_ru", "itsecforu_ru",
"xakep", "XakepRU", "bo0om_ru", "mycopypaste", "cnews_ru", "bdu_fstec", "kaspersky",
"kaspersky_ru", "talos", "smd_ru", "kernelmode", "hitech_crime", "codeby"]
def tg_one(h, url):
try:
r = net.get(url, timeout=25)
t = r.text or ""
title = re.search(r"<title>(.*?)</title>", t, re.S)
src = Source(name="probe_" + h, category="security", kind="html", url=url, adapter="tg_web",
tags=("tg", "leak"), limit=5)
items = feeds.fetch(src, 5)
return {"h": h, "st": r.status, "n": len(t), "msg": t.count("tgme_widget_message_wrap"),
"items": len(items), "title": (title.group(1).strip()[:60] if title else ""),
"first": (items[0].title[:70] if items else "")}
except Exception as e:
return {"h": h, "st": 0, "err": str(e)[:80]}
with ThreadPoolExecutor(6) as ex:
for r in ex.map(lambda h: tg_one(h, "https://t.me/s/" + h), TG):
print(json.dumps(r, ensure_ascii=False))