rapid7/metasploit-framework

View on GitHub

Showing 15,831 of 21,886 total issues

Method digest_auth has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        def digest_auth(user, password, response)
          nonce_count = 1
          cnonce = Digest::MD5.hexdigest("%x" % (Time.now.to_i + rand(65535)))

          i = (response['www-authenticate'] =~ /^(\w+) (.*)/)
Severity: Minor
Found in lib/metasploit/framework/login_scanner/bavision_cameras.rb - About 1 hr to fix

    Method get_login_state has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            def get_login_state(username, password)
              # Prep the data needed for login
              sid       = get_last_sid
              protocol  = ssl ? 'https' : 'http'
              peer      = "#{host}:#{port}"
    Severity: Minor
    Found in lib/metasploit/framework/login_scanner/directadmin.rb - About 1 hr to fix

      Method get_login_state has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              def get_login_state(username, password)
                # Prep the data needed for login
                sid       = get_last_sid
                protocol  = ssl ? 'https' : 'http'
                peer      = "#{host}:#{port}"
      Severity: Minor
      Found in lib/metasploit/framework/login_scanner/symantec_web_gateway.rb - About 1 hr to fix

        Method do_login has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                def do_login(user, pass)
                  # prep the data needed for login
                  protocol = ssl ? 'https' : 'http'
                  # attempt to get an authentication token
                  auth_token_res = get_auth_token(user)
        Severity: Minor
        Found in lib/metasploit/framework/login_scanner/softing_sis.rb - About 1 hr to fix

          Method createJarArchive has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static void createJarArchive(File archiveFile, File[] tobeJared) {
                  try {
                      byte buffer[] = new byte[BUFFER_SIZE];
                      // Open archive file
                      FileOutputStream stream = new FileOutputStream(archiveFile);
          Severity: Minor
          Found in external/source/msfJavaToolkit/javaCompile/CreateJarFile.java - About 1 hr to fix

            Method initialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def initialize(framework, opts)
                  super
            
                  host = opts['ServerHost'] || DefaultHost
                  port = opts['ServerPort'] || DefaultPort
            Severity: Minor
            Found in plugins/msgrpc.rb - About 1 hr to fix

              Method cmd_aggregator_disconnect has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    def cmd_aggregator_disconnect(*_args)
                      if @aggregator && @aggregator.available?
                        # check if this connection is the default forward
                        @aggregator.register_default(nil, nil) if @aggregator.default == @aggregator.uuid
              
              
              Severity: Minor
              Found in plugins/aggregator.rb - About 1 hr to fix

                Method cmd_nessus_server_properties has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      def cmd_nessus_server_properties(*args)
                        search_term = nil
                        while (arg = args.shift)
                          case arg
                          when '-h', '--help'
                Severity: Minor
                Found in plugins/nessus.rb - About 1 hr to fix

                  Method cmd_wmap_targets has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        def cmd_wmap_targets(*args)
                          args.push('-h') if args.empty?
                  
                          while (arg = args.shift)
                            case arg
                  Severity: Minor
                  Found in plugins/wmap.rb - About 1 hr to fix

                    Method cmd_nessus_family_list has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          def cmd_nessus_family_list(*args)
                            search_term = nil
                            while (arg = args.shift)
                              case arg
                              when '-h', '--help'
                    Severity: Minor
                    Found in plugins/nessus.rb - About 1 hr to fix

                      Method checkdep has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      def checkdep(session)
                        tmpout = ""
                        depmode = ""
                        # Expand environment %TEMP% variable
                        tmp = session.sys.config.getenv('TEMP')
                      Severity: Minor
                      Found in scripts/meterpreter/getcountermeasure.rb - About 1 hr to fix

                        Method list_exec has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        def list_exec(session,cmdlst)
                          print_status("Running Command List ...")
                          tmpout = ""
                          cmdout = ""
                          r=''
                        Severity: Minor
                        Found in scripts/meterpreter/multicommand.rb - About 1 hr to fix

                          Method decrypt_user_hash has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          def decrypt_user_hash(rid, hbootkey, enchash, pass)
                          
                            if(enchash.empty?)
                              case pass
                              when @sam_lmpass
                          Severity: Minor
                          Found in scripts/meterpreter/hashdump.rb - About 1 hr to fix

                            Method insttlntsrv has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            def insttlntsrv()
                              trgtos = @client.sys.config.sysinfo['OS']
                              if trgtos =~ /Vista|7|2008/
                                print_status("Checking if Telnet Service is Installed")
                                if checkifinst()
                            Severity: Minor
                            Found in scripts/meterpreter/gettelnet.rb - About 1 hr to fix

                              Method send_text_to_dingtalk has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                    def send_text_to_dingtalk(session)
                                      # https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq/9e91d73c
                                      uri_parser = URI.parse(dingtalk_webhook)
                                      markdown_text = "## You have a new #{session.type} session!\n\n" \
                                      "**platform** : #{session.platform}\n\n" \
                              Severity: Minor
                              Found in plugins/session_notifier.rb - About 1 hr to fix

                                Method store_captured_heartbeats has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def store_captured_heartbeats(c)
                                    if @state[c][:heartbeats].length > 0
                                      begin
                                        path = store_loot(
                                          "openssl.heartbleed.client",
                                Severity: Minor
                                Found in modules/auxiliary/server/openssl_heartbeat_client_memory.rb - About 1 hr to fix

                                  Method initialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def initialize
                                      super(
                                        'Name'           => 'Authentication Capture: SIP',
                                        'Description'    => %q{
                                          This module provides a fake SIP service that is designed to
                                  Severity: Minor
                                  Found in modules/auxiliary/server/capture/sip.rb - About 1 hr to fix

                                    Method process_openssl_encrypted_request has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      def process_openssl_encrypted_request(c, data)
                                        message_type, message_version, protocol_version = data.unpack("Cn@9n")
                                    
                                        return if @state[c][:shutdown]
                                        return unless data.length > 5
                                    Severity: Minor
                                    Found in modules/auxiliary/server/openssl_heartbeat_client_memory.rb - About 1 hr to fix

                                      Method generate_demo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        def generate_demo(base_url, cid)
                                          # This is the Demo Form Page <HTML>
                                          html = <<EOS
                                      <html>
                                      <head>
                                      Severity: Minor
                                      Found in modules/auxiliary/server/capture/http_javascript_keylogger.rb - About 1 hr to fix

                                        Method initialize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          def initialize
                                            super(
                                              'Name'           => 'Authentication Capture: MSSQL',
                                              'Description'    => %q{
                                                This module provides a fake MSSQL service that
                                        Severity: Minor
                                        Found in modules/auxiliary/server/capture/mssql.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language