head 1.1;
access;
symbols;
locks; strict;
comment @# @;
1.1
date 2007.02.04.16.40.35; author syzdek; state Exp;
branches;
next ;
desc
@@
1.1
log
@Initial revision
@
text
@#!/bin/sh
#
# Simple CGI for viewing a web server's file system
# and reading files that have not been properly secured.
#
#
if test "x${PATH_INFO}" = "x";then
DIR=`dirname ${SCRIPT_FILENAME}`
else
DIR=${PATH_INFO}
fi
if [ -d ${DIR} ];then
echo "Content-type: text/html"
echo ""
cd ${DIR}
echo "${DIR}
"
for FILE in `ls -a ${DIR}`;do
if test "x${FILE}" = "x..";then
echo "${FILE}
"
else
echo "${FILE}
"
fi
done
else
echo "Content-type: text/plain"
echo ""
cat ${DIR}
fi
@