11 ms·
#!/bin/sh;#name: dot export DOTLIST=/path/dot.lst test -f $DOTLIST ||exec echo $DOTLIST missing x=$(case $(uname) in :) ;;Linux
by 1vuio0pswjnm7 1y ago
#!/bin/sh;#name: dot
export DOTLIST=/path/dot.lst
test -f $DOTLIST ||exec echo $DOTLIST missing
x=$(case $(uname) in :)
;;Linux)shuf $DOTLIST
;;NetBSD)shuffle -f $DOTLIST
esac|sed 's/ \{0,80\}//;/^[ ]\{0,80\}[;#]/d;/^$/d;/./q')
test $x||{
x=$(sed 's/ *//;/[;#]/d;/^$/d' $DOTLIST|sed -n '$!d;=')
x=$(echo|awk '{srand();printf "%i\n",rand()*'$x'}')
x=$(sed 's/ *//;/[;#]/d;/^$/d' $DOTLIST|sed -n "$x"p)
}
if
test $# -gt 0
then
case $1 in -h|-?|--help)
exec echo usage: ${0##*/} [domainlist]
esac
test -f $1||exit
fi
streamtcp -ansf $x $(sed 's/$/ a in/' ${1-/dev/stdin}) ||
echo svr $x
dot.lst is a list of DoT servers in format ip@port
comments may begin with '#' or ';'
# working
5.5.5.5@853
# not working
;6.6.6.6@443
example usage:
dot < domains.txt > data
yy101 4 < data|sqlite3 map-ip.db