Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- #Range Zip Scanner // By INJ3CTOR_M4
- #Made In Morocco
- set_time_limit(0);
- error_reporting(0);
- echo "
- \t### ### ## ### ## ### # ## # # # #
- \t # # # # # # # # # # # ### # #
- \t # # # # ## # # # # ## ### ###
- \t # # # # # # # # # # # # # # #
- \t### # # # ### ## # # # # ### # # #
- \t\t[+]\tRange Zip Scanner\n
- ";
- $options = getopt('i:f:');
- // Start Of Script
- if (isset ($options['i']) && isset ($options['f'])) {
- $ip = explode('.', $options['i']);
- $ip = $ip[0].'.'.$ip[1].'.'.$ip[2].'.';
- for($i = 1; $i <= 255; $i++) {
- if (fsockopen ($ip.$i, 80)) {
- echo "\r\n[+]\tScanning ".$ip.$i.":\r\n";
- foreach(Rev($ip.$i) as $link) {
- $f = fopen($ip.$i.'-sites.txt', 'ab');
- fwrite($f, $link."\r\n");
- fclose($f);
- zip_Scanner ($link, $options['f']);
- }
- }elseif (fsockopen ($ip.$i, 443)) {
- echo "\r\n[+]\tScanning ".$ip.$i.":\r\n";
- foreach(Rev($ip.$i) as $link) {
- $f = fopen($ip.$i.'-sites.txt', 'ab');
- fwrite($f, $link."\r\n");
- fclose($f);
- zip_Scanner ($link, $options['f']);
- }
- }else {
- echo "\n[-]\t".$ip.$i." Not Alive!";
- }
- }
- }else {
- echo "\n[!] Example Usage: php ".$argv[0]." -i 127.0.0.1 -f zip.txt\n";
- }
- // Zip Scanner Function
- function zip_Scanner ($link, $file) {
- foreach(Get_Maillist($file) as $path) {
- $headers = @get_headers($link.$path);
- if (preg_match ('/200 OK/i', $headers[0])) {
- echo "\t".$link.$path." ... OK!\n";
- }
- }
- }
- // Reverse iP With Bing.com Function
- function Rev($ip) {
- $i = 1;
- while ($i) {
- $data = Get_Source ("http://www.bing.com/search?q=ip%3A$ip&first=$i","SamsungI8910/SymbianOS/9.1 Series60/3.0");
- if (preg_match_all ('#<h2 class="sb_h3 cttl"><a href="(.*?)"#i', $data, $links)){
- foreach($links[1] as $link){
- $parse = parse_url ($link);
- $allLinks[] = $parse['scheme']."://".$parse['host'];
- }
- if (!preg_match ('#class="sb_pagN"#i', $data)) break;
- }
- $i += 10;
- }
- if(!empty ($allLinks) && is_array ($allLinks)) {
- return array_filter(array_unique($allLinks));
- }
- }
- // Get Mail-List Function
- function Get_Maillist($maillist) {
- $emails = file($maillist);
- foreach($emails as $email) {
- $email = trim($email);
- $mailList[] = $email;
- }
- if(!empty ($mailList) && is_array ($mailList)) {
- return array_filter(array_unique ($mailList));
- }
- }
- // Curl Http?s Requests Function
- function Get_Source ($url, $agent) {
- $ch = curl_init();
- curl_setopt ($ch, CURLOPT_URL, $url);
- curl_setopt ($ch, CURLOPT_USERAGENT, $agent);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt ($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
- curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt ($ch, CURLOPT_ENCODING, "gzip, deflate, compress");
- curl_setopt ($ch, CURLOPT_FRESH_CONNECT, 1);
- curl_setopt ($ch, CURLOPT_TIMEOUT, 20);
- $source = curl_exec($ch);
- curl_close($ch);
- return $source;
- }
- // Delete Cookies File
- if(file_exists ('cookie.txt')) {
- @system ("del cookie.txt");
- @system ("rm cookie.txt");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment