Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use LWP::UserAgent;
- use HTTP::Cookies;
- use Text::Iconv;
- $mail = '';
- $pass = '';
- sub str_replace {
- my $replace_this = shift;
- my $with_this = shift;
- my $string = shift;
- my $length = length($string);
- my $target = length($replace_this);
- for(my $i=0; $i<$length - $target + 1; $i++){
- if(substr($string,$i,$target) eq $replace_this){
- $string = substr($string,0,$i) . $with_this . substr($string,$i+$target);
- return $string;
- }
- } return $string;
- }
- print "Auth................";
- $browser = LWP::UserAgent->new();
- $cookie = HTTP::Cookies->new( file => 'cookie.txt', autosave => 1, );
- $browser->cookie_jar($cookie);
- $login = $browser->get("http://login.vk.com/?act=login&email=$mail&pass=$pass&from_host=vk.com")->as_string;
- if($login =~ /reg/) {
- print 'fail!n';
- #exit(1);
- } else {
- print "sucess!\nGetting hash........";
- }
- $chas = $browser->get("http://m.vk.com/letter12943")->as_string;
- if($chas =~ /s\" value=\"(.*)\"/) {
- print "$1\nSend request........";
- $chas = $1;
- $to_id =~ /d\" value=\"(.*)\"/;
- $to_reply =~ /y\" value=\"(.*)\"/;
- $title =~ /e\" value=\"(.*)\"/;
- } else {
- print 'fail!\n'
- #exit(1);
- }
- $link = 'http://m.vk.com/mailsent?pda=1';
- $message = 'Hello!';
- $postdata = "to_id=$to_id&to_reply=$to_reply&title=$title&chas=$chas&message=$message";
- print "$link&$postdata\n";
- $data = $browser->post($link, Content => $postdata)->as_string;
- print "$data\n\n\n";
- exit(1);
- #
Advertisement
Add Comment
Please, Sign In to add comment