在如今充满信息的数字世界中,我们时常需要跟踪感兴趣的项目、关键词或者领域的最新动态。对于软件开发者、技术爱好者或者项目管理者来说,GitHub无疑是一个不可或缺的平台,拥有众多优秀的开源项目和活跃的技术社区。
但是,随着信息的爆炸式增长,我们可能会错过一些重要的更新或者有关自己关注领域的精彩内容。幸运的是,GitHub上出现了一款强大的工具,它能够帮助我们解决这个问题,实现定时关注我们所关心的关键词、项目等。
这个工具的名字是yhy0/github-cve-monitor,它为GitHub用户提供了便捷的定时关注功能。无论你是开发者、研究人员还是项目经理,这个工具都能够帮助你更高效地获取你关注的信息,并在第一时间获取最新的更新。
同步文件
1
| git clone https://github.com/yhy0/github-cve-monitor.git /opt/cve
|
配置运行脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| #!/bin/env sh
set -ex
if ! [ "$(cat /etc/timezone)" = "$TZ" ];then apt update -y ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime echo ${TZ} > /etc/timezone apt install -y tzdata dpkg-reconfigure --frontend noninteractive tzdata apt install -y python3.9 python3-pip pip install -r /opt/cve/requirements.txt rm -rf /var/lib/apt/lists/* fi
cd /opt/cve/ python3 /opt/cve/github_cve_monitor.py
|
python3安装
1 2
| sudo apt update sudo apt install python3.9 python3.9-dev
|
安装完成后,您可以通过运行以下命令来验证 Python 3.9 是否成功安装:
- 如果软件源没有包含 Python 3.9 的安装包
1 2 3 4
| sudo apt update sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.9
|
telegram推送插件安装
- 如果出现如下错误
RuntimeWarning: coroutine 'Bot.send_message' was never awaited
1
| pip install python-telegram-bot==13.15
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| tools_list: - https://api.github.com/repos/BeichenDream/Godzilla - https://api.github.com/repos/rebeyond/Behinder - https://api.github.com/repos/AntSwordProject/antSword - https://api.github.com/repos/j1anFen/shiro_attack - https://api.github.com/repos/yhy0/github-cve-monitor - https://api.github.com/repos/gentilkiwi/mimikatz - https://api.github.com/repos/ehang-io/nps - https://api.github.com/repos/chaitin/xray - https://api.github.com/repos/FunnyWolf/pystinger - https://api.github.com/repos/L-codes/Neo-reGeorg - https://api.github.com/repos/shadow1ng/fscan - https://api.github.com/repos/SafeGroceryStore/MDUT - https://api.github.com/repos/EdgeSecurityTeam/Vulnerability
keyword_list: - Sql注入 - cnvd - 未授权
user_list: - yhy0 - su18 - BeichenDream - phith0n - zhzyker - lijiejie - projectdiscovery - HavocFramework
|
配置config.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| all_config: github_token: xxxxxx dingding: - enable: 1 - webhook: xxxxxxx - secretKey: xxxxxxx - app_name: dingding feishu: - enable: 0 - webhook: xxx - app_name: feishu server: - enable: 0 - sckey: 123123 - app_name: server tgbot: - enable: 0 - token: 123 - group_id: 123 - app_name: tgbot pushplus: - enable: 0 - token: 123456 - app_name: pushplus translate: - enable: 0 black_user: - AlAIAL90
|
- github_token:
- 在需要启用的推送修改 enable为:1,其他为0
- 填入直接对应的id等信息
试运行
如果未跳错,可以将此脚本设为系统服务
设为系统服务并开机自动启动
1
| sudo nano /etc/systemd/system/yourprogram.service
|
1 2 3 4 5 6 7 8 9 10 11 12
| [Unit] Description=Your Program After=network.target
[Service] ExecStart=/path/to/yourprogram.sh Restart=always RestartSec=3 User=<your_username>
[Install] WantedBy=default.target
|
请将/path/to/yourprogram.sh替换为您实际的.sh程序路径,将替换为您的用户名。
- 保存并关闭文件:按下Ctrl + X,然后输入Y保存文件,最后按下Enter关闭编辑器。
- 启用并启动服务:运行以下命令启用和启动服务:
1 2
| sudo systemctl enable yourprogram.service sudo systemctl start yourprogram.service
|
这将使您的.sh程序在开机时自动启动,并在意外退出时自动重启。
感谢github-cve-monitor
感谢telegram推送问题解决方法
感谢Docker start