rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
Severity: Major
Found in modules/payloads/singles/windows/meterpreter_bind_tcp.rb and 11 other locations - About 1 hr to fix
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..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

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block, which for staged connections is really simple.
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block, which for staged connections is really simple.
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block, which for staged connections is really simple.
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block, which for staged connections is really simple.
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def generate_config(opts={})
    opts[:uuid] ||= generate_payload_uuid

    # create the configuration block
    config_opts = {
modules/payloads/singles/windows/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/meterpreter_reverse_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_named_pipe.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb on lines 41..60
modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb on lines 46..65
modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb on lines 42..61
modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb on lines 41..60

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

  def check
    # create a socket
    res_code, sock_or_msg = create_socket_for_xnode(rhost, rport)
    if res_code == 1
      return Exploit::CheckCode::Unknown(sock_or_msg)
modules/auxiliary/gather/manageengine_datasecurity_plus_xnode_enum.rb on lines 69..88

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

  def generate_files(path, items)
    trail = path.split("/")
    return "" if trail.length < 2

    files = ""
Severity: Major
Found in modules/exploits/windows/misc/wireshark_lua.rb and 1 other location - About 1 hr to fix
modules/exploits/windows/fileformat/mcafee_showreport_exec.rb on lines 238..278

Duplicated Code

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

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

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

Tuning

This issue has a mass of 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

        def query_pg_shadow_values(pg_password, vcdb_user, vcdb_name)
          return nil unless command_exists? psql_bin

          output = []
          postgres_users = cmd_exec("#{postgress_connect(pg_password, vcdb_user, vcdb_name)} -c 'SELECT usename, passwd FROM pg_shadow;' -P pager -A -t")
Severity: Major
Found in lib/msf/core/post/vcenter/database.rb and 1 other location - About 1 hr to fix
lib/msf/core/post/vcenter/database.rb on lines 56..77

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

  def check
    # create a socket
    res_code, sock_or_msg = create_socket_for_xnode(rhost, rport)
    if res_code == 1
      return Exploit::CheckCode::Unknown(sock_or_msg)
modules/auxiliary/gather/manageengine_adaudit_plus_xnode_enum.rb on lines 70..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 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

        def query_pg_shadow_values(pg_password, vcdb_user, vcdb_name)
          return nil unless command_exists? psql_bin

          output = []
          postgres_users = cmd_exec("#{postgress_connect(pg_password, vcdb_user, vcdb_name)} -c 'SELECT usename, passwd FROM pg_shadow;' -P pager -A -t")
Severity: Major
Found in lib/msf/core/post/vcenter/database.rb and 1 other location - About 1 hr to fix
lib/msf/core/post/vcenter/database.rb on lines 87..108

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

  def authenticate_it360(port, path, username, password)
    if datastore['DOMAIN_NAME'].nil?
      vars_post = {
        'LOGIN_ID' => username,
        'PASSWORD' => password,
Severity: Major
Found in modules/auxiliary/admin/http/manageengine_file_download.rb and 1 other location - About 1 hr to fix
modules/auxiliary/admin/http/manageengine_dir_listing.rb on lines 102..135

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

  def authenticate_it360(port, path, username, password)
    if datastore['DOMAIN_NAME'].nil?
      vars_post = {
        'LOGIN_ID' => username,
        'PASSWORD' => password,
Severity: Major
Found in modules/auxiliary/admin/http/manageengine_dir_listing.rb and 1 other location - About 1 hr to fix
modules/auxiliary/admin/http/manageengine_file_download.rb on lines 100..133

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

  def generate_files(path, items)
    trail = path.split("/")
    return "" if trail.length < 2

    files = ""
modules/exploits/windows/misc/wireshark_lua.rb on lines 244..284

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

Severity
Category
Status
Source
Language