Showing 22,004 of 22,004 total issues
Method encode
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def encode
# Get the minimum number of nops to use
min = (reqs['MinNops'] || 0).to_i
min = 0 if reqs['DisableNops']
Method asm_block_recv_rc4
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def asm_block_recv_rc4(opts={})
xorkey = Rex::Text.to_dword(opts[:xorkey]).chomp
reliable = opts[:reliable]
asm = %Q^
recv:
File cve_2022_21999_spoolfool_privesc.rb
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class MetasploitModule < Msf::Exploit::Local
Rank = NormalRanking
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Post::File
Method initialize
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super(update_info(info,
'Name' => 'HTTP Client Automatic Exploiter',
'Description' => %q{
This module has three actions. The first (and the default)
Method super_redacted_deobfuscation
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def super_redacted_deobfuscation(ciphertext)
input = ciphertext
input = input.gsub('Z', '000')
base = '0'.upto('9').to_a + 'a'.upto('z').to_a + 'A'.upto('G').to_a
Method initialize
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super(merge_info(info,
'Name' => 'Linux x64 Command Shell, Bind TCP Inline (IPv6)',
'Description' => 'Listen for an IPv6 connection and spawn a command shell',
'Author' => 'epi <epibar052[at]gmail.com>',
Method generate
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate(_opts = {})
# Split the cmd string into arg chunks
cmd_str = datastore['CMD']
cmd_and_args = Shellwords.shellsplit(cmd_str).map { |s| "#{s}\x00" }
Method initialize
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Adobe ColdFusion Unauthenticated Remote Code Execution',
Method send_file
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def send_file(traversal_path, filename, file_content)
#
# FileStorageService packet structure:
#
# @packet_header_pre_packet_size
Method check
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def check
# used to ensure cleanup only runs against flexdotnetcms targets
@skip_cleanup = true
# visit login the page to get the necessary cookies
Method initialize
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info={})
super(update_info(info,
'Name' => "MS12-043 Microsoft XML Core Services MSXML Uninitialized Memory Corruption",
'Description' => %q{
This module exploits a memory corruption flaw in Microsoft XML Core Services
Method build_packet_and_layouts
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_packet_and_layouts(packet, function, args, arch)
case arch
when ARCH_X64
native = 'Q<'
when ARCH_X86
Method juniper_junos_config_eater
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def juniper_junos_config_eater(thost, tport, config)
report_host({
host: thost,
os_name: 'Juniper JunOS'
})
Method identify_hash
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.identify_hash(hash)
# @param [str] a string of a hashed password
# @return [String] the jtr type or empty string on no match
hash = hash.to_s.strip
case
File sap_igs_xmlchart_xxe.rb
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
File client_ftp.rb
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class MetasploitModule < Msf::Auxiliary
include Exploit::Remote::TcpServer
def initialize()
super(
File ahsay_backup_fileupload.rb
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::EXE
include Msf::Exploit::FileDropper
File outlook.rb
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class MetasploitModule < Msf::Post
include Msf::Post::Windows::Registry
include Msf::Post::Windows::Priv
include Msf::Auxiliary::Report
Function run
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
def run(args):
if dependencies_requests_missing:
logging.error('Module dependency (requests) is missing, cannot continue')
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 perform_sqli
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
def perform_sqli
# NOTE: using run_sql because there is a limit on the length of our queries
# will work only if we remove the casts, NULL value handling etc.
digit_range = ('0'..'9')
bit_range = ('0'..'1')
- 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"