Index of /crappycode/whore-cgi
Name Last modified Size Description
Parent Directory 29-Nov-2005 11:52 -
whore 20-Sep-2004 05:07 1k
#!/usr/local/bin/bash
#COMMENTS
#this is just a stupid shell script I wrote to confirm that cgi scripts were running properly
#its more here for me to reference it if I ever need some sample code for psuedorandom number generation in bash
#Set URL to the link to this cgi
URL=
RANDOM=$(date +%s)
function NUMGEN() {
NUMBER=$[ ( $RANDOM % 10 ) + 1 ]
}
NUMGEN
case "$NUMBER" in
1)WHORE="<h3>WHORE</h3>"
;;
2)WHORE="w<h3>hOr</h3>e"
;;
3)WHORE="<h2>whOR3</h2>"
;;
4)WHORE="<h1>whore!</h1>"
;;
5)WHORE="<h3>!erohw</h3>"
;;
6)WHORE="<b>w</b>h0R<h3>3</h3>"
;;
7)WHORE="<h3>wh</h3>0RE"
;;
8)WHORE="<h1>w</h1><h2>h</h2><h3>o</h3><h2>r</h2><h1>e</h1>"
;;
9)WHORE="<h3>Wh</h3>0r3"
;;
10)WHORE="<h1>who</h1><h3>RE</h3>"
;;
*)WHORE="whORE"
esac
echo Content-type: text/plain
echo ""
echo "<META HTTP-EQUIV=Refresh CONTENT="1"; URL="$URL
echo "<HTML><HEAD><TITLE>Whore</TITLE></HEAD><BODY>"$WHORE"<br></BODY></HTML>"