rapid7/metasploit-framework

View on GitHub

Showing 6,072 of 21,960 total issues

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

          if (row.match(/\["file"\]=>/))
            c+=1
            x = n + 1
            y = infos[x].match(/string\(\d+\) "(.*)"/m)
            print_status("Install path : #{y[1]}")
Severity: Minor
Found in modules/auxiliary/admin/tikiwiki/tikidblib.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 75..79
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 81..85
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 87..91
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 93..97
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 99..103

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if (row.match(/\["database"\]=>/))
            c+=1
            x = n + 1
            y = infos[x].match(/string\(\d+\) "(.*)"/m)
            print_status("DB name      : #{y[1]}")
Severity: Minor
Found in modules/auxiliary/admin/tikiwiki/tikidblib.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 69..73
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 75..79
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 87..91
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 93..97
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 99..103

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if (row.match(/\["host"\]=>/))
            c+=1
            x = n + 1
            y = infos[x].match(/string\(\d+\) "(.*)"/m)
            print_status("DB host      : #{y[1]}")
Severity: Minor
Found in modules/auxiliary/admin/tikiwiki/tikidblib.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 69..73
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 75..79
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 81..85
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 93..97
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 99..103

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if (row.match(/\["user"\]=>/))
            c+=1
            x = n + 1
            y = infos[x].match(/string\(\d+\) "(.*)"/m)
            print_status("DB user      : #{y[1]}")
Severity: Minor
Found in modules/auxiliary/admin/tikiwiki/tikidblib.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 69..73
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 75..79
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 81..85
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 87..91
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 99..103

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

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

  def payload_uri
    addr = datastore['LHOST']
    uri_host = Rex::Socket.is_ipv6?(addr) ? "[#{addr}]" : addr
    "sctp://#{uri_host}:#{datastore['LPORT']}"
