Port Scanner
From Dark Signs Online
Jump to navigationJump to search
This script scans a server to check all ports for open or closed status.
Script
// scanner.ds domain/ip start_port end_port // $1 = domain/ip // $2 = start_port // $3 = end_port IF $2 = "" $2 = 1 ENDIF IF $3 = "" $3 = 65536 ENDIF $domain = GETDOMAIN($1) $ip = GETIP($1) WAIT FOR $domain, $ip SAY Domain : $domain SAY IP Address : $ip SAY SAY Scanning... FOR $curPort = $2 to $3 $ping = PINGPORT($1, $curPort) WAIT FOR $ping IF $ping = 1 SAY Open Port - $curPort ENDIF NEXT SAY Port scan complete.
Usage
// Scans all ports on whois.org scanner.ds whois.org // Scans ports 1 to 100 on 227.67.82.231 scanner.ds 227.67.82.231 1 100 // If scanner.ds is placed in /system/commands/ then you can use it like this from any domain. scanner bash.org 1 1337