Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

⛔ A Python tool that downloads IP blocklists from various sources and builds configurations for network equipment and firewalls.

NotificationsYou must be signed in to change notification settings

groveld/blocklists

Repository files navigation

EdgeRouter Update Script

#!/bin/vbashfunctiongetJsonVal() {  python -c"import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)$1))";}JSON=$(curl -s -X GET https://raw.githubusercontent.com/groveld/blocklists/lists/lists.json)NEWFILE=$(echo$JSON| getJsonVal"['nopelist']['dnsmasq']['file']"| tr -d\")NEWHASH=$(echo$JSON| getJsonVal"['nopelist']['dnsmasq']['hash']"| tr -d\")OLDFILE=$(readlink -f /etc/dnsmasq.d/dnsmasq-blocklist.conf)OLDHASH=$(basename$OLDFILE .conf| cut -d'-' -f2)if ["$NEWHASH"=="$OLDHASH" ];thenecho"You already have the latest ads list"exit 0else  curl -s -o /config/user-data/nopelist-$NEWHASH.conf$NEWFILE  ln -sfn /config/user-data/nopelist-$NEWHASH.conf /etc/dnsmasq.d/dnsmasq-blocklist.conf  /etc/init.d/dnsmasq force-reload  rm -rf$OLDFILEecho"Finished updating ads list"exit 0fi

About

⛔ A Python tool that downloads IP blocklists from various sources and builds configurations for network equipment and firewalls.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

    Languages


    [8]ページ先頭

    ©2009-2025 Movatter.jp