Googleinurl

[SCRIPT][ PRIV8 ] AutoXPL 1.0

Apr 16th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.44 KB | None | 0 0
  1. <?php
  2. /*
  3.  
  4.   # AUTOR:        Cleiton Pinheiro / Nick: googleINURL
  5.   # Blog:         http://blog.inurl.com.br
  6.   # Twitter:      https://twitter.com/googleinurl
  7.   # Fanpage:      https://fb.com/InurlBrasil
  8.   # Pastebin      http://pastebin.com/u/Googleinurl
  9.   # GIT:          https://github.com/googleinurl
  10.   # PSS:          http://packetstormsecurity.com/user/googleinurl
  11.   # YOUTUBE:      http://youtube.com/c/INURLBrasil
  12.   # PLUS:         http://google.com/+INURLBrasil
  13.  
  14.  
  15. */
  16. error_reporting(1);
  17. set_time_limit(0);
  18. ini_set('display_errors', 1);
  19. ini_set('max_execution_time', 0);
  20. ini_set('allow_url_fopen', 1);
  21. ob_implicit_flush(true);
  22. ob_end_flush();
  23. $c = __OS();
  24.  
  25. $op_ = getopt('f:t:', array('help::', 'xpl:', 'range:', 'range-rand:', 'thread:'));
  26. echo "{$c['c1']}\n\t\t
  27. \t\t\t\t  _____
  28. \t\t\t\t (_____)  
  29. \t\t\t\t (() ())  
  30. \t\t\t\t  \   /    
  31. \t\t\t\t   \ /      
  32. \t\t\t\t   /=\    
  33. \t\t\t\t  [___]
  34. \n
  35. \n\t\t[ I N U R L  -  B R A S I L ] - [ By GoogleINURL ]\n\t\tNeither war between hackers, nor peace for the system\n
  36. \n\t{$c['c2']}[+] [SCRIPT]: AutoXPL 1.0 / EXECUTE COMMAND\n\t[+] [ help ]: --help\n\n{$c['c0']}";
  37. $menu = "{$c['c1']}
  38.    -t            : SET TARGET.
  39.    -f            : SET FILE TARGETS.
  40.    -range        : SET RANGE IP.
  41.    -range-rand   : SET NUMBE IP RANDOM.
  42.    -xpl          : SET COMMAND XPL.
  43.    Execute:
  44.                  php AutomatedXPL.php -t target   -xpl './xpl _TARGET_'
  45.                  php AutomatedXPL.php -f targets.txt  -xpl './xpl _TARGET_'
  46.                  php AutomatedXPL.php --range '200.1.10.1,200.1.10.255' -xpl './xpl _TARGET_'
  47.                  php AutomatedXPL.php --range-rand 20 -xpl './xpl _TARGET_'
  48. \n{$c['c0']}";
  49. echo isset($op_['help']) ? exit($menu) : NULL;
  50. $params = array(
  51.     'target' => not_isnull_empty($op_['t']) ? $op_['t'] : NULL,
  52.     'file' => !not_isnull_empty($op_['t']) && not_isnull_empty($op_['f']) ? $op_['f'] : NULL,
  53.     'xpl' => not_isnull_empty($op_['xpl']) ? $op_['xpl'] : exit("{$menu}\t{$c['c12']}[X] [ ERRO ] DEFINE XPL COMMAND!\n{$c['c0']}"),
  54.     'range' => not_isnull_empty($op_['range']) ? $op_['range'] : NULL,
  55.     'range-rand' => not_isnull_empty($op_['range-rand']) ? $op_['range-rand'] : NULL,
  56.     'c' => $c,
  57.     'thread' => not_isnull_empty($op_['thread']) ? $op_['thread'] : 1,
  58.     'line' => "--------------------------------------------------------------"
  59. );
  60.  
  61. not_isnull_empty($params['target']) &&
  62.         not_isnull_empty($params['range']) &&
  63.         not_isnull_empty($params['range-rand']) &&
  64.         not_isnull_empty($params['file']) ?
  65.                 exit("{$menu}\t{$c['c12']}[X] [ ERRO ] DEFINE TARGET OR OR RANGES/RAND OR FILE TARGET\n{$c['c0']}") : NULL;
  66.  
  67. function not_isnull_empty($valor = NULL) {
  68.     RETURN !is_null($valor) && !empty($valor) ? TRUE : FALSE;
  69. }
  70.  
  71. function __plus() {
  72.  
  73.     ob_flush();
  74.     flush();
  75. }
  76.  
  77. ################################################################################
  78. #GENERATOR RANGE IP#############################################################
  79.  
  80. function __generatorRangeIP($range) {
  81.  
  82.     $ip_ = explode(',', $range);
  83.     if (is_array($ip_)) {
  84.         $_ = array(0 => ip2long($ip_[0]), 1 => ip2long($ip_[1]));
  85.         while ($_[0] <= $_[1]) {
  86.             $ips[] = long2ip($_[0]);
  87.             $_[0] ++;
  88.         }
  89.     } else {
  90.  
  91.         return FALSE;
  92.     }
  93.  
  94.     return $ips;
  95. }
  96.  
  97. ################################################################################
  98. #GENERATOR RANGE IP RANDOM######################################################
  99.  
  100. function __generatorIPRandom($cont) {
  101.  
  102.     $cont[0] = 0;
  103.     while ($cont[0] < $cont[1]) {
  104.  
  105.         $bloc[0] = rand(0, 255);
  106.         $bloc[1] = rand(0, 255);
  107.         $bloc[2] = rand(0, 255);
  108.         $bloc[3] = rand(0, 255);
  109.         $ip[] = "{$bloc[0]}.{$bloc[1]}.{$bloc[2]}.{$bloc[3]}";
  110.         $cont[0] ++;
  111.     }
  112.     return array_unique($ip);
  113. }
  114.  
  115. ################################################################################
  116. #OPEN FILE TARGETS##############################################################
  117.  
  118. function __listTarget($params) {
  119.  
  120.     $tgt_ = array_unique(array_filter(explode("\n", file_get_contents($params['file']))));
  121.  
  122.  
  123.     if (!is_array($tgt_)) {
  124.  
  125.         return NULL;
  126.     }
  127.  
  128.     foreach ($tgt_ as $url) {
  129.  
  130.         $tgt[] = $url;
  131.         __plus();
  132.     }
  133.     return $tgt;
  134. }
  135.  
  136. ################################################################################
  137. #EXECUTE XPL COMMAND############################################################
  138.  
  139. function __exec($params) {
  140.     echo "{$params['c']['c1']}[+][{$params['count']}/{$params['total']}]{$params['line']}\n";
  141.     echo "{$params['c']['c1']}[+][ TARGET ]:: {$params['c']["c7"]}{$params['target']}\n";
  142.     echo "{$params['c']['c1']}[+]|__\n";
  143.     echo "      |[ COMMAND XPL ]:: {$params['xpl']}\n";
  144.     echo "[+]|__\n";
  145.     echo "      |[P R O C E S S]\n\n";
  146.     $cmd = str_replace("_TARGET_", $params['target'], $params['xpl']);
  147.     echo $params['c']['c2'];
  148.     system($cmd);
  149.     echo $params['c']['c0'];
  150. }
  151.  
  152. ################################################################################
  153. #VALIDATE OPERATING SYSTEM AND COLOR SYSTEM#####################################
  154.  
  155. function __OS() {
  156.  
  157.     $sistema = strtoupper(PHP_OS);
  158.     if (substr($sistema, 0, 3) == "WIN") {
  159.         $i = 0;
  160.         system("cls");
  161.         $_["os"] = 1;
  162.         while ($i <= 17) {
  163.             $_["c{$i}"] = NULL;
  164.             $i++;
  165.         }
  166.     } else {
  167.         system("command clear");
  168.         //DEFINING COLORS
  169.         $_["c0"] = "\033[0m";      // END OF COLOR
  170.         $_["c1"] = "\033[1;37m";   // WHITE
  171.         $_["c2"] = "\033[1;33m";   // YELLOW
  172.         $_["c3"] = "\033[1;31m";   // RED LIGHT
  173.         $_["c4"] = "\033[0;32m";   // GREEN
  174.         $_["c5"] = "\033[1;32m";   // GREEN LIGHT
  175.         $_["c6"] = "\033[0;35m";   // PURPLE
  176.         $_["c7"] = "\033[1;30m";   // DARK GREY
  177.         $_["c8"] = "\033[0;34m";   // BLUE
  178.         $_["c9"] = "\033[0;37m";   // LIGHT GREY
  179.         $_["c10"] = "\033[0;33m";  // BROWN
  180.         $_["c11"] = "\033[1;35m";  // LIGHT PURPLE
  181.         $_["c12"] = "\033[0;31m";  // RED
  182.         $_["c13"] = "\033[1;36m";  // LIGHT CYAN
  183.         $_["c14"] = "\033[0;36m";  // CIANO
  184.         $_["c15"] = "\033[1;34m";  // LIGHT BLUE
  185.         $_["c16"] = "\033[02;31m"; // DARK RED
  186.     }
  187.     return $_;
  188. }
  189.  
  190. ################################################################################
  191. #PROCESS HOME###################################################################
  192.  
  193. function __main($params) {
  194.  
  195.     if (not_isnull_empty($params['target']))
  196.         $params['targets'] = $params['target'];
  197.  
  198.     if (not_isnull_empty($params['range']))
  199.         $params['targets'] = __generatorRangeIP($params['range']);
  200.  
  201.     if (not_isnull_empty($params['range-rand']))
  202.         $params['targets'] = __generatorIPRandom(array(1 => $params['range-rand']));
  203.  
  204.     if (not_isnull_empty($params['file']))
  205.         $params['targets'] = __listTarget($params);
  206.  
  207.  
  208.  
  209.     $params['total'] = count($params['targets']);
  210.     $cont = 1;
  211.     echo "\t{$params['c']['c2']}[!] [ INFO ]: TOTAL TARGETS LOADED : {$params['total']}\n{$params['c']['c0']}";
  212.     echo "\t{$params['c']['c2']}[!] [ INFO ]: XPL COMMAND : {$params['xpl']}\n\n\n{$params['c']['c0']}";
  213.  
  214.     $out = 0;
  215.     $thr = $params['thread'];
  216.     $ini = 0;
  217.     $fin = $thr - 1;
  218.  
  219.     while (1) {
  220.         $childs = array();
  221.  
  222.         for ($count = $ini; $count <= $fin; $count++) {
  223.             if (empty($params['targets'][$count])) {
  224.                 $out = 1;
  225.                 continue;
  226.             }
  227.  
  228.             $pid = pcntl_fork();
  229.  
  230.             if ($pid == -1) {
  231.                 echo "Fork error\n";
  232.                 exit(1);
  233.             } else if ($pid) {
  234.                 array_push($childs, $pid);
  235.             } else {
  236.                 $n = $count + 1;
  237.                 $params['count'] = $count;
  238.                 $params['target'] = $params['targets'][$count];
  239.                 __exec($params);
  240.                 echo "\n\n";
  241.                 exit(0);
  242.             }
  243.         }
  244.  
  245.         foreach ($childs as $key => $pid) {
  246.             pcntl_waitpid($pid, $status);
  247.         }
  248.  
  249.         if ($out == 1) {
  250.             echo "\t{$params['c']["c1"]}[!] [ INFO ]: [ End of process AutoXPL 1.0 at [" . date("d-m-Y H:i:s") . "]\n\n";
  251.             echo "\n\t\t[ I N U R L  -  B R A S I L ] - [ By GoogleINURL ]\n{$params['c']["c0"]}";
  252.             return;
  253.         }
  254.  
  255.         $ini = $fin + 1;
  256.         $fin = $fin + $thr;
  257.     }
  258. }
  259.  
  260. __main($params);
Advertisement
Add Comment
Please, Sign In to add comment