rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

Consider simplifying this complex logical expression.
Open

    if version >= Rex::Version.new('9.0.0') && version < Rex::Version.new('9.0.10') ||
       version >= Rex::Version.new('9.1.0') && version < Rex::Version.new('9.1.4') ||
       version >= Rex::Version.new('10.0.0') && version < Rex::Version.new('10.0.1')
      return Exploit::CheckCode::Appears
    end
Severity: Major
Found in modules/exploits/linux/http/panos_op_cmd_exec.rb - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

            if (version == 3.0 and build < 1330) or
              (version == 2.6 and build < 2106) or
              (version == 2.5 and build < 2200)
                return Exploit::CheckCode::Vulnerable
            else
    Severity: Major
    Found in modules/exploits/linux/http/trendmicro_sps_exec.rb - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if !ikev2_reply.empty? && (ikev2_reply.length >= 40) &&
             # Ensure the response 'Initiator SPI' field is the same as the original one sent.
             (ikev2_reply[0, 8] == ikev2_header[0, 8]) &&
             # Ensure the 'Next Payload' field is Notification (11)
             (ikev2_reply[16, 1].unpack('C').first == 11 &&
      Severity: Major
      Found in modules/exploits/linux/misc/zyxel_ike_decoder_rce_cve_2023_28771.rb - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                  if (leaked_arch == ARCH_X86 and error[0,4] == error[4,4] and error[8..-1] == "er not yet given") or
                     (leaked_arch == ARCH_X64 and error.length == 6 and error[5].count("\x7E-\x7F").nonzero?)
                    leaked_addr = [leaked_addr.last] # use this one, and not another
                    throw(:another_heap_shift, true) # done
                  end
        Severity: Major
        Found in modules/exploits/linux/smtp/exim_gethostbyname_bof.rb - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

              if url.start_with?('http')
                proxy_host = ''
                if opts[:proxy_host] && opts[:proxy_port]
                  prefix = 'http://'
                  prefix = 'socks=' if opts[:proxy_type].to_s.downcase == 'socks'
          Severity: Major
          Found in lib/rex/payloads/meterpreter/config.rb - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                if key && key[:key] && key[:type] && encrypt_flags == key[:type] && (encrypt_flags == ENC_FLAG_AES128 || encrypt_flags == ENC_FLAG_AES256)
                  iv = data[0, AES_IV_SIZE]
                  aes_decrypt(key[:key], iv, data[iv.length..-1])
                else
                  data
            Severity: Major
            Found in lib/rex/post/meterpreter/packet.rb - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                  if (opts[:host] or opts[:address]) and opts[:port] and opts[:proto]
                    addr = opts[:host] || opts[:address]
                    wspace = opts[:workspace] || self.framework.db.workspace
                    host = wspace.hosts.find_by_address(addr)
                    if host && host.services.count > 0
              Severity: Major
              Found in lib/msf/core/rpc/v10/rpc_db.rb - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                    if good_response
                      print_good("SUCCESSFUL LOGIN - #{rhost}:#{rport} - #{user.inspect}:#{pass.inspect}")
                
                      # Extract device model
                      the_cookie = res.get_cookies
                Severity: Major
                Found in lib/msf/core/auxiliary/cnpilot.rb - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                        if attrs.is_a?(String) || attrs.length == 0
                          self.required = required
                          self.desc     = attrs.is_a?(String) ? attrs : desc
                          self.enums    = [ *(enums) ].map { |x| x.to_s }
                          if default.nil? && enums.length > 0
                  Severity: Major
                  Found in lib/msf/core/opt_base.rb - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                          if token[0].nil? or token[0].empty?
                            cred = service.creds.where(user: token[0] || "", ptype: ptype, pass: token[1] || "").first_or_initialize
                          else
                            cred = service.creds.find_by_user_and_ptype_and_pass(token[0] || "", ptype, token[1] || "")
                            unless cred
                    Severity: Major
                    Found in lib/msf/core/db_manager/cred.rb - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                          elsif res.code == 200 and
                              (
                                res.body =~ /href="http[s]*:\/\/.*\/\?*author.+title="([[:print:]]+)" /i or
                                res.body =~ /<body class="archive author author-(?:[^\s]+) author-(?:\d+)/i or
                                res.body =~ /Posts by (\w+) Feed/i or
                      Severity: Major
                      Found in lib/msf/core/exploit/remote/http/wordpress/users.rb - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    elsif (
                                          service[:display].downcase.include?("SQL Server (#{instance}".downcase) || # 2k8
                                          service[:display].downcase.include?("MSSQL$#{instance}".downcase) || # 2k
                                          service[:display].downcase.include?("MSSQLServer#{instance}".downcase) || # 2k5
                                          service[:display].downcase == instance.downcase # If the user gets very specific
                        Severity: Major
                        Found in lib/msf/core/post/windows/mssql.rb - About 40 mins to fix

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                                  result << "#%x" % c.unpack('C*')[0]
                          Severity: Major
                          Found in modules/auxiliary/pdf/foxit/authbypass.rb and 19 other locations - About 40 mins to fix
                          modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb on lines 190..200
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb on lines 259..268
                          modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb on lines 133..142
                          modules/exploits/windows/browser/adobe_geticon.rb on lines 144..153
                          modules/exploits/windows/browser/adobe_media_newplayer.rb on lines 159..168
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_libtiff.rb on lines 121..130
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278
                          modules/exploits/windows/fileformat/adobe_utilprintf.rb on lines 114..123

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                                  result << "#%x" % c.unpack("C*")[0]
                          Severity: Major
                          Found in modules/exploits/windows/browser/adobe_geticon.rb and 19 other locations - About 40 mins to fix
                          modules/auxiliary/pdf/foxit/authbypass.rb on lines 50..59
                          modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb on lines 190..200
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb on lines 259..268
                          modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb on lines 133..142
                          modules/exploits/windows/browser/adobe_media_newplayer.rb on lines 159..168
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_libtiff.rb on lines 121..130
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278
                          modules/exploits/windows/fileformat/adobe_utilprintf.rb on lines 114..123

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                                  result << "#%x" % c.unpack("C*")[0]
                          modules/auxiliary/pdf/foxit/authbypass.rb on lines 50..59
                          modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb on lines 190..200
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb on lines 133..142
                          modules/exploits/windows/browser/adobe_geticon.rb on lines 144..153
                          modules/exploits/windows/browser/adobe_media_newplayer.rb on lines 159..168
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_libtiff.rb on lines 121..130
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278
                          modules/exploits/windows/fileformat/adobe_utilprintf.rb on lines 114..123

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                                  result << "#%x" % c.unpack("C*")[0]
                          Severity: Major
                          Found in modules/exploits/windows/browser/adobe_media_newplayer.rb and 19 other locations - About 40 mins to fix
                          modules/auxiliary/pdf/foxit/authbypass.rb on lines 50..59
                          modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb on lines 190..200
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb on lines 259..268
                          modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb on lines 133..142
                          modules/exploits/windows/browser/adobe_geticon.rb on lines 144..153
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_libtiff.rb on lines 121..130
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278
                          modules/exploits/windows/fileformat/adobe_utilprintf.rb on lines 114..123

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                                  result << "#%x" % c.unpack("C*")[0]
                          modules/auxiliary/pdf/foxit/authbypass.rb on lines 50..59
                          modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb on lines 190..200
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb on lines 259..268
                          modules/exploits/windows/browser/adobe_geticon.rb on lines 144..153
                          modules/exploits/windows/browser/adobe_media_newplayer.rb on lines 159..168
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_libtiff.rb on lines 121..130
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278
                          modules/exploits/windows/fileformat/adobe_utilprintf.rb on lines 114..123

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                          
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                          Severity: Major
                          Found in modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb and 19 other locations - About 40 mins to fix
                          modules/auxiliary/pdf/foxit/authbypass.rb on lines 50..59
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb on lines 259..268
                          modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb on lines 133..142
                          modules/exploits/windows/browser/adobe_geticon.rb on lines 144..153
                          modules/exploits/windows/browser/adobe_media_newplayer.rb on lines 159..168
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_libtiff.rb on lines 121..130
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278
                          modules/exploits/windows/fileformat/adobe_utilprintf.rb on lines 114..123

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                                  result << "#%x" % c.unpack("C*")[0]
                          Severity: Major
                          Found in modules/exploits/windows/fileformat/adobe_utilprintf.rb and 19 other locations - About 40 mins to fix
                          modules/auxiliary/pdf/foxit/authbypass.rb on lines 50..59
                          modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb on lines 190..200
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb on lines 259..268
                          modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb on lines 133..142
                          modules/exploits/windows/browser/adobe_geticon.rb on lines 144..153
                          modules/exploits/windows/browser/adobe_media_newplayer.rb on lines 159..168
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_libtiff.rb on lines 121..130
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 20 locations. Consider refactoring.
                          Open

                            def n_obfu(str)
                              result = ""
                              str.scan(/./u) do |c|
                                if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
                                  result << "#%x" % c.unpack("C*")[0]
                          Severity: Major
                          Found in modules/exploits/windows/fileformat/adobe_libtiff.rb and 19 other locations - About 40 mins to fix
                          modules/auxiliary/pdf/foxit/authbypass.rb on lines 50..59
                          modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb on lines 190..200
                          modules/exploits/windows/browser/adobe_cooltype_sing.rb on lines 363..373
                          modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb on lines 259..268
                          modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb on lines 133..142
                          modules/exploits/windows/browser/adobe_geticon.rb on lines 144..153
                          modules/exploits/windows/browser/adobe_media_newplayer.rb on lines 159..168
                          modules/exploits/windows/browser/adobe_toolbutton.rb on lines 191..201
                          modules/exploits/windows/browser/adobe_utilprintf.rb on lines 123..132
                          modules/exploits/windows/fileformat/adobe_collectemailinfo.rb on lines 117..126
                          modules/exploits/windows/fileformat/adobe_cooltype_sing.rb on lines 350..360
                          modules/exploits/windows/fileformat/adobe_flashplayer_button.rb on lines 265..274
                          modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb on lines 261..270
                          modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb on lines 128..137
                          modules/exploits/windows/fileformat/adobe_media_newplayer.rb on lines 160..169
                          modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb on lines 101..110
                          modules/exploits/windows/fileformat/adobe_toolbutton.rb on lines 200..210
                          modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb on lines 268..278
                          modules/exploits/windows/fileformat/adobe_utilprintf.rb on lines 114..123

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 37.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language