Showing 16,065 of 22,177 total issues
Function main
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def main(argv=None):
if not argv:
argv = sys.argv
if len(argv) == 1:
usage()
- 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
for name in files:
build(name[:-4])
for root, dirs, files in os.walk('./src/single/'):
Avoid deeply nested control flow statements. Open
for (var x=0; x < procs.length; x++) {
if (nprocs[i] == procs[x]) {
found = true;
break;
}
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, remoteName, username='', password='', domain='', outputFile=None, execMethod='smbexec'):
Avoid deeply nested control flow statements. Open
for name in files:
build(name[:-4])
else:
Avoid deeply nested control flow statements. Open
if name[-4:] == '.asm':
build(name[:-4])
for root, dirs, files in os.walk('./src/stager/'):
Avoid deeply nested control flow statements. Open
for name in files:
build(name[:-4])
for root, dirs, files in os.walk('./src/migrate/'):
Function outputTGS
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def outputTGS(self, tgs, oldSessionKey, sessionKey, username, spn, fd=None):
Function oracle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def oracle(target, pms, cke_2nd_prefix, cipher_handshake=ch_def, messageflow=False, timeout=5):
Avoid deeply nested control flow statements. Open
for name in files:
build(name[:-4])
for root, dirs, files in os.walk('./src/kernel/'):
Avoid deeply nested control flow statements. Open
if (found) continue;
Avoid deeply nested control flow statements. Open
for name in files:
build(name[:-4])
for root, dirs, files in os.walk('./src/stager/'):
Method start
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def start
driver.print_status("Beholder is logging to #{config[:base]}")
bool_options = %i[screenshot webcam keystrokes automigrate]
bool_options.each do |o|
config[o] = !(config[o].to_s =~ /^[yt1]/i).nil?
- 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_until_success
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run_until_success(argv, env):
cargv = (c_char_p * len(argv))(*argv)
cenvp = (c_char_p * len(env))(*env)
r, w = os.pipe()
- 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
if not data:
break
output_file.write(data)
Method cmd_captureg
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_captureg(*args)
# short circuit the whole deal if they need help
return help if args.empty?
return help if args.length == 1 && args.first =~ HELP_REGEX
return help(args.last) if args.length == 2 && args.first =~ HELP_REGEX
- 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 tab_complete_aliases_and_commands
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def tab_complete_aliases_and_commands
items = []
# gather all the current commands the driver's dispatcher's have
driver.dispatcher_stack.each do |dispatcher|
next unless dispatcher.respond_to?(:commands)
- 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_task_delete
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_openvas_task_delete(*args)
return unless openvas?
if args?(args, 2)
- 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_db_scan_workspace
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_nessus_db_scan_workspace(*args)
if args[0] == '-h'
print_status('nessus_db_scan_workspace <policy ID> <scan name> <scan description> <workspace>')
print_status('Creates a scan based on all the hosts listed in db_hosts for a given workspace.')
print_status('Use nessus_policy_list to list all available policies with their corresponding policy IDs')
- 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_aggregator_cable_add
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_aggregator_cable_add(*args)
host, port, certificate = nil
case args.length
when 1
host, port = args[0].split(':', 2)
- 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"