rapid7/metasploit-framework

View on GitHub

Showing 2,949 of 22,177 total issues

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

    if (datastore['DOWNHOST'])
      print_status("#{rhost}:#{rport} - Giving #{datastore['HTTP_DELAY']} seconds to the D-Link device to download the payload")
      select(nil, nil, nil, datastore['HTTP_DELAY'])
    else
      wait_linux_payload
Severity: Minor
Found in modules/exploits/linux/http/dlink_dir615_up_exec.rb and 5 other locations - About 15 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 163..167
modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb on lines 169..173
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 311..315
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 204..208
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 259..263

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

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

    if (datastore['DOWNHOST'])
      print_status("#{rhost}:#{rport} - Giving #{datastore['HTTP_DELAY']} seconds to the D-Link device to download the payload")
      select(nil, nil, nil, datastore['HTTP_DELAY'])
    else
      wait_linux_payload
Severity: Minor
Found in modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb and 5 other locations - About 15 mins to fix
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 193..197
modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb on lines 169..173
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 311..315
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 204..208
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 259..263

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

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

    if (datastore['DOWNHOST'])
      print_status("#{rhost}:#{rport} - Giving #{datastore['DELAY']} seconds to the Linksys device to download the payload")
      select(nil, nil, nil, datastore['DELAY'])
    else
      wait_linux_payload
Severity: Minor
Found in modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb and 5 other locations - About 15 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 163..167
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 193..197
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 311..315
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 204..208
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 259..263

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

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

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'TFTP Fetch',
Severity: Minor
Found in modules/payloads/adapters/cmd/linux/tftp/x86.rb and 5 other locations - About 15 mins to fix
modules/payloads/adapters/cmd/linux/http/mips64.rb on lines 10..23
modules/payloads/adapters/cmd/linux/http/x86.rb on lines 10..23
modules/payloads/adapters/cmd/linux/https/mips64.rb on lines 10..23
modules/payloads/adapters/cmd/linux/https/x86.rb on lines 10..23
modules/payloads/adapters/cmd/linux/tftp/mips64.rb on lines 10..23

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

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

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'HTTPS Fetch',
Severity: Minor
Found in modules/payloads/adapters/cmd/linux/https/x86.rb and 5 other locations - About 15 mins to fix
modules/payloads/adapters/cmd/linux/http/mips64.rb on lines 10..23
modules/payloads/adapters/cmd/linux/http/x86.rb on lines 10..23
modules/payloads/adapters/cmd/linux/https/mips64.rb on lines 10..23
modules/payloads/adapters/cmd/linux/tftp/mips64.rb on lines 10..23
modules/payloads/adapters/cmd/linux/tftp/x86.rb on lines 10..23

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

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

    encoded_sql = %Q|
DECLARE
#{var1} VARCHAR2(32767);
#{var2} VARCHAR2(32767);
BEGIN
Severity: Minor
Found in modules/auxiliary/sqli/oracle/dbms_cdc_publish3.rb and 6 other locations - About 15 mins to fix
lib/msf/core/payload/php.rb on lines 96..100
modules/auxiliary/gather/eaton_nsm_creds.rb on lines 71..73
modules/auxiliary/sqli/oracle/dbms_cdc_publish2.rb on lines 62..70
modules/exploits/windows/browser/macrovision_unsafe.rb on lines 65..71
modules/exploits/windows/browser/sonicwall_addrouteentry.rb on lines 69..74
modules/payloads/singles/windows/messagebox.rb on lines 122..262

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

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

          ['SentinelLM 7.2.0.0 Windows NT 4.0 SP4/SP5/SP6', { 'Ret' => 0x77681799 }], # ws2help.dll
          ['SentinelLM 7.2.0.0 Windows 2000 English',       { 'Ret' => 0x75022ac4 }], # ws2help.dll
          ['SentinelLM 7.2.0.0 Windows 2000 German',        { 'Ret' => 0x74fa1887 }], # ws2help.dll
          ['SentinelLM 7.2.0.0 Windows XP English SP0/SP1', { 'Ret' => 0x71aa32ad }], # ws2help.dll
          ['SentinelLM 7.2.0.0 Windows 2003 English SP0',   { 'Ret' => 0x7ffc0638 }], # peb
Severity: Minor
Found in modules/exploits/windows/license/sentinel_lm7_udp.rb and 6 other locations - About 15 mins to fix
modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb on lines 69..91
modules/exploits/windows/ftp/netterm_netftpd_user.rb on lines 40..68
modules/exploits/windows/http/maxdb_webdbm_get_overflow.rb on lines 45..49
modules/exploits/windows/http/psoproxy91_overflow.rb on lines 42..46
modules/exploits/windows/http/savant_31_overflow.rb on lines 55..59
modules/exploits/windows/proxy/ccproxy_telnet_ping.rb on lines 44..48

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

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

          [ 'Microsoft Office 2002 (XP) SP3 base English on Windows XP SP3 English',
            { 'ObjPtr' => 0x307ddd10 }
          ],

          # Office v10.6854.6845, excel.exe v10.0.6854.0
modules/exploits/windows/ftp/netterm_netftpd_user.rb on lines 40..68
modules/exploits/windows/http/maxdb_webdbm_get_overflow.rb on lines 45..49
modules/exploits/windows/http/psoproxy91_overflow.rb on lines 42..46
modules/exploits/windows/http/savant_31_overflow.rb on lines 55..59
modules/exploits/windows/license/sentinel_lm7_udp.rb on lines 43..47
modules/exploits/windows/proxy/ccproxy_telnet_ping.rb on lines 44..48

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

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

        while (arg = args.shift)
          case arg
          when '-h', '--help'
            print_status('nessus_scan_list')
            print_status('Example:> nessus_scan_list -S searchterm')
Severity: Minor
Found in plugins/nessus.rb and 6 other locations - About 15 mins to fix
plugins/nessus.rb on lines 427..435
plugins/nessus.rb on lines 457..465
plugins/nessus.rb on lines 583..591
plugins/nessus.rb on lines 1597..1605
plugins/nessus.rb on lines 1682..1690
plugins/nessus.rb on lines 1844..1852

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

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

    rop_chain =
    [
      0x100b257b,  # POP ESP # RETN
      0x771a22e4,  # pointer in ecx -> initial ret to ret to pointer -> beg rop (thank you mona.py)
      0x10047355,  # Duplicate, readable, RETN
Severity: Minor
Found in modules/exploits/windows/scada/iconics_genbroker.rb and 4 other locations - About 15 mins to fix
modules/exploits/windows/browser/cisco_playerpt_setsource.rb on lines 137..161
modules/exploits/windows/emc/networker_format_string.rb on lines 80..107
modules/exploits/windows/fileformat/visiwave_vwr_type.rb on lines 73..97
modules/exploits/windows/misc/avidphoneticindexer.rb on lines 64..89

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

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

      print_status("#{rhost}:#{rport} - Giving #{datastore['HTTP_DELAY']} seconds to the SAP Management Console to download the payload")
      select(nil, nil, nil, datastore['HTTP_DELAY'])
    else
      wait_linux_payload
    end
Severity: Minor
Found in modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb and 5 other locations - About 15 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 163..167
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 193..197
modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb on lines 169..173
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 311..315
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 204..208

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

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

    if (datastore['DOWNHOST'])
      print_status("#{rhost}:#{rport} - Giving #{datastore['HTTP_DELAY']} seconds to the Netgear device to download the payload")
      select(nil, nil, nil, datastore['HTTP_DELAY'])
    else
      wait_linux_payload
Severity: Minor
Found in modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb and 5 other locations - About 15 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 163..167
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 193..197
modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb on lines 169..173
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 204..208
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 259..263

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

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

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'TFTP Fetch',
Severity: Minor
Found in modules/payloads/adapters/cmd/linux/tftp/mips64.rb and 5 other locations - About 15 mins to fix
modules/payloads/adapters/cmd/linux/http/mips64.rb on lines 10..23
modules/payloads/adapters/cmd/linux/http/x86.rb on lines 10..23
modules/payloads/adapters/cmd/linux/https/mips64.rb on lines 10..23
modules/payloads/adapters/cmd/linux/https/x86.rb on lines 10..23
modules/payloads/adapters/cmd/linux/tftp/x86.rb on lines 10..23

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

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

    alphas = %w[B C D F G H J K M P Q R T V W X Y 2 3 4 6 7 8 9]
Severity: Minor
Found in modules/post/windows/gather/enum_ms_product_keys.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/scanner/http/file_same_name_dir.rb on lines 37..62
modules/auxiliary/scanner/http/prev_dir_same_name_file.rb on lines 34..59
modules/auxiliary/scanner/snmp/snmp_enum.rb on lines 35..46
modules/exploits/windows/iis/ms03_007_ntdll_webdav.rb on lines 137..163
scripts/meterpreter/winenum.rb on lines 59..84

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

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

        while (arg = args.shift)
          case arg
          when '-h', '--help'
            print_status('nessus_server_properties')
            print_status('Example:> nessus_server_properties -S searchterm')
Severity: Minor
Found in plugins/nessus.rb and 6 other locations - About 15 mins to fix
plugins/nessus.rb on lines 457..465
plugins/nessus.rb on lines 583..591
plugins/nessus.rb on lines 893..901
plugins/nessus.rb on lines 1597..1605
plugins/nessus.rb on lines 1682..1690
plugins/nessus.rb on lines 1844..1852

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

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

    php = <<-EOT
    $#{users_var} = &queryDB("SELECT * FROM configUsers;");
    foreach($#{users_var} as $#{user_var}) {
Severity: Minor
Found in modules/auxiliary/gather/eaton_nsm_creds.rb and 6 other locations - About 15 mins to fix
lib/msf/core/payload/php.rb on lines 96..100
modules/auxiliary/sqli/oracle/dbms_cdc_publish2.rb on lines 62..70
modules/auxiliary/sqli/oracle/dbms_cdc_publish3.rb on lines 73..81
modules/exploits/windows/browser/macrovision_unsafe.rb on lines 65..71
modules/exploits/windows/browser/sonicwall_addrouteentry.rb on lines 69..74
modules/payloads/singles/windows/messagebox.rb on lines 122..262

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

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

    unless header && header.length == 6 && header[0, 4] == "\x00\x68\x00\x04"
      disconnect
      fail_with(Failure::Unknown, "#{rhost}:#{rport} - Failure reading packet identifier")
    end
Severity: Minor
Found in modules/exploits/multi/misc/arkeia_agent_exec.rb and 6 other locations - About 15 mins to fix
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 364..367
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 389..392
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 417..420
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 444..447
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 481..484
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 504..507

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

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

        while (arg = args.shift)
          case arg
          when '-h', '--help'
            print_status('nessus_scanner_list')
            print_status('Example:> nessus_scanner_list -S searchterm')
Severity: Minor
Found in plugins/nessus.rb and 6 other locations - About 15 mins to fix
plugins/nessus.rb on lines 427..435
plugins/nessus.rb on lines 457..465
plugins/nessus.rb on lines 893..901
plugins/nessus.rb on lines 1597..1605
plugins/nessus.rb on lines 1682..1690
plugins/nessus.rb on lines 1844..1852

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

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

        while (arg = args.shift)
          case arg
          when '-h', '--help'
            print_status('nessus_policy_list')
            print_status('Example:> nessus_policy_list -S searchterm')
Severity: Minor
Found in plugins/nessus.rb and 6 other locations - About 15 mins to fix
plugins/nessus.rb on lines 427..435
plugins/nessus.rb on lines 457..465
plugins/nessus.rb on lines 583..591
plugins/nessus.rb on lines 893..901
plugins/nessus.rb on lines 1597..1605
plugins/nessus.rb on lines 1682..1690

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

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

      fields_order = [
        "Host IP", "Hostname", "Description", "Contact",
        "Location", "Uptime snmp", "Uptime system",
        "System date", "domain", "User accounts",
        "Network information", "Network interfaces",
Severity: Minor
Found in modules/auxiliary/scanner/snmp/snmp_enum.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/scanner/http/file_same_name_dir.rb on lines 37..62
modules/auxiliary/scanner/http/prev_dir_same_name_file.rb on lines 34..59
modules/exploits/windows/iis/ms03_007_ntdll_webdav.rb on lines 137..163
modules/post/windows/gather/enum_ms_product_keys.rb on lines 105..105
scripts/meterpreter/winenum.rb on lines 59..84

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

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