Showing 16,065 of 22,177 total issues
Method log_and_print
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def log_and_print(msg, level: :debug)
case level
when :debug
vprint_status(msg) if respond_to?(:vprint_status)
dlog(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"
Further reading
Method execute_script
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def execute_script(script, greedy_kill = false)
@session_pids ||= []
running_pids = greedy_kill ? get_ps_pids : []
open_channels = []
# Execute using -EncodedCommand
- 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 query
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def query(filter, max_results, fields, domain = nil)
domain ||= datastore['DOMAIN']
domain ||= get_domain
if domain.blank?
- 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 invalidate_login
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def invalidate_login(opts)
begin
add_opts_workspace(opts)
# Search for an existing Metasploit::Credential::Core object. It requires specific attributes.
core_opts = {}
- 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 start
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def start(opts)
@mutex.synchronize do
return if @running
- 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 process_logins
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def process_logins(opts = {})
self.queued_results ||= []
self.queued_credentials ||= []
unless opts[:final] || self.queued_credentials.length > queue_size
- 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 live_compile?
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def live_compile?
return false unless %w{ Auto True }.include?(datastore['COMPILE'])
if datastore['COMPILER'] == 'gcc' && has_gcc?
vprint_good 'gcc is installed'
- 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 try_login
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def try_login(credential)
begin
res = try_credential(credential)
if res && res.code == 302
- 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 attempt_login
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def attempt_login(credential)
result_options = {
credential: credential,
status: Metasploit::Model::Login::Status::INCORRECT,
host: host,
- 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 attempt_login
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def attempt_login(credential)
result_options = {
credential: credential,
host: host,
port: port,
- 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 Exec
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
public override void Exec(int oldLen)
{
try {
// generate JIT-code for Payload()
Payload();
- 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 __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, command='', username='', password=None, domain='', hashes=None, share=None,
Method defineAndCreate
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static void defineAndCreate(final ConfusingClassLoader cl, final String name[], final byte data[][], final String hexdata, final String jar, final String lhost, final int lport) {
Method scheduleme
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def scheduleme(session,schtype,cmd,tmmod,cmdopt,username,password)
Method connect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, socket=nil, flag=0)
Method make_ntlmssp_secblob_auth
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.make_ntlmssp_secblob_auth(domain, name, user, lm, ntlm, enc_session_key, flags = 0x080201)
Method make_ntlmssp_blob_auth
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.make_ntlmssp_blob_auth(domain, name, user, lm, ntlm, enc_session_key, flags = 0x080201)
Method encode_ldap_response
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def encode_ldap_response(msgid, code, dn, msg, tag, context_data = nil, context_code = nil)
Method process_type1_message
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.process_type1_message(message, nonce = "\x11\x22\x33\x44\x55\x66\x77\x88", win_domain = 'DOMAIN',
win_name = 'SERVER', dns_name = 'server', dns_domain = 'example.com', downgrade = true)
Method create_pkt
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_pkt(src_call, dst_call, tstamp, out_seq, inp_seq, itype, data)