mirror of
https://github.com/nmap/nmap.git
synced 2026-06-09 17:22:26 +00:00
Fix @arg nsedoc parsing in Zenmap
Zenmap was only showing the first line of @arg nsedoc entries, since it was capturing the contents with a regular expression, which ends at the first newline. Fixed by simply returning the entire contents with the first word (the name of the arg) stripped off.
This commit is contained in:
parent
49e06da86f
commit
c4c197b213
1 changed files with 2 additions and 2 deletions
|
|
@ -364,9 +364,9 @@ class ScriptMetadata (object):
|
|||
returned as a list of (argname, description) tuples."""
|
||||
args = []
|
||||
for tag_name, tag_text in nsedoc_tags_iter(f):
|
||||
m = re.match(r'([\w._-]+)\s*(.*)', tag_text)
|
||||
m = re.match(r'([\w._-]+)', tag_text)
|
||||
if (tag_name == "arg" or tag_name == "args") and m:
|
||||
args.append((m.group(1), m.group(2)))
|
||||
args.append((m.group(1), re.sub(r'^[\w._-]+','',tag_text)))
|
||||
return args
|
||||
|
||||
def get_arguments(self, filename):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue