Showing 16,065 of 22,177 total issues
Consider simplifying this complex logical expression. Open
return CheckCode::Safe("Detected Magento #{edition} edition version #{version} which is not vulnerable") unless
version <= (Rex::Version.new('2.4.7')) ||
version <= (Rex::Version.new('2.4.6-p5')) ||
version <= (Rex::Version.new('2.4.5-p7')) ||
version <= (Rex::Version.new('2.4.4-p8')) ||
Consider simplifying this complex logical expression. Open
if res && res.code == 200 && res.body &&
res.body.to_s =~ /ManageEngine Password Manager Pro/ &&
(
res.body.to_s =~ /login\.css\?([0-9]+)/ || # PMP v6
res.body.to_s =~ /login\.css\?version=([0-9]+)/ || # PMP v6
Consider simplifying this complex logical expression. Open
if xmlResponse.include?('NET5501') || xmlResponse.include?('NET5501-I') || xmlResponse.include?('NET5501-XT') || xmlResponse.include?('NET5504') || xmlResponse.include?('NET5500') || xmlResponse.include?('NET5516') || xmlResponse.include?('NET5508')
return Exploit::CheckCode::Appears
end
Consider simplifying this complex logical expression. Open
if (version[0].to_i < 11) or
(version[0].to_i == 11 and version[1].to_i <= 3) or
(version[0].to_i == 11 and version[1].to_i == 3 and version[2].to_i == 0 and version[3].to_i < 999)
ctx = { 'Msf' => framework, 'MsfExploit' => self }
sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => datastore['RPORT_REMOTING'], 'Context' => ctx })
Consider simplifying this complex logical expression. Open
elsif (error[0].empty? or (error[0].unpack('C')[0] & 3) == 0) and # fd_nextsize
(error[1].empty? or (error[1].unpack('C')[0] & 3) == 0) and # fd
(error[2] =~ /\A503 [^s].?\z/mn) and ((error[2].unpack('C*')[4] & 7) == PREV_INUSE) and # size
(error[3] == "177") # the last \x7F of our BAD1 command, encoded as \\177 by string_printing()
leaked_arch = ARCH_X86
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(year=0, month=0, day=0, hour=0, minute=0, second=0, neg=false, second_part=0)
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(host, port = 21, ssl = nil, ssl_version = nil, proxies = nil, username = '', password = '', verbose = false)
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(host, port = 80, context = {}, ssl = nil, ssl_version = nil, proxies = nil, username = '', password = '', kerberos_authenticator: nil, comm: nil, subscriber: nil)
Method map_port
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def map_port(udp_sock, host, port, int_port, ext_port, protocol, lifetime, timeout=1)
Method trans_maxzero
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def trans_maxzero(pipe, param = '', body = '', setup_count = 0, setup_data = '', no_response = false, do_recv = true, ignore_errors = false)
Method list_path
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_path(path, columns, sort, order, short, recursive = false, depth = 0, search_term = nil)
Method initialize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(recnum, timegen, timewri, id, type, cat, strs, data)
Method store_loot
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def store_loot(ltype, ctype, host, data, filename=nil, info=nil, service=nil, &block)
Method handle_nessus
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def handle_nessus(wspace, hobj, port, nasl, plugin_name, severity, data,task=nil)
Function oracle
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def oracle(target, pms, cke_2nd_prefix, cipher_handshake=ch_def, messageflow=False, timeout=5):
try:
s, cke_version = tls_connect(target, timeout)
s.send(bytearray(b'\x16') + cke_version)
s.send(cke_2nd_prefix)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function run_scanner
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def run_scanner(args, login_callback):
userpass = args['userpass'] or []
rhost = args['rhost']
rport = int(args['rport'])
sleep_interval = float(args['sleep_interval'] or 0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method cmd_nessus_plugin_details
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nessus_plugin_details(*args)
search_term = nil
plugin_id = nil
while (arg = args.shift)
case arg
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method cmd_openvas_connect
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_connect(*args)
# Is the database configured?
if !database?
print_error('No database has been configured.')
return
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method cmd_nessus_policy_del
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nessus_policy_del(*args)
if args[0] == '-h'
print_status('nessus_policy_del <policy ID>')
print_status('Example:> nessus_policy_del 1')
print_status('You must be an admin to delete policies.')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method transform_params
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def transform_params(options)
# If we've been given a specific IP to listen on, use that as our poisoning IP
if options[:spoof_ip].nil? && Rex::Socket.is_ip_addr?(options[:srvhost]) && Rex::Socket.addr_atoi(options[:srvhost]) != 0
options[:spoof_ip] = options[:srvhost]
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"