mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Use consistent matching between NSEdoc and Zenmap parsers. Bad example: creds.[service]
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user