Severity: Minor
Found in lib/msf/core/handler/reverse_sctp.rb and 4 other locations - About 15 mins to fix
lib/msf/core/handler/reverse_tcp.rb on lines 89..92
lib/msf/core/handler/reverse_tcp_double.rb on lines 109..112
lib/msf/core/handler/reverse_tcp_double_ssl.rb on lines 106..109
lib/msf/core/handler/reverse_udp.rb on lines 47..50

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

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

  def initialize
    super(
      'Name'           => 'NTP Mode 6 UNSETTRAP DRDoS Scanner',
      'Description'    => %q{
        This module identifies NTP servers which permit mode 6 UNSETTRAP requests that
Severity: Minor
Found in modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb and 4 other locations - About 15 mins to fix
modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb on lines 13..32
modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb on lines 13..32
modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb on lines 13..33
modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb on lines 13..34

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

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

  def initialize
    super(
      'Name'           => 'NTP Mode 7 PEER_LIST DoS Scanner',
      'Description'    => %q{
        This module identifies NTP servers which permit "PEER_LIST" queries and
Severity: Minor
Found in modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb and 4 other locations - About 15 mins to fix
modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb on lines 13..32
modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb on lines 13..33
modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb on lines 13..34
modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb on lines 13..32

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

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

    if result[1] < 200 || result[1] > 300
      fail_with(Failure::Unknown, (result[1] != 0 ? result[0] : 'connection error'))
    end
Severity: Minor
Found in modules/exploits/unix/smtp/qmail_bash_env_exec.rb and 4 other locations - About 15 mins to fix
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 91..93
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 96..98
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 100..102
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 104..106

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

          if (row.match(/\["databaseType"\]=>/))
            c+=1
            x = n + 1
            y = infos[x].match(/string\(\d+\) "(.*)"/m)
            print_status("DB type      : #{y[1]}")
Severity: Minor
Found in modules/auxiliary/admin/tikiwiki/tikidblib.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 69..73
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 81..85
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 87..91
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 93..97
modules/auxiliary/admin/tikiwiki/tikidblib.rb on lines 99..103

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if result
      print_good("Vulnerable to unauthenticated SQL injection within Gallery WD for Joomla!")
      report_vuln({
        :host  => rhost,
        :port  => rport,
modules/auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner.rb on lines 75..82
modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb on lines 130..137
modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb on lines 143..150
modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb on lines 63..70
modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb on lines 55..62

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

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

  def initialize
    super(
      'Name'        => 'Simple',
      'Alias'       => 'ppc_simple',
      'Description' => 'Simple NOP generator',
Severity: Minor
Found in modules/nops/ppc/simple.rb and 4 other locations - About 15 mins to fix
modules/nops/armle/simple.rb on lines 16..28
modules/nops/mipsbe/better.rb on lines 16..28
modules/nops/sparc/random.rb on lines 70..82
modules/nops/x86/single_byte.rb on lines 77..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 25.

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

  def payload_uri
    addr = datastore['LHOST']
    uri_host = Rex::Socket.is_ipv6?(addr) ? "[#{addr}]" : addr
    "ssl://#{uri_host}:#{datastore['LPORT']}"
Severity: Minor
Found in lib/msf/core/handler/reverse_tcp_double.rb and 4 other locations - About 15 mins to fix
lib/msf/core/handler/reverse_sctp.rb on lines 123..126
lib/msf/core/handler/reverse_tcp.rb on lines 89..92
lib/msf/core/handler/reverse_tcp_double_ssl.rb on lines 106..109
lib/msf/core/handler/reverse_udp.rb on lines 47..50

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

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

  def initialize
    super(
      'Name'        => 'SPARC NOP Generator',
      'Alias'       => 'sparc_simple',
      'Description' => 'SPARC NOP generator',
Severity: Minor
Found in modules/nops/sparc/random.rb and 4 other locations - About 15 mins to fix
modules/nops/armle/simple.rb on lines 16..28
modules/nops/mipsbe/better.rb on lines 16..28
modules/nops/ppc/simple.rb on lines 17..29
modules/nops/x86/single_byte.rb on lines 77..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 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if result
      print_good("Vulnerable to unauthenticated SQL injection within CP Multi-View Calendar 1.1.4 for Wordpress")
      report_vuln({
        :host  => rhost,
        :port  => rport,
Severity: Minor
Found in modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner.rb on lines 75..82
modules/auxiliary/scanner/http/joomla_gallerywd_sqli_scanner.rb on lines 92..99
modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb on lines 130..137
modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb on lines 143..150
modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb on lines 55..62

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

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

    if result[1] < 200 || result[1] > 354
      fail_with(Failure::Unknown, (result[1] != 0 ? result[0] : 'connection error'))
    end
Severity: Minor
Found in modules/exploits/unix/smtp/qmail_bash_env_exec.rb and 4 other locations - About 15 mins to fix
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 86..88
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 91..93
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 96..98
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 104..106

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if result
      print_good("Vulnerable to CVE-2015-2562 (search_category_id parameter SQL injection)")
      report_vuln({
        :host  => rhost,
        :port  => rport,
modules/auxiliary/scanner/http/joomla_gallerywd_sqli_scanner.rb on lines 92..99
modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb on lines 130..137
modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb on lines 143..150
modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb on lines 63..70
modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb on lines 55..62

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if (res.code < 200 or res.code >= 300)
      # Changed this to a warning, because red is scary and if this part fails,
      # honestly it's not that bad. In most cases this is probably expected anyway
      # because by default we're using IWAM_*, which doesn't give us a lot of
      # freedom to begin with.
Severity: Minor
Found in modules/exploits/windows/iis/iis_webdav_upload_asp.rb and 5 other locations - About 15 mins to fix
modules/exploits/windows/http/landesk_thinkmanagement_upload_asp.rb on lines 106..109
modules/exploits/windows/http/landesk_thinkmanagement_upload_asp.rb on lines 127..130
modules/exploits/windows/http/landesk_thinkmanagement_upload_asp.rb on lines 165..168
modules/exploits/windows/http/umbraco_upload_aspx.rb on lines 162..165
modules/exploits/windows/iis/iis_webdav_upload_asp.rb on lines 109..112

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

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

  def initialize
    super(
      'Name'           => 'NTP Mode 7 PEER_LIST_SUM DoS Scanner',
      'Description'    => %q{
        This module identifies NTP servers which permit "PEER_LIST_SUM" queries and
Severity: Minor
Found in modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb and 4 other locations - About 15 mins to fix
modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb on lines 13..32
modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb on lines 13..33
modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb on lines 13..34
modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb on lines 13..32

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

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

    if result[1] < 200 || result[1] > 300
      fail_with(Failure::Unknown, (result[1] != 0 ? result[0] : 'connection error'))
    end
Severity: Minor
Found in modules/exploits/unix/smtp/qmail_bash_env_exec.rb and 4 other locations - About 15 mins to fix
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 86..88
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 91..93
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 96..98
modules/exploits/unix/smtp/qmail_bash_env_exec.rb on lines 100..102

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if result
      print_good("Vulnerable to CVE-2013-3623 (close_window.cgi Buffer Overflow)")
      report_vuln({
        :host  => rhost,
        :port  => rport,
Severity: Minor
Found in modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb and 5 other locations - About 15 mins to fix
modules/auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner.rb on lines 75..82
modules/auxiliary/scanner/http/joomla_gallerywd_sqli_scanner.rb on lines 92..99
modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb on lines 130..137
modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb on lines 63..70
modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb on lines 55..62

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

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