rapid7/metasploit-framework

View on GitHub
modules/exploits/unix/local/setuid_nmap.rb

Summary

Maintainability
A
2 hrs
Test Coverage

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

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Setuid Nmap Exploit',
Severity: Minor
Found in modules/exploits/unix/local/setuid_nmap.rb - About 1 hr to fix

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

      def exploit
        if (target.arch.include? ARCH_CMD)
          p = payload.encoded.gsub(/([$"])/) { |_m| "\\#{Regexp.last_match(1)}" }
          evil_lua = %{ os.execute("#{p} &") }
        else
    Severity: Minor
    Found in modules/exploits/unix/local/setuid_nmap.rb - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status