Put this in your cgi-bin directory, chmod +x it, and check the paths to sh (at the top), whois and traceroute.
Try it out here.
#!/bin/sh echo "Content-type: text/html" echo "Pragma: no-cache" echo "" echo "" echo "<html>" echo "<head>" echo "</head>" echo "<body>" echo "<h1> WTF Am I ? </h1>" echo "Hello there, $REMOTE_ADDR - $REMOTE_HOST" echo "<hr>" echo "<h3> whois $REMOTE_ADDR </h3>" echo "<pre>" /usr/bin/whois $REMOTE_ADDR echo "</pre>" echo "<hr>" echo "<h3> traceroute $REMOTE_ADDR </h3>" echo "<pre>" /usr/bin/traceroute $REMOTE_ADDR echo "</pre>" echo "<hr>" echo "</body>" echo "</html>"