Showing 10 of 28 total issues
Class Exploit
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class Exploit
include Core::Metadata::ID
include Core::Metadata::Authors
include Core::Metadata::Summary
Method print_metadata
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def print_metadata(exploit)
fields = {
'Type' => exploit_type(exploit)
}
- 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 run.rb
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'ronin/exploits/cli/exploit_command'
require 'ronin/exploits/cli/ruby_shell'
require 'ronin/exploits/mixins/has_payload'
require 'ronin/exploits/mixins/has_targets'
require 'ronin/exploits/mixins/loot'
Method print_metadata
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
def print_metadata(exploit)
fields = {
'Type' => exploit_type(exploit)
}
Method print_target
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def print_target(target)
fields = {}
fields['Arch'] = target.arch if target.arch
- 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 shouts
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def shouts(new_shouts=nil)
if new_shouts
@shouts = if superclass.kind_of?(ClassMethods)
superclass.shouts + new_shouts
else
- 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 post_exploitation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def post_exploitation
if @exploit_class.include?(Mixins::HasPayload) &&
@exploit.payload.kind_of?(Ronin::Payloads::Payload) &&
@exploit.payload.kind_of?(Ronin::Payloads::Mixins::PostEx)
unless @exploit.payload.session
- 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 select_target
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def select_target(arch: nil, os: nil, os_version: nil, software: nil, version: nil)
targets = self.class.targets.lazy
if arch
targets = targets.select { |target| target.arch == arch }
- 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 print_exploit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def print_exploit(exploit)
puts "[ #{exploit.id} ]"
puts
indent 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 depth
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.depth(new_depth=nil)
if new_depth
@depth = new_depth
else
@depth || if superclass < LFI
- 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"