mirror of
https://github.com/nmap/nmap.git
synced 2026-01-08 15:39:05 +00:00
930bc91359dd88166fe836a92bb4f34fa21497c6
Two changes here, both minor. First, explicitly assigning a new key to nil does not add the key to the ordered set of keys. This better emulates the behavior of regular tables. > o = stdnse.output_table() > o["test"] = nil This previously resulted in output like this: |_ test: nil Now it simply omits the "test:" key. Second, I needed a way to tell whether an output table was empty or not. Since Lua's next() function doesn't call the __pairs metamethod, it was always returning nil. Instead, I used the __call metamethod, since it had the least preexisting semantic meaning: > o = stdnse.output_table() > =o() false > o["test"] = 1 > =o() true
Here is some documentation for Nmap, but these files are much less comprehensive than what you'll find at the actual Nmap documentation site ( http://nmap.org ).
Description
Languages
C
37.8%
Lua
28.1%
C++
16.7%
Shell
5.8%
Python
4.2%
Other
7.2%