Showing 22,177 of 22,177 total issues
File client_core.rb
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rex/post/meterpreter/packet'
require 'rex/post/meterpreter/core_ids'
require 'rex/post/meterpreter/extension'
require 'rex/post/meterpreter/extension_mapper'
require 'rex/post/meterpreter/client'
Method mssql_login
has 246 lines of code (exceeds 25 allowed). Consider refactoring. Open
def mssql_login(user='sa', pass='', db='', domain_name='')
prelogin_data = mssql_prelogin
if auth == Msf::Exploit::Remote::AuthOption::KERBEROS
idx = 0
pkt = ''
Method get_registry
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_registry(outlook_ver)
# Determine if saved accounts exist within Outlook. Ignore the Address Book and Personal Folder registry entries.
outlook_exists = 0
saved_accounts = 0
File protocol.rb
has 575 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "socket"
require "timeout"
require "digest/sha1"
require "stringio"
Method run
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def run
def check_results(passwords, results, hash_type, method)
passwords.each do |password_line|
password_line.chomp!
next if password_line.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 enum_instance
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def enum_instance(rhost)
print_status("#{rhost}:#{rport} [SAP] Connecting to SAP Management Console SOAP Interface")
success = false
soapenv='http://schemas.xmlsoap.org/soap/envelope/'
xsi='http://www.w3.org/2001/XMLSchema-instance'
- 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_execute_bof
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def cmd_execute_bof(*args)
if args.empty?
cmd_execute_bof_help
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 assemble_buffer
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def assemble_buffer(direction, function, args, arch)
layout = {} # paramName => BufferItem
blob = ""
#puts " building buffer: #{direction}"
function.params.each_with_index do |param_desc, param_idx|
- 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 parse_sessionsetup
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def parse_sessionsetup(pkt, s)
payload = pkt.payload.dup
ntlmpayload = payload[/NTLMSSP\x00.*/m]
if ntlmpayload
ntlmmessagetype = ntlmpayload[8,4].unpack("V")[0]
- 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 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
vprint_status("#{peer} - Checking ")
# since we will check res to see if auth was a success, make sure to capture the return
res = send_request_cgi(
'uri' => normalize_uri(target_uri.path),
Method run_host
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run_host(ip)
# Force http verb to be upper-case, because otherwise some web servers such as
# Apache might throw you a 501
http_method = datastore['METHOD'].upcase
File message.rb
has 566 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'postgres_msf'
require 'postgres/buffer'
require 'rex/io/stream'
# Monkeypatch to preserve original code intent
Method parse_ns_config
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
def parse_ns_config
ns_config_data = File.binread(ns_conf)
ns_secret.each do |secret|
element = secret[0]
secret[1].each do |keyword|
- 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 61 (exceeds 5 allowed). Consider refactoring. Open
def run
def check_results(passwords, results, hash_type, method)
passwords.each do |password_line|
password_line.chomp!
next if password_line.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 escalate_or_deescalate_privs
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
def escalate_or_deescalate_privs(deescalate: false)
# Establish some variables based on if we need to escalate or deescalate privileges
if deescalate
use_filesystem = @role_to_add != 'ROLE_FILESYSTEM_EDITOR'
mode = 'cleanup'
- 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 61 (exceeds 5 allowed). Consider refactoring. Open
def run
print_status("Upgrading session ID: #{datastore['SESSION']}")
# Try hard to find a valid LHOST value in order to
# make running 'sessions -u' as robust as possible.
- 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_search
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
def cmd_search(*args)
match = ''
row_filter = nil
output_file = nil
cached = false
- 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
File userspec_generic.py
has 564 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/python
'''
Exploit for CVE-2021-3156 with struct userspec overwrite by sleepya
From https://github.com/worawit/CVE-2021-3156
Method initialize
has 238 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Cisco RV110W/RV130(W)/RV215W Routers Management Interface Remote Command Execution',
Method run
has 237 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
if ! @telephony_loaded
print_error("The Telephony module is not available: #{@telephony_error}")
raise RuntimeError, "Telephony not available"
end