diff --git a/http-info.nse b/http-info.nse index 88d7229..94659df 100644 --- a/http-info.nse +++ b/http-info.nse @@ -60,7 +60,7 @@ action = function(host, port) output.title = title end stdnse.debug1("[INFO] Try favicon %s", favicon_relative_uri) - favicon_relative_uri = parseIcon(answer.body) or "favicon.ico" + favicon_relative_uri = parseIcon(answer.body) or favicon_relative_uri else stdnse.debug1("[ERROR] Can't load page %s", uri) end diff --git a/smb-shares-size.nse b/smb-shares-size.nse index 3ee7c80..3e08504 100644 --- a/smb-shares-size.nse +++ b/smb-shares-size.nse @@ -22,17 +22,13 @@ categories = {"discovery", "intrusive"} author = "Adrien Malingrey" license = "Same as Nmap--See https://nmap.org/book/man-legal.html" -hostrule = function(host) - return smb.get_port(host) ~= nil -end - portrule = shortport.service({"microsoft-ds", "netbios-ssn", "smb"}) local stdnse = require "stdnse" local smb = require "smb" local smb2 = require "smb2" local msrpc = require "msrpc" -local bin = require "bin" +local string = require "string" action = function(host) local status, shares, extra @@ -80,7 +76,7 @@ function get_share_info(host, share) stdnse.debug1("SMB: Getting information for share: %s", path) - local status, err = send_transaction2(smbstate, TRANS2_QUERY_FS_INFORMATION, bin.pack("