ninoseki/SimpleWhatWeb

View on GitHub

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
Severity: Major
Found in lib/whatweb/plugins/drupal.rb - About 1 wk to fix

    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"
    Severity: Major
    Found in lib/whatweb/plugins/drupal.rb - About 4 days to fix

      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
      Severity: Major
      Found in lib/whatweb/plugins/wordpress.rb - About 3 days to fix

        Method passive has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
        Open

          def passive(target)
            m = []
        
            unless target.headers["server"].nil?
        
        
        Severity: Minor
        Found in lib/whatweb/plugins/http-server.rb - About 1 day to fix

        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/"
        Severity: Major
        Found in lib/whatweb/plugins/wordpress.rb - About 1 day to fix

          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",
          Severity: Major
          Found in lib/whatweb/plugins/joomla.rb - About 1 day to fix

            Method aggressive has 187 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def aggressive(target)
                m = []
            
                versions = Hash[
                                "2.0.3" =>
            Severity: Major
            Found in lib/whatweb/plugins/modx-cms.rb - About 7 hrs to fix

              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"],
              Severity: Major
              Found in lib/whatweb/plugins/dotnetnuke.rb - About 6 hrs to fix

                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"?>/
                Severity: Minor
                Found in lib/whatweb/plugins/microsoft-office-xml.rb - About 6 hrs to fix

                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" =>
                Severity: Major
                Found in lib/whatweb/plugins/centreon.rb - About 6 hrs to fix

                  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>/)
                  Severity: Minor
                  Found in lib/whatweb/plugins/phpinfo.rb - About 6 hrs to fix

                  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\.]+">$/
                  Severity: Minor
                  Found in lib/whatweb/plugins/qnap-nas.rb - About 5 hrs to fix

                  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"],
                  Severity: Major
                  Found in lib/whatweb/plugins/silverstripe.rb - About 5 hrs to fix

                    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
                    Severity: Major
                    Found in lib/whatweb/plugins/phpmyadmin.rb - About 4 hrs to fix

                      Method passive has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                      Open

                        def passive(target)
                          m = []
                      
                          device = {};
                          device[:model] = []
                      Severity: Minor
                      Found in lib/whatweb/plugins/moxa-nport-device.rb - About 4 hrs to fix

                      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 = {
                      Severity: Minor
                      Found in lib/whatweb/plugins/mysql_connect.rb - About 3 hrs to fix

                      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"
                      Severity: Minor
                      Found in lib/whatweb/plugins/joomla.rb - About 3 hrs to fix

                        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?
                        Severity: Minor
                        Found in lib/whatweb/plugins/webobjects.rb - About 3 hrs to fix

                        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
                        Severity: Minor
                        Found in lib/whatweb/plugins/htpasswd.rb - About 3 hrs to fix

                        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 /
                        Severity: Minor
                        Found in lib/whatweb/plugins/nmap-log.rb - About 2 hrs to fix

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language