abuse: классификатор ловит панели/github/hn и мульти-теги, реальный total из индекса, кап API поднят до 3000
This commit is contained in:
79
.local/diag8.py
Normal file
79
.local/diag8.py
Normal file
@@ -0,0 +1,79 @@
|
||||
import sys, json, re
|
||||
sys.path.insert(0, '.')
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from omni import feeds, net
|
||||
from omni.sources import Source
|
||||
|
||||
RSS = [
|
||||
("itsecurityguru", "https://www.itsecurityguru.co.uk/feed/"),
|
||||
("securityledger", "https://securityledger.com/feed/"),
|
||||
("zdnet_security", "https://www.zdnet.com/topic/security/rss.xml"),
|
||||
("grahamcluley", "https://www.grahamcluley.com/feed/"),
|
||||
("cyberdefensemagazine", "https://www.cyberdefensemagazine.com/feed/"),
|
||||
("hackersonlineclub", "https://www.hackersonlineclub.com/feed"),
|
||||
("netspi", "https://www.netspi.com/feed/"),
|
||||
("hackingarticles", "https://www.hackingarticles.in/feed/"),
|
||||
("ired_team", "https://www.ired.team/feed.xml"),
|
||||
("pentestpartners", "https://www.pentestpartners.com/feed/"),
|
||||
("trustedsec", "https://www.trustedsec.com/feed/"),
|
||||
("specterops", "https://posts.specterops.io/feed"),
|
||||
("secjuice", "https://www.secjuice.com/feed/"),
|
||||
("varonis_blog", "https://www.varonis.com/blog/feed"),
|
||||
("netenrich", "https://netenrich.com/feed/"),
|
||||
("opennet_ru", "https://opennet.ru/rss.xml"),
|
||||
("linuxorg_ru", "https://www.linux.org.ru/feed.jsp"),
|
||||
("zd3news_security", "https://3dnews.ru/security/rss"),
|
||||
("securelist_ru", "https://securelist.ru/feed/"),
|
||||
("hackware_ru", "https://hackware.ru/feed/"),
|
||||
("cyberint_blog", "https://cyberint.com/blog/feed/"),
|
||||
("gbhackers_rss", "https://gbhackers.com/rss/"),
|
||||
("cybersecnews_rss", "https://cybersecuritynews.com/rss/"),
|
||||
("chaitin_blog", "https://www.chaitin.cn/zh/blog/feed"),
|
||||
("riskivy_blog", "https://blog.riskivy.com/feed"),
|
||||
("qianxin_news", "https://www.qianxin.com/news/rss"),
|
||||
("secwiki_news", "https://www.sec-wiki.com/news/rss"),
|
||||
("bleeping_ransomware", "https://www.bleepingcomputer.com/tag/ransomware/feed/"),
|
||||
("hackread_cybercrime", "https://hackread.com/category/cyber-crime/feed/"),
|
||||
("thecyberwire", "https://thecyberwire.com/feeds/rss.xml"),
|
||||
("riskybiz", "https://risky.biz/feeds/risky-business-news/"),
|
||||
]
|
||||
|
||||
TG = ["ITSecForU", "CyberSecurityNews", "securitylab", "xakepnews", "exploitdb", "hacktips",
|
||||
"pentesttools", "sysadmin_ru", "ai_papay", "gonzo_ai", "llm_ru", "malwareunpacked",
|
||||
"databreachnews", "cve2026", "hackersnewsru", "kasperskyclub", "SecNewsRu", "websec",
|
||||
"cyber_ru", "hackernews_ru", "redos", "anti_malware", "Antimalware", "sec_news"]
|
||||
|
||||
|
||||
def rss(url):
|
||||
ad = "rss"
|
||||
src = Source(name="p", category="security", kind="rss", url=url, adapter=ad, tags=(), limit=5)
|
||||
r = net.get(url, timeout=25)
|
||||
items = feeds.fetch(src, 5)
|
||||
return {"u": url, "st": r.status, "n": len(items), "first": (items[0].title[:60] if items else "")}
|
||||
|
||||
|
||||
def tg(h):
|
||||
url = "https://t.me/s/" + h
|
||||
r = net.get(url, timeout=25)
|
||||
t = r.text or ""
|
||||
if t.count("tgme_widget_message_wrap") < 3:
|
||||
return {"u": url, "n": 0, "why": "no preview"}
|
||||
src = Source(name="p", category="security", kind="html", url=url, adapter="tg_web", tags=("tg",), limit=5)
|
||||
items = feeds.fetch(src, 5)
|
||||
return {"u": url, "n": len(items), "first": (items[0].title[:60] if items else "")}
|
||||
|
||||
|
||||
jobs = [("rss", u) for _, u in RSS] + [("tg", h) for h in TG]
|
||||
|
||||
|
||||
def run(j):
|
||||
kind, x = j
|
||||
try:
|
||||
return tg(x) if kind == "tg" else rss(x)
|
||||
except Exception as e:
|
||||
return {"u": x, "n": 0, "err": str(e)[:70]}
|
||||
|
||||
|
||||
with ThreadPoolExecutor(6) as ex:
|
||||
for r in ex.map(run, jobs):
|
||||
print(json.dumps(r, ensure_ascii=False))
|
||||
Reference in New Issue
Block a user