Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Script to parse youporn log files with logins, e-mails and passwords.
- #In effect you receive simple file e-mail;password.
- #You may need to sort it, uniq it and remove garbage.
- #I've got 1.5M e-mail+password records.
- #Run time few minutes for 1.4GB log files.
- # #password #passwords #hack #hacker #script #perl #youporn #leak
- #The magic:
- #!/usr/bin/env perl
- use strict;
- use warnings;
- my $outfn = "parse_result.csv";
- my %stats;
- $stats{filename}=$outfn;
- unlink $stats{filename};
- open(my $out, '>', $outfn) or die "can't open $outfn: $!";
- my @files = <*.log>;
- my $e;
- my $p;
- foreach my $file (@files) {
- my $lines=0;
- my $count = 0;
- print "File: $file\n";
- open my $fh, $file or die "can't open $file: $!";
- $count += tr/\n/\n/ while sysread($fh, $_, 2 ** 16);
- seek $fh, 0, 0;
- my $line;
- while($line = <$fh>) {
- if (substr($line,0,1) eq '<') {
- $e="";
- $p="";
- }
- if (substr($line,0,6) eq 'email=') {
- $e=substr($line,6,-1);
- }
- if (substr($line,0,9) eq 'password=') {
- $p=substr($line,9,-1);
- }
- if (substr($line,0,1) eq '>' and length $e and length $p) {
- print $out "$e;$p\n";
- }
- print "\r$lines/$count";
- $lines++;
- }
- print "\n";
- close($fh);
- }
- close($out);
Add Comment
Please, Sign In to add comment