rapid7/metasploit-framework

View on GitHub

Showing 22,177 of 22,177 total issues

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

      when '6.3.9600.17837'
        {
          'info_leak' => 0x3d800,
          'pop_rax_ret' => 0x1a51f, # pop rax # ret # 58 C3
          'xchg_rax_rsp' => 0x62b4, # xchg eax, esp # ret # 94 C3
Severity: Major
Found in modules/exploits/windows/local/ms15_078_atmfd_bof.rb and 5 other locations - About 30 mins to fix
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 127..142
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 144..159
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 161..176
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 178..193
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 213..228

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

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

      when '6.3.9600.17796'
        {
          'info_leak' => 0x3d000,
          'pop_rax_ret' => 0x19e4f, # pop rax # ret # 58 C3
          'xchg_rax_rsp' => 0x5f64, # xchg eax, esp # ret # 94 C3
Severity: Major
Found in modules/exploits/windows/local/ms15_078_atmfd_bof.rb and 5 other locations - About 30 mins to fix
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 127..142
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 144..159
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 161..176
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 196..211
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 213..228

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

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

      when '6.3.9600.17393'
        {
          'info_leak' => 0x3cf00,
          'pop_rax_ret' => 0x19fab, # pop rax # ret # 58 C3
          'xchg_rax_rsp' => 0x6121, # xchg eax, esp # ret # 94 C3
Severity: Major
Found in modules/exploits/windows/local/ms15_078_atmfd_bof.rb and 5 other locations - About 30 mins to fix
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 144..159
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 161..176
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 178..193
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 196..211
modules/exploits/windows/local/ms15_078_atmfd_bof.rb on lines 213..228

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

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(info = {})
    super(merge_info(info,
      'Name'        => 'Bind TCP Stager with UUID Support (Windows x64)',
      'Description' => 'Listen for a connection with UUID Support (Windows x64)',
      'Author'      => [ 'sf', 'OJ Reeves' ],
Severity: Major
Found in modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/windows/bind_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/reverse_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb on lines 17..28

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

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(info = {})
    super(merge_info(info,
      'Name'        => 'Reverse TCP Stager with UUID Support',
      'Description' => 'Connect back to the attacker with UUID Support',
      'Author'      => [ 'hdm', 'OJ Reeves' ],
Severity: Major
Found in modules/payloads/stagers/windows/reverse_tcp_uuid.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/windows/bind_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb on lines 17..28

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

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(info={})
    super(merge_info(info,
      'Name'        => 'Java Bind TCP Stager',
      'Description' => 'Listen for a connection',
      'Author'      => ['mihi', 'egypt'],
Severity: Major
Found in modules/payloads/stagers/java/bind_tcp.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/android/reverse_http.rb on lines 14..25
modules/payloads/stagers/android/reverse_https.rb on lines 14..25
modules/payloads/stagers/android/reverse_tcp.rb on lines 14..25
modules/payloads/stagers/java/reverse_tcp.rb on lines 14..25

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

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(info = {})
    super(merge_info(info,
      'Name'          => 'Windows x64 IPv6 Bind TCP Stager with UUID Support',
      'Description'   => 'Listen for an IPv6 connection with UUID Support (Windows x64)',
      'Author'        => [ 'sf', 'OJ Reeves' ],
Severity: Major
Found in modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/windows/bind_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/reverse_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb on lines 17..28

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

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(info = {})
    super(merge_info(info,
      'Name'        => 'Bind TCP Stager with UUID Support (Windows x86)',
      'Description' => 'Listen for a connection with UUID Support (Windows x86)',
      'Author'      => [ 'hdm', 'OJ Reeves' ],
Severity: Major
Found in modules/payloads/stagers/windows/bind_tcp_uuid.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/windows/reverse_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb on lines 17..28

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

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(info = {})
    super(merge_info(info,
      'Name'        => 'Android Reverse HTTP Stager',
      'Description' => 'Tunnel communication over HTTP',
      'Author'      => ['anwarelmakrahy', 'OJ Reeves'],
Severity: Major
Found in modules/payloads/stagers/android/reverse_http.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/android/reverse_https.rb on lines 14..25
modules/payloads/stagers/android/reverse_tcp.rb on lines 14..25
modules/payloads/stagers/java/bind_tcp.rb on lines 14..25
modules/payloads/stagers/java/reverse_tcp.rb on lines 14..25

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

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(info={})
    super(merge_info(info,
      'Name'        => 'Java Reverse TCP Stager',
      'Description' => 'Connect back stager',
      'Author'      => ['mihi', 'egypt'],
Severity: Major
Found in modules/payloads/stagers/java/reverse_tcp.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/android/reverse_http.rb on lines 14..25
modules/payloads/stagers/android/reverse_https.rb on lines 14..25
modules/payloads/stagers/android/reverse_tcp.rb on lines 14..25
modules/payloads/stagers/java/bind_tcp.rb on lines 14..25

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

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

  def probereply(pcap, to)
    reply = nil
    begin
      Timeout.timeout(to) do
        pcap.each do |r|
Severity: Minor
Found in modules/auxiliary/scanner/portscan/xmas.rb and 3 other locations - About 30 mins to fix
modules/auxiliary/bnat/bnat_scan.rb on lines 42..55
modules/auxiliary/scanner/portscan/ack.rb on lines 136..149
modules/auxiliary/scanner/portscan/syn.rb on lines 125..138

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

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(info = {})
    super(merge_info(info,
      'Name'        => 'Reverse TCP Stager with UUID Support (Windows x64)',
      'Description' => 'Connect back to the attacker with UUID Support (Windows x64)',
      'Author'      => [ 'sf', 'OJ Reeves' ],
Severity: Major
Found in modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/windows/bind_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/reverse_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb on lines 17..28
modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb on lines 17..28

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

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(info = {})
    super(merge_info(info,
      'Name'          => 'Android Reverse TCP Stager',
      'Description'   => 'Connect back stager',
      'Author'        => ['mihi', 'egypt'],
Severity: Major
Found in modules/payloads/stagers/android/reverse_tcp.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/android/reverse_http.rb on lines 14..25
modules/payloads/stagers/android/reverse_https.rb on lines 14..25
modules/payloads/stagers/java/bind_tcp.rb on lines 14..25
modules/payloads/stagers/java/reverse_tcp.rb on lines 14..25

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

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

    config_opts = {
      ascii_str:  true,
      arch:       opts[:uuid].arch,
      expiration: ds['SessionExpirationTimeout'].to_i,
      uuid:       opts[:uuid],
Severity: Minor
Found in lib/msf/core/payload/android.rb and 1 other location - About 30 mins to fix
lib/msf/core/payload/java/meterpreter_loader.rb on lines 64..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 32.

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

    config_opts = {
      ascii_str:  true,
      arch:       opts[:uuid].arch,
      expiration: ds['SessionExpirationTimeout'].to_i,
      uuid:       opts[:uuid],
Severity: Minor
Found in lib/msf/core/payload/java/meterpreter_loader.rb and 1 other location - About 30 mins to fix
lib/msf/core/payload/android.rb on lines 49..56

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

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

  def probe_reply(pcap, to)
    reply = nil
    begin
      Timeout.timeout(to) do
        pcap.each do |r|
Severity: Minor
Found in modules/auxiliary/bnat/bnat_scan.rb and 3 other locations - About 30 mins to fix
modules/auxiliary/scanner/portscan/ack.rb on lines 136..149
modules/auxiliary/scanner/portscan/syn.rb on lines 125..138
modules/auxiliary/scanner/portscan/xmas.rb on lines 136..149

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

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(info = {})
    super(merge_info(info,
      'Name'        => 'Android Reverse HTTPS Stager',
      'Description' => 'Tunnel communication over HTTPS',
      'Author'      => ['anwarelmakrahy', 'OJ Reeves'],
Severity: Major
Found in modules/payloads/stagers/android/reverse_https.rb and 4 other locations - About 30 mins to fix
modules/payloads/stagers/android/reverse_http.rb on lines 14..25
modules/payloads/stagers/android/reverse_tcp.rb on lines 14..25
modules/payloads/stagers/java/bind_tcp.rb on lines 14..25
modules/payloads/stagers/java/reverse_tcp.rb on lines 14..25

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

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

      when Metasploit::Model::Login::Status::INCORRECT
        vprint_brute :level => :verror, :ip => ip, :msg => "Failed: '#{result.credential}'"
        invalidate_login(credential_data)
        scanner.ssh_socket.close if scanner.ssh_socket && !scanner.ssh_socket.closed?
      else
Severity: Minor
Found in modules/auxiliary/scanner/ssh/ssh_login.rb and 1 other location - About 30 mins to fix
modules/auxiliary/scanner/ssh/karaf_login.rb on lines 122..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 32.

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 do_http_get(uri='',opts={})
    @connected = false
    connect
    @connected = true

Severity: Minor
Found in modules/auxiliary/fuzzers/http/http_get_uri_strings.rb and 1 other location - About 30 mins to fix
modules/auxiliary/fuzzers/http/http_get_uri_long.rb on lines 27..33

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

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

    if not resp or resp[0,3] != '250'
      fail_with(Failure::Unknown, "#{rhost}:#{rport} - #{msg}")
    else
      print_status("#{rhost}:#{rport} - #{msg}")
    end
Severity: Minor
Found in modules/exploits/linux/smtp/exim4_dovecot_exec.rb and 3 other locations - About 30 mins to fix
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 175..179
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 184..188
modules/exploits/linux/smtp/exim4_dovecot_exec.rb on lines 196..200

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

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