idiotbox-roulette - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- idiotbox-roulette (368B) --- 1 #!/bin/sh 2 # idiotbox roulette 3 # by: eidolon 4 # Thanks! 5 6 [ -z "$1" ] && exit 1 7 8 printf '/idiotbox.cgi\t%s\r\n' "$1" | 9 nc codemadness.org 70 | 10 awk -v seed="$RANDOM" ' 11 BEGIN { FS="\t"; srand(seed) } 12 13 /^h/ && !/^hAtom/ { out[i++] = $1" "$2 } 14 15 END { 16 p = out[int(rand()*length(out))] 17 p = substr(p, 2) 18 print p 19 } 20 ' | sed 's,URL:,url: ,'