modules/exploits/multi/http/drupal_drupageddon.rb
Method exploit_newuser
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit_newuser
# TODO: Check if option admin_role exists via admin/people/permissions/roles
# call login page to extract tokens
File drupal_drupageddon.rb
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
Method exploit_newuser
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
def exploit_newuser
# TODO: Check if option admin_role exists via admin/people/permissions/roles
# call login page to extract tokens
- 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 initialize
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def initialize(info={})
super(update_info(info,
'Name' => 'Drupal HTTP Parameter Key/Value SQL Injection',
'Description' => %q{
This module exploits the Drupal HTTP Parameter Key/Value SQL Injection
Method exploit_formcache
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def exploit_formcache
form_build_id = 'form-' + rand_text_alphanumeric(43)
# Remove the malicious cache entries upon success.
evalstr = "cache_clear_all(array('form_" + form_build_id + "', " \
Method phpass_encode64
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def phpass_encode64(input, count)
out = ''
cur = 0
while cur < count
value = input[cur].ord
- 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"