WIP scripts
This commit is contained in:
parent
7d14bab2d8
commit
81fddeba05
3 changed files with 207 additions and 0 deletions
100
scripts/2021/donaraltopt
Executable file
100
scripts/2021/donaraltopt
Executable file
|
@ -0,0 +1,100 @@
|
|||
#!/bin/bash
|
||||
|
||||
red() { IFS= ; while read -r line; do echo -e '\e[31m'$line'\e[0m'; done; }
|
||||
green() { IFS= ; while read -r line; do echo -e '\e[32m'$line'\e[0m'; done; }
|
||||
yellow() { IFS= ; while read -r line; do echo -e '\e[33m'$line'\e[0m'; done; }
|
||||
blue() { IFS= ; while read -r line; do echo -e '\e[34m'$line'\e[0m'; done; }
|
||||
purple() { IFS= ; while read -r line; do echo -e '\e[35m'$line'\e[0m'; done; }
|
||||
cyan() { IFS= ; while read -r line; do echo -e '\e[36m'$line'\e[0m'; done; }
|
||||
|
||||
SOCK_PORT=$((9000+$1))
|
||||
CONTROL_PORT=$((9100+$1))
|
||||
LOCAL_PORT=$((9200+$1))
|
||||
DONAR_PORT=$((7000+$1*12))
|
||||
|
||||
while true; do
|
||||
touch /tmp/empty
|
||||
rm -rf /tmp/tor$CONTROL_PORT
|
||||
/usr/local/bin/tor2 \
|
||||
-f /tmp/empty --defaults-torrc /tmp/empty \
|
||||
--hush \
|
||||
--UseEntryGuards 1 \
|
||||
--NumEntryGuards 2 \
|
||||
--NumPrimaryGuards 2 \
|
||||
--SocksPort 0 \
|
||||
--ControlPort $CONTROL_PORT \
|
||||
--DataDirectory /tmp/tor$CONTROL_PORT | red &
|
||||
sleep 1
|
||||
|
||||
rm -rf /tmp/tor$SOCK_PORT
|
||||
/usr/local/bin/tor2 \
|
||||
-f /tmp/empty --defaults-torrc /tmp/empty \
|
||||
--hush \
|
||||
--UseEntryGuards 1 \
|
||||
--NumEntryGuards 2 \
|
||||
--NumPrimaryGuards 2 \
|
||||
--SocksPort "127.0.0.1:$SOCK_PORT IsolateDestPort IsolateDestAddr IsolateClientAddr" \
|
||||
--DataDirectory /tmp/tor$SOCK_PORT | green &
|
||||
sleep 1
|
||||
|
||||
rm -rf state_$LOCAL_PORT/
|
||||
mkdir state_$LOCAL_PORT/
|
||||
pushd .
|
||||
cd state_$LOCAL_PORT/
|
||||
/usr/local/bin/donar \
|
||||
-s \
|
||||
-a lightning \
|
||||
-q $CONTROL_PORT \
|
||||
-k $DONAR_PORT \
|
||||
-l 12 \
|
||||
-p 'fast_count=3!tick_tock=1!measlat=0!window=2000' \
|
||||
-b \
|
||||
-e $LOCAL_PORT 2>&1 | yellow &
|
||||
sleep 1
|
||||
|
||||
/usr/local/bin/donar \
|
||||
-c \
|
||||
-a lightning \
|
||||
-q $SOCK_PORT \
|
||||
-k $DONAR_PORT \
|
||||
-o ./onion_services.pub \
|
||||
-l 12 \
|
||||
-p 'fast_count=3!tick_tock=1!measlat=0!window=2000' \
|
||||
-b \
|
||||
-r $LOCAL_PORT 2>&1 | blue &
|
||||
sleep 1
|
||||
popd
|
||||
|
||||
/usr/local/bin/measlat \
|
||||
-l \
|
||||
-t udp \
|
||||
-h 127.0.0.1 \
|
||||
-p $LOCAL_PORT \
|
||||
-c 135000 \
|
||||
-i 40 \
|
||||
-m donaraltopt \
|
||||
-s 172 2>&1 | cyan &
|
||||
sleep 1
|
||||
|
||||
/usr/local/bin/measlat \
|
||||
-t udp \
|
||||
-h 127.13.3.7 \
|
||||
-p $LOCAL_PORT \
|
||||
-b \
|
||||
-c 1 \
|
||||
-i 5000 \
|
||||
-m donaraltopt \
|
||||
-s 172 2>&1 | purple
|
||||
|
||||
/usr/local/bin/measlat \
|
||||
-t udp \
|
||||
-h 127.13.3.7 \
|
||||
-p $LOCAL_PORT \
|
||||
-c 135000 \
|
||||
-i 40 \
|
||||
-m donaraltopt \
|
||||
-s 172 2>&1 | purple
|
||||
|
||||
kill -9 $(jobs -p)
|
||||
sleep 5
|
||||
done
|
100
scripts/2021/donardupopt
Executable file
100
scripts/2021/donardupopt
Executable file
|
@ -0,0 +1,100 @@
|
|||
#!/bin/bash
|
||||
|
||||
red() { IFS= ; while read -r line; do echo -e '\e[31m'$line'\e[0m'; done; }
|
||||
green() { IFS= ; while read -r line; do echo -e '\e[32m'$line'\e[0m'; done; }
|
||||
yellow() { IFS= ; while read -r line; do echo -e '\e[33m'$line'\e[0m'; done; }
|
||||
blue() { IFS= ; while read -r line; do echo -e '\e[34m'$line'\e[0m'; done; }
|
||||
purple() { IFS= ; while read -r line; do echo -e '\e[35m'$line'\e[0m'; done; }
|
||||
cyan() { IFS= ; while read -r line; do echo -e '\e[36m'$line'\e[0m'; done; }
|
||||
|
||||
SOCK_PORT=$((9000+$1))
|
||||
CONTROL_PORT=$((9100+$1))
|
||||
LOCAL_PORT=$((9200+$1))
|
||||
DONAR_PORT=$((7000+$1*12))
|
||||
|
||||
while true; do
|
||||
touch /tmp/empty
|
||||
rm -rf /tmp/tor$CONTROL_PORT
|
||||
/usr/local/bin/tor2 \
|
||||
-f /tmp/empty --defaults-torrc /tmp/empty \
|
||||
--hush \
|
||||
--UseEntryGuards 1 \
|
||||
--NumEntryGuards 2 \
|
||||
--NumPrimaryGuards 2 \
|
||||
--SocksPort 0 \
|
||||
--ControlPort $CONTROL_PORT \
|
||||
--DataDirectory /tmp/tor$CONTROL_PORT | red &
|
||||
sleep 1
|
||||
|
||||
rm -rf /tmp/tor$SOCK_PORT
|
||||
/usr/local/bin/tor2 \
|
||||
-f /tmp/empty --defaults-torrc /tmp/empty \
|
||||
--hush \
|
||||
--UseEntryGuards 1 \
|
||||
--NumEntryGuards 2 \
|
||||
--NumPrimaryGuards 2 \
|
||||
--SocksPort "127.0.0.1:$SOCK_PORT IsolateDestPort IsolateDestAddr IsolateClientAddr" \
|
||||
--DataDirectory /tmp/tor$SOCK_PORT | green &
|
||||
sleep 1
|
||||
|
||||
rm -rf state_$LOCAL_PORT/
|
||||
mkdir state_$LOCAL_PORT/
|
||||
pushd .
|
||||
cd state_$LOCAL_PORT/
|
||||
/usr/local/bin/donar \
|
||||
-s \
|
||||
-a lightning \
|
||||
-q $CONTROL_PORT \
|
||||
-k $DONAR_PORT \
|
||||
-l 12 \
|
||||
-p 'fast_count=3!tick_tock=0!measlat=0!window=2000' \
|
||||
-b \
|
||||
-e $LOCAL_PORT 2>&1 | yellow &
|
||||
sleep 1
|
||||
|
||||
/usr/local/bin/donar \
|
||||
-c \
|
||||
-a lightning \
|
||||
-q $SOCK_PORT \
|
||||
-k $DONAR_PORT \
|
||||
-o ./onion_services.pub \
|
||||
-l 12 \
|
||||
-p 'fast_count=3!tick_tock=0!measlat=0!window=2000' \
|
||||
-b \
|
||||
-r $LOCAL_PORT 2>&1 | blue &
|
||||
sleep 1
|
||||
popd
|
||||
|
||||
/usr/local/bin/measlat \
|
||||
-l \
|
||||
-t udp \
|
||||
-h 127.0.0.1 \
|
||||
-p $LOCAL_PORT \
|
||||
-c 135000 \
|
||||
-i 40 \
|
||||
-m donardupopt \
|
||||
-s 172 2>&1 | cyan &
|
||||
sleep 1
|
||||
|
||||
/usr/local/bin/measlat \
|
||||
-t udp \
|
||||
-h 127.13.3.7 \
|
||||
-p $LOCAL_PORT \
|
||||
-b \
|
||||
-c 1 \
|
||||
-i 5000 \
|
||||
-m donardupopt \
|
||||
-s 172 2>&1 | purple
|
||||
|
||||
/usr/local/bin/measlat \
|
||||
-t udp \
|
||||
-h 127.13.3.7 \
|
||||
-p $LOCAL_PORT \
|
||||
-c 135000 \
|
||||
-i 40 \
|
||||
-m donardupopt \
|
||||
-s 172 2>&1 | purple
|
||||
|
||||
kill -9 $(jobs -p)
|
||||
sleep 5
|
||||
done
|
7
scripts/2021/donardupopt@.service
Normal file
7
scripts/2021/donardupopt@.service
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=donardupopt
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/donardupopt %i
|
||||
WorkingDirectory=/root/donardupopt/
|
||||
|
Loading…
Reference in a new issue