Merge 86f9ce943e
into e3b597d5ff
This commit is contained in:
commit
d41cf7f700
1 changed files with 23 additions and 0 deletions
23
updateproxy.sh
Normal file
23
updateproxy.sh
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#Change proxy every DELAY seconds for MAX times
|
||||||
|
FILE=toriptables2.py
|
||||||
|
COUNTER=0
|
||||||
|
MAX=$1 #
|
||||||
|
DELAY=$2
|
||||||
|
|
||||||
|
#Check if args was received
|
||||||
|
if [ $# -ne 2 ]; then
|
||||||
|
echo "USAGE: sudo ${0} <number-of-repetitions> <delay-between-repetitions>"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
#iptables dropping packets makes sure your real ip isn't leaked if webpage
|
||||||
|
#is being fetched during the proxy reload.
|
||||||
|
while [ ${COUNTER} -lt ${MAX} ]; do
|
||||||
|
iptables -w -P OUTPUT DROP
|
||||||
|
${FILE} -l
|
||||||
|
iptables -w -P OUTPUT ACCEPT
|
||||||
|
sleep ${DELAY}
|
||||||
|
let "COUNTER += 1"
|
||||||
|
done
|
Loading…
Add table
Add a link
Reference in a new issue