svesve
21.10.2009, 10:24
Подкину все продавцам какашечку )))
Статус чейнджер давно есть в паблике
в accounts.txt акки вида мыло:пасс
в status.txt – кладем статусы,каждый статус с новой строки
Для работы с AntiCaptcha нужны либа
Скачать (http://slil.ru/28105399) и положить в C:\Perl\lib
Источник тут (http://uasc.org.ua/2009/09/vkontakte-status-changer/) (uasc.org.ua)
use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Cookies;
use threads;
use Fcntl ':flock';
use threads::shared;
use AntiCaptcha;
my @ACCOUNTS:shared = &fopen('путь к файлу accounts.txt');
my @STATUS:shared = &fopen('путь к файлу status.txt');
my $threads = scalar(@ACCOUNTS)>15?15:scalar(@ACCOUNTS);
my @trl = ();
$|=1;
my $ac = AntiCaptcha->new('antigate.com', 'ваш ключ на АС');
$trl[$_] = threads->create(\&main)
for 0..$threads-1; $_->join for @trl;
foreach (<*.dat>) {
unlink;
}
exit(0);
sub main {
my ($ua,$ck) = &browser;
while (@ACCOUNTS) {
my $acc; {
lock(@ACCOUNTS);
$acc = shift @ACCOUNTS;
} my ($email,$pass) = split(':',$acc);
($email,$pass) = split(';',$acc) if (!$email);
my $page = $ua->get('http://vkontakte.ru/index.php')->as_string;
$page .= $ua->post('http://vkontakte.ru/login.php?op=slogin&nonenone=1',['s'=>'nonenone'])->as_string;
$page .= $ua->post('http://vkontakte.ru/login.php',['op'=>'a_login_attempt'])->as_string;
if ($page =~ /"captcha_sid":"(.+?)"/i) {
$page = $ua->get('http://vkontakte.ru/captcha.php?s=1&sid='.$1)->content;
open FILE,'>'.$1.'.jpg';
binmode FILE;
print FILE $page;
close FILE;
my $id = $ac->Recognize($1.'.jpg');
my $answ = undef;
until($answ = $ac->GetStatus($id))
{
sleep 5;
}
$page .= $ua->post('http://vkontakte.ru/login.php',['op'=>'a_login_attempt','captcha_sid'=>$1,'captcha_key'=>$answ])->as_string;
} else{
$page .= $ua->post('http://login.vk.com/?act=login',['email'=>$email,'pass'=>$pass,'expire'=>'1','vk'=>''])->as_string;
}
my ($s) = $page =~ /'s' value='(.+?)'/i;
$ua->post('http://vkontakte.ru/login.php?op=slogin&redirect=1', [ 's' => $s ] )->as_string;
$page = $ua->get('http://vkontakte.ru/profile.php')->as_string;
if (length($page)>=20000) {
my $id = '0';
$id = $1 if ($page =~ /"\/id(\d+)"/i);
my ($hash) = $page =~ /id='activityhash' value='(.+?)'/i;
$page = $ua->post('http://vkontakte.ru/profile.php', [ 'setactivity' => $STATUS[rand @STATUS], 'activityhash'=>$hash ] )->as_string;
if ($page =~ /"captcha_sid":"(.+?)"/i) {
$page = $ua->get('http://vkontakte.ru/captcha.php?s=1&sid='.$1)->content;
open FILE,'>'.$1.'.jpg';
binmode FILE;
print FILE $page;
close FILE;
my $id = $ac->Recognize($1.'.jpg');
my $answ = undef;
until($answ = $ac->GetStatus($id))
{
sleep 5;
}
$page = $ua->post('http://vkontakte.ru/activation.php', [ 'setactivity' => $STATUS[rand @STATUS], 'activityhash'=>$hash, 'captcha_sid'=>$1, 'captcha_key'=>$answ ] )->as_string;
}
print ' + '.($id eq'0'?$acc:'id'.$id).": changed!\n";
}else{
print ' - '.$acc.": bad acc!\n";
}
}
}
sub browser {
my $ua = new LWP::UserAgent;$ua->agent('Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1');
my $cookie_jar = HTTP::Cookies->new(file => "./".rand(1).".dat", autosave => 1);
$cookie_jar->clear();
$ua->cookie_jar($cookie_jar);
$ua->parse_head(0);
$ua->timeout(10);
return $ua, $cookie_jar;
}
sub fopen {
open(F, "<", $_[0]) || die " - [ $_[0] ] $!$/";
chomp(my @list = <F>);
close F;
return @list;
}
Статус чейнджер давно есть в паблике
в accounts.txt акки вида мыло:пасс
в status.txt – кладем статусы,каждый статус с новой строки
Для работы с AntiCaptcha нужны либа
Скачать (http://slil.ru/28105399) и положить в C:\Perl\lib
Источник тут (http://uasc.org.ua/2009/09/vkontakte-status-changer/) (uasc.org.ua)
use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Cookies;
use threads;
use Fcntl ':flock';
use threads::shared;
use AntiCaptcha;
my @ACCOUNTS:shared = &fopen('путь к файлу accounts.txt');
my @STATUS:shared = &fopen('путь к файлу status.txt');
my $threads = scalar(@ACCOUNTS)>15?15:scalar(@ACCOUNTS);
my @trl = ();
$|=1;
my $ac = AntiCaptcha->new('antigate.com', 'ваш ключ на АС');
$trl[$_] = threads->create(\&main)
for 0..$threads-1; $_->join for @trl;
foreach (<*.dat>) {
unlink;
}
exit(0);
sub main {
my ($ua,$ck) = &browser;
while (@ACCOUNTS) {
my $acc; {
lock(@ACCOUNTS);
$acc = shift @ACCOUNTS;
} my ($email,$pass) = split(':',$acc);
($email,$pass) = split(';',$acc) if (!$email);
my $page = $ua->get('http://vkontakte.ru/index.php')->as_string;
$page .= $ua->post('http://vkontakte.ru/login.php?op=slogin&nonenone=1',['s'=>'nonenone'])->as_string;
$page .= $ua->post('http://vkontakte.ru/login.php',['op'=>'a_login_attempt'])->as_string;
if ($page =~ /"captcha_sid":"(.+?)"/i) {
$page = $ua->get('http://vkontakte.ru/captcha.php?s=1&sid='.$1)->content;
open FILE,'>'.$1.'.jpg';
binmode FILE;
print FILE $page;
close FILE;
my $id = $ac->Recognize($1.'.jpg');
my $answ = undef;
until($answ = $ac->GetStatus($id))
{
sleep 5;
}
$page .= $ua->post('http://vkontakte.ru/login.php',['op'=>'a_login_attempt','captcha_sid'=>$1,'captcha_key'=>$answ])->as_string;
} else{
$page .= $ua->post('http://login.vk.com/?act=login',['email'=>$email,'pass'=>$pass,'expire'=>'1','vk'=>''])->as_string;
}
my ($s) = $page =~ /'s' value='(.+?)'/i;
$ua->post('http://vkontakte.ru/login.php?op=slogin&redirect=1', [ 's' => $s ] )->as_string;
$page = $ua->get('http://vkontakte.ru/profile.php')->as_string;
if (length($page)>=20000) {
my $id = '0';
$id = $1 if ($page =~ /"\/id(\d+)"/i);
my ($hash) = $page =~ /id='activityhash' value='(.+?)'/i;
$page = $ua->post('http://vkontakte.ru/profile.php', [ 'setactivity' => $STATUS[rand @STATUS], 'activityhash'=>$hash ] )->as_string;
if ($page =~ /"captcha_sid":"(.+?)"/i) {
$page = $ua->get('http://vkontakte.ru/captcha.php?s=1&sid='.$1)->content;
open FILE,'>'.$1.'.jpg';
binmode FILE;
print FILE $page;
close FILE;
my $id = $ac->Recognize($1.'.jpg');
my $answ = undef;
until($answ = $ac->GetStatus($id))
{
sleep 5;
}
$page = $ua->post('http://vkontakte.ru/activation.php', [ 'setactivity' => $STATUS[rand @STATUS], 'activityhash'=>$hash, 'captcha_sid'=>$1, 'captcha_key'=>$answ ] )->as_string;
}
print ' + '.($id eq'0'?$acc:'id'.$id).": changed!\n";
}else{
print ' - '.$acc.": bad acc!\n";
}
}
}
sub browser {
my $ua = new LWP::UserAgent;$ua->agent('Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1');
my $cookie_jar = HTTP::Cookies->new(file => "./".rand(1).".dat", autosave => 1);
$cookie_jar->clear();
$ua->cookie_jar($cookie_jar);
$ua->parse_head(0);
$ua->timeout(10);
return $ua, $cookie_jar;
}
sub fopen {
open(F, "<", $_[0]) || die " - [ $_[0] ] $!$/";
chomp(my @list = <F>);
close F;
return @list;
}