first commit

This commit is contained in:
2026-05-19 20:10:37 +02:00
commit 4813376d59
10 changed files with 354 additions and 0 deletions

42
source/bnmap.src Normal file
View File

@@ -0,0 +1,42 @@
if params.len < 1 or params[0] == "-h" or params[0] == "--help" then
current_program = get_shell.host_computer.File(program_path)
exit("Usage: "+current_program.name+" <remote ip>")
end if
mx = include_lib("/lib/metaxploit.so")
ip = params[0]
// ROUTER
router_sess = mx.net_use(ip)
if not router_sess then
exit("Unable to connect to router")
end if
router_lib = router_sess.dump_lib
data_out = "PORT STATE LIBRARY VERSION LAN"
data_out = data_out + "\n" +
" " + // port
"open" + " " + // state
router_lib.lib_name + " " + // library
router_lib.version + " " + // version
"" // lan ip
// PORTS
router = get_router(ip)
for port in router.used_ports
if port.is_closed == 0 then state = "open" else state = "closed"
sess = mx.net_use(ip, port.port_number)
if not sess then
data_out = data_out + "\n" +
port.port_number + " " + // port
state + " " + // state
"N/A" + " " + // library
"N/A" + " " + // version
"" // lan ip
continue
end if
lib = sess.dump_lib
data_out = data_out + "\n" +
port.port_number + " " + // port
state + " " + // state
lib.lib_name + " " + // library
lib.version + " " + // version
port.get_lan_ip
end for
print(format_columns(data_out))