Skip to content

Instantly share code, notes, and snippets.

@htruong
Created May 16, 2014 23:45
Show Gist options
  • Save htruong/343c17ef1307f2b4d477 to your computer and use it in GitHub Desktop.
Save htruong/343c17ef1307f2b4d477 to your computer and use it in GitHub Desktop.
Tomato Adblock LITE script
PREFIX="/tmp/adblock/" ## adjust this!
mkdir $PREFIX
echo '
PIXEL_IP="0" ## 0: disable pixelserv
PIXEL_OPTS=""
BRIDGE="br0"
RAMLIST="1" ## 1: keep blocklist in RAM (e.g. for small JFFS)
CONF="/etc/dnsmasq.custom" ## dnsmasq custom config
SOURCES="$SOURCES http://winhelp2002.mvps.org/hosts.txt"
SOURCES="$SOURCES http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext"
BLACKLIST=""
WHITELIST=""
' > "$PREFIX/config" && echo "config success"
[ -d "$PREFIX" ] || mkdir -p "$PREFIX"
echo "
H4sIAB+rOVMAA5VXe1PbSBL/2/oUzaBCOGVZNix7WXOmjoATXEtiFkztVYXkSlhj
exZZEnpgUhu++3XPQ5INDtmisDSj7p5fv3u2t7xbEXnZ3NrehpOQ+1ELzvEX/CiA
j/RyHNyG8eQOHn5pH8DtN5j7fpogNTGMklzEUdajd2capxPu9EA+oUgCPxfRDLK4
wHXWkjRZHidIEojMvw25kd0CJ49ns5C47wsxuQu/gdooT48Vong6lXJSnuV+miO9
fisJd3l71iYMMImjqZjBZO5HM541LWIcj05HPXAmpKjTIjx+XmQOxEoRy/JD4WfA
w3jWd/BnxlNwUfjpu/PRye/gZo6mEElOGmR9xyuy1MvIiGbPsaxEBFMR8r734Kde
WkSer+C18YN1J8IQ3A7YuxM/B1vTwt6RF/AHLyrCsAk71QJ2duBvq0GYgB1HcT5H
UCJC6BHaeRoXaJddI6XZAv4oyPBbDHnwFbrWk8Un8xhsG47K4xAjfd1tVrIHihH5
0kVFp4TY/0EpFrmvznGF66RkYfbJ6NN7VsduWQ1jFXBPYfjp4noMrgD73eXw9MMA
3ATySQJuAHbKA5EKfHe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+CwNbA7kY/ndw/r/h
hULSqSHRzu2zTlv+GYEI4bGyWjloVGZds2s1ipSm9fgjxzpFUwZZ2Zi5I2PZnGvv
rk8rZRsVEdZ3Csmq4O1TwetV6+56AWSZt3dw4JUKe9h+0QxY9fyMYgSdIKTWcgpp
As1zh4eYE/hsyt9DUDg7tK1m8KZJaVX/VBrDKjE8Eb3sqk316KPHaY+xZqNHL2+a
2maO3XWkmdBIPEU5MYahEdVFUp75E8RshqtlFMZ+AGa6YlYR5YKmP6zX7j129i7M
4hiBtifxAqrqrIqDkvKnL0dbcy+IMHbFg8i/tdttmtJCjhbf71iqROSpn4CjJ1wx
i3DswGDn4oFSekJTdxgSkEOQbeHFgrtTx/GMzIw9a3TaBPsdB66GH/64Ho7pOfwk
H+PB5Ud6nl1fWGqep06PJe/FrkuKZrJYXo2uL08GV8oa1dAJdgY7SuElGseysN3g
JSTlaGqcNxS5Dhtcq8BpdJqNQDuEB31yVqPRRY/LgUCv95qNwgw7aks6lI5aL4QG
7ZqByn3lCvc1a+g0r5A9LzmrwYQUqJyaBDDONH+JehP7exHmGLFQEeoBYEslyIsl
vjYGmBMb+sitlbxSZLAdcR5gfN0hQ0/1dx0Ye7JZqwK1lhzKAaw+j7wMBqfYf3jq
vjyVqohqs6SEKwfwDUccGeHW8/q7tVZ/kSDJavOPfJrl/Uv11fRjVlpVmaKi8EMK
4m+A1+4I07QF2Z0wt1Q9Lenc5rksCkVSu0rGUXWERZN2eVF8ONc3xTo+VbTbb8qL
4hu6zwZJ3lsul8w0i5qU4T+5bv4M68/cn1HOk7w1PLsZl2xFggQvdbySQrtxdDG+
qkLilQvwpvuvpRuH9X+EHnJggBIAAA==
" | openssl enc -d -base64 | gunzip -c > "$PREFIX/adblock.sh" && echo "script creation success"
chmod +x "$PREFIX/adblock.sh"
$PREFIX/adblock.sh && echo "adblock success"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment