rapid7/metasploit-framework

View on GitHub

Showing 2,949 of 22,177 total issues

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

          [ 'Windows 2000 Pro All - English', { 'Ret' => 0x750211aa } ], # p/r ws2help.dll
          [ 'Windows 2000 Pro All - Italian', { 'Ret' => 0x74fd2ac5 } ], # p/r ws2help.dll
          [ 'Windows 2000 Pro All - French',  { 'Ret' => 0x74fa36b2 } ], # p/r ws2help.dll
          [ 'Windows XP Pro SP2 - English',   { 'Ret' => 0x71ab76ed } ], # p/r ws2help.dll
        ],
Severity: Minor
Found in modules/exploits/windows/http/savant_31_overflow.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/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

          [ 'Windows 2000 Pro All - Italian', { 'Ret' => 0x74fd2b81 } ], # call esi ws2help.dll
          [ 'Windows 2000 Pro All - French',  { 'Ret' => 0x74fa2b22 } ], # call esi ws2help.dll
          [ 'Windows XP SP0/1 - English',     { 'Ret' => 0x71aa1a97 } ], # call esi ws2help.dll
          [ 'Windows XP SP2 - English',        { 'Ret' => 0x71aa1b22 } ], # call esi ws2help.dll
        ],
Severity: Minor
Found in modules/exploits/windows/proxy/ccproxy_telnet_ping.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/license/sentinel_lm7_udp.rb on lines 43..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 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_user_list')
            print_status('Example:> nessus_user_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 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 6 locations. Consider refactoring.
Open

    extensions = [
      '.null',
      '.backup',
      '.bak',
      '.c',
Severity: Minor
Found in modules/auxiliary/scanner/http/prev_dir_same_name_file.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/snmp/snmp_enum.rb on lines 35..46
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

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

      <object classid='clsid:6EEFD7B1-B26C-440D-B55A-1EC677189F30' id='#{vname}'></object>
      <script language='javascript'>
      var #{vname} = document.getElementById('#{vname}');
      var #{strname} = new String('#{sploit}');
      #{vname}.AddRouteEntry(#{strname}, #{vname});
Severity: Minor
Found in modules/exploits/windows/browser/sonicwall_addrouteentry.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/auxiliary/sqli/oracle/dbms_cdc_publish3.rb on lines 73..81
modules/exploits/windows/browser/macrovision_unsafe.rb on lines 65..71
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\x60\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 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
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 527..530

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\x43\x00\x00"
      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 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
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 527..530

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_family_list')
            print_status('Example:> nessus_family_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 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 6 locations. Consider refactoring.
Open

    if (datastore['DOWNHOST'])
      print_status("#{rhost}:#{rport} - Giving #{datastore['HTTP_DELAY']} seconds to the target to download the payload")
      select(nil, nil, nil, datastore['HTTP_DELAY'])
    else
      wait_linux_payload
Severity: Minor
Found in modules/exploits/linux/smtp/exim4_dovecot_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/http/netgear_dgn2200b_pppoe_exec.rb on lines 311..315
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 7 locations. Consider refactoring.
Open

    unless header && header.length == 6 && header[0, 4] == "\x00\x60\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 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
modules/exploits/multi/misc/arkeia_agent_exec.rb on lines 527..530

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 527..530

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_status')
            print_status('Example:> nessus_server_status -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 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 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/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/x86.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 6 locations. Consider refactoring.
Open

      "\x41\xa8", # Windows 2000 Professional (SP0 EN / SP0 NL / SP1 EN / SP2 EN / SP2 FR / SP2 PT)
      "\x41\xa9", # Windows 2000 Professional (SP0 EN / SP0 NL / SP1 AR / SP1 EN / SP2 EN / SP2 FR / SP2 PT)
      "\x41\xaa", # Windows 2000 Professional (SP1 EN / SP2 FR / SP2 PT)
      "\x41\xab", # Windows 2000 Professional (SP1 AR)
      "\x41\xac", # Windows 2000 Professional (SP0 FI)
Severity: Minor
Found in modules/exploits/windows/iis/ms03_007_ntdll_webdav.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/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

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

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'HTTP Fetch',
Severity: Minor
Found in modules/payloads/adapters/cmd/linux/http/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/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
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

commands = [
  'cmd.exe /c set',
  'arp -a',
  'ipconfig /all',
  'ipconfig /displaydns',
Severity: Minor
Found in scripts/meterpreter/winenum.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
modules/post/windows/gather/enum_ms_product_keys.rb on lines 105..105

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

    extensions = [
      '.null',
      '.backup',
      '.bak',
      '.c',
Severity: Minor
Found in modules/auxiliary/scanner/http/file_same_name_dir.rb and 5 other locations - About 15 mins to fix
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
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

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

    content = %Q|
      <html>
        <object classid='clsid:E9880553-B8A7-4960-A668-95C68BED571E' id='#{vname}'></object>
        <script language='JavaScript'>
          #{vname}.Initialize("#{vname}","#{vname}","","");
Severity: Minor
Found in modules/exploits/windows/browser/macrovision_unsafe.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/auxiliary/sqli/oracle/dbms_cdc_publish3.rb on lines 73..81
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

    encoded_sql = %Q|
DECLARE
#{var1} VARCHAR2(32767);
#{var2} VARCHAR2(32767);
BEGIN
Severity: Minor
Found in modules/auxiliary/sqli/oracle/dbms_cdc_publish2.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_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

            {
              'Ret'      => 0x0040df98, # netftpd.exe (multiple versions)
            },
          ],
          [
Severity: Minor
Found in modules/exploits/windows/ftp/netterm_netftpd_user.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/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

Severity
Category
Status
Source
Language