File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
modules/post/android/manage Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class Msf::Post < Msf::Module
16
16
require 'msf/core/post/solaris'
17
17
require 'msf/core/post/unix'
18
18
require 'msf/core/post/windows'
19
+ require 'msf/core/post/android'
19
20
20
21
include Msf ::PostMixin
21
22
Original file line number Diff line number Diff line change 4
4
##
5
5
6
6
require 'msf/core'
7
- require 'rex'
8
7
9
8
class Metasploit4 < Msf ::Post
10
9
11
10
include Msf ::Post ::Common
11
+ include Msf ::Post ::Android ::Priv
12
12
13
13
def initialize ( info = { } )
14
14
super ( update_info ( info , {
@@ -28,10 +28,9 @@ def initialize(info={})
28
28
end
29
29
30
30
def run
31
- id = cmd_exec ( 'id' )
32
- unless id =~ /root/
33
- #print_error("This module requires root permissions")
34
- #return
31
+ unless is_root?
32
+ print_error ( "This module requires root permissions." )
33
+ return
35
34
end
36
35
37
36
%W{
You can’t perform that action at this time.
0 commit comments