Properly check root for remove_lock_root (android post module)
This uses the Msf::Post::Android::Priv mixin.bug/bundler_fix
parent
d7887b59aa
commit
13afbc4eae
|
@ -4,11 +4,12 @@
|
|||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'rex'
|
||||
require 'msf/core/post/android'
|
||||
|
||||
class Metasploit4 < Msf::Post
|
||||
|
||||
include Msf::Post::Common
|
||||
include Msf::Post::Android::Priv
|
||||
|
||||
def initialize(info={})
|
||||
super( update_info( info, {
|
||||
|
@ -28,10 +29,9 @@ class Metasploit4 < Msf::Post
|
|||
end
|
||||
|
||||
def run
|
||||
id = cmd_exec('id')
|
||||
unless id =~ /root/
|
||||
#print_error("This module requires root permissions")
|
||||
#return
|
||||
unless is_root?
|
||||
print_error("This module requires root permissions.")
|
||||
return
|
||||
end
|
||||
|
||||
%W{
|
||||
|
|
Loading…
Reference in New Issue