rapid7/metasploit-framework

View on GitHub
modules/exploits/osx/local/persistence.rb

Summary

Maintainability
A
2 hrs
Test Coverage

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

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Mac OS X Persistent Payload Installer',
Severity: Minor
Found in modules/exploits/osx/local/persistence.rb - About 1 hr to fix

    Method add_launchctl_item has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def add_launchctl_item
        label = File.basename(backdoor_path)
        cmd_exec("mkdir -p #{File.dirname(plist_path).shellescape}")
        # Note: the OnDemand key is the OSX < 10.4 equivalent of KeepAlive
        item = <<-EOI
    Severity: Minor
    Found in modules/exploits/osx/local/persistence.rb - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status