Advertisement
m-a_labz

massacreur

Mar 7th, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.13 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # m-a_labz
  3. use LWP::UserAgent;
  4. use IO::Socket;
  5. use Net::IP;
  6.  
  7. $ua = LWP::UserAgent->new;
  8. $ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1) Gecko/20090624 Firefox/3.5");
  9. $ua->timeout(15);
  10.  
  11. $ipg = new Net::IP ('195.45.6.7 - 195.45.6.19') || die $!; # ip range
  12. $file = "ips.txt"; # file to save generated ip in
  13. $proxyf = "proxies.txt"; # proxies file
  14. $dir = "out";
  15. mkdir($dir);
  16. open (ipg,">".$file);
  17. do {    print ipg $ipg->ip(), "\n";} while (++$ipg);
  18. close(ipg);
  19. open (ip, "<".$file);
  20. @ips = <ip>;
  21. close ip;
  22. print " + total ips : ".scalar(@ips)."\n";
  23. ## start
  24.  
  25. foreach $ip (@ips) {
  26. chomp($ip);
  27. $socket = IO::Socket::INET->new(PeerAddr => $ip , PeerPort => 80 , Proto => 'tcp' , Timeout => 5); # check if port 80 is open
  28. if( $socket )
  29. {print "+ ip: ".$ip." is valid, reversing ...\n";
  30. yougetsignalre($ip);
  31. }else{
  32. print "- ip: ".$ip." is invalid \n";
  33. }
  34. }
  35.  
  36. sub yougetsignalre {
  37. reversesned:
  38. $response = $ua->post("http://domains.yougetsignal.com/domains.php",
  39. { remoteAddress  => $_[0]}) or next;
  40. my $pwnd = $response->content;
  41. if ($pwnd =~ /Daily reverse IP check limit reached for/)
  42. {
  43. print "  - limit reached, bypassing ...\n";
  44. $getproxy = gproxy();
  45. $ua->proxy('http', $getproxy);
  46. goto reversesned;
  47. }elsif ($pwnd =~ /\"domainCount\":\"(.*?)\"/){
  48. print "  + Total Sites : ".$1."\n";
  49. while ($pwnd =~ m/\[\"(.*?)\",/sg){$group{$1} = undef;}
  50. if (length %group > 5)
  51. {
  52. foreach  $s (keys %group) {savefile($_[0].".txt",$s);}
  53. %group = undef;
  54. }
  55. }elsif($pwnd =~ /An existing connection was forcibly closed by the remote host/) {goto reversesned;}
  56. }
  57. sub gproxy {
  58. open(DAT,$proxyf);
  59. @proxys=<DAT>;
  60. close(DAT);
  61. foreach $proxy (@proxys)
  62. {
  63. chomp($proxy);
  64. $proxy = "http://".$proxy if ($proxy !~ m/http:\/\//);
  65. $ua->proxy('http', $proxy);
  66. $checkp = $ua->get("http://domains.yougetsignal.com/domains.php");
  67. if ($checkp->content =~ /\{\"status\"\:\"Success\"\,/)
  68. {
  69. print "+ proxy: ".$proxy." is valid \n";
  70. $ua->proxy('http', $proxy);
  71. return $proxy;
  72. }else{
  73. print "- proxy: ".$proxy." is invalid \n";
  74. }}}
  75. sub savefile {
  76. open (save,">>out/".$_[0]);
  77. print save $_[1]."\n";
  78. close save;
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement