Showing 21,886 of 21,886 total issues
Method mobaxterm_decrypt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def mobaxterm_decrypt(ciphertext, key)
ct = ''.bytes
ciphertext.each_byte do |c|
ct << c if key.include?(c)
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 enum_users
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def enum_users
users = []
system_drive = get_env('SystemDrive').to_s.strip
- 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 smtp_use_ssl.nil?
print_status(' SMTP Use SSL: No')
else
print_status(' SMTP Use SSL: Yes')
end
Avoid deeply nested control flow statements. Open
next if ['.', '..'].include?(file)
Method enum_users
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def enum_users
users = []
userinfo = {}
session.sys.config.getuid
userpath = 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
Avoid deeply nested control flow statements. Open
if imap_port.nil?
print_status(' IMAP Port: 143')
portnum = 143
else
print_status(" IMAP Port: #{imap_port}")
Method get_onedrive_accounts
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_onedrive_accounts(reg, accounts, syncdata)
all_oda = {}
synctargets_used = []
ret = {}
reg.each do |ses|
- 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 (loc['flags'] & 0x01) > 0
@data_out += "\tShortcut file is on a local volume.\n"
lnk_file.sysseek(offset + loc['vol_ofs'], ::IO::SEEK_SET)
Avoid deeply nested control flow statements. Open
if !imap_use_spa.nil? # Account for SPA (NTLM auth)
print_status(' Secure Password Authentication (SPA): Enabled')
end
Avoid deeply nested control flow statements. Open
if loc['base_ofs'] > 0
@data_out += get_target_path(loc['base_ofs'] + offset, lnk_file)
elsif loc['path_ofs'] > 0
@data_out += get_target_path(loc['path_ofs'] + offset, lnk_file)
end
Avoid deeply nested control flow statements. Open
if http_server_url.include? "h\x00t\x00t\x00p\x00s"
portnum = 443
else
portnum = 80
end
Method run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run
creds = Rex::Text::Table.new(
'Header' => 'IMVU Credentials',
'Indent' => 1,
'Columns' => [
- 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
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run
pw_tbl = Rex::Text::Table.new(
'Header' => 'MobaXterm Password',
'Columns' => [
'Protocol',
- 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 imap_password.nil?
print_status(' User Password: <not stored>')
else
imap_password.slice!(0, 1)
pass = decrypt_password(imap_password)
Method parse_odbc_dsn
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def parse_odbc_dsn(dsn_reg_key)
return nil unless registry_key_exist?(dsn_reg_key)
res = {}
wug_server = registry_getvaldata(dsn_reg_key, 'Server').to_s.delete("\000")
- 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_subdirs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def enum_subdirs(path)
xmlfiles = []
begin
session.fs.dir.foreach(path) do |sub|
- 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 get_ini
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_ini(filename)
config = client.fs.file.new(filename, 'r')
parse = config.read
ini = Rex::Parser::Ini.from_s(parse)
- 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
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run
print_status("Running module against #{sysinfo['Computer']}")
# Collect even without a database to store them.
if session.framework.db.active
db_ok = true
- 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 preconditions_met?
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def preconditions_met?
unless is_admin?
print_error('This module requires Admin privs to run')
return false
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 init_wug_encryption
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def init_wug_encryption
print_status('Init WhatsUp Gold crypto ...')
# Static RC2-40 key "salted" with 11 bytes of 0x00 - looking at you, wincrypt.h
@wug_rc2_key = ['112cc5a60c0000000000000000000000'].pack('H*')
- 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"