Just some stuff
This commit is contained in:
23
nmap.src
Normal file
23
nmap.src
Normal file
@@ -0,0 +1,23 @@
|
||||
import_code("/root/myprogram")
|
||||
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user