rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    super(update_info(info,
      'Name'           => 'FutureSoft TFTP Server 2000 Transfer-Mode Overflow',
      'Description'    => %q{
          This module exploits a stack buffer overflow in the FutureSoft TFTP Server
        2000 product. By sending an overly long transfer-mode string, we were able
Severity: Major
Found in modules/exploits/windows/tftp/futuresoft_transfermode.rb and 1 other location - About 1 hr to fix
modules/exploits/windows/tftp/tftpd32_long_filename.rb on lines 12..47

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 61.

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'UnrealIRCD 3.2.8.1 Backdoor Command Execution',
      'Description'    => %q{
          This module exploits a malicious backdoor that was added to the
Severity: Major
Found in modules/exploits/unix/irc/unreal_ircd_3281_backdoor.rb and 1 other location - About 1 hr to fix
modules/exploits/unix/misc/distcc_exec.rb on lines 11..52

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 61.

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def cmd_nessus_scan_pause_all(*args)
        scan_ids = Array.new
        if args[0] == '-h'
          print_status('nessus_scan_pause_all')
          print_status('Example:> nessus_scan_pause_all')
Severity: Major
Found in plugins/nessus.rb and 1 other location - About 1 hr to fix
plugins/nessus.rb on lines 1347..1372

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 61.

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          def encode
            elems = []
            elems << OpenSSL::ASN1::ASN1Data.new([encode_tkt_vno], 0, :CONTEXT_SPECIFIC)
            elems << OpenSSL::ASN1::ASN1Data.new([encode_realm], 1, :CONTEXT_SPECIFIC)
            elems << OpenSSL::ASN1::ASN1Data.new([encode_sname], 2, :CONTEXT_SPECIFIC)
Severity: Major
Found in lib/rex/proto/kerberos/model/ticket.rb and 1 other location - About 1 hr to fix
lib/rex/proto/kerberos/model/krb_cred.rb on lines 51..61

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 61.

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 2 locations. Consider refactoring.
Open

                tgt, cipher, oldSessionKey, sessionKey = getKerberosTGT(userName, self.__password, self.__domain,
                                                                        unhexlify(self.__lmhash),
                                                                        unhexlify(self.__nthash), self.__aesKey,
                                                                        kdcHost=self.__kdcIP)
Severity: Major
Found in modules/auxiliary/gather/get_user_spns.py and 1 other location - About 1 hr to fix
modules/auxiliary/gather/get_user_spns.py on lines 158..175

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 43.

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 2 locations. Consider refactoring.
Open

        if self.__password != '' and (self.__lmhash == '' and self.__nthash == ''):
            try:
                tgt, cipher, oldSessionKey, sessionKey = getKerberosTGT(userName, '', self.__domain,
                                                                        compute_lmhash(self.__password),
                                                                        compute_nthash(self.__password), self.__aesKey,
Severity: Major
Found in modules/auxiliary/gather/get_user_spns.py and 1 other location - About 1 hr to fix
modules/auxiliary/gather/get_user_spns.py on lines 166..169

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 43.

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            self._Kd[rds - (i // 4)][i % 4] = tk[i]
Severity: Major
Found in data/meterpreter/python/met_aes.py and 1 other location - About 1 hr to fix
data/meterpreter/python/met_aes.py on lines 146..146

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 43.

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                self._Kd[rds - (t // 4)][t % 4] = tk[j]
Severity: Major
Found in data/meterpreter/python/met_aes.py and 1 other location - About 1 hr to fix
data/meterpreter/python/met_aes.py on lines 126..126

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 43.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/http/sevone_enum.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/nexpose/nexpose_api_login.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/mongodb/mongodb_login.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/http/oracle_ilom_login.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/http/pocketpad_login.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/http/sentry_cdu_enum.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nessus/nessus_ntp_login.rb on lines 59..83
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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

Similar blocks of code found in 25 locations. Consider refactoring.
Open

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: opts[:service_name],
Severity: Major
Found in modules/auxiliary/scanner/nessus/nessus_ntp_login.rb and 24 other locations - About 1 hr to fix
lib/msf/core/auxiliary/cnpilot.rb on lines 15..39
lib/msf/core/auxiliary/epmp.rb on lines 15..39
modules/auxiliary/admin/scada/modicon_password_recovery.rb on lines 91..115
modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb on lines 55..79
modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb on lines 86..110
modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb on lines 107..131
modules/auxiliary/scanner/http/oracle_ilom_login.rb on lines 70..94
modules/auxiliary/scanner/http/pocketpad_login.rb on lines 65..89
modules/auxiliary/scanner/http/rfcode_reader_enum.rb on lines 144..168
modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb on lines 44..68
modules/auxiliary/scanner/http/sentry_cdu_enum.rb on lines 70..94
modules/auxiliary/scanner/http/sevone_enum.rb on lines 66..90
modules/auxiliary/scanner/http/typo3_bruteforce.rb on lines 39..63
modules/auxiliary/scanner/lotus/lotus_domino_login.rb on lines 31..55
modules/auxiliary/scanner/misc/oki_scanner.rb on lines 38..62
modules/auxiliary/scanner/mongodb/mongodb_login.rb on lines 132..156
modules/auxiliary/scanner/msf/msf_rpc_login.rb on lines 55..79
modules/auxiliary/scanner/msf/msf_web_login.rb on lines 140..164
modules/auxiliary/scanner/nexpose/nexpose_api_login.rb on lines 58..82
modules/auxiliary/scanner/nntp/nntp_login.rb on lines 167..185
modules/auxiliary/scanner/openvas/openvas_omp_login.rb on lines 56..80
modules/auxiliary/scanner/openvas/openvas_otp_login.rb on lines 56..80
modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb on lines 103..127
modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb on lines 107..131

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 60.

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