rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

    res = send_request_cgi({
      'method' => 'POST',
      'uri' => '/genierestore.cgi',
      'ctype' => "multipart/form-data; boundary=#{post_data.bound}",
      'agent' => nil, # Disable sending the User-Agent header
modules/auxiliary/admin/http/netgear_r7000_backup_cgi_heap_overflow_rce.rb on lines 240..246
modules/auxiliary/admin/http/netgear_r7000_backup_cgi_heap_overflow_rce.rb on lines 258..264

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

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

    res = send_request_cgi({
      'method' => 'POST',
      'uri' => '/genierestore.cgi',
      'ctype' => "multipart/form-data; boundary=#{post_data.bound}",
      'agent' => nil, # Disable sending the User-Agent header
modules/auxiliary/admin/http/netgear_r7000_backup_cgi_heap_overflow_rce.rb on lines 204..210
modules/auxiliary/admin/http/netgear_r7000_backup_cgi_heap_overflow_rce.rb on lines 258..264

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

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

  def generate(_opts = {})
    vars = Rex::RandomIdentifier::Generator.new
    dis = "$#{vars[:dis]}"
    shell = <<-END_OF_PHP_CODE
              #{php_preamble(disabled_varname: dis)}
Severity: Major
Found in modules/payloads/singles/php/reverse_perl.rb and 2 other locations - About 45 mins to fix
modules/payloads/singles/php/bind_perl.rb on lines 37..45
modules/payloads/singles/php/bind_perl_ipv6.rb on lines 37..45

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

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

  def generate(_opts = {})
    vars = Rex::RandomIdentifier::Generator.new
    dis = "$#{vars[:dis]}"
    shell = <<-END_OF_PHP_CODE
              #{php_preamble(disabled_varname: dis)}
Severity: Major
Found in modules/payloads/singles/php/bind_perl_ipv6.rb and 2 other locations - About 45 mins to fix
modules/payloads/singles/php/bind_perl.rb on lines 37..45
modules/payloads/singles/php/reverse_perl.rb on lines 37..45

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

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

    res = send_request_cgi({
      'method' => 'POST',
      'uri' => '/genierestore.cgi',
      'ctype' => "multipart/form-data; boundary=#{post_data.bound}",
      'agent' => nil, # Disable sending the User-Agent header
modules/auxiliary/admin/http/netgear_r7000_backup_cgi_heap_overflow_rce.rb on lines 204..210
modules/auxiliary/admin/http/netgear_r7000_backup_cgi_heap_overflow_rce.rb on lines 240..246

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

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 wait_linux_payload
    print_status("#{rhost}:#{rport} - Waiting for the victim to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
Severity: Major
Found in modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 206..214
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 241..249
modules/exploits/linux/http/linksys_e1500_apply_exec.rb on lines 234..242
modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb on lines 401..409
modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb on lines 238..246
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 71..79
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 306..314

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

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 wait_linux_payload
    print_status("#{rhost}:#{rport} - Waiting for the victim to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
Severity: Major
Found in modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 206..214
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 241..249
modules/exploits/linux/http/linksys_e1500_apply_exec.rb on lines 234..242
modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb on lines 238..246
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 343..351
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 71..79
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 306..314

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

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

    print_status("#{rhost}:#{rport} - Waiting for the victim to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
      select(nil, nil, nil, 1)
Severity: Major
Found in modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 206..214
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 241..249
modules/exploits/linux/http/linksys_e1500_apply_exec.rb on lines 234..242
modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb on lines 401..409
modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb on lines 238..246
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 343..351
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 71..79

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

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 wait_linux_payload
    print_status("#{rhost}:#{rport} - Waiting for the victim to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
Severity: Major
Found in modules/exploits/linux/http/dlink_dir615_up_exec.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 206..214
modules/exploits/linux/http/linksys_e1500_apply_exec.rb on lines 234..242
modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb on lines 401..409
modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb on lines 238..246
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 343..351
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 71..79
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 306..314

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

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 wait_linux_payload
    print_status("#{rhost}:#{rport} - Waiting for the target to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
Severity: Major
Found in modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 241..249
modules/exploits/linux/http/linksys_e1500_apply_exec.rb on lines 234..242
modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb on lines 401..409
modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb on lines 238..246
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 343..351
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 71..79
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 306..314

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

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 wait_linux_payload
    print_status("#{rhost}:#{rport} - Waiting for the victim to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
Severity: Major
Found in modules/exploits/linux/smtp/exim4_dovecot_exec.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 206..214
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 241..249
modules/exploits/linux/http/linksys_e1500_apply_exec.rb on lines 234..242
modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb on lines 401..409
modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb on lines 238..246
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 343..351
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 306..314

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

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 wait_linux_payload
    print_status("#{rhost}:#{rport} - Waiting for the victim to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
Severity: Major
Found in modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 206..214
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 241..249
modules/exploits/linux/http/linksys_e1500_apply_exec.rb on lines 234..242
modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb on lines 401..409
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 343..351
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 71..79
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 306..314

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

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

  def generate(_opts = {})
    vars = Rex::RandomIdentifier::Generator.new
    dis = "$#{vars[:dis]}"
    shell = <<-END_OF_PHP_CODE
              #{php_preamble(disabled_varname: dis)}
Severity: Major
Found in modules/payloads/singles/php/bind_perl.rb and 2 other locations - About 45 mins to fix
modules/payloads/singles/php/bind_perl_ipv6.rb on lines 37..45
modules/payloads/singles/php/reverse_perl.rb on lines 37..45

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

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 wait_linux_payload
    print_status("#{rhost}:#{rport} - Waiting for the victim to request the ELF payload...")

    waited = 0
    while (not @elf_sent)
Severity: Major
Found in modules/exploits/linux/http/linksys_e1500_apply_exec.rb and 7 other locations - About 45 mins to fix
modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb on lines 206..214
modules/exploits/linux/http/dlink_dir615_up_exec.rb on lines 241..249
modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb on lines 401..409
modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb on lines 238..246
modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb on lines 343..351
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 71..79
modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb on lines 306..314

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

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

    def process_digitalocean_sd_configs(job_name, digitalocean_sd_configs)
      username, password = process_authorization(digitalocean_sd_configs['authorization'])
      cred = credential_data
      cred[:port] = ''
      cred[:address] = ''
Severity: Major
Found in lib/msf/core/auxiliary/prometheus.rb and 2 other locations - About 45 mins to fix
lib/msf/core/auxiliary/prometheus.rb on lines 318..334
lib/msf/core/auxiliary/prometheus.rb on lines 378..394

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

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

  def initialize(info = {})
    super(update_info(info,
      "Name" => "Printer Directory Listing Scanner",
      "Description" => %q{
        This module lists a directory on a set of printers using the
Severity: Major
Found in modules/auxiliary/scanner/printer/printer_list_dir.rb and 2 other locations - About 45 mins to fix
modules/auxiliary/scanner/printer/printer_delete_file.rb on lines 13..36
modules/auxiliary/scanner/printer/printer_download_file.rb on lines 13..36

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

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

    super(update_info(info,
      'Name'            => 'WordPress OptimizePress Theme File Upload Vulnerability',
      'Description'     => %q{
        This module exploits a vulnerability found in the WordPress theme OptimizePress. The
        vulnerability is due to an insecure file upload on the media-upload.php component, allowing
Severity: Major
Found in modules/exploits/unix/webapp/wp_optimizepress_upload.rb and 2 other locations - About 45 mins to fix
modules/exploits/unix/webapp/wp_frontend_editor_file_upload.rb on lines 13..39
modules/exploits/unix/webapp/wp_slideshowgallery_upload.rb on lines 13..39

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

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

      when '67' # MYSQL
        host = row[1]
        username = row[2].match(/--username=(.*?)\s/)[1]
        password = row[2].match(/--password=%22(.*?)%22/)[1]

Severity: Major
Found in modules/post/linux/gather/enum_nagios_xi.rb and 2 other locations - About 45 mins to fix
modules/post/linux/gather/enum_nagios_xi.rb on lines 225..241
modules/post/linux/gather/enum_nagios_xi.rb on lines 263..279

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

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

    def process_linode_sd_configs(job_name, linode_sd_configs)
      username, password = process_authorization(linode_sd_configs['authorization'])
      cred = credential_data
      cred[:port] = ''
      cred[:address] = ''
Severity: Major
Found in lib/msf/core/auxiliary/prometheus.rb and 2 other locations - About 45 mins to fix
lib/msf/core/auxiliary/prometheus.rb on lines 231..247
lib/msf/core/auxiliary/prometheus.rb on lines 378..394

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

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

    super(update_info(
      info,
      'Name'           => 'Wordpress Front-end Editor File Upload',
      'Description'    => %q{
          The WordPress Front-end Editor plugin contains an authenticated file upload
Severity: Major
Found in modules/exploits/unix/webapp/wp_frontend_editor_file_upload.rb and 2 other locations - About 45 mins to fix
modules/exploits/unix/webapp/wp_optimizepress_upload.rb on lines 16..42
modules/exploits/unix/webapp/wp_slideshowgallery_upload.rb on lines 13..39

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

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