more scripts

This commit is contained in:
Quentin 2021-01-27 22:51:49 +01:00
parent eb1dad3cea
commit c52a4e3a00
3 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,7 @@
[Unit]
Description=donaralt
[Service]
ExecStart=/usr/local/bin/donaralt %i
WorkingDirectory=/root/donaralt/

53
scripts/2021/torhsopt Executable file
View file

@ -0,0 +1,53 @@
#!/bin/bash
while true; do
SOCK_PORT=$((9000+$1))
CONTROL_PORT=$((9100+$1))
LOCAL_PORT=$((9200+$1))
echo "tor daemon serv"
/usr/local/bin/tor2 \
--hush \
--UseEntryGuards 0 \
--SocksPort 0 \
--ControlPort $CONTROL_PORT \
--DataDirectory /tmp/tor$CONTROL_PORT &
echo "tor client serv"
/usr/local/bin/tor2 \
--hush \
--UseEntryGuards 0 \
--SocksPort "127.0.0.1:$SOCK_PORT IsolateDestPort IsolateDestAddr IsolateClientAddr" \
--DataDirectory /tmp/tor$SOCK_PORT &
sleep 5
echo "measlat serv"
rm -f os_${LOCAL_PORT}.{pub,priv}
/usr/local/bin/measlat \
-l \
-t tor \
-q $CONTROL_PORT \
-p $LOCAL_PORT \
-c 135000 \
-i 40 \
-s 172 \
-m torhsopt &
until [ -f os_${LOCAL_PORT}.pub ]; do sleep 1; done
echo "measlat cli"
/usr/local/bin/measlat \
-t tor \
-q $SOCK_PORT \
-h $(cat os_${LOCAL_PORT}.pub).onion \
-p $LOCAL_PORT \
-c 135000 \
-i 40 \
-s 172 \
-m torhsopt
kill -9 $(jobs -p)
sleep 5
done

View file

@ -0,0 +1,7 @@
[Unit]
Description=torhsopt
[Service]
ExecStart=/usr/local/bin/torhsopt %i
WorkingDirectory=/root/torhsopt/