Method cmd_execute_bof
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def cmd_execute_bof(*args)
if args.empty?
cmd_execute_bof_help
return false
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 cmd_execute_bof
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_execute_bof(*args)
if args.empty?
cmd_execute_bof_help
return false
end
Method get_executable_symbols
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def get_executable_symbols(coff)
executable_symbols = []
coff.symbols.each do |sym|
next unless sym
next unless sym.sec_nr.is_a? Integer
- 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 compile_c
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def compile_c(source)
if client.arch == ARCH_X86
mingw = Metasploit::Framework::Compiler::Mingw::X86.new
elsif client.arch == ARCH_X64
mingw = Metasploit::Framework::Compiler::Mingw::X64.new
- 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
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return unless bof_data
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return