Showing 6 of 6 total issues
Method add_module
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def add_module(path)
elf = BISC::ELF::Executable.new(path)
elfname = File.basename(path)
@modules[elfname] = elf
- 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 add_module
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def add_module(path)
pe = Rex::PeParsey::Pe.new_from_file(path, true)
pename = File.basename(path)
@modules[pename] = pe
- 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 add_module
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_module(path)
pe = Rex::PeParsey::Pe.new_from_file(path, true)
pename = File.basename(path)
@modules[pename] = pe
Method add_module
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_module(path)
elf = BISC::ELF::Executable.new(path)
elfname = File.basename(path)
@modules[elfname] = elf
Method get_iat_pointer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_iat_pointer(dll_name, function_name)
@modules.values.each do |pe|
pe.imports.each do |import|
if import.name.casecmp(dll_name) == 0
import.entries.each_with_index { |entry, i|
- 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 []
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def [](s)
case s
when Symbol
addresses = @instructions[s]
- 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"