1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-31 11:59:03 +00:00

fix a test of a return from reg_get_value which caused the following error when

getting NT_STATUS_WERR_ACCESS_DENIED from winreg.openhkpd

smb-system-info.nse:131:
attempt to perform arithmetic on field 'number_of_processors' (a string value)
stack traceback:
        smb-system-info.nse:131: in function 'get_info_registry'
        smb-system-info.nse:182: in function <smb-system-info.nse:180>
        (tail call): ?
This commit is contained in:
jah
2010-08-25 21:32:40 +00:00
parent 9be7cd7be0
commit 22b458476f

View File

@@ -117,7 +117,7 @@ local function get_info_registry(host)
-- Processor information
result['status-number_of_processors'], result['number_of_processors'] = reg_get_value(smbstate, openhklm_result['handle'], "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment", "NUMBER_OF_PROCESSORS")
if(status == false) then
if(result['status-number_of_processors'] == false) then
result['number_of_processors'] = 0
end
result['status-os'], result['os'] = reg_get_value(smbstate, openhklm_result['handle'], "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment", "OS")