Showing 15,831 of 21,886 total issues
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
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"
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 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
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_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_lab_load_config
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cmd_lab_load_config(*args)
return lab_usage if args.empty?
if args[0] =~ /^remote_/
return lab_usage unless args.count == 3
- 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_lab_load_running
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cmd_lab_load_running(*args)
return lab_usage if args.empty?
if args[0] =~ /^remote_/
return lab_usage unless args.count == 3
- 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_ffautoregen
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cmd_ffautoregen(*_args)
if !active_module || !(path = active_module.file_path)
print_line('Error: No active module selected')
return nil
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"
Further reading
Method rpc_list_nodes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def rpc_list_nodes
indent = ' '
tbl = Rex::Text::Table.new(
'Indent' => indent.length,
- 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 local_module_exec
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def local_module_exec(mod, mtype, opts, _nmaxjobs)
jobify = false
modinst = framework.modules.create(mod)
- 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 send_text_to_gotify
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def send_text_to_gotify(session)
# https://gotify.net/docs/more-pushmsg
uri_parser = URI.parse(gotify_address)
message_text =
"Platform : #{session.platform}\n" \
- 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 run_host
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def run_host(ip)
begin
name = datastore['MSG']
- 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"