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 (336B)
---
1 #!/bin/sh
2 # idiotbox roulette
3 # by: eidolon
4 # Thanks!
5
6 spin() {
7 awk 'BEGIN { FS = "\t"; srand() }
8 /^h/ && !/^hAtom/ { if (rand() < 1 / ++n) out = $1" "$2 }
9 END { sub(/URL:/, "url: ", out); print substr(out, 2) }'
10 }
11
12 [ -z "$1" ] && exit 1
13
14 nc codemadness.org 70 << _EOF | spin
15 $(printf '/idiotbox.cgi\t%s\r\n' "$1")
16 _EOF