Showing 22,177 of 22,177 total issues
Method build_unirpc_message
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def build_unirpc_message(
version_byte: 0x6c,
other_version_byte: 0x01,
body_length_override: 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 find_hook_point
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def find_hook_point(manifest)
return unless manifest
package = manifest.xpath('//manifest').first['package']
- 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 asm_reverse_http
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def asm_reverse_http(opts={})
retry_count = opts[:retry_count].to_i
retry_wait = opts[:retry_wait].to_i * 1000
proxy_enabled = !!(opts[:proxy_host].to_s.strip.length > 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 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
if datastore['DEPTH'] < 5
print_bad('A DEPTH of < 5 is unlikely to succeed as almost all observed installs require 5-11 depth.')
end
Method send_payload_objdata
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
def send_payload_objdata
# basic weblogic ClassTableEntry object (serialized)
# TODO: WHAT DOES THIS DO? CAN WE RANDOMIZE ANY OF IT?
objdata = '056508000000010000001b0000005d0101007372017870737202787000000000'
objdata << '00000000757203787000000000787400087765626c6f67696375720478700000'
Method exploit
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
peer = "#{rhost}:#{rport}"
if target.name =~ /WMI/
File cogent_datahub_command.rb
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
# Exploitation is reliable, but the service hangs and needs manual restarting.
Rank = ManualRanking
include Msf::Exploit::Remote::HttpClient
File MainPage.xaml.cs
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.IO;
Method exploit
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
jsp_name = datastore['JSP'] || rand_text_alpha(8+rand(8))
app_base = datastore['APPBASE'] || rand_text_alpha(8+rand(8))
mytarget = target
Method send_payload_objdata
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
def send_payload_objdata
shost = srvhost
if ['0.0.0.0', '127.0.0.1', '::'].include?(shost)
shost = Rex::Socket.source_address
end
Method search
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
def search(args = nil)
args ||= {}
# filtering, scoping, search base
# filter: https://tools.ietf.org/html/rfc4511#section-4.5.1.7
File wp_popular_posts_rce.rb
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::FileDropper
File huawei_hg532n_cmdinject.rb
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'base64'
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
File mssql_findandsampledata.rb
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Scanner
include Msf::Auxiliary::Report
include Msf::Exploit::Remote::MSSQL
include Msf::OptionalSession::MSSQL
File payload_set.rb
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
###
#
# This class is a special case of the generic module set class because
Class FileStat
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class FileStat
#
# Basic file types.
#
Method make_js
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
def make_js(encoded_payload)
# The following executes a ret2lib using BIB.dll
# The effect is to bypass DEP and execute the shellcode in an indirect way
stack_data = [
Method run
has 128 lines of code (exceeds 25 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?
Method sap_port_info
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sap_port_info(port)
case port.to_s
when /^3299$/
Method initialize
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'SpamTitan Unauthenticated RCE',