diff --git a/modules/post/android/manage/remove_lock_root.rb b/modules/post/android/manage/remove_lock_root.rb index f0079e25e2..8f390a61b0 100644 --- a/modules/post/android/manage/remove_lock_root.rb +++ b/modules/post/android/manage/remove_lock_root.rb @@ -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{