1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 11:49:01 +00:00

Fix a logic bug (and vs or) and extend usernames to 8 chars. See #671

This commit is contained in:
dmiller
2017-03-01 20:41:17 +00:00
parent 6d3c181316
commit 36c03069bd

View File

@@ -108,7 +108,7 @@ Driver = {
-- At this point we MUST be at CESL/CESN to try accounts. -- At this point we MUST be at CESL/CESN to try accounts.
-- If we're not then we quit with an error -- If we're not then we quit with an error
if not (self.tn3270:find('SIGN ON TO CICS') or self.tn3270:find("Signon to CICS")) then if not (self.tn3270:find('SIGN ON TO CICS') or self.tn3270:find("Signon to CICS")) then
local err = brute.Error:new( "Can't get to CESL") local err = brute.Error:new( "Can't get to Transaction")
err:setRetry( true ) err:setRetry( true )
return false, err return false, err
end end
@@ -213,7 +213,7 @@ local function cics_test( host, port, commands, transaction )
end end
tn:get_screen_debug(2) tn:get_screen_debug(2)
if tn:find('SIGN ON TO CICS') and tn:find("Signon to CICS") then if tn:find('SIGN ON TO CICS') or tn:find("Signon to CICS") then
stdnse.verbose(2,"At CICS Login Transaction (%s)", transaction) stdnse.verbose(2,"At CICS Login Transaction (%s)", transaction)
tn:disconnect() tn:disconnect()
return true return true
@@ -228,7 +228,7 @@ end
-- ^%D = The first char must NOT be a digit -- ^%D = The first char must NOT be a digit
-- [%w@#%$] = All letters including the special chars @, #, and $. -- [%w@#%$] = All letters including the special chars @, #, and $.
local valid_name = function(x) local valid_name = function(x)
return (string.len(x) <= 7 and string.match(x,"^%D+[%w@#%$]")) return (string.len(x) <= 8 and string.match(x,"^%D+[%w@#%$]"))
end end
action = function(host, port) action = function(host, port)
@@ -244,8 +244,6 @@ action = function(host, port)
engine.options.passonly = true engine.options.passonly = true
engine.options:setTitle("CICS User ID") engine.options:setTitle("CICS User ID")
local status, result = engine:start() local status, result = engine:start()
-- port.version.extrainfo = "Security: " .. secprod
-- nmap.set_port_version(host, port)
return result return result
else else
return err return err