mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Use consistent matching between NSEdoc and Zenmap parsers. Bad example: creds.[service]
This commit is contained in:
parent
356831b129
commit
5a505b9fc9
1 changed files with 2 additions and 2 deletions
|
|
@ -456,9 +456,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._-]+)', tag_text)
|
||||
m = re.match(r'(\S+)\s+(.*?)', tag_text, re.DOTALL)
|
||||
if (tag_name == "arg" or tag_name == "args") and m:
|
||||
args.append((m.group(1), re.sub(r'^[\w._-]+', '', tag_text)))
|
||||
args.append((m.group(1), m.group(2)))
|
||||
return args
|
||||
|
||||
def get_arguments(self, filename):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue