rastating/wordpress-exploit-framework

View on GitHub

Showing 121 of 338 total issues

Avoid too many return statements within this method.
Open

      return null;
Severity: Major
Found in data/php/download_exec.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

          return false
    Severity: Major
    Found in lib/wpxf/modules/auxiliary/misc/simple_ads_manager_sql_injection.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return @success

        Avoid too many return statements within this method.
        Open

            return true

          Avoid too many return statements within this method.
          Open

                return false

            Avoid too many return statements within this method.
            Open

                return @success

              Avoid too many return statements within this method.
              Open

                  return @success

                Avoid too many return statements within this method.
                Open

                      return false

                  Method run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def run
                      return false unless super
                  
                      emit_info 'Creating new admin user...'
                      res = execute_post_request(

                  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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def run
                      return false unless super
                  
                      cookie = authenticate_with_wordpress(username, password)
                      return false unless cookie

                  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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def run
                      return false unless super
                  
                      res = execute_get_request(url: scan_url, params: { 'url' => "http://127.0.0.1:#{lport}" })
                  
                  
                  Severity: Minor
                  Found in lib/wpxf/modules/auxiliary/misc/qards_local_port_scan.rb - About 25 mins 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 random_browser_and_os has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def random_browser_and_os
                          frequencies = clients_by_frequency
                          target_frequency = rand(1..100)
                          sum = 0
                  
                  
                  Severity: Minor
                  Found in lib/wpxf/net/user_agent.rb - About 25 mins 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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def run
                      return false unless super
                      return false unless fetch_nonce
                  
                      emit_info "Authenticating as #{datastore['admin_email']}..."
                  Severity: Minor
                  Found in lib/wpxf/modules/exploit/shell/super_socializer_shell_upload.rb - About 25 mins 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 check has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def check
                          return unless module_loaded?(false) && module_can_execute?
                          state = context.module.check
                  
                          if state == :vulnerable
                  Severity: Minor
                  Found in lib/wpxf/cli/loaded_module.rb - About 25 mins 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 start_socket_read_loop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def start_socket_read_loop(socket)
                      loop do
                        begin
                          print socket.read_nonblock(1024)
                        rescue IO::WaitReadable
                  Severity: Minor
                  Found in lib/wpxf/payloads/socket_helper.rb - About 25 mins 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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def run
                      return false unless super
                  
                      emit_info 'Preparing payload...'
                      payload_name = "#{Utility::Text.rand_alpha(10, :lower)}.php"
                  Severity: Minor
                  Found in lib/wpxf/modules/exploit/shell/simplecart_shell_upload.rb - About 25 mins 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 missing_options has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def missing_options
                        opts = super
                        opts.push('payload') if exploit_module? && !payload
                  
                        if payload
                  Severity: Minor
                  Found in lib/wpxf/core/module.rb - About 25 mins 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 post_exploit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def post_exploit(mod)
                        return true unless listen_with_wpxf
                  
                        if @session_started
                          begin
                  Severity: Minor
                  Found in lib/wpxf/payloads/reverse_tcp.rb - About 25 mins 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 upload_shell has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def upload_shell(username, password)
                      cookie = authenticate_with_wordpress(username, password)
                      return false unless cookie
                  
                      emit_info 'Uploading payload...'

                  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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def run
                      return false unless super
                  
                      cookie = authenticate_with_wordpress(datastore['username'], datastore['password'])
                      return false unless cookie

                  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