mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
o [NSE] Removed the nmap.get_interface_link function, which was
deprecated by the new nmap.get_interface_info function.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [NSE] Removed the nmap.get_interface_link function, which was
|
||||
deprecated by the new nmap.get_interface_info. The sniffer-detect
|
||||
script now calls the nmap.get_interface_info function to retrieve
|
||||
the network interface link type. [Djalal]
|
||||
|
||||
o [NSE] Fixed a bug reported by Daniel Miller that was causing the
|
||||
nfs-ls script to ignore NFS mounts when the Mount version is 1.
|
||||
[Djalal]
|
||||
|
||||
25
nse_dnet.cc
25
nse_dnet.cc
@@ -113,31 +113,6 @@ LUALIB_API int l_dnet_get_interface_info (lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
LUALIB_API int l_dnet_get_interface_link (lua_State *L)
|
||||
{
|
||||
struct interface_info *ii = getInterfaceByName(luaL_checkstring(L, 1));
|
||||
|
||||
if (ii == NULL)
|
||||
return luaL_argerror(L, 1, "bad interface");
|
||||
|
||||
switch (ii->device_type)
|
||||
{
|
||||
case devt_ethernet:
|
||||
lua_pushliteral(L, "ethernet");
|
||||
return 1;
|
||||
case devt_loopback:
|
||||
lua_pushliteral(L, "loopback");
|
||||
return 1;
|
||||
case devt_p2p:
|
||||
lua_pushliteral(L, "p2p");
|
||||
return 1;
|
||||
case devt_other:
|
||||
default:
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static int close_eth (lua_State *L)
|
||||
{
|
||||
eth_t **eth = (eth_t **) luaL_checkudata(L, 1, DNET_ETH_METATABLE);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define NMAP_LUA_DNET_H
|
||||
|
||||
LUALIB_API int l_dnet_new (lua_State *);
|
||||
LUALIB_API int l_dnet_get_interface_link (lua_State *);
|
||||
LUALIB_API int l_dnet_get_interface_info (lua_State *);
|
||||
LUALIB_API int luaopen_dnet (lua_State *L);
|
||||
|
||||
|
||||
@@ -763,7 +763,6 @@ int luaopen_nmap (lua_State *L)
|
||||
{"port_is_excluded", l_port_is_excluded},
|
||||
{"new_socket", l_nsock_new},
|
||||
{"new_dnet", l_dnet_new},
|
||||
{"get_interface_link", l_dnet_get_interface_link},
|
||||
{"clock_ms", l_clock_ms},
|
||||
{"clock", l_clock},
|
||||
{"log_write", l_log_write},
|
||||
|
||||
@@ -230,18 +230,6 @@ function clock()
|
||||
-- @usage local now = nmap.clock_ms()
|
||||
function clock_ms()
|
||||
|
||||
--- Gets the link-level hardware type of an interface.
|
||||
--
|
||||
-- This function takes a dnet-style interface name and returns a string
|
||||
-- representing the hardware type of the interface. Possible return values are
|
||||
-- <code>"ethernet"</code>, <code>"loopback"</code>, <code>"p2p"</code>, or
|
||||
-- <code>nil</code> if none of the other types apply.
|
||||
-- @param interface_name The name of the interface.
|
||||
-- @return <code>"ethernet"</code>, <code>"loopback"</code>,
|
||||
-- <code>"p2p"</code>, or <code>nil</code>.
|
||||
-- @usage iface_type = nmap.get_interface_link("eth0")
|
||||
function get_interface_link(interface_name)
|
||||
|
||||
--- Create a mutex on an object.
|
||||
--
|
||||
-- This function returns another function that works as a mutex on the object
|
||||
|
||||
Reference in New Issue
Block a user