====== Misc info ====== Really just for fun, of no practical value I think.... ===== Bash cgi-bin ===== Why you would want to do this I don't know, but it seemed to fun at the time to write cgi in some obscure ways. **hello.sh** #!/bin/bash printf "Content-Type: Text/HTML\n" printf "\n\n" printf "\n" printf "BASH cgi script\n" printf "\n

This is `hostname`

\n\n" printf "\n"
===== DOS cgi-bin ===== Run this under windows and make your system even more insecure!(If that's possible) **hello.bat** @echo off echo content-type: text/html; echo. echo. echo ^ echo ^ echo ^Test for DOS batch file CGI-script^ echo ^ echo ^ echo Hello World echo. echo ^ nbtstat -A 172.25.0.20 echo ^ echo ^ echo ^ ===== BASH traceroute ===== Not mine, copied. # cat traceroute.sh #!/bin/sh # cgi-bin for traceroute - v1.4b - new links added Apr 17th 1996 # July,Dec 1995 by Laurent Demailly - dl@hplyot.obspm.fr # infos,... on http://hplyot.obspm.fr/~dl/wwwtools.html # Free software - GNU GPL - AS IS, NO WARRANTY... # please keep author's (my) reference... # note: using ncsa server, it is recommended to name the script # "nph-something", like nph-traceroute so outputs come as it is # done and not at the end. # configure the following according to your place : # place name: PLACENAME="Observatoire de Paris à Meudon (France)" # traceroute full path (unix path): TRACEROUTE=/usr/local/bin/traceroute # this script relative url (absolute would work too) SCRIPTURL=/cgi-bin/nph-traceroute # an icon to use as back to your home page BACK2TOPICON=/icons/house.gif # the icon width ICONWIDTH=48 # the icon height (use xv for instance to check sizes) ICONHEIGHT=48 # you are going to use this script, please drop a mail to # so I can add you to the directory # (I'm planning for version 2.0 some sort of auto database, etc...) # no changes shall be needed below, but have a look : echo HTTP/1.0 200 OK echo Content-type: text/html echo Server: $SERVER_SOFTWARE echo cat << EOM Traceroute

Traceroute

EOM if [ -x $TRACEROUTE ]; then if [ $# = 0 ]; then cat << EOM Typein the name of a machine (or follow here for trace to your place ($REMOTE_HOST)) you want to trace from $PLACENAME: You can also try the following traceroute services If you know a web traceroute not listed above (like if you install a copy of this script at your site), please mail me (dl@hplyot.obspm.fr), so I can add a link here for the benefit of everybody. EOM else echo "Result for $1:" echo \ nice $TRACEROUTE "$1" 2>&1 echo \ fi else echo Cannot find traceroute on this system. fi cat << EOM
Idea stolen from S.Bortzmeyer.
This implementation (1.4b) is © by Laurent Demailly

[top] EOM