Properly check root for remove_lock_root (android post module)

This uses the Msf::Post::Android::Priv mixin.
bug/bundler_fix
wchen-r7 2015-09-08 10:40:08 -05:00
parent d7887b59aa
commit 13afbc4eae
1 changed files with 5 additions and 5 deletions

View File

@ -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{