Showing 54 of 66 total issues
Method run
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def run(*args)
local, upstream = *args
if local.include?(':')
proxy_host, proxy_port = host_and_port(local)
- 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 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(*args)
local, upstream = *args
if local.include?(':')
proxy_host, proxy_port = host_and_port(local)
Method server_loop
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def server_loop
finished = Async::Notification.new
endpoint = async_endpoint
stdin = async_stdin
clients = []
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
def run(*args)
if options[:hexdump]
require 'hexdump'
@hexdump = Hexdump::Hexdump.new
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 hexdump.rb
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../file_processor_command'
require 'hexdump'
module Ronin
File http.rb
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../value_processor_command'
require_relative '../printing/http'
require_relative '../http_shell'
require 'ronin/support/network/http'
require 'ronin/support/network/http/cookie'
Method process_hostname
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def process_hostname(host)
if options[:subdomain]
puts host.subdomain(options[:subdomain])
elsif options[:domain]
puts host.domain
- 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 proxy.rb
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../command'
require_relative '../host_and_port'
require 'ronin/core/cli/logging'
require 'ronin/support/network/tcp/proxy'
Class HTTPShell
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class HTTPShell < Core::CLI::CommandShell
include Printing::HTTP
# The base URI.
Method define_char_sets
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.define_char_sets(command)
command.option :numeric, short: '-N',
desc: 'Searches for numeric characters (0-9)' do
@char_set = Chars::NUMERIC
end
File netcat.rb
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../command'
require 'ronin/core/cli/logging'
require 'ronin/support/network/ssl'
require 'command_kit/options/verbose'
Method client_loop
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def client_loop
finished = Async::Notification.new
endpoint = async_endpoint
stdin = async_stdin
buffer_size = options[:buffer_size]
- 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 pattern_options.rb
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'ronin/support/text/patterns'
module Ronin
class CLI
#
Method run
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(*args)
if options[:hexdump]
require 'hexdump'
@hexdump = Hexdump::Hexdump.new
end
Method define_source_code_options
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.define_source_code_options(command)
command.option :identifier, desc: 'Searches for all identifier names' do
@pattern = IDENTIFIER
end
Method process_value
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def process_value(url)
uri = URI(url)
if options[:user]
puts uri.user
- 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 process_value
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def process_value(domain)
if options[:has_addresses]
each_typo_squat(domain) do |typo_domain|
if typo_domain.has_addresses?
puts typo_domain
- 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 process_value
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def process_value(domain)
if options[:has_addresses]
each_bit_squat(domain) do |host|
puts host if host.has_addresses?
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 server_loop
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def server_loop
finished = Async::Notification.new
endpoint = async_endpoint
stdin = async_stdin
clients = []
Method client_loop
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def client_loop
finished = Async::Notification.new
endpoint = async_endpoint
stdin = async_stdin
buffer_size = options[:buffer_size]