Files
Grey_Hack/nmap.src

21 lines
715 B
Plaintext

if params.len == 0 then exit("<b>Usage: </b>nmap [IP]")
target_ip = params[0]
if not is_valid_ip(target_ip) then exit(target_ip + " is not a valid ip")
if nslookup(target_ip) == "Not found" then
exit("<color=red><b>That domain is not valid.</b></color>")
end if
target_router = get_router(target_ip)
target_ports = target_router.used_ports
column = "<b>Number Type Version IP</b>"
column = column + "\n" + "0" + " " + "kernel_router" + " " + target_router.kernel_version + " " + target_router.local_ip
for port in target_ports
column = column + "\n" + port.port_number + " " + target_router.port_info(port) + " " + port.get_lan_ip
end for
print("\nIP Address : " + target_ip)
print(format_columns(column))