Showing 16,065 of 22,177 total issues
Method cmd_besecure_report_list
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_besecure_report_list(*_args)
tbl = Rex::Text::Table.new(
'Columns' => ['ID', 'Name', 'Hosts']
)
- 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_db_nodes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def rpc_db_nodes(host, port, user, pass, name)
rpc_reconnect_nodes
if active_rpc_nodes == 0
print_error('No active nodes at this time')
- 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
Avoid deeply nested control flow statements. Open
elsif args[0] == '-a'
if scan['status'] == 'canceled'
tbl << [ scan['id'], scan['name'], scan['owner'], scan['starttime'], scan['status'], scan['folder_id'] ]
end
else
Avoid deeply nested control flow statements. Open
rescue ::Exception
print_status(" >> Exception during launch from #{xref[0]}: #{$ERROR_INFO}")
Avoid deeply nested control flow statements. Open
if !modname.empty?
eprofile << modname
end
Method cmd_lab_snapshot
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_lab_snapshot(*args)
return lab_usage if args.count < 2
snapshot = args[args.count - 1]
- 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 print_tree_recursive
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def print_tree_recursive(tree, max_level, indent, prefix, is_last, unicode)
Method cmd_lab_revert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_lab_revert(*args)
return lab_usage if args.count < 2
snapshot = args[args.count - 1]
- 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_add_node
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def rpc_add_node(host, port, ssl, user, pass, bypass_exist)
Avoid deeply nested control flow statements. Open
if execmod
rpc_round_exec(xref[0], xref[1], modopts, njobs)
end
Avoid deeply nested control flow statements. Open
if scan['status'] == 'completed'
tbl << [ scan['id'], scan['name'], scan['owner'], scan['starttime'], scan['status'], scan['folder_id'] ]
end
Method regdump
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def regdump(pathoflogs,filename)
host,port = @client.session_host, @client.session_port
#This variable will only contain garbage, it is to make sure that the channel is not closed while the reg is being dumped and compress
garbage = ''
hives = %w{HKCU HKLM HKCC HKCR HKU}
- 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_on_trgt_exec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_on_trgt_exec(session,cmdexe,opt,verbose)
r=''
session.response_timeout=120
if verbose == 1
begin
- 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
Avoid deeply nested control flow statements. Open
elsif srv_create
priv_check
if srv_name and srv_command
begin
print_status("Creating Service #{srv_name}")
Method list_logs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_logs(eventlog_name,filter,filter_string,logs,local_log,sup_print)
Method script_exec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def script_exec(session,scrptlst)
print_status("Running script List ...")
scrptlst.each_line do |scrpt|
next if scrpt.strip.length < 1
next if scrpt[0,1] == "#"
- 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 enum_users
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def enum_users(os)
users = []
path4users = ""
sysdrv = @client.sys.config.getenv('SystemDrive')
- 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
Avoid deeply nested control flow statements. Open
dump_mem(p,name,toggle) if not query
Method wmicexec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def wmicexec(session,wmiccmds= nil)
tmpout = ''
session.response_timeout=120
begin
tmp = session.sys.config.getenv('TEMP')
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
def run_host(ip)
begin
src = datastore['SRCADDR']
- 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"