Showing 22,177 of 22,177 total issues
Method run
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def run
unless (flow_file && properties_file) || identity_file
fail_with(Failure::NotFound, 'Unable to find login-identity-providers.xml, nifi.properties and/or flow.json.gz files')
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 check_badchars
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def check_badchars
badchars = %Q|&<=>|
in_super = false
in_author = 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_load
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def cmd_load(*args)
if args.length == 0
args.unshift('-h')
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 tab_complete_option_values
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def tab_complete_option_values(mod, str, words, opt:)
if words.last.casecmp?('SessionTlvLogging')
return %w[console true false file:<file>]
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 extract_user_and_realm
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def extract_user_and_realm(certificate, username, realm)
raise ArgumentError, 'Must provide username if providing realm' if username.nil? && !realm.nil?
raise ArgumentError, 'Must provide realm if providing username' if realm.nil? && !username.nil?
results = []
- 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 util.rb
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rex/post/meterpreter/extensions/stdapi/railgun/library_helper'
module Rex
module Post
module Meterpreter
Method initialize
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(update_info(info,
'Name' => 'CVE-2019-0708 BlueKeep RDP Remote Windows Kernel Use After Free',
'Description' => %q(
The RDP termdd.sys driver improperly handles binds to internal-only channel MS_T120,
Method make_pdf
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def make_pdf(ttf, js)
#swf_name = rand_text_alpha(8 + rand(8)) + ".swf"
xref = []
Method exploit_html
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit_html(cli)
p = payload.encoded
arch = Rex::Arch.endian(target.arch)
payload_final = Rex::Text.to_unescape(p, arch, prefix='\\u')
base_uri = get_module_resource
Method on_request_uri
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(client, request)
return if ((p = regenerate_payload(client)) == nil)
agent = request.headers['User-Agent']
Method make_pdf
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def make_pdf(ttf, js)
#swf_name = rand_text_alpha(8 + rand(8)) + ".swf"
xref = []
Method parse_sddl_sid
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_sddl_sid(sid, domain_sid:)
# see: https://learn.microsoft.com/en-us/windows/win32/secauthz/sid-strings
sid = sid.dup.upcase
# these can be validated using powershell where ?? is the code
Method cmd_loot
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_loot(*args)
return unless active?
mode = :search
host_ranges = []
Method send_request_tgt
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def send_request_tgt(options = {})
realm = options[:realm]
server_name = options[:server_name] || "krbtgt/#{realm}"
client_name = options[:client_name]
client_name = client_name.dup.force_encoding('utf-8') if client_name
Method get_detection_html
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_detection_html(user_agent)
ua_info = fingerprint_user_agent(user_agent)
os = ua_info[:os_name]
client = ua_info[:ua_name]
Method run
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
# If the action can be detected automatically. (Action: Automatic)
@my_action = pick_action
if @my_action.nil?
# If the automatic search fails, bye bye.
Method exploit
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
sploit = ''
if target.name =~ /Windows 2000 SP4/
sploit << rand_text_alpha(934)
File mssql_linkcrawler.rb
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = GreatRanking
include Msf::Exploit::Remote::MSSQL
include Msf::Auxiliary::Report
File sock_sendpage.rb
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Local
Rank = GreatRanking
include Msf::Post::File
include Msf::Post::Linux::Priv
File cve_2019_1663_cisco_rmi_rce.rb
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = GoodRanking
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager