msgbox

some

Sep 5th, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.49 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3.     use LWP::UserAgent;
  4.     use HTTP::Cookies;
  5.     use Text::Iconv;
  6.  
  7.     $mail = '';
  8.     $pass = '';
  9.  
  10.     sub str_replace {
  11.         my $replace_this = shift;
  12.         my $with_this = shift;
  13.         my $string = shift;
  14.         my $length = length($string);
  15.         my $target = length($replace_this);
  16.         for(my $i=0; $i<$length - $target + 1; $i++){
  17.         if(substr($string,$i,$target) eq $replace_this){
  18.                 $string = substr($string,0,$i) . $with_this . substr($string,$i+$target);
  19.                 return $string;
  20.             }
  21.         } return $string;
  22.     }
  23.  
  24.     print "Auth................";
  25.     $browser = LWP::UserAgent->new();
  26.     $cookie = HTTP::Cookies->new( file => 'cookie.txt', autosave => 1, );
  27.     $browser->cookie_jar($cookie);
  28.     $login = $browser->get("http://login.vk.com/?act=login&email=$mail&pass=$pass&from_host=vk.com")->as_string;
  29.     if($login =~ /reg/) {
  30.     print 'fail!n';
  31.     #exit(1);
  32.     } else {
  33.     print "sucess!\nGetting hash........";
  34.     }
  35.  
  36.     $chas = $browser->get("http://m.vk.com/letter12943")->as_string;
  37.     if($chas =~ /s\" value=\"(.*)\"/) {
  38.     print "$1\nSend request........";
  39.     $chas = $1;
  40.     $to_id =~ /d\" value=\"(.*)\"/;
  41.     $to_reply =~ /y\" value=\"(.*)\"/;
  42.     $title =~ /e\" value=\"(.*)\"/;
  43.     } else {
  44.     print 'fail!\n'
  45.     #exit(1);
  46.     }
  47.  
  48.     $link = 'http://m.vk.com/mailsent?pda=1';
  49.     $message = 'Hello!';
  50.     $postdata = "to_id=$to_id&to_reply=$to_reply&title=$title&chas=$chas&message=$message";
  51.     print "$link&$postdata\n";
  52.     $data = $browser->post($link, Content => $postdata)->as_string;
  53.     print "$data\n\n\n";
  54.     exit(1);
  55.  
  56. #
Advertisement
Add Comment
Please, Sign In to add comment