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"(.*?)", 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))