Famous last words: "surely this CGI script is safe"

Seth Gordon sethg at ropine.com
Mon Mar 31 16:45:18 EST 2003


I've composed this CGI shell script as an example of backlink-tracing:

[begin]
#!/bin/bash

echo "Content-type: text/plain"
echo

# If the linking page isn't in the referers file, add it.
grep --quiet $HTTP_REFERER referers || echo $HTTP_REFERER >> referers

echo
echo "Links to this page have been followed from the following URLs:"
echo
cat referers
[end]

Other than filling up my partition with spurious URLs, is there any
damage that a malicious outsider could do with this script?

-- 
"Your labour is only worth something to the extent that it saves someone
else having to do it."  --Paul Foley
// seth gordon // sethg at ropine.com // http://ropine.com/sethg/cv.html //




More information about the Discuss mailing list