rapid7/metasploit-framework

View on GitHub
modules/exploits/windows/novell/netiq_pum_eval.rb

Summary

Maintainability
C
1 day
Test Coverage

Method exploit has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def exploit
    data = fake_login

    print_status("Sending fake login request...")
    res = send_request_cgi(
Severity: Major
Found in modules/exploits/windows/novell/netiq_pum_eval.rb - About 5 hrs to fix

    File netiq_pum_eval.rb has 257 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class MetasploitModule < Msf::Exploit::Remote
      Rank = ExcellentRanking
    
      include Msf::Exploit::Remote::HttpServer
      include Msf::Exploit::Remote::HttpClient
    Severity: Minor
    Found in modules/exploits/windows/novell/netiq_pum_eval.rb - About 2 hrs to fix

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

        def initialize(info = {})
          super(
            update_info(
              info,
              'Name' => 'NetIQ Privileged User Manager 2.3.1 ldapagnt_eval() Remote Perl Code Execution',
      Severity: Minor
      Found in modules/exploits/windows/novell/netiq_pum_eval.rb - About 2 hrs to fix

        Method on_new_session has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

          def on_new_session(session)
            if session.type == "meterpreter"
              session.core.use("stdapi") unless session.ext.aliases.include?("stdapi")
            end
        
        
        Severity: Minor
        Found in modules/exploits/windows/novell/netiq_pum_eval.rb - About 55 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

        Method exploit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          def exploit
            data = fake_login
        
            print_status("Sending fake login request...")
            res = send_request_cgi(
        Severity: Minor
        Found in modules/exploits/windows/novell/netiq_pum_eval.rb - About 35 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