Skip to content

IP Blacklist

IP Blacklist #4136

Workflow file for this run

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: |
mv all_blacklist_append.txt tmpfile
echo "">abuseipdb_blacklist_ip_score_100.txt
echo "">abuseipdb_blacklist_ip_score_75.txt
curl -G https://api.abuseipdb.com/api/v2/blacklist -d ipVersion=6 -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 ipVersion=6 -d confidenceMinimum=75 -d limit=9999999 -d plaintext -H "Key: ${{ secrets.ABUSEIPDB_TOKEN }}" -H "Accept: text/plain" >> abuseipdb_blacklist_ip_score_75.txt || true
echo "">>abuseipdb_blacklist_ip_score_100.txt
echo "">>abuseipdb_blacklist_ip_score_75.txt
curl -G https://api.abuseipdb.com/api/v2/blacklist -d ipVersion=4 -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 ipVersion=4 -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"|grep -v "#"| awk -F" " '{print $2}' > 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
cat all_blacklist.txt tmpfile |uniq> all_blacklist_append.txt
rm -f tmpfile
- name: Commit
run: |
git config --global user.email action@github.com
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