rapid7/metasploit-framework

View on GitHub

Showing 22,177 of 22,177 total issues

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

    if (res)
      print_status("The server returned: #{res.code} #{res.message}")

      m = res.body.match(/YYY\n(.*)\nYYY/m)

Severity: Minor
Found in modules/exploits/unix/webapp/awstatstotals_multisort.rb and 2 other locations - About 35 mins to fix
modules/exploits/unix/webapp/awstats_configdir_exec.rb on lines 80..92
modules/exploits/unix/webapp/awstats_migrate_exec.rb on lines 84..96

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

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

    if (res)
      print_status("The server returned: #{res.code} #{res.message}")

      m = res.body.match(/YYY\n(.*)\nYYY/m)

Severity: Minor
Found in modules/exploits/unix/webapp/awstats_migrate_exec.rb and 2 other locations - About 35 mins to fix
modules/exploits/unix/webapp/awstats_configdir_exec.rb on lines 80..92
modules/exploits/unix/webapp/awstatstotals_multisort.rb on lines 78..90

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

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

  def self.create_payload
    lambda {
      warden.authenticate!
      begin
        opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/payload_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/host_servlet.rb on lines 78..87
lib/msf/core/web_services/servlet/login_servlet.rb on lines 67..76
lib/msf/core/web_services/servlet/note_servlet.rb on lines 63..72
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 65..74
lib/msf/core/web_services/servlet/route_servlet.rb on lines 35..44
lib/msf/core/web_services/servlet/service_servlet.rb on lines 62..71
lib/msf/core/web_services/servlet/workspace_servlet.rb on lines 67..76

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

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

  def self.delete_host
    lambda {
      warden.authenticate!
      begin
        opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/host_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/login_servlet.rb on lines 67..76
lib/msf/core/web_services/servlet/note_servlet.rb on lines 63..72
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 23..32
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 65..74
lib/msf/core/web_services/servlet/route_servlet.rb on lines 35..44
lib/msf/core/web_services/servlet/service_servlet.rb on lines 62..71
lib/msf/core/web_services/servlet/workspace_servlet.rb on lines 67..76

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

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

  def self.delete_service
    lambda {
      warden.authenticate!
      begin
        opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/service_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/host_servlet.rb on lines 78..87
lib/msf/core/web_services/servlet/login_servlet.rb on lines 67..76
lib/msf/core/web_services/servlet/note_servlet.rb on lines 63..72
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 23..32
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 65..74
lib/msf/core/web_services/servlet/route_servlet.rb on lines 35..44
lib/msf/core/web_services/servlet/workspace_servlet.rb on lines 67..76

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

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

  def self.delete_note
    lambda {
      warden.authenticate!
      begin
        opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/note_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/host_servlet.rb on lines 78..87
lib/msf/core/web_services/servlet/login_servlet.rb on lines 67..76
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 23..32
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 65..74
lib/msf/core/web_services/servlet/route_servlet.rb on lines 35..44
lib/msf/core/web_services/servlet/service_servlet.rb on lines 62..71
lib/msf/core/web_services/servlet/workspace_servlet.rb on lines 67..76

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

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

  def self.report_session_route_remove
    lambda {
      warden.authenticate!
      begin
        opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/route_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/host_servlet.rb on lines 78..87
lib/msf/core/web_services/servlet/login_servlet.rb on lines 67..76
lib/msf/core/web_services/servlet/note_servlet.rb on lines 63..72
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 23..32
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 65..74
lib/msf/core/web_services/servlet/service_servlet.rb on lines 62..71
lib/msf/core/web_services/servlet/workspace_servlet.rb on lines 67..76

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

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

    def self.delete_workspace
      lambda {
        warden.authenticate!
        begin
          opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/workspace_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/host_servlet.rb on lines 78..87
lib/msf/core/web_services/servlet/login_servlet.rb on lines 67..76
lib/msf/core/web_services/servlet/note_servlet.rb on lines 63..72
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 23..32
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 65..74
lib/msf/core/web_services/servlet/route_servlet.rb on lines 35..44
lib/msf/core/web_services/servlet/service_servlet.rb on lines 62..71

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

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

  def self.delete_payload
    lambda {
      warden.authenticate!
      begin
        opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/payload_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/host_servlet.rb on lines 78..87
lib/msf/core/web_services/servlet/login_servlet.rb on lines 67..76
lib/msf/core/web_services/servlet/note_servlet.rb on lines 63..72
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 23..32
lib/msf/core/web_services/servlet/route_servlet.rb on lines 35..44
lib/msf/core/web_services/servlet/service_servlet.rb on lines 62..71
lib/msf/core/web_services/servlet/workspace_servlet.rb on lines 67..76

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

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

  def self.delete_logins
    lambda {
      warden.authenticate!
      begin
        opts = parse_json_request(request, false)
Severity: Major
Found in lib/msf/core/web_services/servlet/login_servlet.rb and 7 other locations - About 35 mins to fix
lib/msf/core/web_services/servlet/host_servlet.rb on lines 78..87
lib/msf/core/web_services/servlet/note_servlet.rb on lines 63..72
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 23..32
lib/msf/core/web_services/servlet/payload_servlet.rb on lines 65..74
lib/msf/core/web_services/servlet/route_servlet.rb on lines 35..44
lib/msf/core/web_services/servlet/service_servlet.rb on lines 62..71
lib/msf/core/web_services/servlet/workspace_servlet.rb on lines 67..76

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

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

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'Linux Meterpreter Service, Reverse TCP Inline',
      'Description'   => 'Stub payload for interacting with a Meterpreter Service',
      'Author'        => 'hdm',
Severity: Major
Found in modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb and 6 other locations - About 35 mins to fix
modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/tty/unix/interact.rb on lines 13..28
modules/payloads/singles/windows/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/windows/metsvc_reverse_tcp.rb on lines 15..30

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

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

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'Unix TTY, Interact with Established Connection',
      'Description'   => 'Interacts with a TTY on an established socket connection',
      'Author'        => 'hdm',
Severity: Major
Found in modules/payloads/singles/tty/unix/interact.rb and 6 other locations - About 35 mins to fix
modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/windows/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/windows/metsvc_reverse_tcp.rb on lines 15..30

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

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

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'Windows Meterpreter Service, Reverse TCP Inline',
      'Description'   => 'Stub payload for interacting with a Meterpreter Service',
      'Author'        => 'hdm',
Severity: Major
Found in modules/payloads/singles/windows/metsvc_reverse_tcp.rb and 6 other locations - About 35 mins to fix
modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/tty/unix/interact.rb on lines 13..28
modules/payloads/singles/windows/metsvc_bind_tcp.rb on lines 15..30

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

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

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'FreeBSD Meterpreter Service, Bind TCP',
      'Description'   => 'Stub payload for interacting with a Meterpreter Service',
      'Author'        => 'hdm',
Severity: Major
Found in modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb and 6 other locations - About 35 mins to fix
modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/tty/unix/interact.rb on lines 13..28
modules/payloads/singles/windows/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/windows/metsvc_reverse_tcp.rb on lines 15..30

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

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

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'FreeBSD Meterpreter Service, Reverse TCP Inline',
      'Description'   => 'Stub payload for interacting with a Meterpreter Service',
      'Author'        => 'hdm',
Severity: Major
Found in modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb and 6 other locations - About 35 mins to fix
modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/tty/unix/interact.rb on lines 13..28
modules/payloads/singles/windows/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/windows/metsvc_reverse_tcp.rb on lines 15..30

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

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

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'Windows Meterpreter Service, Bind TCP',
      'Description'   => 'Stub payload for interacting with a Meterpreter Service',
      'Author'        => 'hdm',
Severity: Major
Found in modules/payloads/singles/windows/metsvc_bind_tcp.rb and 6 other locations - About 35 mins to fix
modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/tty/unix/interact.rb on lines 13..28
modules/payloads/singles/windows/metsvc_reverse_tcp.rb on lines 15..30

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

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

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'Linux Meterpreter Service, Bind TCP',
      'Description'   => 'Stub payload for interacting with a Meterpreter Service',
      'Author'        => 'hdm',
Severity: Major
Found in modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb and 6 other locations - About 35 mins to fix
modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb on lines 15..30
modules/payloads/singles/tty/unix/interact.rb on lines 13..28
modules/payloads/singles/windows/metsvc_bind_tcp.rb on lines 15..30
modules/payloads/singles/windows/metsvc_reverse_tcp.rb on lines 15..30

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

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

      [ 'HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion', 'DigitalProductId' ],
      [ 'HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion', 'DigitalProductId4' ],
      [ 'HKLM\\SOFTWARE\\Microsoft\\Office\\11.0\\Registration\\{91110409-6000-11D3-8CFE-0150048383C9}', 'DigitalProductId' ],
      [ 'HKLM\\SOFTWARE\\Microsoft\\Office\\12.0\\Registration\\{91120000-00CA-0000-0000-0000000FF1CE}', 'DigitalProductId' ],
      [ 'HKLM\\SOFTWARE\\Microsoft\\Office\\12.0\\Registration\\{91120000-0014-0000-0000-0000000FF1CE}', 'DigitalProductId' ],
Severity: Major
Found in modules/post/windows/gather/enum_ms_product_keys.rb and 4 other locations - About 35 mins to fix
modules/exploits/linux/http/geutebruck_cmdinject_cve_2021_335xx.rb on lines 33..43
modules/exploits/linux/local/apport_abrt_chroot_priv_esc.rb on lines 56..69
modules/exploits/unix/webapp/openx_banner_edit.rb on lines 27..38
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 44..54

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

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

    register_options([
      OptString.new('TARGETURI', [ true, 'The Artica Proxy endpoint URL', '/' ]),
      OptString.new('WEBSHELL', [false, 'Set webshell name without extension. Name will be randomly generated if left unset.', nil]),
      OptEnum.new('COMMAND',
                  [true, 'Use PHP command function', 'passthru', %w[passthru shell_exec system exec]], conditions: %w[TARGET != 0])
modules/exploits/linux/http/terramaster_unauth_rce_cve_2020_35665.rb on lines 91..96
modules/exploits/multi/http/gambio_unauth_rce_cve_2024_23759.rb on lines 83..88
modules/exploits/multi/http/wp_plugin_fma_shortcode_unauth_rce.rb on lines 118..126

Duplicated Code

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

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

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

Tuning

This issue has a mass of 34.

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 t3_handshake
    # retrieved from network traffic
    if !datastore['SSL'] || datastore['FORCE_T3']
      shake = 't3'
    else
Severity: Minor
Found in modules/exploits/multi/misc/weblogic_deserialize_rawobject.rb and 1 other location - About 35 mins to fix
modules/exploits/multi/misc/weblogic_deserialize_marshalledobject.rb on lines 118..132

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

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