rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

  def exec(cmd)
    tries = 0
    begin
      out = cmd_exec(cmd).chomp
    rescue ::Timeout::Error => e
Severity: Major
Found in modules/post/osx/gather/enum_colloquy.rb and 3 other locations - About 1 hr to fix
modules/post/osx/admin/say.rb on lines 34..50
modules/post/osx/gather/enum_airport.rb on lines 26..42
modules/post/osx/gather/enum_chicken_vnc_profile.rb on lines 35..51

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

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

  def exec(cmd)
    tries = 0
    begin
      out = cmd_exec(cmd).chomp
    rescue ::Timeout::Error => e
Severity: Major
Found in modules/post/osx/gather/enum_airport.rb and 3 other locations - About 1 hr to fix
modules/post/osx/admin/say.rb on lines 34..50
modules/post/osx/gather/enum_chicken_vnc_profile.rb on lines 35..51
modules/post/osx/gather/enum_colloquy.rb on lines 125..141

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

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

    scanner.scan! do |result|
      credential_data = result.to_h
      credential_data.merge!(
        module_fullname: fullname,
        workspace_id: myworkspace_id
Severity: Major
Found in modules/auxiliary/scanner/http/octopusdeploy_login.rb and 4 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/buffalo_login.rb on lines 49..63
modules/auxiliary/scanner/http/gitlab_login.rb on lines 68..82
modules/auxiliary/scanner/http/jenkins_login.rb on lines 61..73
modules/auxiliary/scanner/http/mybook_live_login.rb on lines 69..83

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

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

  def exec(cmd)
    tries = 0
    begin
      out = cmd_exec(cmd).chomp
    rescue ::Timeout::Error => e
Severity: Major
Found in modules/post/osx/gather/enum_chicken_vnc_profile.rb and 3 other locations - About 1 hr to fix
modules/post/osx/admin/say.rb on lines 34..50
modules/post/osx/gather/enum_airport.rb on lines 26..42
modules/post/osx/gather/enum_colloquy.rb on lines 125..141

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'Fortinet SSL VPN',
Severity: Major
Found in modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
   service_data = {
    address: opts[:ip],
    port: opts[:port],
    service_name: 'LDAP',
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'splunk-web',
Severity: Major
Found in modules/auxiliary/scanner/http/splunk_web_login.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'telnet',
Severity: Major
Found in modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'cctv_dvr',
Severity: Major
Found in modules/auxiliary/scanner/misc/cctv_dvr_login.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def exec(cmd)
    tries = 0
    begin
      out = cmd_exec(cmd).chomp
    rescue ::Timeout::Error => e
Severity: Major
Found in modules/post/osx/admin/say.rb and 3 other locations - About 1 hr to fix
modules/post/osx/gather/enum_airport.rb on lines 26..42
modules/post/osx/gather/enum_chicken_vnc_profile.rb on lines 35..51
modules/post/osx/gather/enum_colloquy.rb on lines 125..141

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'Cisco SSL VPN',
Severity: Major
Found in modules/auxiliary/scanner/http/cisco_ssl_vpn.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'asterisk_manager',
Severity: Major
Found in modules/auxiliary/voip/asterisk_login.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'vmware',
Severity: Major
Found in modules/auxiliary/scanner/vmware/vmware_http_login.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'InfoVista VistaPortal',
Severity: Major
Found in modules/auxiliary/scanner/http/infovista_enum.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'http',
Severity: Major
Found in modules/auxiliary/scanner/http/vcms_login.rb and 11 other locations - About 1 hr to fix
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'Cisco ASA ASDM',
modules/auxiliary/scanner/http/cisco_asa_clientless_vpn.rb on lines 77..101
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

  def report_cred(opts)
    service_data = {
      address: opts[:ip],
      port: opts[:port],
      service_name: 'Cisco ASA SSL VPN Service',
modules/auxiliary/scanner/http/cisco_asa_asdm_bruteforce.rb on lines 72..96
modules/auxiliary/scanner/http/cisco_ssl_vpn.rb on lines 137..161
modules/auxiliary/scanner/http/fortinet_ssl_vpn.rb on lines 90..114
modules/auxiliary/scanner/http/infovista_enum.rb on lines 80..104
modules/auxiliary/scanner/http/splunk_web_login.rb on lines 127..151
modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb on lines 64..86
modules/auxiliary/scanner/http/vcms_login.rb on lines 50..74
modules/auxiliary/scanner/misc/cctv_dvr_login.rb on lines 130..154
modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb on lines 58..82
modules/auxiliary/scanner/vmware/vmware_http_login.rb on lines 35..59
modules/auxiliary/voip/asterisk_login.rb on lines 51..75

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

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

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

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

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

Refactorings

Further Reading

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

  def generate_files(path)
    trail = path.split("/")
    return "" if trail.length < 2

    base  = @basename
Severity: Major
Found in modules/exploits/windows/http/sap_host_control_cmd_exec.rb and 2 other locations - About 1 hr to fix
modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb on lines 340..379
modules/exploits/windows/http/cogent_datahub_command.rb on lines 287..326

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

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

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

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

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

Refactorings

Further Reading

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

  def generate_files(path)
    trail = path.split("/")
    return "" if trail.length < 2

    base  = @basename
Severity: Major
Found in modules/exploits/windows/http/cogent_datahub_command.rb and 2 other locations - About 1 hr to fix
modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb on lines 340..379
modules/exploits/windows/http/sap_host_control_cmd_exec.rb on lines 282..321

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

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

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

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

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

Refactorings

Further Reading

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

  def generate_files(path)
    trail = path.split("/")
    return "" if trail.length < 2

    base  = @basename
Severity: Major
Found in modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb and 2 other locations - About 1 hr to fix
modules/exploits/windows/http/cogent_datahub_command.rb on lines 287..326
modules/exploits/windows/http/sap_host_control_cmd_exec.rb on lines 282..321

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

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