Showing 15,831 of 21,886 total issues
Method cmd_jobs
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
def cmd_jobs(*args)
# Make the default behavior listing all jobs if there were no options
# or the only option is the verbose flag
args.unshift("-l") if args.empty? || args == ["-v"]
- 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
Class ConsoleCommandDispatcher
has 55 methods (exceeds 20 allowed). Consider refactoring. Open
class ConsoleCommandDispatcher
include Msf::Ui::Console::CommandDispatcher
def name
PLUGIN_NAME
File safari_jit.rb
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = GoodRanking
include Msf::Post::File
include Msf::Exploit::Remote::HttpServer::HTML
Method exploit
has 195 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
# lots of this file's format is based on pkexec.rb
# direct copy of code from exploit-db
main = %q{
Method cmd_reg
has 195 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_reg(*args)
# Extract the command, if any
cmd = args.shift
if (args.length == 0)
Method init
has 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public void init()
{
try
{
Method exploit
has 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
print_status('Trying to detect if target is running a supported version of piwik')
res = send_request_cgi({
'method' => 'GET',
'uri' => normalized_index
Method exploit
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
def exploit
print_status('Trying to detect if target is running a supported version of piwik')
res = send_request_cgi({
'method' => 'GET',
'uri' => normalized_index
- 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 decrypt_trigger_decrypt
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
def decrypt_trigger_decrypt(org_file, new_file, temp_file)
[org_file, new_file, temp_file].each do |f|
f.insert(0, @paths['ff'])
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 start_element
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
def start_element(name, attrs)
@state[:current_tag][name] = true
case name
when "description", "information"
return unless in_tag("detaillist")
- 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_db_import
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
def cmd_db_import(*args)
return unless active?
openvas_cert = false
openvas_dfn = false
::ApplicationRecord.connection_pool.with_connection {
- 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 opts_to_services
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
def opts_to_services(hosts,opts)
::ApplicationRecord.connection_pool.with_connection {
wspace = find_workspace(opts[:workspace])
services = []
if opts[:host] or opts[:address] or opts[:addresses]
- 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 each_unfiltered_username_first
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
def each_unfiltered_username_first
if pass_file.present?
pass_fd = File.open(pass_file, 'r:binary')
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
File manage_engine_dc_pmp_sqli.rb
has 489 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
File filezilla_server.rb
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rexml/document'
class MetasploitModule < Msf::Post
include Msf::Post::File
File shares.rb
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'pathname'
require 'rex/post/file'
require 'filesize'
module Rex
Method parse_server
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_server(data)
creds = []
perms = []
groups = []
settings = {}
Method build_t3_request_object
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_t3_request_object
# T3 request serialized data
# retrieved by watching network traffic
# This is a proprietary, undocumented protocol
# TODO: WHAT DOES THIS DO? CAN WE RANDOMIZE ANY OF IT?
Method exploit
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
# Hijacking Administrator session by exploiting objection injection vuln that end up with sqli
print_status("Hijacking administrator session")
sql = "SELECT id FROM sessions LIMIT 1"
Method listeners_start
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
def listeners_start(args)
config = parse_start_args(args)
if config[:show_help]
help('start')
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"