Showing 22,177 of 22,177 total issues
Method smtp_recv
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def smtp_recv(expected_code = nil, expected_data = nil)
fail_with(Failure::BadConfig, "state is #{@smtp_state}") if @smtp_state != :recv
@smtp_state = :recving
failure = catch(:failure) do
- 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 40 (exceeds 5 allowed). Consider refactoring. Open
def run
opt = {}
opt['PADDING'] = datastore['PADDING'] if datastore['PADDING']
opt['FC'] = datastore['FC'] if datastore['FC']
pids = get_current_data_pids(datastore['CANBUS'], datastore['SRCID'], datastore['DSTID'], opt)
- 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 relay
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def relay( relay_client, relay_sock )
@relay_client = relay_client
@relay_sock = relay_sock
# start the relay thread (modified from Rex::IO::StreamAbstraction)
@relay_thread = Rex::ThreadFactory.spawn("SOCKS4AProxyServerRelay", false) do
- 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 arista_eos_config_eater
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def arista_eos_config_eater(thost, tport, config)
if framework.db.active
credential_data = {
address: thost,
- 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 import_nikto_xml
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def import_nikto_xml(args={}, &block)
data = args[:data]
wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
doc = rexmlify(data)
- 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 ping6
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def ping6(dhost, opts={})
check_pcaprub_loaded
dhost_intf = dhost + '%' + ipv6_interface(opts)
- 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 send_request_tgt
has a Cognitive Complexity of 40 (exceeds 5 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
- 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_winhttp
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def asm_reverse_winhttp(opts={})
retry_count = [opts[:retry_count].to_i, 1].max
verify_ssl = nil
encoded_cert_hash = 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 exploit
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
target_endpoint = normalize_uri(target_uri.path, datastore['CONFLUENCE_TARGET_ENDPOINT'])
print_status("Setting the application configuration's setupComplete to false via endpoint: #{target_endpoint}")
File jenkins_gather.rb
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'nokogiri'
require 'base64'
require 'digest'
require 'openssl'
require 'sshkey'
File reverse_http_x64.rb
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
###
#
# Complex payload generation for Windows ARCH_X86 that speak HTTP(S)
Function Signaler
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Signaler(root, socketURL) {
var self = this;
root.startBroadcasting = function () {
if(!root.MediaStream) throw 'Offerer must have media stream.';
Method prometheus_config_eater
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
def prometheus_config_eater(yamlconf)
@table_creds = Rex::Text::Table.new(
'Header' => 'Credentials',
'Indent' => 2,
'Columns' =>
Method asm_reverse_named_pipe
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
def asm_reverse_named_pipe(opts={})
#reliable = opts[:reliable]
reliable = false
retry_count = [opts[:retry_count].to_i, 1].max
Method run
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
case session.type
when 'meterpreter'
meterpreter = true
else
Class Sys
has 44 methods (exceeds 20 allowed). Consider refactoring. Open
class Console::CommandDispatcher::Stdapi::Sys
Klass = Console::CommandDispatcher::Stdapi::Sys
include Console::CommandDispatcher
Method cmd_connect
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_connect(*args)
if args.length < 2 or args.include?("-h") or args.include?("--help")
cmd_connect_help
return false
end
Class CommandShell
has 44 methods (exceeds 20 allowed). Consider refactoring. Open
class CommandShell
#
# This interface supports basic interaction.
#
File lab.rb
has 416 lines of code (exceeds 250 allowed). Consider refactoring. Open
$LOAD_PATH.unshift(File.join(__dir__, '..', 'lib', 'lab'))
require 'yaml'
module Msf
File splunk_upload_app_exec.rb
has 416 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = GoodRanking
include Msf::Exploit::Remote::HttpClient