添加日志系统

This commit is contained in:
MasonLiu 2024-12-08 00:18:31 +08:00
parent 4d9cd77157
commit 39e5ca3924
31 changed files with 1371 additions and 1286 deletions

72
Core.py
View File

@ -21,6 +21,23 @@ from GotoSend_xianzhi import Src_xianzhi
from GotoSend_freebuf import Src_freebuf from GotoSend_freebuf import Src_freebuf
from GotoSend_qianxin import Src_qianxin from GotoSend_qianxin import Src_qianxin
from GotoSend_seebug import Src_seebug from GotoSend_seebug import Src_seebug
import logging
# 设置日志记录
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.handlers.clear() # 清除已有的处理器
file_handler = logging.FileHandler('./log/spider.log', mode='a', encoding='utf-8')
file_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
logger.addHandler(file_handler)
logger.addHandler(console_handler)
logger.propagate = False # 禁用日志传递
# 加载参数 # 加载参数
with open('./config.yaml', 'r', encoding="utf-8") as file: with open('./config.yaml', 'r', encoding="utf-8") as file:
@ -32,7 +49,13 @@ webhook_url_once, timestamp_once, sign_once = gen_sign()
def send_job(time_1): def send_job(time_1):
# 爬取数据 # 爬取数据
print("正在启动各爬虫并获取资源中...") print("正在启动各爬虫并获取资源中...")
run() seebug_main()
M_4hou_main()
anquanke_main()
# sec_wiki_main()
huawei_main()
doonsec_main()
qianxin_main()
freebuf_main() freebuf_main()
xianzhi_main() xianzhi_main()
@ -51,83 +74,83 @@ def send_job(time_1):
# 发送嘶吼资讯 # 发送嘶吼资讯
if reslt_4hou: if reslt_4hou:
print("-" * 40) print("-" * 40)
print("嘶吼资讯递送中:") logger.info("嘶吼资讯递送中:")
SendToFeishu(reslt_4hou, "嘶吼资讯递送", webhook_url, timestamp, sign) SendToFeishu(reslt_4hou, "嘶吼资讯递送", webhook_url, timestamp, sign)
print("-" * 40 + "\n") print("-" * 40 + "\n")
time.sleep(60) time.sleep(60)
else: else:
print("-" * 40) print("-" * 40)
print("嘶吼数据为空,跳过执行。") logger.info("嘶吼数据为空,跳过执行。")
# 发送安全客资讯 # 发送安全客资讯
if reslt_anquanke: if reslt_anquanke:
print("-" * 40) print("-" * 40)
print("安全客资讯递送中:") logger.info("安全客资讯递送中:")
SendToFeishu(reslt_anquanke, "安全客资讯递送", webhook_url, timestamp, sign) SendToFeishu(reslt_anquanke, "安全客资讯递送", webhook_url, timestamp, sign)
print("-" * 40 + "\n") print("-" * 40 + "\n")
time.sleep(60) time.sleep(60)
else: else:
print("-" * 40) print("-" * 40)
print("安全客数据为空,跳过执行。") logger.info("安全客数据为空,跳过执行。")
# 发送洞见微信安全资讯 # 发送洞见微信安全资讯
if reslt_doonsec: if reslt_doonsec:
print("-" * 40) print("-" * 40)
print("洞见微信安全资讯递送中:") logger.info("洞见微信安全资讯递送中:")
SendToFeishu(reslt_doonsec, "洞见微信安全资讯递送", webhook_url, timestamp, sign) SendToFeishu(reslt_doonsec, "洞见微信安全资讯递送", webhook_url, timestamp, sign)
print("-" * 40 + "\n") print("-" * 40 + "\n")
time.sleep(60) time.sleep(60)
else: else:
print("-" * 40) print("-" * 40)
print("洞见微信安全数据为空,跳过执行。") logger.info("洞见微信安全数据为空,跳过执行。")
# 发送先知社区资讯 # 发送先知社区资讯
if reslt_xianzhi: if reslt_xianzhi:
print("-" * 40) print("-" * 40)
print("先知社区资讯递送中:") logger.info("先知社区资讯递送中:")
SendToFeishu(reslt_xianzhi, "先知社区资讯递送", webhook_url, timestamp, sign) SendToFeishu(reslt_xianzhi, "先知社区资讯递送", webhook_url, timestamp, sign)
print("-" * 40 + "\n") print("-" * 40 + "\n")
time.sleep(60) time.sleep(60)
else: else:
print("-" * 40) print("-" * 40)
print("先知社区数据为空,跳过执行。") logger.info("先知社区数据为空,跳过执行。")
# 发送FreeBuf资讯 # 发送FreeBuf资讯
if reslt_freebuf: if reslt_freebuf:
print("-" * 40) print("-" * 40)
print("FreeBuf资讯递送中") logger.info("FreeBuf资讯递送中")
SendToFeishu(reslt_freebuf, "FreeBuf资讯递送", webhook_url, timestamp, sign) SendToFeishu(reslt_freebuf, "FreeBuf资讯递送", webhook_url, timestamp, sign)
print("-" * 40 + "\n") print("-" * 40 + "\n")
time.sleep(60) time.sleep(60)
else: else:
print("-" * 40) print("-" * 40)
print("FreeBuf数据为空跳过执行。") logger.info("FreeBuf数据为空跳过执行。")
# 发送奇安信攻防社区资讯 # 发送奇安信攻防社区资讯
if reslt_qianxin: if reslt_qianxin:
print("-" * 40) print("-" * 40)
print("奇安信攻防社区资讯递送中:") logger.info("奇安信攻防社区资讯递送中:")
SendToFeishu(reslt_qianxin, "奇安信攻防社区资讯递送", webhook_url, timestamp, sign) SendToFeishu(reslt_qianxin, "奇安信攻防社区资讯递送", webhook_url, timestamp, sign)
print("-" * 40 + "\n") print("-" * 40 + "\n")
time.sleep(60) time.sleep(60)
else: else:
print("-" * 40) print("-" * 40)
print("奇安信攻防社区数据为空,跳过执行。") logger.info("奇安信攻防社区数据为空,跳过执行。")
# 发送Seebug资讯 # 发送Seebug资讯
if reslt_seebug: if reslt_seebug:
reslt_seebug = Src_seebug(1000) reslt_seebug = Src_seebug(1000)
webhook_url, timestamp, sign = gen_sign() webhook_url, timestamp, sign = gen_sign()
print("-" * 40) print("-" * 40)
print("Seebug社区资讯递送中") logger.info("Seebug社区资讯递送中")
SendToFeishu(reslt_seebug, "Seebug社区资讯递送", webhook_url, timestamp, sign) SendToFeishu(reslt_seebug, "Seebug社区资讯递送", webhook_url, timestamp, sign)
print("-" * 40 + "\n") print("-" * 40 + "\n")
else: else:
print("-" * 40) print("-" * 40)
print("Seebug社区数据为空跳过执行。") logger.info("Seebug社区数据为空跳过执行。")
def signal_handler(sig, frame): def signal_handler(sig, frame):
print("接收到退出信号,程序即将退出...") logger.info("接收到退出信号,程序即将退出...")
sys.exit(0) sys.exit(0)
@ -140,14 +163,14 @@ def main_loop():
while True: while True:
try: try:
# 执行任务 # 执行任务
print(f"{n}次执行,当前时间为:{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") logger.info(f"{n}次执行,当前时间为:{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
send_job(e_hour) send_job(e_hour)
print("执行完毕,等待下一次执行...") logger.info("执行完毕,等待下一次执行...")
n += 1 n += 1
time.sleep(e_hour * 60 * 60 - 5 * 60) time.sleep(e_hour * 60 * 60 - 5 * 60)
except Exception as e: except Exception as e:
print(f"发生错误: {e}, 程序已暂停") logger.error(f"发生错误: {e}, 程序已暂停")
# SendToFeishu(f"发生错误: {e}, 程序已退出", "报错信息") # SendToFeishu(f"发生错误: {e}, 程序已退出", "报错信息")
exit() exit()
@ -193,13 +216,18 @@ if __name__ == "__main__":
start_info += "程序已启动,当前时间为:" + datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n" start_info += "程序已启动,当前时间为:" + datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n"
start_info += "程序作者MasonLiu \t 开源地址:[GM-gitea](https://git.masonliu.com/MasonLiu/PyBot)" + "\n" start_info += "程序作者MasonLiu \t 开源地址:[GM-gitea](https://git.masonliu.com/MasonLiu/PyBot)" + "\n"
start_info += "时间配置:每隔" + str(e_hour) + "小时执行一次推送\n" start_info += "时间配置:每隔" + str(e_hour) + "小时执行一次推送\n"
SendToFeishu(start_info, "程序信息", webhook_url_once, timestamp_once, sign_once) result = SendToFeishu(start_info, "程序信息", webhook_url_once, timestamp_once, sign_once)
logger.info(result)
print("-" * 40)
# print(start_info) # print(start_info)
SendToFeishu(rss_info, "RSS源状态", webhook_url_once, timestamp_once, sign_once) result = SendToFeishu(rss_info, "RSS源状态", webhook_url_once, timestamp_once, sign_once)
logger.info(rss_info)
logger.info(result)
print("-" * 40)
# print(rss_info) # print(rss_info)
# 首次运行先暂停两分钟 # 首次运行先暂停两分钟
time.sleep(2 * 60) # time.sleep(2 * 60)
# 主程序 # 主程序
main_loop() main_loop()

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,140 @@
[ [
{
"guid": "https://www.anquanke.com/post/id/302508",
"title": "开放银行中的 API 安全:平衡创新与风险管理",
"author": " 安全客",
"description": null,
"source": "hackread",
"pubDate": "2024-12-06 16:51:03"
},
{
"guid": "https://www.anquanke.com/post/id/302505",
"title": "非洲执法部门抓获1000多名网络犯罪嫌疑人",
"author": " 安全客",
"description": null,
"source": "darkreading",
"pubDate": "2024-12-06 16:50:19"
},
{
"guid": "https://www.anquanke.com/post/id/302502",
"title": "NCA的破坏行动瓦解全球洗钱网络",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-06 16:49:32"
},
{
"guid": "https://www.anquanke.com/post/id/302499",
"title": "FBI 警告犯罪分子利用生成式人工智能进行欺诈活动",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-06 16:48:36"
},
{
"guid": "https://www.anquanke.com/post/id/302465",
"title": "印度尼西亚富士电机遭受勒索软件攻击: 业务合作伙伴数据可能泄露",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-06 15:41:27"
},
{
"guid": "https://www.anquanke.com/post/id/302496",
"title": "Lorex 2K安全摄像头的五个缺陷使黑客能够完全控制警告发布",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-06 15:17:22"
},
{
"guid": "https://www.anquanke.com/post/id/302459",
"title": "Veeam 备份与复制漏洞曝光: 高严重性漏洞使数据面临风险",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-06 15:16:35"
},
{
"guid": "https://www.anquanke.com/post/id/302511",
"title": "360数字安全集团携手上海东海职业技术学院共育实战型网络安全人才队伍",
"author": " 安全客",
"description": null,
"source": "微信",
"pubDate": "2024-12-06 15:16:11"
},
{
"guid": "https://www.anquanke.com/post/id/302493",
"title": "网络钓鱼狂潮Cloudflare 域在最新攻击中被利用",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-05 16:14:12"
},
{
"guid": "https://www.anquanke.com/post/id/302490",
"title": "可用的漏洞利用代码:在 WhatsUp Gold 中发现严重缺陷 - CVE-2024-8785 CVSS 9.8",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-05 16:06:53"
},
{
"guid": "https://www.anquanke.com/post/id/302485",
"title": "最高级360获评NVDB通用网络产品安全漏洞专业库“三星级技术支撑单位”称号",
"author": " 安全客",
"description": null,
"source": "微信",
"pubDate": "2024-12-05 15:51:37"
},
{
"guid": "https://www.anquanke.com/post/id/302482",
"title": "Crypto.com 与 HackerOne 一起推出 200 万美元的漏洞赏金计划",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-05 15:44:08"
},
{
"guid": "https://www.anquanke.com/post/id/302479",
"title": "FSB 黑客攻破巴基斯坦的 APT 风暴-0156",
"author": " 安全客",
"description": null,
"source": "darkreading",
"pubDate": "2024-12-05 15:31:48"
},
{
"guid": "https://www.anquanke.com/post/id/302476",
"title": "Veeam 解决了关键的服务提供商控制台 VSPC 错误",
"author": " 安全客",
"description": null,
"source": "securityaffairs",
"pubDate": "2024-12-05 15:20:49"
},
{
"guid": "https://www.anquanke.com/post/id/302473",
"title": "软件供应链攻击导致 Solana 的 web3.js 库在 npm 注册表上出现恶意版本",
"author": " 安全客",
"description": null,
"source": "helpnetsecurity",
"pubDate": "2024-12-05 15:11:15"
},
{
"guid": "https://www.anquanke.com/post/id/302468",
"title": "CVE-2024-51378 CVSS 10CISA 警告称,严重 Cyber Panel 缺陷受到主动攻击",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-05 15:03:45"
},
{
"guid": "https://www.anquanke.com/post/id/302462",
"title": "CVE-2024-10905 (CVSS 10) SailPoint IdentityIQ 中的严重漏洞会暴露敏感数据",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-05 14:37:48"
},
{ {
"guid": "https://www.anquanke.com/post/id/302456", "guid": "https://www.anquanke.com/post/id/302456",
"title": "当心 Celestial Stealer新的 MaaS 针对浏览器和加密钱包", "title": "当心 Celestial Stealer新的 MaaS 针对浏览器和加密钱包",
@ -22,141 +158,5 @@
"description": null, "description": null,
"source": "securityonline", "source": "securityonline",
"pubDate": "2024-12-05 11:02:51" "pubDate": "2024-12-05 11:02:51"
},
{
"guid": "https://www.anquanke.com/post/id/302432",
"title": "AI全新赋能360开启终端All in One 5.0时代",
"author": " 安全客",
"description": null,
"source": "微信",
"pubDate": "2024-12-04 14:44:35"
},
{
"guid": "https://www.anquanke.com/post/id/302429",
"title": "日本加密服务因价值3.08亿美元的比特币被盗而关闭",
"author": " 安全客",
"description": null,
"source": "therecord",
"pubDate": "2024-12-04 14:36:18"
},
{
"guid": "https://www.anquanke.com/post/id/302426",
"title": "能源行业承包商称勒索软件攻击限制了对 IT 系统的访问",
"author": " 安全客",
"description": null,
"source": "therecord",
"pubDate": "2024-12-04 14:31:13"
},
{
"guid": "https://www.anquanke.com/post/id/302423",
"title": "韩国撤销戒严令,加密货币市场回暖",
"author": " 安全客",
"description": null,
"source": "Cointelegraph.com News",
"pubDate": "2024-12-04 14:25:11"
},
{
"guid": "https://www.anquanke.com/post/id/302420",
"title": "法国移动运营商联手应对日益猖獗的欺诈行为",
"author": " 安全客",
"description": null,
"source": "infosecurity",
"pubDate": "2024-12-04 11:31:24"
},
{
"guid": "https://www.anquanke.com/post/id/302417",
"title": "ASA漏洞CVE-2014-2120正在被恶意利用",
"author": " 安全客",
"description": null,
"source": "securityaffairs",
"pubDate": "2024-12-04 11:24:59"
},
{
"guid": "https://www.anquanke.com/post/id/302414",
"title": "Play Store上发现15款针对数百万人的SpyLoan应用程序",
"author": " 安全客",
"description": null,
"source": "hackread",
"pubDate": "2024-12-04 11:19:55"
},
{
"guid": "https://www.anquanke.com/post/id/302411",
"title": "保护您的网络: Zyxel 发布固件更新",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-04 11:02:26"
},
{
"guid": "https://www.anquanke.com/post/id/302407",
"title": "谷歌浏览器解决 V8 JavaScript 引擎中的高严重性漏洞 (CVE-2024-12053)",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-04 10:47:00"
},
{
"guid": "https://www.anquanke.com/post/id/302404",
"title": "威胁行为者利用Gafgyt恶意软件利用配置错误的Docker远程API服务器进行攻击",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-04 10:37:57"
},
{
"guid": "https://www.anquanke.com/post/id/302397",
"title": "CVE-2024-48651ProFTPD 漏洞为攻击者提供 Root 访问权限",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-03 15:23:53"
},
{
"guid": "https://www.anquanke.com/post/id/302394",
"title": "针对 Windows 任务计划程序缺陷 CVE-2024-49039 发布的零日漏洞利用代码,该漏洞已被 RomCom Group 积极利用",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-03 15:16:41"
},
{
"guid": "https://www.anquanke.com/post/id/302390",
"title": "领跑中国市场360安全大模型获权威机构安全运营实测认证",
"author": " 安全客",
"description": null,
"source": "微信",
"pubDate": "2024-12-03 15:01:22"
},
{
"guid": "https://www.anquanke.com/post/id/302387",
"title": "黑客利用 DeFi 漏洞在 2024 年从加密货币中盗取 14.8 亿美元",
"author": " 安全客",
"description": null,
"source": "hackread",
"pubDate": "2024-12-03 14:56:10"
},
{
"guid": "https://www.anquanke.com/post/id/302384",
"title": "施乐、诺基亚、美国银行、摩根士丹利等公司 76 万员工的数据在网上泄露",
"author": " 安全客",
"description": null,
"source": "theregister",
"pubDate": "2024-12-03 14:43:32"
},
{
"guid": "https://www.anquanke.com/post/id/302381",
"title": "Horns & Hooves活动利用NetSupport和BurnsRAT进行广泛妥协",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-03 14:31:35"
},
{
"guid": "https://www.anquanke.com/post/id/302378",
"title": "从美国到阿联酋: APT35 扩大网络间谍活动范围",
"author": " 安全客",
"description": null,
"source": "securityonline",
"pubDate": "2024-12-03 11:35:47"
} }
] ]

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,92 @@
[ [
{
"title": "关键的联发科芯片组漏洞影响15亿手机用户",
"link": "https://www.freebuf.com/news/417104.html",
"description": "联发科已经承认了这些安全漏洞,并强烈敦促相关组织立即更新受影响的系统以防范潜在风险。",
"body": "<p>联发科MediaTek是全球领先的Android平板电脑和智能手机芯片供应商同时也是全球第二大智能手机芯片制造商拥有超过15亿活跃的Android设备。该公司以其集成的先进5G、人工智能、成像、连接和游戏技术而闻名致力于提供高性能解决方案以增强全球范围内各种设备的用户体验。</p><p><img src=\"https://image.3001.net/images/2024120",
"category": "资讯",
"pubDate": "Fri, 06 Dec 2024 19:01:01 +0800"
},
{
"title": "FreeBuf周报 | AWS密钥泄露即可被利用新型钓鱼工具包能让“菜鸟”轻松发动攻击",
"link": "https://www.freebuf.com/news/417080.html",
"description": "总结推荐本周的热点资讯、安全事件、一周好文和省心工具,保证大家不错过本周的每一个重点!",
"body": "<p>各位 Buffer 周末好以下是本周「FreeBuf周报」我们总结推荐了本周的热点资讯、安全事件、一周好文和省心工具保证大家不错过本周的每一个重点<img src=\"https://image.3001.net/images/20220923/1663923572_632d7574ead5a97f52086.jpg!small\" alt=\"\" /></p><h2 id=\"h2-1\">",
"category": "资讯",
"pubDate": "Fri, 06 Dec 2024 15:44:07 +0800"
},
{
"title": "最强大的Android间谍软件曝光可提取信息、密码和执行shell命令",
"link": "https://www.freebuf.com/news/417070.html",
"description": "Monokle 间谍软件功能十分完善,曾号称是最强的间谍软件之一。",
"body": "<blockquote><p>最近在俄罗斯联邦安全局FSB查获的手机上发现了一种新的Android间谍软件这突显了用户隐私和安全持续面临的风险特别是当设备被当局没收然后归还时。</p></blockquote><p><img src=\"https://image.3001.net/images/20241206/1733469855_6752a69fbc368b86c7c1f.png!sm",
"category": "资讯",
"pubDate": "Fri, 06 Dec 2024 15:22:13 +0800"
},
{
"title": "混淆还原的几种方式实践",
"link": "https://www.freebuf.com/articles/mobile/417063.html",
"description": "下面都是使用goron的混淆进行符号执行以及模拟执行处理的结果",
"body": "<p><code></code>下面都是使用goron的混淆进行符号执行以及模拟执行处理的结果</p><h1>一、控制流平坦化</h1><p>还原前<br /><img src=\"https://image.3001.net/images/20241206/1733466950_67529b46739bd7254126d.png!small\" alt=\"image\" /></p><p>还原后<br",
"category": "移动安全",
"pubDate": "Fri, 06 Dec 2024 14:55:36 +0800"
},
{
"title": "德勤遭勒索攻击被窃取机密数据超1TB",
"link": "https://www.freebuf.com/news/417056.html",
"description": "勒索软件组织 Brain Cipher 近日声称入侵了世界四大会计师事务所之一德勤并从中窃取了1TB的压缩数据。",
"body": "<p>据Cyber Security News消息臭名昭著的勒索软件组织 Brain Cipher 近日声称入侵了世界四大会计师事务所之一德勤并从中窃取了1TB的压缩数据。</p><p><img src=\"https://image.3001.net/images/20241206/1733467139_67529c0348d0bb6d8ab42.png!small\" alt=\"\" width",
"category": "资讯",
"pubDate": "Fri, 06 Dec 2024 14:38:41 +0800"
},
{
"title": "新型安卓系统银行恶意软件能窃取77家金融机构的账户凭证",
"link": "https://www.freebuf.com/news/417038.html",
"description": "名为DroidBot的新型安卓银行恶意软件试图窃取77家加密货币交易所和银行应用程序的凭证涉及英国、意大利、法国、等多个国家。",
"body": "<p>据BleepingComputer消息一种名为“DroidBot”的新型安卓系统银行恶意软件试图窃取77 家加密货币交易所和银行应用程序的凭证,涉及英国、意大利、法国、西班牙、葡萄牙等多个国家。</p><p>据发现恶意软件的 Cleafy 研究人员称DroidBot 自 2024 年 6 月以来一直活跃,并作为恶意软件即服务 MaaS 平台运行每月的使用价格为3000美元。</p>",
"category": "资讯",
"pubDate": "Fri, 06 Dec 2024 13:47:34 +0800"
},
{
"title": "漏洞挖掘与复现",
"link": "https://www.freebuf.com/articles/web/414845.html",
"description": "漏洞复现与挖掘",
"body": "<p>大家好我是一个在IT行业十余年的小菜鸟今天与大家聊一聊漏洞的挖掘与复现。</p><h2 id=\"h2-1\">一 漏洞复现。</h2><h3 id=\"h3-1\">1.NetScaler ADC </h3><p>例如我对CVE-2023-3519漏洞进行了分析该漏洞是Citrix ADC 和 Citrix Gateway 中存在未经身份验证的远程代码执行漏洞。</p><p>由于不同版本会导",
"category": "Web安全",
"pubDate": "Fri, 06 Dec 2024 12:03:12 +0800"
},
{
"title": "freebuf快速同步语雀文章",
"link": "https://www.freebuf.com/sectool/417015.html",
"description": "把时间花在重要的事情上,减少浪费时间在重复动作上",
"body": "<h1>1. 背景</h1><p>日常笔记使用语雀记录文章想要快速同步内容至freebuf寻找已有工具无果遂写了个工具方便快速同步文章。</p><h1>2. 工具</h1><pre><code># coding=gbk\nimport re\nimport requests\nfrom urllib.parse import urlparse, parse_qs\nimport os\nimport ",
"category": "工具",
"pubDate": "Fri, 06 Dec 2024 11:03:02 +0800"
},
{
"title": "I-O Data路由器0Day漏洞被利用无修复补丁",
"link": "https://www.freebuf.com/news/417010.html",
"description": "日本CERT发布公告称黑客正在利用I-O Data路由器设备中的零日漏洞来修改设备设置、执行命令甚至关闭防火墙。",
"body": "<p>日本计算机紧急响应小组CERT警告称 黑客正在利用I-O Data路由器设备中的零日漏洞来修改设备设置、执行命令甚至关闭防火墙。</p><p>I-O Data在其网站上发布的安全公告中承认确实存在三个零日漏洞但目前暂无完整的修复补丁预计将在2024年12月18日发布因此在此之前用户将面临比较严重的风险。<img src=\"https://image.3001.net/image",
"category": "资讯",
"pubDate": "Fri, 06 Dec 2024 10:48:56 +0800"
},
{
"title": "FreeBuf早报 | 数万台卫星接收器预装DDoS攻击工具美国检方起诉 19 岁少年黑客",
"link": "https://www.freebuf.com/news/416954.html",
"description": "真主党对讲机爆炸案后韩国再次曝出大规模“恶意硬件”案件数十万台销往全球市场的卫星接收器中暗藏DDoS攻击工具。",
"body": "<h2 id=\"h2-1\">全球动态</h2><h3 id=\"h3-1\">1. 上海全面开展个人信息保护,对“刷脸支付”等过度索取个人信息行为说“不”</h3><p>12月4日上海市网信办在“亮剑浦江·2024”消费领域个人信息权益保护专项执法行动总结交流会议上发布成效评估报告并透露今年全市范围3704家公共停车场全面落实停车缴费“纯净码”24家重点咖啡企业开展自查整改。 【<a href=",
"category": "资讯",
"pubDate": "Thu, 05 Dec 2024 16:53:55 +0800"
},
{
"title": "知名伏特加品牌因勒索攻击而倒闭",
"link": "https://www.freebuf.com/news/416924.html",
"description": "Stoli集团在美国的子公司因8月份遭受的勒索软件攻击以及俄罗斯当局没收其在俄剩余酿酒厂而不得不申请破产保护。",
"body": "<p>Stoli集团在美国的子公司因8月份遭受的勒索软件攻击以及俄罗斯当局没收其在俄剩余酿酒厂而不得不申请破产保护。<img src=\"https://image.3001.net/images/20241205/1733378175_6751407f6ee8aa40b6bdc.png!small\" alt=\"\" /></p><p>Stoli美国公司及其子公司肯塔基猫头鹰公司的总裁兼全球首席执行",
"category": "资讯",
"pubDate": "Thu, 05 Dec 2024 13:56:42 +0800"
},
{ {
"title": "谷歌浏览器类型混淆漏洞让攻击者能够执行远程代码", "title": "谷歌浏览器类型混淆漏洞让攻击者能够执行远程代码",
"link": "https://www.freebuf.com/news/416908.html", "link": "https://www.freebuf.com/news/416908.html",
@ -7,6 +95,14 @@
"category": "资讯", "category": "资讯",
"pubDate": "Thu, 05 Dec 2024 11:29:27 +0800" "pubDate": "Thu, 05 Dec 2024 11:29:27 +0800"
}, },
{
"title": "利用断开的域管理员RDP会话提权",
"link": "https://www.freebuf.com/vuls/416904.html",
"description": "当域内管理员登录过攻击者可控的域内普通机器运维或者排查结束后退出3389时没有退出账号而是直接关掉了远程桌面那么会产生哪些风险呢",
"body": "<h2 id=\"h2-1\">前言</h2><p>当域内管理员登录过攻击者可控的域内普通机器运维或者排查结束后退出3389时没有退出账号而是直接关掉了远程桌面那么会产生哪些风险呢有些读者第一个想到的肯定就是抓密码但是如果抓不到明文密码又或者无法pth呢</p><h2 id=\"h2-2\">通过计划任务完成域内提权</h2><p>首先模拟域管登录了攻击者可控的普通域内机器并且关掉了3389远程",
"category": "漏洞",
"pubDate": "Thu, 05 Dec 2024 11:10:43 +0800"
},
{ {
"title": "警惕这类黑产,近百万老年机被远程控制,每月莫名扣费……", "title": "警惕这类黑产,近百万老年机被远程控制,每月莫名扣费……",
"link": "https://www.freebuf.com/news/416899.html", "link": "https://www.freebuf.com/news/416899.html",
@ -15,6 +111,38 @@
"category": "资讯", "category": "资讯",
"pubDate": "Thu, 05 Dec 2024 10:46:34 +0800" "pubDate": "Thu, 05 Dec 2024 10:46:34 +0800"
}, },
{
"title": "安全研究年终总结-分享2024年RCE类的CVE漏洞高危EXP集合!",
"link": "https://www.freebuf.com/articles/web/416887.html",
"description": "网络安全漏洞不断变化且威胁日益严重及时了解和修复这些漏洞至关重要。本文介绍的多个CVE漏洞涉及常见的企业级软件和硬件黑客可以利用这些漏洞远程控制系统、窃取敏感数据甚至完全破坏服务。",
"body": "<h2 id=\"h2-1\">缘起</h2><ul><li><p>网络安全漏洞不断变化且威胁日益严重及时了解和修复这些漏洞至关重要。本文介绍的多个CVE漏洞涉及常见的企业级软件和硬件黑客可以利用这些漏洞远程控制系统、窃取敏感数据甚至完全破坏服务。</p></li><li><p>对于企业和开发者来说,了解这些漏洞不仅能帮助保护自己的系统,还能减少数据泄露、经济损失和品牌信誉的风险。因此,深入研究",
"category": "Web安全",
"pubDate": "Thu, 05 Dec 2024 09:42:13 +0800"
},
{
"title": "信息安全管 | 企业端点与主机安全",
"link": "https://www.freebuf.com/articles/endpoint/400836.html",
"description": "本文主要探讨企业在管理和强化端点与主机安全方面所面临的挑战,并介绍一些最佳实践和策略,帮助企业构建一个坚固的安全防线。",
"body": "<h2 id=\"h2-1\">前言:</h2><p>随着网络威胁的日益复杂化和攻击手段的不断进化,企业端点与主机安全的重要性愈发凸显。端点安全不仅涉及保护企业内部员工的工作站、笔记本电脑、移动设备等,还包括确保服务器、虚拟化环境以及企业数据中心的安全。这些端点作为企业网络的入口和出口,若管理不善,将可能成为网络攻击者的温床和突破口。本文主要探讨企业在管理和强化端点与主机安全方面所面临的挑战,并介绍一",
"category": "终端安全",
"pubDate": "Thu, 05 Dec 2024 08:46:32 +0800"
},
{
"title": "企业从0到1如何配置 | 工控操作系统标准基线",
"link": "https://www.freebuf.com/articles/ics-articles/402959.html",
"description": "合理的安全配置基线可以有效降低工控系统受到恶意攻击的风险,提升系统的稳定性和可靠性。",
"body": "<h2 id=\"h2-1\"><strong>前言</strong></h2><p>开局先废话前几天领导说要我把企业所有基线标准梳理一下然后我马上就把活甩给小弟做了同时紧急把我的文件库存拿出来看了一下顺便分享一下给兄弟们在制造业随着自动化工控系统的普及和发展Windows操作系统在工控领域的应用也越来越广泛。然而由于工控系统的特殊性对Windows操作系统的安全配置提出了更高的要求。为",
"category": "工控安全",
"pubDate": "Thu, 05 Dec 2024 08:43:15 +0800"
},
{
"title": "钓鱼网页散播银狐木马,远控后门威胁终端安全",
"link": "https://www.freebuf.com/news/416880.html",
"description": "在当今网络环境下,许多人都有通过搜索引擎下载应用程序的习惯,虽然这种方式简单又迅速,但这也可能被不法分子所利用,通过设置钓鱼网站来欺骗用户。这些钓鱼网站可能会通过各种方式吸引用户点击,从而进行病毒的传",
"body": "<p style=\"text-align:left;\">在当今网络环境下,许多人都有通过搜索引擎下载应用程序的习惯,虽然这种方式简单又迅速,但这也可能被不法分子所利用,通过设置钓鱼网站来欺骗用户。这些钓鱼网站可能会通过各种方式吸引用户点击,从而进行病毒的传播,危害个人或企业的信息安全。</p><p style=\"text-align:left;\">我们期望本篇文章有助于帮助您提高网络安全防范意识,",
"category": "资讯",
"pubDate": "Wed, 04 Dec 2024 21:28:45 +0800"
},
{ {
"title": "FreeBuf早报 | 今年黑客已窃取 14.9 亿美元加密货币Cloudflare开发人员域正被滥用", "title": "FreeBuf早报 | 今年黑客已窃取 14.9 亿美元加密货币Cloudflare开发人员域正被滥用",
"link": "https://www.freebuf.com/news/416863.html", "link": "https://www.freebuf.com/news/416863.html",
@ -24,139 +152,11 @@
"pubDate": "Wed, 04 Dec 2024 17:35:23 +0800" "pubDate": "Wed, 04 Dec 2024 17:35:23 +0800"
}, },
{ {
"title": "立即修复微软驱动程序关键漏洞已被APT组织利用", "title": "JNDI绕过高版本注入限制那些事",
"link": "https://www.freebuf.com/news/416830.html", "link": "https://www.freebuf.com/vuls/416862.html",
"description": "2024年8月微软发布安全更新已经修复该漏洞强烈建议组织及时进行修复。", "description": "JNDI高版本注入可以说是java安全大集合了。涉及了许多框架漏洞的组合使用当分析完JNDI高版本时我认为也算是正式入门JAVA安全了",
"body": "<p>近日微软被曝Windows AFD.sys漏洞编号CVE-2024-38193正在被黑客组织利用。该漏洞被归类为自带易受攻击驱动程序BYOVD漏洞可影响Windows套接字的注册I/ORIO扩展并允许攻击者远程接管整个系统。</p><p>漏洞影响版本包括Windows 11ARM64、x64多个版本、Windows 10ARM64、x64、32位多个版本、Wi", "body": "<p style=\"white-space:pre-wrap;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;\">JNDI高版本注入可以说是java安全大集合了。涉及了许多框架漏洞的组合使用当分析完JNDI高版本时我认为也算是正式入门JAVA安全了</p><p style=\"white-spa",
"category": "资讯",
"pubDate": "Wed, 04 Dec 2024 14:37:40 +0800"
},
{
"title": "思科安全设备ASA十年老漏洞正在被利用",
"link": "https://www.freebuf.com/news/416826.html",
"description": "该漏洞最初于2014年披露它允许未经身份验证的远程攻击者对WebVPN用户执行XSS攻击。",
"body": "<p>近期思科系统公司Cisco Systems更新了关于CVE-2014-2120的安全公告警告客户该漏洞已在野外被利用。CVE-2014-2120是一个影响思科自适应安全设备ASA软件的WebVPN登录页面的跨站脚本XSS漏洞。该漏洞最初于2014年披露它允许未经身份验证的远程攻击者对WebVPN用户执行XSS攻击。</p><p><img src=\"https://image",
"category": "资讯",
"pubDate": "Wed, 04 Dec 2024 14:12:46 +0800"
},
{
"title": "因涉嫌实施侵入性的监控行为,苹果公司在加州被员工起诉",
"link": "https://www.freebuf.com/news/416797.html",
"description": "一名现任苹果员工于美国当地时间12月1日向加利福尼亚州法院提起诉讼指控苹果侵入性的监控行为干预了员工的个人生活。",
"body": "<p>据Cyber Security News消息一名现任苹果员工于美国当地时间12月1日向加利福尼亚州法院提起诉讼指控苹果侵入性的监控行为干预了员工的个人生活。</p><p><img src=\"https://image.3001.net/images/20241204/1733280393_674fc28912cc0257261a4.png!small\" alt=\"\" width=\"646",
"category": "资讯",
"pubDate": "Wed, 04 Dec 2024 10:34:21 +0800"
},
{
"title": "FreeBuf早报 | 苹果被员工起诉监控越界;暗网头目背叛终身监禁",
"link": "https://www.freebuf.com/news/416759.html",
"description": "苹果要求员工上班期间只能使用苹果设备,并鼓励他们在个人设备上也使用苹果产品。",
"body": "<h2 id=\"h2-1\">全球动态</h2><h3 id=\"h3-1\">1. 工信部通报27款侵害用户权益行为的APP及SDK</h3><p>近期工信部组织第三方检测机构进行抽查共发现27款App及SDK存在侵害用户权益行为主要集中在信息窗口关不掉、乱跳转违规收集个人信息以及过度索取权限等问题。工信部要求相关App开发者限期整改对于整改落实不到位的将采取企业约谈、App下架、行政处罚",
"category": "资讯",
"pubDate": "Tue, 03 Dec 2024 16:41:40 +0800"
},
{
"title": "知名开源监控系统Zabbix存在SQL 注入漏洞",
"link": "https://www.freebuf.com/news/416735.html",
"description": "攻击者可以通过操控特定的API调用注入恶意SQL代码从而获得未授权的访问和控制权限。",
"body": "<p style=\"list-style-type:none;\">Zabbix 存在 SQL 注入漏洞CVE-2024-42327该漏洞是由于在 Zabbix前端的CUser类中的addRelatedObjects函数未对输入数据进行充分验证和转义导致具有API访问权限的恶意用户可以通过user.get API传递特制输入触发SQL注入攻击进而利用该漏洞实现权限提升或访问敏感数据。</p",
"category": "资讯",
"pubDate": "Tue, 03 Dec 2024 13:46:22 +0800"
},
{
"title": "只需几分钟AWS密钥泄露即被利用",
"link": "https://www.freebuf.com/news/416720.html",
"description": "Clutch Security的研究人员进行了一项测试以查看这种情况发生的速度有多快。",
"body": "<p>开发者经常无意中在网上暴露AWS访问密钥这已不是秘密这些密钥在组织有机会撤销它们之前就被攻击者抓取并滥用。Clutch Security的研究人员进行了一项测试以查看这种情况发生的速度有多快。</p><p><img src=\"https://image.3001.net/images/20241203/1733204055_674e9857af59cfdecf8da.png!smal",
"category": "资讯",
"pubDate": "Tue, 03 Dec 2024 11:50:54 +0800"
},
{
"title": "新型恶意软件能利用LogoFAIL漏洞感染Linux系统",
"link": "https://www.freebuf.com/news/416709.html",
"description": "由韩国BoB培训计划的网络安全学生利用 LogoFAIL 漏洞创建了新型恶意软件Bootkitty能够攻击Linux系统设备。",
"body": "<p>据BleepingComputer消息韩国Best of the Best BoB 培训计划的网络安全学生利用 LogoFAIL 漏洞创建了新型恶意软件Bootkitty能够攻击Linux系统设备。</p><p>固件安全公司Binarly 于2023 年 11 月发现了 LogoFAIL并警告其可能被用于实际攻击。而安全公司ESET表示Bootkitty 是第一个专门针对 Lin",
"category": "资讯",
"pubDate": "Tue, 03 Dec 2024 11:12:26 +0800"
},
{
"title": "FreeBuf 赠书第109期 | API攻防Web API安全指南",
"link": "https://www.freebuf.com/articles/416686.html",
"description": "这本书就体系化地讲解了Web API 的漏洞挖掘方法和防御策略能够帮助组织构建起API安全体系。",
"body": "<p>知名网络安全公司HackerOne发布的《2023年黑客力量安全报告》透露已有30名优秀的白帽子各自获得了超100万美元的奖励而其中最厉害的白帽奖励超过了400万美元。</p><p>HackerOne是全球领先的漏洞赏金平台自2012年成立以来HackerOne已向白帽子和漏洞研究人员发放了超过3亿美元的奖励。</p><p>白帽遵循一套道德准则和职业操守,在获得组织的明确授权后,通过",
"category": "活动",
"pubDate": "Mon, 02 Dec 2024 18:54:59 +0800"
},
{
"title": "浅谈一次edusrc | 文件上传成功getshell",
"link": "https://www.freebuf.com/vuls/416682.html",
"description": "这篇文章偏基础的src漏洞挖掘并且讲的内容还是偏向edusrc方面的。",
"body": "<h2 id=\"h2-1\">0x1 前言</h2><p>这里记录一下我在微信小程序挖人社局等一些人力资源和社会保障部信息中心漏洞人社这类漏洞相对于web应用端的漏洞来讲要好挖很多里面的WAF过滤等一些验证也少。比如你在开始学习src漏洞挖掘就可以从微信小程序下手。<br />一般像这类漏洞可以在微信小程序检索<strong>就业、人社、贷款</strong>等关键字</p><p><img s",
"category": "漏洞", "category": "漏洞",
"pubDate": "Mon, 02 Dec 2024 18:22:10 +0800" "pubDate": "Wed, 04 Dec 2024 17:25:46 +0800"
},
{
"title": "FreeBuf早报 | 苹果Safari远程代码执行漏洞被广泛利用蓝牙芯片漏洞影响15亿用户",
"link": "https://www.freebuf.com/news/416669.html",
"description": "Safari中的一个关键远程代码执行漏洞已被发现并被广泛利用。该漏洞存在于WebKit的JavaScriptCore组件中。",
"body": "<h2 id=\"h2-1\">全球动态</h2><h3 id=\"h3-1\">1. 国家安全部:警惕开源信息成为泄密源头</h3><p>大数据时代,信息在网络空间发布、传播渠道愈发丰富多样。值得警惕的是,一些敏感信息在未经脱密处理、未经风险隐患评估的情况下,通过互联网公开传播,成为境外间谍情报机关获取开源情报的重要来源,对我国家安全构成威胁。 【<a href=\"https://www.secrss.",
"category": "资讯",
"pubDate": "Mon, 02 Dec 2024 17:27:57 +0800"
},
{
"title": "因软件更新丹麦第一电信运营商宕机超过24小时",
"link": "https://www.freebuf.com/news/416662.html",
"description": "丹麦电信运营商 TDC Net 遭遇大规模电信服务中断,导致所有用户无法使用移动电话、短信和网络接入服务。",
"body": "<p>上周11月28日丹麦发生了一起大规模手机故障事件。丹麦电信运营商 TDC Net 遭遇大规模电信服务中断,导致所有用户无法使用移动电话、短信和网络接入服务,持续时间长达至少一天。</p><p>这次中断事件严重扰乱了成千上万人的通信,并引发了人们对基本电信服务可靠性的严重担忧。受影响的群体包括紧急救援人员、医院和通勤上班一族,这表明了现代社会依赖无缝连接的程度。<img src=\"htt",
"category": "资讯",
"pubDate": "Mon, 02 Dec 2024 16:38:31 +0800"
},
{
"title": "印度电信安全新规引发大量吐槽",
"link": "https://www.freebuf.com/news/416631.html",
"description": "印度电信监管机构推出了旨在保护国家关键基础设施网络免受网络威胁的规则。",
"body": "<p>印度电信监管机构推出了旨在保护国家关键基础设施网络免受网络威胁的规则,但专家表示,这些新指南对用户的基本隐私权保护不足。</p><p>上周由印度电信部DoT发布的这些规定要求电信实体在六小时内报告网络安全事件与网络安全当局共享用户流量数据并采用包括风险管理方法、培训、网络测试和风险评估的网络安全政策。</p><p>这些措施是在2023年通过的具有里程碑意义的《电信法》下推出的对行",
"category": "资讯",
"pubDate": "Mon, 02 Dec 2024 13:52:30 +0800"
},
{
"title": "新型钓鱼工具包能让“菜鸟”轻松发动攻击",
"link": "https://www.freebuf.com/news/416616.html",
"description": "一种恶意电子邮件活动正利用名为 Rockstar 2FA 的网络钓鱼即服务PhaaS工具包窃取 Microsoft 365 用户帐户凭证。",
"body": "<p>据The Hacker News消息研究人员近日发出警告称一种恶意电子邮件活动正利用名为 Rockstar 2FA 的网络钓鱼即服务PhaaS工具包窃取 Microsoft 365 用户帐户凭证。</p><p><img src=\"https://image.3001.net/images/20241202/1733109695_674d27bfcbce0a33907d7.png!sm",
"category": "资讯",
"pubDate": "Mon, 02 Dec 2024 11:18:40 +0800"
},
{
"title": "损坏的Word钓鱼文件可以绕过微软安全防护",
"link": "https://www.freebuf.com/news/416610.html",
"description": "通过发送损坏的Word文档作为电子邮件附件使它们能够因为损坏状态而绕过安全软件但仍然可以被应用程序恢复。",
"body": "<p>一种新型的网络钓鱼攻击利用了微软Word文件恢复功能通过发送损坏的Word文档作为电子邮件附件使它们能够因为损坏状态而绕过安全软件但仍然可以被应用程序恢复。</p><p>威胁行为者不断寻找新的方法来绕过电子邮件安全软件将他们的网络钓鱼邮件送达到目标收件箱。由恶意软件狩猎公司Any.Run发现的一个新的网络钓鱼活动使用故意损坏的Word文档作为电子邮件附件这些邮件伪装成来自工资单和",
"category": "资讯",
"pubDate": "Mon, 02 Dec 2024 10:26:53 +0800"
},
{
"title": "一周网安优质PDF资源推荐丨FreeBuf知识大陆",
"link": "https://www.freebuf.com/news/416552.html",
"description": "各位读者周末好我们精选了本周知识大陆公开发布的10条优质资源让我们一起看看吧。",
"body": "<p>各位读者周末好以下是本周「FreeBuf知识大陆一周优质资源推荐」我们精选了本周知识大陆公开发布的10条优质资源让我们一起看看吧。</p><p><img src=\"https://image.3001.net/images/20241129/1732868224_6749788012adb40a28cdb.png!small\" width=\"690\" height=\"1200\" alt",
"category": "资讯",
"pubDate": "Fri, 29 Nov 2024 16:16:39 +0800"
},
{
"title": "FreeBuf早报 | 史上最高漏洞赏金1.1亿元澳大利亚禁16岁以下使用社交媒体",
"link": "https://www.freebuf.com/news/416532.html",
"description": "国际加密货币交易所Uniswap Labs宣布在新版交易协议Uniswap v4上线之前将启动自称“历史上最高的漏洞赏金”计划。",
"body": "<h2 id=\"h2-1\">全球动态</h2><h3 id=\"h3-1\">1. 英国医疗保健提供者遭网络攻击,服务大受影响</h3><p align=\"left\">一场重大的网络攻击扰乱了威勒尔大学教学医院WUTH的运营该医院隶属于NHS基金会信托导致预约和程序推迟。【外刊-<a href=\"https://cybersecuritynews.com/uk-healthcare-provi",
"category": "资讯",
"pubDate": "Fri, 29 Nov 2024 14:54:24 +0800"
},
{
"title": "FreeBuf周报 | VPN正成为企业入侵的关键路径知名压缩工具7-Zip存在严重漏洞",
"link": "https://www.freebuf.com/news/416526.html",
"description": "总结推荐本周的热点资讯、安全事件、一周好文和省心工具,保证大家不错过本周的每一个重点!",
"body": "<p>各位 Buffer 周末好以下是本周「FreeBuf周报」我们总结推荐了本周的热点资讯、安全事件、一周好文和省心工具保证大家不错过本周的每一个重点<img style=\"border-width:0px;line-height:inherit;max-width:635px;height:auto;\" src=\"https://image.3001.net/images/202209",
"category": "资讯",
"pubDate": "Fri, 29 Nov 2024 14:02:37 +0800"
} }
] ]

View File

@ -1,4 +1,11 @@
[ [
{
"guid": "https://forum.butian.net/share/3924",
"title": "GPU 驱动漏洞:窥探驱动漏洞利用的技术奥秘",
"description": "本文尝试以 GPU 漏洞为引介绍围绕 GPU 驱动这一攻击面,安全研究人员对内核漏洞利用技术做的一些探索。\n背景介绍\n目前移动 SOC 平台上由多个硬件模块组成常见的硬件模块有CPU、GPU、Modem基...",
"source": "subject",
"pubDate": "2024-12-06 09:00:00"
},
{ {
"guid": "https://forum.butian.net/share/3913", "guid": "https://forum.butian.net/share/3913",
"title": "qemu逃逸入门及例题复现", "title": "qemu逃逸入门及例题复现",
@ -61,12 +68,5 @@
"description": "本文详细记录了笔者做SCTF2024Pwn方向题目的过程希望对打Pwn的你有所启发", "description": "本文详细记录了笔者做SCTF2024Pwn方向题目的过程希望对打Pwn的你有所启发",
"source": "subject", "source": "subject",
"pubDate": "2024-11-28 09:33:40" "pubDate": "2024-11-28 09:33:40"
},
{
"guid": "https://forum.butian.net/share/3900",
"title": "ksmbd 条件竞争漏洞挖掘:思路与案例",
"description": "ksmbd 条件竞争漏洞挖掘:思路与案例\n本文介绍从代码审计的角度分析、挖掘条件竞争、UAF 漏洞思路,并以 ksmbd 为实例介绍审计的过程和几个经典漏洞案例。\n分析代码版本为linux-6.5.5\n相关漏...",
"source": "subject",
"pubDate": "2024-11-27 10:00:01"
} }
] ]

View File

@ -1,4 +1,20 @@
[ [
{
"title": "基于 InternLM 和 LangChain 搭建私人知识库\n",
"link": "https://paper.seebug.org/3247/",
"description": "作者Jinzhong Xu\n原文链接https://xujinzh.github.io/2024/01/08/ai-Interlm-langchain-RAG/index.html\n本篇介绍基于 InternLM 和 LangChain 搭建私人知识库。\npython!conda create --name internlm_langchain --clone=/root/share/c...\n",
"pubDate": "Thu, 05 Dec 2024 11:34:00 +0000",
"guid": "https://paper.seebug.org/3247/",
"category": "AI安全"
},
{
"title": "书生·浦语大模型使用\n",
"link": "https://paper.seebug.org/3246/",
"description": "作者Jinzhong Xu\n原文链接https://xujinzh.github.io/2024/01/06/ai-internlm-useage/\n本篇介绍书生·浦语大模型的使用包括智能对话、智能体工具调用和图文理解创作等。\n环境配置\npython!conda create --name internlm-chat --clone=/root/share/conda_envs/int...\n",
"pubDate": "Thu, 05 Dec 2024 10:27:00 +0000",
"guid": "https://paper.seebug.org/3246/",
"category": "AI安全"
},
{ {
"title": "Uncontrolled PCDN: Observation and Case Analysis of the Current State of PCDN Technology\n", "title": "Uncontrolled PCDN: Observation and Case Analysis of the Current State of PCDN Technology\n",
"link": "https://paper.seebug.org/3245/", "link": "https://paper.seebug.org/3245/",
@ -26,7 +42,7 @@
{ {
"title": "失控的PCDN观察PCDN技术现状与案例分析\n", "title": "失控的PCDN观察PCDN技术现状与案例分析\n",
"link": "https://paper.seebug.org/3242/", "link": "https://paper.seebug.org/3242/",
"description": "作者知道创宇404积极防御实验室\n日期2024年11月22日\n背景介绍\n2024年10月知道创宇404积极防御实验室监测到某客户网站流量异常疑似遭到CC攻击。经过分析本次CC攻击疑似为PCDN厂商为了平衡上下行流量对客户网站视频文件进行的盗刷流量行为。\n在调查分析的过程中我们发现PCDN技术的发展正逐渐失控。为了深入研究我们对PCDN技术现状及其背后的产业链进行了调查和分析...\n", "description": "作者知道创宇404积极防御实验室\n日期2024年11月22日\nEnglish Version: https://paper.seebug.org/3245/\n背景介绍\n2024年10月知道创宇404积极防御实验室监测到某客户网站流量异常疑似遭到CC攻击。经过分析本次CC攻击疑似为PCDN厂商为了平衡上下行流量对客户网站视频文件进行的盗刷流量行为。\n在调查分析的过程中我们发现PCD...\n",
"pubDate": "Fri, 22 Nov 2024 12:38:00 +0000", "pubDate": "Fri, 22 Nov 2024 12:38:00 +0000",
"guid": "https://paper.seebug.org/3242/", "guid": "https://paper.seebug.org/3242/",
"category": "情报分析" "category": "情报分析"
@ -102,21 +118,5 @@
"pubDate": "Tue, 12 Nov 2024 06:07:00 +0000", "pubDate": "Tue, 12 Nov 2024 06:07:00 +0000",
"guid": "https://paper.seebug.org/3233/", "guid": "https://paper.seebug.org/3233/",
"category": "404专栏" "category": "404专栏"
},
{
"title": "使用 ZoomEye 平台 进行 C2 资产拓线\n",
"link": "https://paper.seebug.org/3232/",
"description": "作者知道创宇404实验室\n时间2024年10月21日\n1 摘要\n本文基于推特社交平台上一则C2的IP地址及其相关文件信息以此作为线索使用ZoomEye网络空间搜索引擎 [1] 进行C2资产拓线发现更多属于该黑客组织的C2网络资产并针对这些C2服务器上的木马程序进行分析获取黑客组织的惯用攻击手法和独有特征。\n2 概述\n2024年9月8日推特社交平台上有一位安全研究员发布了一则C...\n",
"pubDate": "Mon, 21 Oct 2024 07:29:00 +0000",
"guid": "https://paper.seebug.org/3232/",
"category": "404专栏"
},
{
"title": "APT-Patchwork 组织测试 Badnews 新变种?\n",
"link": "https://paper.seebug.org/3231/",
"description": "作者知道创宇404高级威胁情报团队\n时间2024年9月30日\n1.分析概述\n近期知道创宇404高级威胁情报团队在分析过程中发现一个与Patchwork组织历史TTP极其相似的样本该样本使用Patchwork常用的donut加载执行最终的载荷。最终载荷与该组织已知的武器badnews在代码方面存在大量重合相比老版本的badnews具备以下特点\n1) 使用base64+Salsa2...\n",
"pubDate": "Mon, 30 Sep 2024 06:18:00 +0000",
"guid": "https://paper.seebug.org/3231/",
"category": "威胁情报"
} }
] ]

View File

@ -1,4 +1,144 @@
[ [
{
"title": "S8强网杯Final-thinkshopplus",
"link": "https://xz.aliyun.com/t/16581",
"published": "2024-12-06T19:01:00+08:00",
"id": "https://xz.aliyun.com/t/16581",
"summary": {
"@type": "html",
"#text": "S8强网杯Final-thinkshopplus"
}
},
{
"title": "伪装成ToDesk安装程序加载后门盗取数字货币",
"link": "https://xz.aliyun.com/t/16552",
"published": "2024-12-04T20:00:59+08:00",
"id": "https://xz.aliyun.com/t/16552",
"summary": {
"@type": "html",
"#text": "伪装成ToDesk安装程序加载后门盗取数字货币"
}
},
{
"title": "Android逆向实战——以某APP跳过广告为例",
"link": "https://xz.aliyun.com/t/16550",
"published": "2024-12-04T17:38:00+08:00",
"id": "https://xz.aliyun.com/t/16550",
"summary": {
"@type": "html",
"#text": "Android逆向实战——以某APP跳过广告为例"
}
},
{
"title": "webpwn的一些总结",
"link": "https://xz.aliyun.com/t/16549",
"published": "2024-12-04T17:20:50+08:00",
"id": "https://xz.aliyun.com/t/16549",
"summary": {
"@type": "html",
"#text": "webpwn的一些总结"
}
},
{
"title": "Fastjson反序列化漏洞深度解析与利用和修复",
"link": "https://xz.aliyun.com/t/16547",
"published": "2024-12-04T15:18:05+08:00",
"id": "https://xz.aliyun.com/t/16547",
"summary": {
"@type": "html",
"#text": "Fastjson反序列化漏洞深度解析与利用和修复"
}
},
{
"title": "2024金盾信安杯线上题目wp",
"link": "https://xz.aliyun.com/t/16546",
"published": "2024-12-04T15:08:41+08:00",
"id": "https://xz.aliyun.com/t/16546",
"summary": {
"@type": "html",
"#text": "2024金盾信安杯线上题目wp"
}
},
{
"title": "高版本Fastjson反序列化Xtring新链和EventListenerList绕过",
"link": "https://xz.aliyun.com/t/16540",
"published": "2024-12-04T13:59:43+08:00",
"id": "https://xz.aliyun.com/t/16540",
"summary": {
"@type": "html",
"#text": "高版本Fastjson反序列化Xtring新链和EventListenerList绕过"
}
},
{
"title": "域渗透入门靶机之HTB-Cicada",
"link": "https://xz.aliyun.com/t/16539",
"published": "2024-12-04T13:10:46+08:00",
"id": "https://xz.aliyun.com/t/16539",
"summary": {
"@type": "html",
"#text": "域渗透入门靶机之HTB-Cicada"
}
},
{
"title": "java加载动态链接库绕过一些限制的思考",
"link": "https://xz.aliyun.com/t/16538",
"published": "2024-12-04T11:12:08+08:00",
"id": "https://xz.aliyun.com/t/16538",
"summary": {
"@type": "html",
"#text": "java加载动态链接库绕过一些限制的思考"
}
},
{
"title": "从零构建:我的漏洞扫描器之旅",
"link": "https://xz.aliyun.com/t/16537",
"published": "2024-12-04T10:38:46+08:00",
"id": "https://xz.aliyun.com/t/16537",
"summary": {
"@type": "html",
"#text": "从零构建:我的漏洞扫描器之旅"
}
},
{
"title": "CS代码审计配合Jdbc反序列化漏洞的利用",
"link": "https://xz.aliyun.com/t/16536",
"published": "2024-12-03T23:58:20+08:00",
"id": "https://xz.aliyun.com/t/16536",
"summary": {
"@type": "html",
"#text": "CS代码审计配合Jdbc反序列化漏洞的利用"
}
},
{
"title": "从案例中学习 IoT 固件仿真——D-Link DIR-605L(FW_113) 运行环境修复",
"link": "https://xz.aliyun.com/t/16535",
"published": "2024-12-03T23:57:40+08:00",
"id": "https://xz.aliyun.com/t/16535",
"summary": {
"@type": "html",
"#text": "从案例中学习 IoT 固件仿真——D-Link DIR-605L(FW_113) 运行环境修复"
}
},
{
"title": "某云音乐为例-反调试绕过,栈回溯,web算法逆向",
"link": "https://xz.aliyun.com/t/16534",
"published": "2024-12-03T23:50:24+08:00",
"id": "https://xz.aliyun.com/t/16534",
"summary": {
"@type": "html",
"#text": "某云音乐为例-反调试绕过,栈回溯,web算法逆向"
}
},
{
"title": "2024睿抗网络安全初赛0解题——nopassword详解",
"link": "https://xz.aliyun.com/t/16533",
"published": "2024-12-03T22:29:02+08:00",
"id": "https://xz.aliyun.com/t/16533",
"summary": {
"@type": "html",
"#text": "2024睿抗网络安全初赛0解题——nopassword详解"
}
},
{ {
"title": "某省移动网络安全技能竞赛决赛 个人赛第一名wp", "title": "某省移动网络安全技能竞赛决赛 个人赛第一名wp",
"link": "https://xz.aliyun.com/t/16532", "link": "https://xz.aliyun.com/t/16532",
@ -72,7 +212,7 @@
{ {
"title": "2024鹏城杯线下赛复现", "title": "2024鹏城杯线下赛复现",
"link": "https://xz.aliyun.com/t/16522", "link": "https://xz.aliyun.com/t/16522",
"published": "2024-12-03T14:42:42+08:00", "published": "2024-12-03T14:42:00+08:00",
"id": "https://xz.aliyun.com/t/16522", "id": "https://xz.aliyun.com/t/16522",
"summary": { "summary": {
"@type": "html", "@type": "html",
@ -858,145 +998,5 @@
"@type": "html", "@type": "html",
"#text": "第四届网鼎杯半决赛-安全运营挑战赛加固修复Part学习&分析" "#text": "第四届网鼎杯半决赛-安全运营挑战赛加固修复Part学习&分析"
} }
},
{
"title": "Windows综合渗透_DTcms_远控gotohttp软件在渗透中利用",
"link": "https://xz.aliyun.com/t/16384",
"published": "2024-11-25T17:48:00+08:00",
"id": "https://xz.aliyun.com/t/16384",
"summary": {
"@type": "html",
"#text": "Windows综合渗透_DTcms_远控gotohttp软件在渗透中利用"
}
},
{
"title": "jetty 内存马构造分析",
"link": "https://xz.aliyun.com/t/16382",
"published": "2024-11-25T16:52:30+08:00",
"id": "https://xz.aliyun.com/t/16382",
"summary": {
"@type": "html",
"#text": "jetty 内存马构造分析"
}
},
{
"title": "免杀基础-IAT隐藏",
"link": "https://xz.aliyun.com/t/16376",
"published": "2024-11-25T14:51:46+08:00",
"id": "https://xz.aliyun.com/t/16376",
"summary": {
"@type": "html",
"#text": "免杀基础-IAT隐藏"
}
},
{
"title": "CNSSCTF WEB详细解析WP",
"link": "https://xz.aliyun.com/t/16375",
"published": "2024-11-25T11:27:51+08:00",
"id": "https://xz.aliyun.com/t/16375",
"summary": {
"@type": "html",
"#text": "CNSSCTF WEB详细解析WP"
}
},
{
"title": "unity引擎基于Windows下的il2cpp逆向初探——以CTF赛题为例",
"link": "https://xz.aliyun.com/t/16374",
"published": "2024-11-25T08:56:31+08:00",
"id": "https://xz.aliyun.com/t/16374",
"summary": {
"@type": "html",
"#text": "unity引擎基于Windows下的il2cpp逆向初探——以CTF赛题为例"
}
},
{
"title": "渗透测试&红队之信息收集",
"link": "https://xz.aliyun.com/t/16373",
"published": "2024-11-24T23:59:00+08:00",
"id": "https://xz.aliyun.com/t/16373",
"summary": {
"@type": "html",
"#text": "渗透测试&红队之信息收集"
}
},
{
"title": "[2024网鼎杯半决赛]pwn-cardmaster",
"link": "https://xz.aliyun.com/t/16371",
"published": "2024-11-24T20:50:41+08:00",
"id": "https://xz.aliyun.com/t/16371",
"summary": {
"@type": "html",
"#text": "[2024网鼎杯半决赛]pwn-cardmaster"
}
},
{
"title": "网鼎杯-半决赛-青龙组-逆向安全",
"link": "https://xz.aliyun.com/t/16370",
"published": "2024-11-24T19:39:44+08:00",
"id": "https://xz.aliyun.com/t/16370",
"summary": {
"@type": "html",
"#text": "网鼎杯-半决赛-青龙组-逆向安全"
}
},
{
"title": "2024深育杯 Pwn部分题解",
"link": "https://xz.aliyun.com/t/16368",
"published": "2024-11-24T16:38:34+08:00",
"id": "https://xz.aliyun.com/t/16368",
"summary": {
"@type": "html",
"#text": "2024深育杯 Pwn部分题解"
}
},
{
"title": "Java JAR包反编译与动态调试指南",
"link": "https://xz.aliyun.com/t/16367",
"published": "2024-11-24T12:06:12+08:00",
"id": "https://xz.aliyun.com/t/16367",
"summary": {
"@type": "html",
"#text": "Java JAR包反编译与动态调试指南"
}
},
{
"title": "2024 蜀道山 crypto-wp",
"link": "https://xz.aliyun.com/t/16365",
"published": "2024-11-23T23:37:02+08:00",
"id": "https://xz.aliyun.com/t/16365",
"summary": {
"@type": "html",
"#text": "2024 蜀道山 crypto-wp"
}
},
{
"title": "Windows10/11 内置组件 dll劫持",
"link": "https://xz.aliyun.com/t/16364",
"published": "2024-11-23T23:34:01+08:00",
"id": "https://xz.aliyun.com/t/16364",
"summary": {
"@type": "html",
"#text": "Windows10/11 内置组件 dll劫持"
}
},
{
"title": "第四届网鼎杯半决赛应急加固",
"link": "https://xz.aliyun.com/t/16508",
"published": "2024-11-23T21:59:00+08:00",
"id": "https://xz.aliyun.com/t/16508",
"summary": {
"@type": "html",
"#text": "第四届网鼎杯半决赛应急加固"
}
},
{
"title": "2024网鼎杯半决赛(青龙组Crypto唯一解)——RSA加密分析",
"link": "https://xz.aliyun.com/t/16360",
"published": "2024-11-23T20:59:34+08:00",
"id": "https://xz.aliyun.com/t/16360",
"summary": {
"@type": "html",
"#text": "2024网鼎杯半决赛(青龙组Crypto唯一解)——RSA加密分析"
}
} }
] ]

View File

@ -32,6 +32,8 @@ centos: `yum install screen` <br>
![后端展示](./imgs/run.jpg) <br> ![后端展示](./imgs/run.jpg) <br>
### 下一步计划 ### 下一步计划
- 探查异常中断原因
- 添加更多RSS订阅源 - 添加更多RSS订阅源
- 将所有打印信息转为logging info并存档 - 将所有打印信息转为logging info并存档(已完成)
- 存档所有推送文章方便以后查看 - 存档所有推送文章方便以后查看
- 添加更多推送方式,如邮件、微信等

View File

@ -71,14 +71,13 @@ def SendToFeishu(body, header, webhook_url, timestamp, sign):
response_data = json.loads(response.content) response_data = json.loads(response.content)
# 检查 msg 字段 # 检查 msg 字段
if response_data.get('msg') == 'success': if response_data.get('msg') == 'success':
print("飞书发送成功") return f"飞书发送 {header} 成功"
elif response_data.get('msg') == 'sign match fail or timestamp is not within one hour from current time': elif response_data.get('msg') == 'sign match fail or timestamp is not within one hour from current time':
print("发送失败: 签名验证错误,请检查签名密钥是否正确!") return f"{header} 发送失败: 签名验证错误,请检查签名密钥是否正确!"
else: else:
print("发送失败: 其他错误,请检查请求参数是否正确!") return f"{header} 发送失败: 其他错误,请检查请求参数是否正确!\n原因:{response_data.get('msg')}"
print(f"原因:{response_data.get('msg')}")
except json.JSONDecodeError as e: except json.JSONDecodeError as e:
print(f"JSON 解析错误: {e}") return f"{header} JSON解析错误: {e}"
# print(sign) # print(sign)
# print(response.content) # print(response.content)

View File

@ -1,4 +1,4 @@
key: aa04a02f-d7bf-4279-bd48-44c4f28c8f74 key: aa04a02f-d7bf-4279-bd48-44c4f28c8f74
secret: 4tq65T4jm1MO2IlxvHxBWe secret: 4tq65T4jm1MO2IlxvHxBWe
# 结算时间范围 # 结算时间范围
e_hour: 5 # 程序运行时间间隔 e_hour: 12 # 程序运行时间间隔

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
log/spider.log Normal file
View File

View File

@ -4,6 +4,22 @@ import requests
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import json import json
from requests.exceptions import RequestException from requests.exceptions import RequestException
import logging
# 设置日志记录
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.handlers.clear() # 清除已有的处理器
file_handler = logging.FileHandler('./log/spider.log', mode='a', encoding='utf-8')
file_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
logger.addHandler(file_handler)
logger.addHandler(console_handler)
logger.propagate = False # 禁用日志传递
# 测试用爬虫请求头 # 测试用爬虫请求头
headers = { headers = {
@ -25,7 +41,7 @@ def fetch_rss(url, headers):
response.raise_for_status() # 检查请求是否成功 response.raise_for_status() # 检查请求是否成功
return response.content return response.content
except RequestException as e: except RequestException as e:
print(f"请求失败: {e}") # 可选:打印错误信息 logger.error(f"请求 {url} 时发生错误: {e}")
return None # 返回None表示请求失败 return None # 返回None表示请求失败
def parse_rss(rss_content): def parse_rss(rss_content):
@ -42,11 +58,15 @@ def save_to_json(data, filename):
with open(filename, 'w', encoding='utf-8') as f: with open(filename, 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False, indent=4) json.dump(data, f, ensure_ascii=False, indent=4)
# seebug 爬虫 # seebug 爬虫
def seebug_main(): def seebug_main():
url = "https://paper.seebug.org/rss/" url = "https://paper.seebug.org/rss/"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None: if rss_content is None:
logger.warning("无法获取Seebug社区RSS内容跳过保存操作。")
return
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -54,16 +74,17 @@ def seebug_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/seebug.json') save_to_json(items, './JSON/seebug.json')
print("数据已保存到 ./JSON/seebug.json") logger.info("数据已保存到 ./JSON/seebug.json")
else:
print("无法获取Seebug社区RSS内容跳过保存操作。")
# 4hou 爬虫 # 4hou 爬虫
def M_4hou_main(): def M_4hou_main():
url = "https://www.4hou.com/feed" url = "https://www.4hou.com/feed"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None: if rss_content is None:
logger.warning("无法获取嘶吼RSS内容跳过保存操作。")
return
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -71,16 +92,17 @@ def M_4hou_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/4hou.json') save_to_json(items, './JSON/4hou.json')
print("数据已保存到 ./JSON/4hou.json") logger.info("数据已保存到 ./JSON/4hou.json")
else:
print("无法获取嘶吼RSS内容跳过保存操作。")
# 安全客 爬虫 # 安全客 爬虫
def anquanke_main(): def anquanke_main():
url = "https://api.anquanke.com/data/v1/rss" url = "https://api.anquanke.com/data/v1/rss"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None: if rss_content is None:
logger.warning("无法获取安全客RSS内容跳过保存操作。")
return
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -88,16 +110,17 @@ def anquanke_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/anquanke.json') save_to_json(items, './JSON/anquanke.json')
print("数据已保存到 ./JSON/anquanke.json") logger.info("数据已保存到 ./JSON/anquanke.json")
else:
print("无法获取安全客RSS内容跳过保存操作。")
# sec_wiki 爬虫 # sec_wiki 爬虫
def sec_wiki_main(): def sec_wiki_main():
url = "https://www.sec_wiki.com/news/rss" url = "https://www.sec_wiki.com/news/rss"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None: if rss_content is None:
logger.warning("无法获取安全维基RSS内容跳过保存操作。")
return
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -105,16 +128,17 @@ def sec_wiki_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/sec_wiki.json') save_to_json(items, './JSON/sec_wiki.json')
print("数据已保存到 ./JSON/sec_wiki.json") logger.info("数据已保存到 ./JSON/sec_wiki.json")
else:
print("无法获取安全维基RSS内容跳过保存操作。")
# 华为 爬虫 # 华为 爬虫
def huawei_main(): def huawei_main():
url = "https://www.huawei.com/cn/rss-feeds/psirt/rss" url = "https://www.huawei.com/cn/rss-feeds/psirt/rss"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None: if rss_content is None:
logger.warning("无法获取华为RSS内容跳过保存操作。")
return
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -122,16 +146,17 @@ def huawei_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/huawei.json') save_to_json(items, './JSON/huawei.json')
print("数据已保存到 ./JSON/huawei.json") logger.info("数据已保存到 ./JSON/huawei.json")
else:
print("无法获取华为RSS内容跳过保存操作。")
# 洞见微信聚合爬虫 # 洞见微信聚合爬虫
def doonsec_main(): def doonsec_main():
url = "https://wechat.doonsec.com/bayes_rss.xml" url = "https://wechat.doonsec.com/bayes_rss.xml"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None: if rss_content is None:
logger.warning("无法获取洞见微信聚合RSS内容跳过保存操作。")
return
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -139,16 +164,17 @@ def doonsec_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/doonsec.json') save_to_json(items, './JSON/doonsec.json')
print("数据已保存到 ./JSON/doonsec.json") logger.info("数据已保存到 ./JSON/doonsec.json")
else:
print("无法获取洞见微信聚合RSS内容跳过保存操作。")
# 奇安信攻防社区 爬虫 # 奇安信攻防社区 爬虫
def qianxin_main(): def qianxin_main():
url = "https://forum.butian.net/Rss" url = "https://forum.butian.net/Rss"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None: if rss_content is None:
logger.warning("无法获取奇安信攻防社区RSS内容跳过保存操作。")
return
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -156,9 +182,7 @@ def qianxin_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/qianxin.json') save_to_json(items, './JSON/qianxin.json')
print("数据已保存到 ./JSON/qianxin.json") logger.info("数据已保存到 ./JSON/qianxin.json")
else:
print("无法获取奇安信攻防社区RSS内容跳过保存操作。")
def run(): def run():
seebug_main() seebug_main()
@ -168,4 +192,3 @@ def run():
huawei_main() huawei_main()
doonsec_main() doonsec_main()
qianxin_main() qianxin_main()

View File

@ -4,6 +4,22 @@ import requests
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import json import json
from requests.exceptions import RequestException from requests.exceptions import RequestException
import logging
# 设置日志记录
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.handlers.clear() # 清除已有的处理器
file_handler = logging.FileHandler('./log/spider.log', mode='a', encoding='utf-8')
file_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
logger.addHandler(file_handler)
logger.addHandler(console_handler)
logger.propagate = False # 禁用日志传递
# 测试用爬虫请求头 # 测试用爬虫请求头
headers = { headers = {
@ -25,7 +41,7 @@ def fetch_rss(url, headers):
response.raise_for_status() # 检查请求是否成功 response.raise_for_status() # 检查请求是否成功
return response.content return response.content
except RequestException as e: except RequestException as e:
print(f"请求失败: {e}") # 可选:打印错误信息 logger.error(f"请求 {url} 时发生错误: {e}")
return None # 返回None表示请求失败 return None # 返回None表示请求失败
def parse_rss(rss_content): def parse_rss(rss_content):
@ -49,7 +65,12 @@ def save_to_json(data, filename):
def freebuf_main(): def freebuf_main():
url = "https://www.freebuf.com/feed" url = "https://www.freebuf.com/feed"
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is not None:
if rss_content is None:
logger.warning("无法获取Freebuf RSS内容跳过保存操作。")
return
try:
items = parse_rss(rss_content) items = parse_rss(rss_content)
# 确保目录存在 # 确保目录存在
@ -57,9 +78,9 @@ def freebuf_main():
# 将解析后的数据保存到 JSON 文件 # 将解析后的数据保存到 JSON 文件
save_to_json(items, './JSON/freebuf.json') save_to_json(items, './JSON/freebuf.json')
print("数据已保存到 ./JSON/freebuf.json") logger.info("数据已保存到 ./JSON/freebuf.json")
else: except Exception as e:
print("无法获取Freebuf社区RSS内容跳过保存操作。") logger.error(f"解析或保存Freebuf RSS内容时发生错误: {e}")
if __name__ == '__main__': if __name__ == '__main__':
freebuf_main() freebuf_main()

View File

@ -6,7 +6,19 @@ import json
import logging import logging
# 设置日志记录 # 设置日志记录
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.handlers.clear() # 清除已有的处理器
file_handler = logging.FileHandler('./log/spider.log', mode='a', encoding='utf-8')
file_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
console_handler = logging.StreamHandler()
console_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
logger.addHandler(file_handler)
logger.addHandler(console_handler)
logger.propagate = False # 禁用日志传递
# 测试用爬虫请求头 # 测试用爬虫请求头
headers = { headers = {
@ -24,7 +36,7 @@ def fetch_rss(url, headers):
response.raise_for_status() # 检查请求是否成功 response.raise_for_status() # 检查请求是否成功
return response.content return response.content
except requests.exceptions.RequestException as e: except requests.exceptions.RequestException as e:
logging.error(f"请求 {url} 时发生错误: {e}") logger.error(f"请求 {url} 时发生错误: {e}")
return None return None
# 先知社区 爬虫 # 先知社区 爬虫
@ -33,7 +45,7 @@ def xianzhi_main():
rss_content = fetch_rss(url, headers) rss_content = fetch_rss(url, headers)
if rss_content is None: if rss_content is None:
logging.warning("无法获取先知社区RSS内容跳过保存操作。") logger.warning("无法获取先知社区RSS内容跳过保存操作。")
return return
try: try:
@ -64,9 +76,9 @@ def xianzhi_main():
with open('./JSON/xianzhi.json', 'w', encoding='utf-8') as json_file: with open('./JSON/xianzhi.json', 'w', encoding='utf-8') as json_file:
json_file.write(json_data) json_file.write(json_data)
logging.info("数据已保存到 ./JSON/xianzhi.json") logger.info("数据已保存到 ./JSON/xianzhi.json")
except Exception as e: except Exception as e:
logging.error(f"解析或保存先知社区RSS内容时发生错误: {e}") logger.error(f"解析或保存先知社区RSS内容时发生错误: {e}")
# 示例调用 # 示例调用
if __name__ == "__main__": if __name__ == "__main__":