1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 09:29:01 +00:00

Make test-environment.lua a bit more straightforward.

This commit is contained in:
david
2013-10-04 22:42:13 +00:00
parent 35e118802b
commit 5657e7e00b

View File

@@ -1,9 +1,13 @@
#!/usr/bin/lua
--Print the following NCAT_* variables and their values:
envs = {'REMOTE_ADDR', 'REMOTE_PORT', 'LOCAL_ADDR', 'LOCAL_PORT', 'PROTO'}
for _,v in pairs(envs) do
v = 'NCAT_' .. v
function print_env(v)
print(("%s=%s"):format(v, os.getenv(v)))
end
print_env("NCAT_REMOTE_ADDR")
print_env("NCAT_REMOTE_PORT")
print_env("NCAT_LOCAL_ADDR")
print_env("NCAT_LOCAL_PORT")
print_env("NCAT_PROTO")