Showing 22,177 of 22,177 total issues
Method create_session_key
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def self.create_session_key(ntlmssp_flags, server_ntlmssp_flags, user, pass, domain, challenge_key,
client_challenge = '', ntlm_cli_challenge = '' , opt = {} )
usentlm2_session = opt[:usentlm2_session] != nil ? opt[:usentlm2_session] : true
use_ntlmv2 = opt[:use_ntlmv2] != nil ? opt[:use_ntlmv2] : 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
Method initialize
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def initialize(prompt = DefaultPrompt, prompt_char = DefaultPromptChar, opts = {})
histfile = opts['HistFile'] || Msf::Config.history_file
begin
FeatureManager.instance.load_config
- 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 solicit_ipv6_mac
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def solicit_ipv6_mac(dhost, opts = {})
check_pcaprub_loaded
dhost_intf = dhost + '%' + ipv6_interface(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
File services.rb
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
class Post
module Windows
# @deprecated Use {Services} instead
module WindowsServices
Method create_sqlite_db
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_sqlite_db
dbfile = Tempfile.new('ad_to_sqlite')
db = SQLite3::Database.new(dbfile.path)
db.type_translation = true
Method cmd_search
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_search(*args)
match = ''
row_filter = nil
output_file = nil
cached = false
Method run
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
@show_progress = datastore['ShowProgress']
@show_percent = datastore['ShowProgressPercent'].to_i
if self.respond_to?(:session) && session
File meterpreter.rb
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rex/post/meterpreter/client'
require 'rex/post/meterpreter/ui/console'
module Msf
module Sessions
Method html_get_hash
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
def html_get_hash(arg = {})
ntlm_ver = arg[:ntlm_ver]
if ntlm_ver == NTLM_CONST::NTLM_V1_RESPONSE or ntlm_ver == NTLM_CONST::NTLM_2_SESSION_RESPONSE
lm_hash = arg[:lm_hash]
nt_hash = arg[:nt_hash]
Method on_request_uri
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(cli, request)
# Random JavaScript variable names
js_element_name = rand_text_alpha(rand(10) + 5)
js_obj_addr_name = rand_text_alpha(rand(10) + 5)
File ldap_esc_vulnerable_cert_finder.rb
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::LDAP
include Msf::OptionalSession::LDAP
include Rex::Proto::Secauthz
Method on_client_data
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_client_data(client)
data = client.get_once
return if !data
print_status("SMTP: #{@state[client][:name]} Command: #{data.strip}")
File solr_velocity_rce.rb
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::CmdStager
include Msf::Exploit::Powershell
File ad_to_sqlite.rb
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'sqlite3'
require 'tempfile'
class MetasploitModule < Msf::Post
include Msf::Post::Windows::LDAP
Method asm_reflective_pe_loader_x64
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
def asm_reflective_pe_loader_x64(opts)
prologue = ''
if opts[:is_dll] == true
prologue = %(
File core.rb
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'set'
require 'rex/post/hwbridge'
module Rex
module Post
Method run_host
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def run_host(ip)
conn = true
ecode = nil
emesg = 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
Method run
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def run
init_railgun_defs
@hostname_cache = {}
libgnome_keyring = session.railgun.libgnome_keyring
- 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 dispatch_request
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def dispatch_request(from, buf)
type = buf.unpack('C').first
if (type != Constants::Request)
#dlog("Unknown DHCP request type: #{type}")
return
- 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_single
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def run_single(line, propagate_errors: false)
arguments = parse_line(line)
method = arguments.shift
cmd_status = nil # currently either nil or :handled, more statuses can be added in the future
error = 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"