Showing 21,960 of 21,960 total issues
Method process_propfind
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def process_propfind(cli, request)
path = request.uri
print_status("PROPFIND #{path}")
body = ''
Method run_host
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run_host(ip)
vprint_status('Attempting user enumeration')
res = send_request_cgi(
'uri' => normalize_uri(target_uri.path, 'api', 'index.php', 'v1', 'users'),
'headers' => {
Method initialize
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Atlassian Confluence WebWork OGNL Injection',
Method upload_payload
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def upload_payload
uri = target_uri.path
@filename = rand_text_alpha(8+rand(8)) + ".cfm" #numbers is a bad idea
taskname = rand_text_alpha(8+rand(8)) #numbers is a bad idea
Method initialize
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'FreeBSD ip6_setpktopt Use-After-Free Privilege Escalation',
Method initialize
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info={})
super(update_info(info,
'Name' => "Aladdin Knowledge System Ltd ChooseFilePath Buffer Overflow",
'Description' => %q{
This module exploits a vulnerability found in Aladdin Knowledge System's
Method on_request_uri
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(cli, request)
agent = request['User-Agent']
case request['User-Agent']
when /MSIE.*Windows NT 5\.1.*\.NET CLR .*/
Method exploit
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
overflow = rand_text(target["Offset"])
overflow << generate_seh_record(target.ret)
overflow << payload.encoded
File execute_dotnet_assembly.rb
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Post
include Msf::Post::File
include Msf::Exploit::Retry
include Msf::Post::Windows::Priv
Method create_session_key
has 98 lines of code (exceeds 25 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
File charset.rb
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
class RbMysql
# @!attribute [r] number
# @private
# @!attribute [r] name
# @return [String] charset name
Method cmd_creds_help
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_creds_help
print_line
print_line "With no sub-command, list credentials. If an address range is"
print_line "given, show only credentials with logins on hosts within that"
print_line "range."
Method f5_config_eater
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def f5_config_eater(thost, tport, config, store = true)
credential_data = {
address: thost,
port: tport,
Method asm_reverse_tcp
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def asm_reverse_tcp(opts={})
# TODO: reliability is coming
retry_count = opts[:retry_count]
encoded_port = "0x%.8x" % [opts[:port].to_i, 2].pack("vn").unpack("N").first
encoded_host = "0x%.8x" % Rex::Socket.addr_aton(opts[:host]||"127.127.127.127").unpack("V").first
Method asm_bind_tcp
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def asm_bind_tcp(opts={})
#reliable = opts[:reliable]
af_inet = 2
Method wmicexec
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def wmicexec(wmiccmds= nil)
print_status("Running WMIC Commands ....")
i, a = 0, []
@client.response_timeout=120
- 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 load_settings_from_config
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def load_settings_from_config
config_file = Msf::Config.config_file
ini = Rex::Parser::Ini.new(config_file)
group = ini[name]
if group
- 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 27 (exceeds 5 allowed). Consider refactoring. Open
def run
sid, cookies = authenticate
left_marker = Rex::Text.rand_text_alpha(5)
right_marker = Rex::Text.rand_text_alpha(5)
- 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 scanner_process
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def scanner_process(data, shost, sport)
head = data.slice!(0,12)
xid, flags, quests, answers, auths, adds = head.unpack('n6')
- 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 27 (exceeds 5 allowed). Consider refactoring. Open
def run_host(ip)
if datastore['SUBDOM_LIST'] and ::File.file?(datastore['SUBDOM_LIST'])
valstr = IO.readlines(datastore['SUBDOM_LIST']).map {
|e| e.gsub(".#{datastore['DOMAIN']}", "").chomp
}
- 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"