# parse $user_input $database="$user_input.db"; open(FILE "<$database");
$user=$ARGV[1] #
if ($user ne "root"){
# }
, , - p root - . root\0 = , , , , root.
$file="/etc/passwd\0.txt.whatever.we.want";
die("hahaha! Caught you!) if($file eq "/etc/passwd");
if (-e $file){
open (FILE, ">$file");}
/etc/passwd . - - : $insecure_data=~s/\0//g;
$file="/usr/tmp/.\\./.\\./etc/passwd";
$file=s/\.\.//g;
system("ls -l $file");
, (''). -e (non-piped) .
$file="/usr/tmp/.\\./.\\./etc/passwd";
open(FILE, "<$file") or die("No such file");
NO SUCH FILE.
$filename="/safe/dir/to/read/$FORM" open(FILE, $filename), ls - $FROM "../../../../bin/ls|", .
$filename="/safe/dir/to/read/$FORM"
if(!(-e $filename)) die("I don't think so!")
open(FILE, $filename)
-e. , "-" , , , , (|). - -, , . . - - ls%00| , - , ls !
$filename="/bin/ls /etc\0|" if(!(-e $filename)) exit; open(FILE, $filename)/etc. , -e , /bin/ls /etc . :
$filename="/bin/ls\0 /etc|" if(!(-e $filename)) exit; open(FILE, $filename), - ( ls) - /etc .
$bug="ls|" open(FILE, $bug) open(FILE, "$bug").
# First version 1.1 # Dan Bloomquist dan@lakeweb.net, %DATA. '..', . , ...
#This sets the real paths to the html and lock files.
#It is done here, after the POST data is read.
#of the classified page.
$pageurl= $realpath . $DATA{ 'adPath' } . ".html";
$lockfile= $realpath . $DATA{ 'adPath' } . ".lock";
'adPath=/../../../../../etc/passwd%00' - $pageurl . $lockfile. - (.html) .
#Read in the classified page open( FILE,"$pageurl" ) || die "can't open to read $pageurl: $!\n"; @lines= ; close( FILE );$pageurl , . , $pageurl . , , , - . , , , .
#Send your mail out.
#
open( MAIL, "|$mailprog $DATA{ 'adEmail' }" )
|| die "can't open sendmail: $adEmail: $!\n";
.. . , .. .
# flexform.cgi # Written by Leif M. Wright # leif@conservatives.net, %CONTENTS, .
$output = $basedir . $contents{'file'};
open(RESULTS, ">>$output");
, (/../../) , 0x00. - , , . pipe (|) bug.
Last-modified: Thu, 27 Jan 2000 16:40:27 GMT