rapid7/metasploit-framework

View on GitHub
modules/exploits/windows/browser/ms14_064_ole_code_execution.rb

Summary

Maintainability
D
1 day
Test Coverage

Method vbs_prepare has 148 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def vbs_prepare()
    code = %Q|
dim   aa()
dim   ab()
dim   a0
Severity: Major
Found in modules/exploits/windows/browser/ms14_064_ole_code_execution.rb - About 5 hrs to fix

    File ms14_064_ole_code_execution.rb has 316 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class MetasploitModule < Msf::Exploit::Remote
      Rank = GoodRanking
    
      include Msf::Exploit::Remote::BrowserExploitServer
      include Msf::Exploit::EXE
    Severity: Minor
    Found in modules/exploits/windows/browser/ms14_064_ole_code_execution.rb - About 3 hrs to fix

      Method initialize has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def initialize(info={})
          super(update_info(info,
            'Name'           => "MS14-064 Microsoft Internet Explorer Windows OLE Automation Array Remote Code Execution",
            'Description'    => %q{
              This module exploits the Windows OLE Automation array vulnerability, CVE-2014-6332.
      Severity: Major
      Found in modules/exploits/windows/browser/ms14_064_ole_code_execution.rb - About 2 hrs to fix

        Method vbs_vector has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def vbs_vector(prep)
            vbs_name = "#{Rex::Text.rand_text_alpha(rand(16)+4)}.vbs"
            gif_name = "#{Rex::Text.rand_text_alpha(rand(5)+3)}.gif"
        
            payload_src = "#{gif_name}"
        Severity: Minor
        Found in modules/exploits/windows/browser/ms14_064_ole_code_execution.rb - About 1 hr to fix

          Method on_request_exploit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

            def on_request_exploit(cli, request, target_info)
              if get_target.name.match(OperatingSystems::Match::WINDOWS_7) && !datastore['AllowPowershellPrompt']
                send_not_found(cli)
                return
              end
          Severity: Minor
          Found in modules/exploits/windows/browser/ms14_064_ole_code_execution.rb - About 25 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          There are no issues that match your filters.

          Category
          Status