Advertisement
syst3m_h4x0r

Mass Proxy Checker

Oct 30th, 2017
9,468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.38 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Proxy List Checker by v4p0r
  3. # Made in Brazil niggas 2k17
  4. # greetz: YC - EOF Club - BRLZPoCC - All Friends
  5.  
  6. use Getopt::Long;
  7. use LWP::UserAgent;
  8. use strict;
  9.  
  10.  
  11. my $distro;
  12. my $usr = $^O;
  13.  
  14. if ( $usr eq "MSWin32") {
  15.     system ("cls");
  16. } else {
  17.     system ("clear");
  18. }
  19.  
  20. my $banner = @ARGV;
  21. print "\n-------------------------\n".
  22.       "      Proxy Checker      \n".
  23.       "-------------------------\n";
  24.  
  25. my $optList;
  26. my $optSave;
  27. my $optUrl;
  28. my $optTime;
  29. my $optHelp;
  30. my $rTime;
  31. my $rAlvo;
  32.  
  33.     GetOptions('list|l=s'  => \$optList,
  34.                'url|u=s'     => \$optUrl,
  35.                'time|t=s'    => \$optTime,
  36.                'save|s=s'       => \$optSave,
  37.                'help|h'    => \$optHelp,
  38.               );
  39.    
  40.    
  41.    
  42.     if ($optHelp) {
  43.         print "Usage: $0 [comando]\n".
  44.               "[+] Comandos:\n".
  45.               "--help [Ajuda com os comandos]\n".
  46.               "--list [Seleciona sua lista de proxys]\n".
  47.               "--url  [Url na hora de dar o GET]\n".
  48.               "       [Defaut http://google.com]\n".
  49.               "--time [Tempo de resposta]\n".
  50.               "       [Defaut 15]\n".
  51.               "--save [Onde as proxys boas serao salvas]\n\n".
  52.               "[!] Exemplos:\n".
  53.               "perl $0 --list list.txt --url http://myhost.com --time 10 --save god_proxys.txt\n".
  54.               "perl $0 --list list.txt --save god_proxys.txt\n";
  55.         exit;
  56.     }
  57.    
  58.     if ($optUrl) {
  59.         if ($optUrl) { 
  60.             $rAlvo = $optUrl;
  61.         } else {
  62.             die "$0: url invalida.\n";
  63.         }
  64.     } else {
  65.         $rAlvo = "http://google.com";
  66.     }
  67.  
  68.     if ($optTime) {
  69.         if ($optTime =~ /^\d+$/) { 
  70.             $rTime = $optTime;
  71.         } else {
  72.             die "$0: tempo invalido.\n";
  73.         }
  74.     } else {
  75.         $rTime = "15";
  76.     }
  77.    
  78.    
  79. if($banner <= 1){
  80.     print "\nCoder: v4p0r\n" .
  81.     "Team: Yunkers Crew && BRLZ PoC\n" .
  82.     "Twitter: 0x777null".
  83.     "Skype: drx.priv\n\n" .
  84.     "Usage: perl $0 --help\n";
  85.    
  86.     exit;
  87. }
  88.  
  89.    
  90.     open(my $list1,'<', $optList);
  91.     my @proxy1 = <$list1>;
  92.    
  93.     print "[+] Site: ".$rAlvo."\n";
  94.     print "[+] Time: ".$rTime."\n";
  95.     print "[+] ".scalar(@proxy1)." Quantidade de proxy a ser checada\n\n";
  96.    
  97.     foreach my $prxs (@proxy1) {
  98.    
  99.     my $ua = LWP::UserAgent->new;
  100.        $ua->timeout($rTime);
  101.    
  102.     my $proxy = "http://".$prxs;
  103.        $ua->proxy('http', $proxy);
  104.        
  105.     my $resposta = $ua->get($rAlvo);
  106.        
  107.         if ($resposta->is_success)
  108.     {
  109.         print "[+] God Proxys: $prxs";
  110.        
  111.             open(my $fh, '>>', $optSave);
  112.             print $fh "$prxs";
  113.             close $fh;
  114.     } else {
  115.         print "[-] Fail Proxys: $prxs";
  116.     }
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement