mirror of
https://github.com/nmap/nmap.git
synced 2026-01-02 12:59:02 +00:00
Conditionally write the HTTP etag response header value to the IPv4 and IPv6
Assignments text files, i.e. don't try and write the header value if it wasn't received!
This commit is contained in:
@@ -1769,7 +1769,9 @@ function get_local_assignments_data()
|
||||
local hline = {}
|
||||
hline[#hline+1] = "<" .. os.time() .. ">"
|
||||
hline[#hline+1] = "<" .. http_response.header["last-modified"] .. ">"
|
||||
hline[#hline+1] = "<" .. http_response.header.etag .. ">"
|
||||
if http_response.header.etag then
|
||||
hline[#hline+1] = "<" .. http_response.header.etag .. ">"
|
||||
end
|
||||
table.insert( file_content, 2, table.concat( hline ) )
|
||||
write_success, err = write_to_file( file, file_content )
|
||||
if err then
|
||||
|
||||
Reference in New Issue
Block a user