mirror of
https://github.com/nmap/nmap.git
synced 2026-07-11 18:55:08 +00:00
Tighten pattern match to avoid \r in output
This commit is contained in:
parent
b5cc57fbcc
commit
ff0f32bb67
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ local function list_files(host, port, url, output, maxdepth, basedir)
|
|||
|
||||
local patterns = {
|
||||
'<[Aa] [Hh][Rr][Ee][Ff]="([^"]+)">[^<]+</[Aa]></[Tt][Dd]><[Tt][Dd][^>]*> *([0-9]+-[A-Za-z0-9]+-[0-9]+ [0-9]+:[0-9]+) *</[Tt][Dd]><[Tt][Dd][^>]*> *([^<]+)</[Tt][Dd]>',
|
||||
'<[Aa] [Hh][Rr][Ee][Ff]="([^"]+)">[^<]+</[Aa]> *([0-9]+-[A-Za-z0-9]+-[0-9]+ [0-9]+:[0-9]+) *([^ \n]+)',
|
||||
'<[Aa] [Hh][Rr][Ee][Ff]="([^"]+)">[^<]+</[Aa]> *([0-9]+-[A-Za-z0-9]+-[0-9]+ [0-9]+:[0-9]+) *([^ \r\n]+)',
|
||||
}
|
||||
for _, pattern in ipairs(patterns) do
|
||||
for fname, date, size in string.gmatch(resp.body, pattern) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue