Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.81 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. #use LWP::Simple;
  5. use HTML::Strip;
  6. use WWW::Mechanize;
  7.  
  8. my $search = <>;
  9. my $url = $search;
  10. my $content WWW::Mechanize->new();
  11. $content -> get $url;
  12.  
  13. my $user = "havox";
  14. my $pass = "test";
  15.  
  16. $content->form(1); #index starts at 1 instead of 0.
  17. $content->field("user", $user); #finds form and inputs data from $user
  18. $content->form(2);
  19. $content->field("pwd". $pass);
  20. $content->click(); #clicks submit button
  21.  
  22.  
  23. #ignore everything below this line
  24. my $hs = HTML::Strip->new();
  25. my $clean_text = $hs->parse($content);
  26.  
  27.        print $clean_text;
  28.         #print "Search:";
  29.         #chomp(my $string = <>);
  30.  
  31.         my $taa = "<php blah blah blah ?>";
  32.  
  33.         open FILE, ">>stan.php" or die $!;
  34.         print FILE $taa;
  35.         close File;
  36.  
  37.  
  38. #my $result = index($content, $string);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement