rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

Avoid deeply nested control flow statements.
Open

              if self.is_pass_ntlm_hash?(pass)
                arglm = {
                  :ntlmv2_hash =>  Rex::Proto::NTLM::Crypt::ntlmv2_hash(
                            user,
                            [ pass.upcase()[33,65] ].pack('H32'),
Severity: Major
Found in lib/rex/proto/ntlm/utils.rb - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  tr[:file][:started] = true if (tr[:file][:once])
    Severity: Major
    Found in lib/rex/proto/tftp/server.rb - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

              yield("Aborting, got error type:%d, message:'%s'" % [type, data]) if block_given?
      Severity: Major
      Found in lib/rex/proto/tftp/client.rb - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                yield("Aborting, got code:%d, type:%d, message:'%s'" % [code, type, data]) if block_given?
        Severity: Major
        Found in lib/rex/proto/tftp/client.rb - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                if temp_response.kind_of? Rex::Proto::Http::Response
                  res = temp_response
                end
          Severity: Major
          Found in lib/rex/proto/http/client.rb - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                        break if not data
            Severity: Major
            Found in lib/rex/proto/dcerpc/client.rb - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                          break if not data.length
              Severity: Major
              Found in lib/rex/proto/dcerpc/client.rb - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                          formatted << (sysinfo.nil? ? default : sysinfo['Computer'])
                Severity: Major
                Found in lib/rex/ui/text/shell.rb - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                            formatted << (sysinfo.nil? ? default : sysinfo['Architecture'])
                  Severity: Major
                  Found in lib/rex/ui/text/shell.rb - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                              formatted << (session.respond_to?(:fs) ? session.fs.dir.getwd(refresh: false) : default)
                    Severity: Major
                    Found in lib/rex/ui/text/shell.rb - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                formatted << (session.respond_to?(:sys) ? session.sys.config.getuid(refresh: false) : default)
                      Severity: Major
                      Found in lib/rex/ui/text/shell.rb - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                  if /^(?<p_num>\d{1,5})\/(?<p_proto>.+)\s\((?<p_name>.+)\)/ =~ @text
                                    @state[:name] = p_name.gsub(/iana: /i, '')
                                    @state[:port] = p_num
                                    @state[:proto] = p_proto
                                    record_service if p_num
                        Severity: Major
                        Found in lib/rex/parser/openvas_document.rb - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                @state[:ref] = @text.strip if @text
                          Severity: Major
                          Found in lib/rex/parser/outpost24_document.rb - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                        @state[:ref_dfn] = [] if @state[:ref_dfn].nil?
                            Severity: Major
                            Found in lib/rex/parser/openvas_document.rb - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                          @state[:ref_cb] = [] if @state[:ref_cb].nil?
                              Severity: Major
                              Found in lib/rex/parser/openvas_document.rb - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            if buffer_size != 4
                                              raise "Please pass 4 for 'out' PULONG_PTR, since they require a buffer of size 4"
                                            end
                                Severity: Major
                                Found in lib/rex/post/meterpreter/extensions/stdapi/railgun/library.rb - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                          case arch
                                          when ARCH_X86,nil
                                            to_solaris_x86_elf(framework, code, exeopts)
                                          end
                                  Severity: Major
                                  Found in lib/msf/util/exe.rb - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                              current_workspace.name == ws.name ? '*' : '',
                                    Severity: Major
                                    Found in lib/msf/ui/console/command_dispatcher/db.rb - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                            unless verbose
                                              current = nil
                                              framework.db.workspaces.sort_by {|s| s.name}.each do |s|
                                                if s.name == current_workspace.name
                                                  current = s.name
                                      Severity: Major
                                      Found in lib/msf/ui/console/command_dispatcher/db.rb - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                              if workspace
                                                framework.db.workspace = workspace
                                                print_status("Workspace: #{workspace.name}")
                                              else
                                                print_error("Workspace not found: #{name}")
                                        Severity: Major
                                        Found in lib/msf/ui/console/command_dispatcher/db.rb - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language