Showing 22,177 of 22,177 total issues
Method do_decrypt
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def do_decrypt
unless datastore['DISCLAIMER']
decrypt_disclaimer
return
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 gathernix
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def gathernix
print_status('Unix OS detected')
user_files = cmd_exec('locate tomcat-users.xml').split("\n")
if !user_files.empty?
user_files.each do |path|
- 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 38 (exceeds 5 allowed). Consider refactoring. Open
def run
current_action = action.name.downcase
if current_action == 'decrypt' && !datastore['VBR_CSV_FILE'] && !datastore['VOM_CSV_FILE']
fail_with(Msf::Exploit::Failure::BadConfig, 'You must set either the VBR_CSV_FILE or VOM_CSV_FILE advanced options')
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 validate_directive
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def validate_directive(pack_directive)
# current pointer value
p = 0
# end of pointer range
- 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_tcp
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def send_tcp(packet,packet_data, nameservers)
ans = nil
length = [packet_data.size].pack("n")
- 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 38 (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("SOCKS5ProxyServerTcpRelay", 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 cmd_threads
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def cmd_threads(*args)
# Make the default behavior listing all jobs if there were no options
# or the only option is the verbose flag
if (args.length == 0 or args == ["-v"])
args.unshift("-l")
- 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 report_service
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def report_service(opts)
return if !active
::ApplicationRecord.connection_pool.with_connection { |conn|
opts = opts.clone() # protect the original caller's opts
addr = opts.delete(:host) || 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"
Further reading
Method do_request_cert
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def do_request_cert(icpr, opts)
private_key = OpenSSL::PKey::RSA.new(2048)
user = opts[:username] || datastore['SMBUser']
status_msg = "Requesting a certificate for user #{user}"
alt_dns = opts[:alt_dns] || (datastore['ALT_DNS'].blank? ? nil : datastore['ALT_DNS'])
- 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 dcerpc_endpoint_list
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def dcerpc_endpoint_list
res = []
print_status("Connecting to the endpoint mapper service...")
begin
- 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_message
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def send_message(data)
mailfrom = datastore['MAILFROM'].strip
if bad_address(mailfrom)
print_error "Bad from address, not sending: #{mailfrom}"
return 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 parse
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def parse(value, datastore)
Enumerator.new do |results|
# extract the individual elements from the rhost string, ensuring that
# whitespace, strings, escape characters, etc are handled correctly.
values = Rex::Parser::Arguments.from_s(value)
- 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
Function Int64
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Int64(v) {
// The underlying byte array.
var bytes = new Uint8Array(8);
switch (typeof v) {
Method create_library
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.create_library(constant_manager, library_path = 'ntdll')
dll = Library.new(library_path, constant_manager)
dll.add_function('NtAllocateVirtualMemory', 'DWORD', [
['DWORD', 'ProcessHandle', 'in'],
Method vyos_config_eater
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
def vyos_config_eater(thost, tport, config, store = true)
credential_data = {
address: thost,
port: tport,
File nmap_document.rb
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "rex/parser/nokogiri_doc_mixin"
module Rex
module Parser
Method run
has 142 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 run_host
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run_host(ip)
path = datastore['PATH']
check1 = [
'iNotes/Forms5.nsf',
Method exploit
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
# Display start time
time1 = Time.new
print_status("-------------------------------------------------")
print_status("Start time : #{time1.inspect}")
Method query_current_connection
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
def query_current_connection(wlan_handle, guid)
connection = {}
conn_info = @wlanapi.WlanQueryInterface(wlan_handle, guid, 7, nil, 4, 4, nil)
# Grab the pointer to our data structure. We skip voer the Interface State since we already have it