Showing 22,177 of 22,177 total issues
File vim_soap.rb
has 597 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
module Exploit::Remote::VIMSoap
include Msf::Exploit::Remote::HttpClient
File auth_brute.rb
has 595 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
###
#
# This module provides methods for brute forcing authentication
File utils.rb
has 587 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Rex::Proto::NTLM
class Utils
# duplicate from lib/rex/proto/smb/utils cause we only need this function from Rex::Proto::SMB::Utils
# Convert a unix timestamp to a 64-bit signed server time
File http_client.rb
has 587 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'uri'
require 'digest'
module Msf
Method run
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
def run
# check if we already have a socket, if not, create one
unless @sock
# create a socket
res_code, sock_or_msg = create_socket_for_xnode(rhost, rport)
- 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 64 (exceeds 5 allowed). Consider refactoring. Open
def run
# check if we already have a socket, if not, create one
unless @sock
# create a socket
res_code, sock_or_msg = create_socket_for_xnode(rhost, rport)
- 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 64 (exceeds 5 allowed). Consider refactoring. Open
def run
base_addr = datastore['BASEDNS']
targ_addr = datastore['TARGDNS']
check_ar = datastore['CHECK_ADDITIONAL']
check_aa = datastore['CHECK_AUTHORITY']
- 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_host
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
def run_host(target_host)
print_status("Trying #{target_host}")
if wordpress_and_online?
version = wordpress_version
version_string = version || '(no version detected)'
- 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 64 (exceeds 5 allowed). Consider refactoring. Open
def initialize(framework)
self.framework = framework
self.sid_pool = 0
self.mutex = Mutex.new
self.scheduler_queue = ::Queue.new
- 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 on_request_uri
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(cli, request)
print_status("Sending #{request.uri} to #{request['User-Agent']}")
escaped_payload = Rex::Text.to_unescape(payload.raw)
jscript = %Q^
var shellcode = unescape("#{escaped_payload}");
File crushftp_rce_cve_2023_43177.rb
has 585 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::FileDropper
Method on_request_uri
has 249 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(cli, request)
print_status("Sending #{request.uri} to #{request['User-Agent']}")
download_payload = ''
shellcode = payload.encoded
uripath = datastore['URIPATH'] || get_resource
File cloud_lookup.rb
has 580 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'public_suffix'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::DNS::Enumeration
include Msf::Auxiliary::Report
File firefox_creds.rb
has 580 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'tmpdir'
#
# Gems
#
Function main
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
def main(argv=None):
if not argv:
argv = sys.argv
if len(argv) == 1:
print('Usage: build.py [clean|all|<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 create_lm_ntlm_responses
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
def self.create_lm_ntlm_responses(user, pass, challenge_key, domain = '', default_name = '', default_domain = '',
dns_host_name = '', dns_domain_name = '', chall_MsvAvTimestamp = nil, spnopt = {}, 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 cmd_transport
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
def cmd_transport(*args)
if ( args.length == 0 or args.include?("-h") )
cmd_transport_help
return
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 monitor_socket
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
def monitor_socket
# Skip if we are using a passive dispatcher
return if self.passive_service
- 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 command_string
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
def command_string
if (datastore['JOBNAME'] == "DUMMY") && !datastore['FTPUSER'].nil?
datastore['JOBNAME'] = (datastore['FTPUSER'] + "1").strip.upcase
end
lhost = Rex::Socket.resolv_nbo(datastore['LHOST'])
Method osx_capture_media
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
def osx_capture_media(opts)
capture_code = <<-EOS
#{osx_ruby_dl_header}
options = {