rapid7/metasploit-framework

View on GitHub

Showing 6,027 of 21,757 total issues

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

  def import_qualys_scan_xml_file(args={})
    filename = args[:filename]

    data = ""
    ::File.open(filename, 'rb') do |f|
Severity: Major
Found in lib/msf/core/db_manager/import/qualys/scan.rb and 10 other locations - About 20 mins to fix
lib/msf/core/db_manager/import/ip360/v3.rb on lines 6..13
lib/msf/core/db_manager/import/ip_list.rb on lines 18..25
lib/msf/core/db_manager/import/metasploit_framework/xml.rb on lines 57..64
lib/msf/core/db_manager/import/nessus/nbe.rb on lines 84..91
lib/msf/core/db_manager/import/netsparker.rb on lines 161..168
lib/msf/core/db_manager/import/nexpose/raw.rb on lines 74..81
lib/msf/core/db_manager/import/nexpose/simple.rb on lines 155..162
lib/msf/core/db_manager/import/nmap.rb on lines 241..248
lib/msf/core/db_manager/import/retina.rb on lines 87..94
lib/msf/core/db_manager/import/wapiti.rb on lines 13..20

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

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

  def run_host(ip)
    res = send_request_cgi({
      'uri'      => normalize_uri(datastore['URI']),
      'method'   => 'GET'
    }, 25)
modules/auxiliary/scanner/sap/sap_mgmt_con_abaplog.rb on lines 32..43
modules/auxiliary/scanner/sap/sap_mgmt_con_extractusers.rb on lines 35..46
modules/auxiliary/scanner/sap/sap_mgmt_con_getaccesspoints.rb on lines 35..46
modules/auxiliary/scanner/sap/sap_mgmt_con_getenv.rb on lines 35..46
modules/auxiliary/scanner/sap/sap_mgmt_con_getprocesslist.rb on lines 38..49
modules/auxiliary/scanner/sap/sap_mgmt_con_listconfigfiles.rb on lines 40..51
modules/auxiliary/scanner/sap/sap_mgmt_con_listlogfiles.rb on lines 37..48
modules/auxiliary/scanner/sap/sap_mgmt_con_startprofile.rb on lines 35..46
modules/auxiliary/scanner/sap/sap_mgmt_con_version.rb on lines 35..46

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

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

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

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

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

Refactorings

Further Reading

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

    if target_pid == current_pid
      print_good("Already in #{client.sys.process.open.name} (#{client.sys.process.open.pid}) as: #{client.sys.config.getuid}")
      return true
Severity: Minor
Found in modules/post/windows/capture/keylog_recorder.rb and 2 other locations - About 20 mins to fix
modules/post/windows/capture/keylog_recorder.rb on lines 199..201
modules/post/windows/manage/priv_migrate.rb on lines 117..119

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

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

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

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

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

Refactorings

Further Reading

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

          if (res.code and res.headers['Location'])
            print_error("#{ip}:#{rport} #{res.code} Redirect to #{res.headers['Location']}")
          else
            ''
          end
Severity: Minor
Found in modules/auxiliary/scanner/lotus/lotus_domino_version.rb and 2 other locations - About 20 mins to fix
modules/auxiliary/scanner/lotus/lotus_domino_version.rb on lines 122..128
modules/auxiliary/scanner/lotus/lotus_domino_version.rb on lines 165..171

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

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 initialize(info = {})
    super(merge_info(info,
      'Name'        => 'Python Reverse TCP Stager with UUID Support',
      'Description' => 'Connect back to the attacker with UUID Support',
      'Author'      => 'OJ Reeves',
Severity: Major
Found in modules/payloads/stagers/python/reverse_tcp_uuid.rb and 7 other locations - About 20 mins to fix
modules/payloads/stagers/linux/x64/reverse_sctp.rb on lines 12..25
modules/payloads/stagers/php/reverse_tcp.rb on lines 13..23
modules/payloads/stagers/python/bind_tcp.rb on lines 15..25
modules/payloads/stagers/python/bind_tcp_uuid.rb on lines 19..29
modules/payloads/stagers/python/reverse_http.rb on lines 14..24
modules/payloads/stagers/python/reverse_https.rb on lines 14..24
modules/payloads/stagers/python/reverse_tcp.rb on lines 14..24

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

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 initialize(info = {})
    super(merge_info(info,
      'Name'        => 'Python Meterpreter Shell, Bind TCP Inline',
      'Description' => 'Connect to the victim and spawn a Meterpreter shell',
      'Author'      => 'Spencer McIntyre',
Severity: Major
Found in modules/payloads/singles/python/meterpreter_bind_tcp.rb and 7 other locations - About 20 mins to fix
modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb on lines 15..24
modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb on lines 15..25
modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb on lines 16..26
modules/payloads/singles/python/meterpreter_reverse_tcp.rb on lines 16..26
modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb on lines 15..24
modules/payloads/singles/solaris/sparc/shell_find_port.rb on lines 15..24
modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb on lines 15..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 28.

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 initialize(info = {})
    super(merge_info(info,
      'Name'          => 'Solaris Command Shell, Bind TCP Inline',
      'Description'   => 'Listen for a connection and spawn a command shell',
      'Author'        => 'vlad902',
Severity: Major
Found in modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb and 7 other locations - About 20 mins to fix
modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb on lines 15..24
modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb on lines 15..25
modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb on lines 16..26
modules/payloads/singles/python/meterpreter_bind_tcp.rb on lines 16..26
modules/payloads/singles/python/meterpreter_reverse_tcp.rb on lines 16..26
modules/payloads/singles/solaris/sparc/shell_find_port.rb on lines 15..24
modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb on lines 15..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 28.

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

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

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

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

Refactorings

Further Reading

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

    if target_pid == current_pid
      print_good("Already in #{client.sys.process.open.name} (#{client.sys.process.open.pid}) as: #{client.sys.config.getuid}")
      return true
Severity: Minor
Found in modules/post/windows/manage/priv_migrate.rb and 2 other locations - About 20 mins to fix
modules/post/windows/capture/keylog_recorder.rb on lines 199..201
modules/post/windows/capture/keylog_recorder.rb on lines 232..234

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

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

          [ 'Linux x86 eGroupware',
            {
              'DefaultCookie' => 'eGW_remember',
              'DefaultURI'    => '/egroupware/login.php',
              'Signature'     => /www.egroupware.org/,
Severity: Major
Found in modules/exploits/multi/php/php_unserialize_zval_cookie.rb and 7 other locations - About 20 mins to fix
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 71..82
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 86..97
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 101..112
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 116..127
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 131..142
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 146..157
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 161..172

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

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 initialize(info = {})
    super(merge_info(info,
      'Name'          => 'Python Reverse HTTP Stager',
      'Description'   => 'Tunnel communication over HTTP',
      'Author'        => 'Spencer McIntyre',
Severity: Major
Found in modules/payloads/stagers/python/reverse_http.rb and 7 other locations - About 20 mins to fix
modules/payloads/stagers/linux/x64/reverse_sctp.rb on lines 12..25
modules/payloads/stagers/php/reverse_tcp.rb on lines 13..23
modules/payloads/stagers/python/bind_tcp.rb on lines 15..25
modules/payloads/stagers/python/bind_tcp_uuid.rb on lines 19..29
modules/payloads/stagers/python/reverse_https.rb on lines 14..24
modules/payloads/stagers/python/reverse_tcp.rb on lines 14..24
modules/payloads/stagers/python/reverse_tcp_uuid.rb on lines 19..29

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

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

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

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

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

Refactorings

Further Reading

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

          if (res.code and res.headers['Location'])
            print_error("#{ip}:#{rport} #{res.code} Redirect to #{res.headers['Location']}")
          else
            ''
          end
Severity: Minor
Found in modules/auxiliary/scanner/lotus/lotus_domino_version.rb and 2 other locations - About 20 mins to fix
modules/auxiliary/scanner/lotus/lotus_domino_version.rb on lines 81..87
modules/auxiliary/scanner/lotus/lotus_domino_version.rb on lines 165..171

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

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

          [ 'Linux x86 Deadman Redirect',
            {
              'DefaultCookie' => 'authcookie',
              'DefaultURI'    => '/dmr/dmr.php',
              'Signature'     => /document\.f\.userdata\.focus/,
Severity: Major
Found in modules/exploits/multi/php/php_unserialize_zval_cookie.rb and 7 other locations - About 20 mins to fix
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 71..82
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 86..97
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 101..112
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 131..142
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 146..157
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 161..172
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 176..187

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

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

          [ 'Linux x86 Ariadne-CMS',
            {
              'DefaultCookie' => 'ARCookie',
              'DefaultURI'    => '/ariadne/loader.php/',
              'Signature'     => /Ariadne is free software/,
Severity: Major
Found in modules/exploits/multi/php/php_unserialize_zval_cookie.rb and 7 other locations - About 20 mins to fix
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 71..82
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 86..97
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 101..112
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 116..127
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 131..142
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 161..172
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 176..187

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

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 initialize(info = {})
    super(merge_info(info,
      'Name'        => 'Python Meterpreter Shell, Reverse TCP Inline',
      'Description' => 'Connect back to the attacker and spawn a Meterpreter shell',
      'Author'      => 'Spencer McIntyre',
Severity: Major
Found in modules/payloads/singles/python/meterpreter_reverse_tcp.rb and 7 other locations - About 20 mins to fix
modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb on lines 15..24
modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb on lines 15..25
modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb on lines 16..26
modules/payloads/singles/python/meterpreter_bind_tcp.rb on lines 16..26
modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb on lines 15..24
modules/payloads/singles/solaris/sparc/shell_find_port.rb on lines 15..24
modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb on lines 15..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 28.

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

          [ 'Linux x86 punBB',
            {
              'DefaultCookie' => 'punbb_cookie',
              'DefaultURI'    => '/index.php',
              'Signature'     => /Powered\s+by.*PunBB/,
Severity: Major
Found in modules/exploits/multi/php/php_unserialize_zval_cookie.rb and 7 other locations - About 20 mins to fix
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 71..82
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 101..112
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 116..127
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 131..142
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 146..157
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 161..172
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 176..187

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

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

          [ 'Linux x86 ProMA',
            {
              'DefaultCookie' => 'proma',
              'DefaultURI'    => '/proma/index.php',
              'Signature'     => /Change Account Information/,
Severity: Major
Found in modules/exploits/multi/php/php_unserialize_zval_cookie.rb and 7 other locations - About 20 mins to fix
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 71..82
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 86..97
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 101..112
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 116..127
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 131..142
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 146..157
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 176..187

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

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 initialize(info = {})
    super(merge_info(info,
      'Name'        => 'Python Reverse TCP Stager',
      'Description' => 'Connect back to the attacker',
      'Author'      => 'Spencer McIntyre',
Severity: Major
Found in modules/payloads/stagers/python/reverse_tcp.rb and 7 other locations - About 20 mins to fix
modules/payloads/stagers/linux/x64/reverse_sctp.rb on lines 12..25
modules/payloads/stagers/php/reverse_tcp.rb on lines 13..23
modules/payloads/stagers/python/bind_tcp.rb on lines 15..25
modules/payloads/stagers/python/bind_tcp_uuid.rb on lines 19..29
modules/payloads/stagers/python/reverse_http.rb on lines 14..24
modules/payloads/stagers/python/reverse_https.rb on lines 14..24
modules/payloads/stagers/python/reverse_tcp_uuid.rb on lines 19..29

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

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

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

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

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

Refactorings

Further Reading

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

          if (res.code and res.headers['Location'])
            print_error("#{ip}:#{rport} #{res.code} Redirect to #{res.headers['Location']}")
          else
            ''
          end
Severity: Minor
Found in modules/auxiliary/scanner/lotus/lotus_domino_version.rb and 2 other locations - About 20 mins to fix
modules/auxiliary/scanner/lotus/lotus_domino_version.rb on lines 81..87
modules/auxiliary/scanner/lotus/lotus_domino_version.rb on lines 122..128

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

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

          [ 'Linux x86 PhpWebGallery',
            {
              'DefaultCookie' => 'pwg_remember',
              'DefaultURI'    => '/phpwebgallery/index.php',
              'Signature'     => /Powered\s+by.*phpwebgallery/msi,
Severity: Major
Found in modules/exploits/multi/php/php_unserialize_zval_cookie.rb and 7 other locations - About 20 mins to fix
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 71..82
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 86..97
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 101..112
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 116..127
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 146..157
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 161..172
modules/exploits/multi/php/php_unserialize_zval_cookie.rb on lines 176..187

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

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 initialize(info = {})
    super(merge_info(info,
      'Name'          => 'BSD Command Shell, Reverse TCP Inline',
      'Description'   => 'Connect back to attacker and spawn a command shell',
      'Author'        => 'vlad902',
Severity: Major
Found in modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb and 7 other locations - About 20 mins to fix
modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb on lines 15..24
modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb on lines 16..26
modules/payloads/singles/python/meterpreter_bind_tcp.rb on lines 16..26
modules/payloads/singles/python/meterpreter_reverse_tcp.rb on lines 16..26
modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb on lines 15..24
modules/payloads/singles/solaris/sparc/shell_find_port.rb on lines 15..24
modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb on lines 15..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 28.

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