rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

          [ 'CHANNEL', { 'Description' => 'Obtain the channel/camera information from the DVR' } ],
          [ 'DDNS', { 'Description' => 'Obtain the DDNS settings from the DVR' } ],
          [ 'EMAIL', { 'Description' => 'Obtain the email settings from the DVR' } ],
          [ 'GROUP', { 'Description' => 'Obtain the group information the DVR' } ],
          [ 'NAS', { 'Description' => 'Obtain the NAS settings from the DVR' } ],
Severity: Major
Found in modules/auxiliary/scanner/misc/dahua_dvr_auth_bypass.rb and 2 other locations - About 55 mins to fix
modules/auxiliary/cloud/kubernetes/enum_kubernetes.rb on lines 39..47
modules/auxiliary/scanner/scada/modbusclient.rb on lines 28..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

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

    [ 'x86/alpha_mixed', 'x86/unicode_mixed' ].each { |name|
      enc = framework.encoders.create(name)
      if name =~ /unicode/
        enc.datastore.import_options_from_hash({ 'BufferRegister' => 'EAX' })
      else
Severity: Major
Found in modules/exploits/windows/fileformat/cyberlink_p2g_bof.rb and 3 other locations - About 55 mins to fix
modules/exploits/windows/fileformat/foxit_title_bof.rb on lines 77..90
modules/exploits/windows/fileformat/xion_m3u_sehbof.rb on lines 103..116
modules/exploits/windows/ftp/scriptftp_list.rb on lines 119..133

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

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

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

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

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

Refactorings

Further Reading

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

    if defined?(read_stage_size?) && read_stage_size?
      asm << %Q^
    allocate_memory:
    read_stage_size:
      push ebx               ; temporary storage for stage size
Severity: Major
Found in lib/msf/core/payload/windows/reverse_http.rb and 2 other locations - About 55 mins to fix
lib/msf/core/payload/windows/x64/reverse_http_x64.rb on lines 451..534
lib/msf/core/payload/windows/x64/reverse_win_http_x64.rb on lines 566..650

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

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

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

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

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

Refactorings

Further Reading

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

  def get_ecu_name(bus, src_id, dst_id, opt = {})
    packets = get_vehicle_info(bus, src_id, dst_id, 0x0A, opt)
    return "" if packets.nil?
    return "UDS ERR: #{packets['error']}" if packets.key? "error"
    data = response_hash_to_data_array(dst_id.to_s(16), packets)
Severity: Major
Found in lib/msf/core/post/hardware/automotive/uds.rb and 2 other locations - About 55 mins to fix
lib/msf/core/post/hardware/automotive/uds.rb on lines 578..585
lib/msf/core/post/hardware/automotive/uds.rb on lines 596..603

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

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

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

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

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

Refactorings

Further Reading

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

    if defined?(read_stage_size?) && read_stage_size?
      asm << %Q^
      allocate_memory:
        ; read incoming stage size
        push rbx                      ; buffer for stage size
Severity: Major
Found in lib/msf/core/payload/windows/x64/reverse_http_x64.rb and 2 other locations - About 55 mins to fix
lib/msf/core/payload/windows/reverse_http.rb on lines 450..525
lib/msf/core/payload/windows/x64/reverse_win_http_x64.rb on lines 566..650

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

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

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

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

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

Refactorings

Further Reading

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

          ['READ_COILS', { 'Description' => 'Read bits from several coils' } ], # Function Code 1 Read Coils
          ['READ_DISCRETE_INPUTS', { 'Description' => 'Read bits from several DISCRETE INPUTS' } ], # Function Code 2 Read Discrete Inputs
          ['READ_HOLDING_REGISTERS', { 'Description' => 'Read words from several HOLDING registers' } ], # Function Code 3 Read Holding Registers
          ['READ_INPUT_REGISTERS', { 'Description' => 'Read words from several INPUT registers' } ], # Function Code 4 Read Input Registers
          ['WRITE_COIL', { 'Description' => 'Write one bit to a coil' } ],
Severity: Major
Found in modules/auxiliary/scanner/scada/modbusclient.rb and 2 other locations - About 55 mins to fix
modules/auxiliary/cloud/kubernetes/enum_kubernetes.rb on lines 39..47
modules/auxiliary/scanner/misc/dahua_dvr_auth_bypass.rb on lines 29..37

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

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

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

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

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

Refactorings

Further Reading

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

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Oracle DB SQL Injection via SYS.LT.MERGEWORKSPACE',
      'Description'    => %q{
        This module exploits a sql injection flaw in the MERGEWORKSPACE
Severity: Major
Found in modules/auxiliary/sqli/oracle/lt_mergeworkspace.rb and 2 other locations - About 55 mins to fix
modules/auxiliary/sqli/oracle/dbms_export_extension.rb on lines 9..32
modules/auxiliary/sqli/oracle/lt_findricset_cursor.rb on lines 9..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 46.

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

      enc = framework.encoders.create(name)
      if name =~ /unicode/
        enc.datastore.import_options_from_hash({ 'BufferRegister' => 'ESP' })
      else
        enc.datastore.import_options_from_hash({ 'BufferRegister' => 'EDX' })
Severity: Major
Found in modules/exploits/windows/fileformat/xion_m3u_sehbof.rb and 3 other locations - About 55 mins to fix
modules/exploits/windows/fileformat/cyberlink_p2g_bof.rb on lines 61..74
modules/exploits/windows/fileformat/foxit_title_bof.rb on lines 77..90
modules/exploits/windows/ftp/scriptftp_list.rb on lines 119..133

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

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

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

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

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

Refactorings

Further Reading

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

    if defined?(read_stage_size?) && read_stage_size?
      asm << %^
      allocate_memory:
        ; read incoming stage size
        push rbx                      ; buffer for stage size
Severity: Major
Found in lib/msf/core/payload/windows/x64/reverse_win_http_x64.rb and 2 other locations - About 55 mins to fix
lib/msf/core/payload/windows/reverse_http.rb on lines 450..525
lib/msf/core/payload/windows/x64/reverse_http_x64.rb on lines 451..534

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

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

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

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

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

Refactorings

Further Reading

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

  def get_vin(bus, src_id, dst_id, opt = {})
    packets = get_vehicle_info(bus, src_id, dst_id, 0x02, opt)
    return "" if packets.nil?
    return "UDS ERR: #{packets['error']}" if packets.key? "error"
    data = response_hash_to_data_array(dst_id.to_s(16), packets)
Severity: Major
Found in lib/msf/core/post/hardware/automotive/uds.rb and 2 other locations - About 55 mins to fix
lib/msf/core/post/hardware/automotive/uds.rb on lines 596..603
lib/msf/core/post/hardware/automotive/uds.rb on lines 614..621

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

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

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

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

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

Refactorings

Further Reading

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

          ['all', { 'Description' => 'enumerate all resources' }],
          ['version', { 'Description' => 'enumerate version' }],
          ['auth', { 'Description' => 'enumerate auth' }],
          ['namespace', { 'Description' => 'enumerate namespace' }],
          ['namespaces', { 'Description' => 'enumerate namespaces' }],
Severity: Major
Found in modules/auxiliary/cloud/kubernetes/enum_kubernetes.rb and 2 other locations - About 55 mins to fix
modules/auxiliary/scanner/misc/dahua_dvr_auth_bypass.rb on lines 29..37
modules/auxiliary/scanner/scada/modbusclient.rb on lines 28..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

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 on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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 on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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 on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

Severity: Major
Found in modules/exploits/windows/browser/ibm_spss_c1sizer.rb and 11 other locations - About 55 mins to fix
modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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 on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

Severity: Major
Found in modules/exploits/windows/browser/ie_cbutton_uaf.rb and 11 other locations - About 55 mins to fix
modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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

    dll.add_function('CreateMDIWindowA', 'DWORD',[
      ["PCHAR","lpClassName","in"],
      ["PCHAR","lpWindowName","in"],
      ["DWORD","dwStyle","in"],
      ["DWORD","X","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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 on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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 on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

Severity: Major
Found in modules/exploits/windows/browser/ms11_081_option.rb and 11 other locations - About 55 mins to fix
modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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 on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

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

    dll.add_function('CreateMDIWindowW', 'DWORD',[
      ["PWCHAR","lpClassName","in"],
      ["PWCHAR","lpWindowName","in"],
      ["DWORD","dwStyle","in"],
      ["DWORD","X","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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