Advertisement
Shad0w

Untitled

Apr 14th, 2011
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.48 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use WWW::Mechanize;
  5.  
  6. my $url = "http://www.facebook.com";
  7. my $mech = WWW::Mechanize->new();
  8. my $result;
  9.  
  10. $mech->get($url);
  11. $mech->submit_form(
  12.         form_id => "login_form",
  13.         fields    => {
  14.                         email => $ARGV[0],
  15.                         pass  => $ARGV[1]
  16.                      }
  17. );
  18. print $mech->uri();
  19. $result = $mech->content;
  20. if($result =~ /Incorrect email/)
  21. {
  22.     print "Failed";
  23. }
  24. else
  25. {
  26.     print "Succsed";
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement