Showing 152 of 506 total issues
Method aggressive
has 1504 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
# the paths are relative to the url path if they don't start with /
# this path, with this md5 = this version
File drupal.rb
has 1525 lines of code (exceeds 250 allowed). Consider refactoring. Open
WhatWeb::Plugin.define "Drupal" do
@author = "Andrew Horton"
@version = "0.3"
@description = "Drupal is an opensource CMS written in PHP."
@website = "http://www.drupal.org"
Method aggressive
has 718 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
# the paths are relative to the url path if they don't start with /
# this path, with this md5 = this version
Method passive
has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
unless target.headers["server"].nil?
- 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 wordpress.rb
has 757 lines of code (exceeds 250 allowed). Consider refactoring. Open
WhatWeb::Plugin.define "WordPress" do
@author = "Andrew Horton"
@version = "0.5"
@description = "WordPress is an opensource blogging system commonly used as a CMS."
@website = "http://www.wordpress.org/"
Method aggressive
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
versions = Hash["1.0.0" =>
[["mambots/editors/tinymce.xml",
Method aggressive
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
versions = Hash[
"2.0.3" =>
Method aggressive
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
versions = Hash[
"05.06.04" => [
["Portals/_default/default.css", "621653870c35f7eb431b9679b39155ee"],
Method passive
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
# Excel
if target.body =~ /<DocumentProperties xmlns="urn:schemas-microsoft-com:office:[excel|office]?">/ || target.body =~ /<?mso-application progid="Excel.Sheet"?>/
- 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 aggressive
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
versions = Hash[
"1.4.1" =>
Method passive
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
# Check if the document is a valid phpinfo() file
if target.body =~ /<title>phpinfo\(\)<\/title>/ && (target.body =~ /<h1 class="p">PHP Version [^<]{3,40}<\/h1>/ || target.body =~ /<h1>PHP Version [^<]{3,40}<\/h1>/)
- 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 passive
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
# /cgi-bin/authLogin.cgi # Check document is QNAP XML
if (target.uri.path == "/cgi-bin/authLogin.cgi") && target.body =~ /^<QDocRoot version="[\d\.]+">$/
- 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 aggressive
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
versions = Hash[
"2.4.10" => [
["cms/css/layout.css", "5db089786a6d5487e16297ce36ab2421"],
Method aggressive
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
def aggressive(target)
m = []
# the paths are relative to the url path if they don't start with /
# this path, with this md5 = this version
Method passive
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
device = {};
device[:model] = []
- 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 passive
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
hup = {}; hup[:host] = []; hup[:user] = []; hup[:pass] = []
stuff = {
- 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 joomla.rb
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
WhatWeb::Plugin.define "Joomla" do
@author = "Andrew Horton"
@version = "0.7"
@description = "Opensource CMS written in PHP. Aggressive version detection compares just 5 files, valid for versions 1.5.0-1.5.22 and 1.6.0-1.6.1."
@website = "http://joomla.org"
Method passive
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
# x-webobjects-loadaverage
m << { name: "x-webobjects-loadaverage" } unless target.headers["x-webobjects-loadaverage"].nil?
- 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 passive
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
# Check if the current file is a .htpasswd file
if target.uri.path =~ /htpasswd/i && target.body =~ /^([0-9a-z\-_]{2,255}:[^\r^\n^\s^:]{1,80})[\r\n\s:]*/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 passive
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def passive(target)
m = []
# Extract details
if target.body =~ /^Interesting ports on (.+):[\r]?$/ && target.body =~ /^Starting (n|N)map /
- 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"