403Webshell
Server IP : 172.64.80.1  /  Your IP : 216.73.216.175
Web Server : LiteSpeed
System : Linux srv13.swhc.ca 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64
User : hongluck ( 2522)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/hongluck/public_html/old site/cgi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/hongluck/public_html/old site/cgi/gdform.cgi
#!/usr/bin/perl

sub parse_form_data
{
    local (*FORM_DATA) = @_;
    local  ( $request_method, $query_string, @key_value_pairs, $key_value, $key, $value);
    $request_method = $ENV{'REQUEST_METHOD'};
    if ($request_method eq "GET") {
        $query_string = $ENV{'QUERY_STRING'};
    } elsif ($request_method eq "POST") {
        read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
    };
    @key_value_pairs = split(/&/, $query_string);
    foreach $key_value (@key_value_pairs) {
        ($key, $value) = split (/=/, $key_value);
        if (defined($value)) {$value =~ tr/+/ /;
            $value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex ($1))/eg;};
        if (defined($FORM_DATA{$key})) {
            $FORM_DATA{$key} = join (" ", $FORM_DATA{$key}, $value);
        } else {
            $FORM_DATA{$key} = $value;
        }
    }
}; # end of sub

&parse_form_data(*simple_form);
$t = time;
chdir ($ENV{'DOCUMENT_ROOT'}) ; chdir("..");
open (OUTFILE, ">data/gdform_$t") or die ("Cannot open file");
while (($key , $value) = each(%simple_form)) {

  print OUTFILE "<GDFORM_VARIABLE NAME=$key START>\n";
  print OUTFILE "$value\n";
  print OUTFILE "<GDFORM_VARIABLE NAME=$key END>\n";
  if ($key eq "redirect") { $landing_page = $value;}

}
close (OUTFILE);

if ($landing_page ne "") {
  $scheck = index(lc($landing_page), "location:");
  if ($scheck >= 0) {
    print "Location: http://$ENV{'HTTP_HOST'}/\n\n";
  } else {
    print "Location: http://$ENV{'HTTP_HOST'}/$landing_page\n\n";
  }
} else {
  print "Location: http://$ENV{'HTTP_HOST'}/\n\n";
}


Youez - 2016 - github.com/yon3zu
LinuXploit