Advertisement
_d3f4ult

[+] Perl Proxy Scraper from URL list [+]

May 3rd, 2015
1,932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Usage: proxyScraper.pl [proxy_file]
  3. use strict;
  4. use warnings;
  5. use WWW::Mechanize;
  6. use Try::Tiny;
  7. my $source_file=shift;
  8. open (INPUT_FILE, "<$source_file") || die "Can't open $source_file: $!\n";
  9. my @sources = ;
  10. my $crawler = WWW::Mechanize->new();
  11. foreach (@sources) {
  12. try {
  13. $crawler->get($_);
  14. # hunt for IP:PORT combination
  15. my @ips= $crawler->text() =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5})/g;
  16. foreach (@ips){
  17. print "$_\n";
  18. }
  19. } catch {
  20. warn "[!] Error, who cares\n";
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement