Just some stuff

This commit is contained in:
2025-02-09 17:42:21 +01:00
parent 855a8e8234
commit cc5f2e488b
9 changed files with 435 additions and 106 deletions

23
nmap.src Normal file
View 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))