rapid7/metasploit-framework

View on GitHub

Showing 16,065 of 22,177 total issues

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

  def parse_vmx(vmx_data, filename)
    vm = {}
    unless vmx_data.nil? || vmx_data.empty?
      vm['SharedFolders'] = []
      vmx_data.each_line do |line|
Severity: Minor
Found in modules/post/multi/gather/find_vmx.rb - About 1 hr to fix

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

      def initialize(info = {})
        super(
          update_info(
            info,
            'Name' => 'Gather MinIO Client Key',
    Severity: Minor
    Found in modules/post/multi/gather/minio_client.rb - About 1 hr to fix

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

        def get_report(api_key, checksum)
          #
          # We have to use Net::HTTP instead of HttpClient because of the following error:
          # The supplied module name is ambiguous: undefined method `register_autofilter_ports'
          #
      Severity: Minor
      Found in modules/post/multi/gather/check_malware.rb - About 1 hr to fix

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

          def initialize(info = {})
            super(
              update_info(
                info,
                'Name' => 'Multi Gather Resolve Hosts',
        Severity: Minor
        Found in modules/post/multi/gather/resolve_hosts.rb - About 1 hr to fix

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

            def initialize(info = {})
              super(
                update_info(
                  info,
                  'Name' => 'Gather GRUB Password',
          Severity: Minor
          Found in modules/post/multi/gather/grub_creds.rb - About 1 hr to fix

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

              def run
                if client.nil?
                  print_error("Invalid session ID selected. Make sure the host isn't dead.")
                  return
                end
            Severity: Minor
            Found in modules/post/multi/manage/record_mic.rb - About 1 hr to fix

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

                def initialize(info = {})
                  super(
                    update_info(
                      info,
                      'Name' => 'Multiple Linux / Unix Post Sudo Upgrade Shell',
              Severity: Minor
              Found in modules/post/multi/manage/sudo.rb - About 1 hr to fix

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

                  def initialize(info = {})
                    super(
                      update_info(
                        info,
                        'Name' => 'Write Messages to Users',
                Severity: Minor
                Found in modules/post/multi/general/wall.rb - About 1 hr to fix

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

                    def list_group_members(domain)
                      tbl = Rex::Text::Table.new(
                        'Header' => 'Account in Local Groups with Domain Context',
                        'Indent' => 1,
                        'Columns' =>
                  Severity: Minor
                  Found in modules/post/windows/gather/enum_domain_tokens.rb - About 1 hr to fix

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

                      def hyperv?
                        physical_host = get_regval_str('HKLM\\SOFTWARE\\Microsoft\\Virtual Machine\\Guest\\Parameters', 'PhysicalHostNameFullyQualified')
                    
                        if physical_host
                          report_note(
                    Severity: Minor
                    Found in modules/post/windows/gather/checkvm.rb - About 1 hr to fix

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

                        def initialize(info = {})
                          super(
                            update_info(
                              info,
                              'Name' => 'Windows Antivirus Exclusions Enumeration',
                      Severity: Minor
                      Found in modules/post/windows/gather/enum_av_excluded.rb - About 1 hr to fix

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

                          def run
                            # Check if Exchange Server is installed on the target by checking the registry
                            if registry_key_exist?('HKLM\Software\Microsoft\ExchangeServer')
                              print_good('Exchange Server is present on target machine')
                            else
                        Severity: Minor
                        Found in modules/post/windows/gather/exchange.rb - About 1 hr to fix

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

                            def initialize(info = {})
                              super(
                                update_info(
                                  info,
                                  'Name' => 'FannyBMP or DementiaWheel Detection Registry Check',
                          Severity: Minor
                          Found in modules/post/windows/gather/forensics/fanny_bmp_check.rb - About 1 hr to fix

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

                              def list_currently_logged_on_users
                                return unless session.type == 'meterpreter'
                            
                                tbl = Rex::Text::Table.new(
                                  'Header' => 'Current Logged Users',
                            Severity: Minor
                            Found in modules/post/windows/gather/enum_logged_on_users.rb - About 1 hr to fix

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

                                def initialize(info = {})
                                  super(
                                    update_info(
                                      info,
                                      'Name' => 'Windows Gather Enumerate Domain',
                              Severity: Minor
                              Found in modules/post/windows/gather/enum_domain.rb - About 1 hr to fix

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

                                  def get_onedrive_accounts(reg, accounts, syncdata)
                                    all_oda = {}
                                    synctargets_used = []
                                    ret = {}
                                    reg.each do |ses|
                                Severity: Minor
                                Found in modules/post/windows/gather/enum_onedrive.rb - About 1 hr to fix

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

                                    def process_hashes_and_versions(hashes_and_versions)
                                      hashes_and_versions.each do |hash, version|
                                        if version >= VERSION_5 && version < VERSION_6
                                          hashtype = 'md5u'
                                          version_name = 'v5'
                                  Severity: Minor
                                  Found in modules/post/windows/gather/credentials/mcafee_vse_hashdump.rb - About 1 hr to fix

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

                                      def report_creds(domain, user, pass)
                                        return if (user.empty? || pass.empty?)
                                        return if pass.include?('n.a.')
                                    
                                        # Assemble data about the credential objects we will be creating
                                    Severity: Minor
                                    Found in modules/post/windows/gather/credentials/sso.rb - About 1 hr to fix

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

                                        def run
                                          print_status("Gather PL/SQL Developer Histories and Credentials on #{sysinfo['Computer']}")
                                          profiles = grab_user_profiles
                                          pref_paths = []
                                      
                                      
                                      Severity: Minor
                                      Found in modules/post/windows/gather/credentials/plsql_developer.rb - About 1 hr to fix

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

                                          def decrypt(csv_file)
                                            csv = read_csv_file(csv_file)
                                            print_good("#{csv.count} WUG rows loaded, #{@wug_total_secrets} unique nCredentialTypeIDs")
                                            result = decrypt_wug_db(csv)
                                            processed_rows = result[:processed_rows]
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language