Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # m-a_labz
- use LWP::UserAgent;
- use IO::Socket;
- use Net::IP;
- $ua = LWP::UserAgent->new;
- $ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1) Gecko/20090624 Firefox/3.5");
- $ua->timeout(15);
- $ipg = new Net::IP ('195.45.6.7 - 195.45.6.19') || die $!; # ip range
- $file = "ips.txt"; # file to save generated ip in
- $proxyf = "proxies.txt"; # proxies file
- $dir = "out";
- mkdir($dir);
- open (ipg,">".$file);
- do { print ipg $ipg->ip(), "\n";} while (++$ipg);
- close(ipg);
- open (ip, "<".$file);
- @ips = <ip>;
- close ip;
- print " + total ips : ".scalar(@ips)."\n";
- ## start
- foreach $ip (@ips) {
- chomp($ip);
- $socket = IO::Socket::INET->new(PeerAddr => $ip , PeerPort => 80 , Proto => 'tcp' , Timeout => 5); # check if port 80 is open
- if( $socket )
- {print "+ ip: ".$ip." is valid, reversing ...\n";
- yougetsignalre($ip);
- }else{
- print "- ip: ".$ip." is invalid \n";
- }
- }
- sub yougetsignalre {
- reversesned:
- $response = $ua->post("http://domains.yougetsignal.com/domains.php",
- { remoteAddress => $_[0]}) or next;
- my $pwnd = $response->content;
- if ($pwnd =~ /Daily reverse IP check limit reached for/)
- {
- print " - limit reached, bypassing ...\n";
- $getproxy = gproxy();
- $ua->proxy('http', $getproxy);
- goto reversesned;
- }elsif ($pwnd =~ /\"domainCount\":\"(.*?)\"/){
- print " + Total Sites : ".$1."\n";
- while ($pwnd =~ m/\[\"(.*?)\",/sg){$group{$1} = undef;}
- if (length %group > 5)
- {
- foreach $s (keys %group) {savefile($_[0].".txt",$s);}
- %group = undef;
- }
- }elsif($pwnd =~ /An existing connection was forcibly closed by the remote host/) {goto reversesned;}
- }
- sub gproxy {
- open(DAT,$proxyf);
- @proxys=<DAT>;
- close(DAT);
- foreach $proxy (@proxys)
- {
- chomp($proxy);
- $proxy = "http://".$proxy if ($proxy !~ m/http:\/\//);
- $ua->proxy('http', $proxy);
- $checkp = $ua->get("http://domains.yougetsignal.com/domains.php");
- if ($checkp->content =~ /\{\"status\"\:\"Success\"\,/)
- {
- print "+ proxy: ".$proxy." is valid \n";
- $ua->proxy('http', $proxy);
- return $proxy;
- }else{
- print "- proxy: ".$proxy." is invalid \n";
- }}}
- sub savefile {
- open (save,">>out/".$_[0]);
- print save $_[1]."\n";
- close save;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement