Difference between revisions of "BlackBlockGoogle"

From FuckOffGoogle
Jump to: navigation, search
Line 25: Line 25:
 
------
 
------
  
IP=nslookup $1 | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | tail -n1 | cut -d\ -f3
+
-- iptsetup.sh --
AS=wget -q -O - http://ipinfo.io/$IP/org | cut -f1 -d \ | sed -e 's/AS//'
+
<pre>
 +
#!/bin/sh
 +
#
 +
## setup domain.com name fwmark#
 +
#
 +
IP=`nslookup $1 | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | tail -n1 | cut -d\ -f3`
 +
AS=`wget -q -O - http://ipinfo.io/$IP/org | cut -f1 -d \ | sed -e 's/AS//'`
  
 
echo '#!/bin/sh' > add_$2.sh
 
echo '#!/bin/sh' > add_$2.sh
Line 32: Line 38:
 
echo '#!/bin/sh' > del_$2.sh
 
echo '#!/bin/sh' > del_$2.sh
 
chmod 750 del_$2.sh
 
chmod 750 del_$2.sh
NETWORKS=wget -O - http://stat.ripe.net/data/announced-prefixes/data.yaml?resource=$AS|grep prefix\:|grep -v \:\:|awk '{print $3}'
+
NETWORKS=`wget -O - http://stat.ripe.net/data/announced-prefixes/data.yaml?resource=$AS|grep prefix\:|grep -v \:\:|awk '{print $3}'`
  
 
echo "iptables -t mangle -N $2_ip" >> add_$2.sh
 
echo "iptables -t mangle -N $2_ip" >> add_$2.sh
Line 47: Line 53:
 
echo "iptables -t mangle -X $2_ip" >> del_$2.sh
 
echo "iptables -t mangle -X $2_ip" >> del_$2.sh
 
echo "iptables -t mangle -X $2_do" >> del_$2.sh
 
echo "iptables -t mangle -X $2_do" >> del_$2.sh
root@OpenWrt:/usr/sbin#
+
 
13:03so you would do "iptsetup.sh google.com gl 1"
+
</pre>
13:04that would create for you add_gl.sh and del_gl.sh
+
 
 +
Do, for example: "iptsetup.sh google.com gl 1"
 +
that would create for you add_gl.sh and del_gl.sh

Revision as of 11:18, 27 April 2018

A list of tools, please check their descriptions inside...

https://addons.mozilla.org/en-US/firefox/addon/librejs/

https://addons.mozilla.org/en-US/firefox/addon/trackmenot/

https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/

https://www.eff.org/privacybadger

https://prism-break.org/en/


IP=nslookup $1 | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | tail -n1 | cut -d\ -f3

AS=wget -q -O - http://ipinfo.io/$IP/org | cut -f1 -d \ | sed -e 's/AS//'

NETWORKS=wget -O - http://stat.ripe.net/data/announced-prefixes/data.yaml?resource=$AS%7Cgrep prefix\:|grep -v \:\:|awk '{print $3}'

for i in $NETWORKS; do echo "iptables -t mangle -A ggl_ip -d $i -j ggl_do"; done



-- iptsetup.sh --

#!/bin/sh
#
## setup domain.com name fwmark#
#
IP=`nslookup $1 | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | tail -n1 | cut -d\  -f3`
AS=`wget -q -O - http://ipinfo.io/$IP/org | cut -f1 -d \  | sed -e 's/AS//'`

echo '#!/bin/sh' > add_$2.sh
chmod 750 add_$2.sh
echo '#!/bin/sh' > del_$2.sh
chmod 750 del_$2.sh
NETWORKS=`wget -O - http://stat.ripe.net/data/announced-prefixes/data.yaml?resource=$AS|grep prefix\:|grep -v \:\:|awk '{print $3}'`

echo "iptables -t mangle -N $2_ip" >> add_$2.sh
echo "iptables -t mangle -N $2_do" >> add_$2.sh
echo "iptables -t mangle -A m_ip -j $2_ip" >> add_$2.sh
echo "iptables -t mangle -D m_ip -j $2_ip" >> del_$2.sh

for i in $NETWORKS; do echo "iptables -t mangle -A $2_ip -d $i -j $2_do" >> add_$2.sh; done
for i in $NETWORKS; do echo "iptables -t mangle -D $2_ip -d $i -j $2_do" >> del_$2.sh; done

echo "iptables -t mangle -A $2_do -j MARK --set-mark $3" >> add_$2.sh
echo "iptables -t mangle -D $2_do -j MARK --set-mark $3" >> del_$2.sh

echo "iptables -t mangle -X $2_ip" >> del_$2.sh
echo "iptables -t mangle -X $2_do" >> del_$2.sh

Do, for example: "iptsetup.sh google.com gl 1" that would create for you add_gl.sh and del_gl.sh