Showing 16,065 of 22,177 total issues
Method get_log_details
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_log_details
logs_detail = Array.new
eventlog_list.each do |log_name|
- 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 listtokens
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def listtokens()
begin
print_status("Getting Tokens...")
dt = ''
@client.core.use("incognito")
- 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 scan
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def scan(path)
begin
dirs = client.fs.dir.foreach(path)
rescue ::Rex::Post::Meterpreter::RequestError => e
print_error("Error scanning #{path}: #{$!}")
- 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
rescue
print_error("A Service Name must be provided, service names are case sensitive.")
Avoid deeply nested control flow statements. Open
if srv_name
begin
print_status("Changing Service #{srv_name} Startup to #{srv_startup}")
service_change_startup(srv_name,srv_startup)
print_good("Service Startup changed!")
Method enum_users
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def enum_users
os = @client.sys.config.sysinfo['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
elsif stdlkp == 1
if dom != nil
message(logs)
stdlookup(session, dom, dest)
else
Method unlock
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def unlock(phone_name)
res = send_request_cgi({
'method' => 'GET',
'uri' => '/IPSPCFG/user/Default.aspx',
'headers' => {
- 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 lock
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def lock(phone_name)
res = send_request_cgi({
'method' => 'GET',
'uri' => '/IPSPCFG/user/Default.aspx',
'headers' => {
- 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 passbf
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def passbf(session,passlist,target,user,opt,logfile)
Avoid deeply nested control flow statements. Open
print_status("Dumping memory for #{name}") if not query
Avoid deeply nested control flow statements. Open
print_status("\tsize for #{name} in PID #{p} is #{get_mem_usage(p)}K") if query
Avoid deeply nested control flow statements. Open
if dom != nil && hostlist!= nil &&
message(logs)
frwdlp(session, hostlist, dom, dest)
elsif dom == nil
print_error("Please add a domain name for DNS forward lookup: -d <value>")
Method cmd_sqlmap_get_option
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cmd_sqlmap_get_option(*args)
@hid_tasks ||= {}
@tasks ||= {}
unless args.length == 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
Avoid deeply nested control flow statements. Open
if kill_frfx
kill_firefox
end
Method abuse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def abuse(session,targets,commands,username,password,delay)
Avoid deeply nested control flow statements. Open
elsif request.uri =~ /custom_methods$/i
print_status("Sending custom methods") if datastore['VERBOSE']
send_response_html(cli, get_custom_methods().to_json(), { 'Content-Type' => 'application/json' })
elsif request.uri =~ /custom\/sample_cmd\?data=(\S+)$/
print_status("Request for custom command with args #{$1}") if datastore['VERBOSE']
Avoid deeply nested control flow statements. Open
resp << ( auth_tokens['nc'] ? auth_tokens['nc'] : "" )
Method run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run
begin
# check Pcaprub is up to date
if not netifaces_implemented?
print_error("WARNING : Pcaprub is not up-to-date, some functionality will not be available")
- 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 cansend
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def cansend(bus, id, data)
result = {}
result["Success"] = false
id = id.to_i(16).to_s(16) # Clean up the HEX
bytes = data.scan(/../) # Break up data string into 2 char (byte) chunks
- 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"