It looks like you're new here. If you want to get involved, click one of these buttons!
<html>
<head>
<title>..::iExploit Rules::..</title>
</head>
<body>
<h1>HTML test page for iExploit perl-cgi example</h1>
<hr />
<p><form method=\"GET\" action=\"cgi-bin/example.cgi\">
Input text to display: <input type=\"text\" size=\"30\" maxlength=\"100\" name=\"input\"> <br />
<input type=\"submit\" name=\"submit\" value=\"Print value!\">
</form></p>
<hr />
</body>
</html>
#!C:/Perl64/bin/Perl.exe -w
# Semtex-Primed
# Perl-CGI example2
# GET method using HTML form
local ($buffer, @pairs, $pair, $name, $value, %FORM);
$ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;
if ($ENV{'REQUEST_METHOD'} eq \"GET\")
{
$buffer = $ENV{'QUERY_STRING'};
}
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%(..)/pack(\"C\", hex($1))/eg;
$FORM{$name} = $value;
}
$input = $FORM{input};
print \"Content-type:text/html\r\n\r\n\";
print \"<html>\";
print \"<head>\";
print \"<title>..::iExploit Rules::..</title>\";
print \"</head>\";
print \"<body>\";
print \"<h1>HTML test page for iExploit perl-cgi example</h1>\";
print \"<hr />\";
print \"<h2>The value you input is: $input</h2>\";
print \"<hr />\";
print \"Thanks, Semtex-Primed\";
print \"</body>\";
print \"</html>\";
Thanks Xin, obviously GET is somewhat of a hazard to use. What I'm going to do is come up with a script to use for sanitising input to these types of scripts.