IP Blacklist #3157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: IP Blacklist | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */6 * * *' | |
jobs: | |
fetch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Fetch | |
run: | | |
curl -G https://api.abuseipdb.com/api/v2/blacklist -d confidenceMinimum=100 -d limit=9999999 -d plaintext -H "Key: ${{ secrets.ABUSEIPDB_TOKEN }}" -H "Accept: text/plain" > abuseipdb_blacklist_ip_score_100.txt || true | |
curl -G https://api.abuseipdb.com/api/v2/blacklist -d confidenceMinimum=75 -d limit=9999999 -d plaintext -H "Key: ${{ secrets.ABUSEIPDB_TOKEN }}" -H "Accept: text/plain" > abuseipdb_blacklist_ip_score_75.txt || true | |
curl http://antivirus.neu.edu.cn/ssh/lists/neu.txt -H "Accept: text/plain"|grep -v "127.0.0.1" > neucert_blacklist_ip.txt || true | |
curl https://blackip.ustc.edu.cn/list.php?txt -H "Accept: text/plain"|grep -v "127.0.0.1" > ustc_blacklist_ip.txt || true | |
for F in `ls *.txt`;do echo "">> $F; done | |
cat *.txt|grep -v "#"|sort|uniq > all_blacklist.txt | |
- name: Commit | |
run: | | |
git config --global user.email [email protected] | |
git config --global user.name Action | |
git add . | |
git commit -m "Update IP." -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main |