mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 02:49:01 +00:00
Add port.reason_ttl
Document port.reason and port.reason_ttl
This commit is contained in:
@@ -1938,6 +1938,32 @@ host.os = {
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>port.reason</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Contains a string representation of the reason why the target port is in
|
||||
its current state (given by <literal>port.state</literal>). The reason is
|
||||
given by the type of the packet that determined the state. For example, a
|
||||
<literal>RST</literal> packet from a closed port or
|
||||
<literal>SYN-ACK</literal> from an open port.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>port.reason_ttl</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Contains the TTL value of the response packet, that was used to determine
|
||||
the status of the target port, when it arrived. This response packet is the
|
||||
packet that is also used to set <literal>port.reason</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>port.version</option>
|
||||
</term>
|
||||
|
||||
@@ -70,6 +70,7 @@ void set_portinfo (lua_State *L, const Target *target, const Port *port)
|
||||
nseU_setsfield(L, -1, "protocol", IPPROTO2STR(port->proto));
|
||||
nseU_setsfield(L, -1, "state", statenum2str(port->state));
|
||||
nseU_setsfield(L, -1, "reason", reason_str(port->reason.reason_id, 1));
|
||||
nseU_setnfield(L, -1, "reason_ttl", port->reason.ttl);
|
||||
lua_newtable(L);
|
||||
set_version(L, &sd);
|
||||
lua_setfield(L, -2, "version");
|
||||
|
||||
Reference in New Issue
Block a user