#!/bin/bash #### NetHack Google Abuser v. 0.6 #### # by Stanislav Traykov # # The NetHack Google Abuser displays some YAFAP and YAAP statistics. # It requires bash and nc (netcat). # # Changes: # 0.6 - added filter and num for more accurate results # - added sleeping gaver=0.6 #CONFIG------------ # location of Dylan O'Donnell's gods spoiler for name lookup godspoil="/home/glimz/documents/nhspoilers/gods-342.txt" # netcat program netcat=nc # sleep between queries? dosleep=false # if you don't like the defaults, uncomment and change the following: # sleep=sleep #sleep command # sleep_amount=0.5 #seconds #end CONFIG-------- firstq=false roles="Arc Bar Cav Hea Kni Mon Pri Rog Ran Sam Tou Val Wiz" alignments="Cha Neu Law" sclasses="$roles $alignments" newsgrp="rec.games.roguelike.nethack" search="GET /groups?num=100&filter=0&q=group%%3A${newsgrp}" insub="insubject%%3A" exclRe="-${insub}re" exclAln=`eval "echo -${insub}{\`echo -n $alignments|sed 'y/ /,/'\`} | sed 'y/ /+/'"` lookupGod() { if [ -r "$godspoil" ]; then echo `grep -A3 $1 $godspoil | grep "^$2" | sed "s/.*: *\([A-Za-z ]*\).*/\1/"` else echo "$1$2" fi } google() { $dosleep && $firstq && ${sleep:-sleep} ${sleep_amount:-0.5} echo `\ printf "$* HTTP/1.0\n\n" \ | $netcat groups.google.com 80 \ | (grep "^