Showing 47 of 57 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 'ronin/cli/file_processor_command'
require 'hexdump'
module Ronin
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 'ronin/cli/command'
require 'ronin/cli/host_and_port'
require 'ronin/core/cli/logging'
require 'ronin/support/network/tcp/proxy'
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
Class HTTPShell
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class HTTPShell < Core::CLI::CommandShell
include Printing::HTTP
# The base URI.
File netcat.rb
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'ronin/cli/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 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 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 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 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]
Method process_value
has a Cognitive Complexity of 12 (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 define_file_system_options
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.define_file_system_options(command)
command.option :file_name, desc: 'Searches for all file names' do
@pattern = FILE_NAME
end
Method define_pii_options
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.define_pii_options(command)
command.option :user_name, desc: 'Searches for all user names' do
@pattern = USER_NAME
end