Skip to content

Commit eb4c4c9

Browse files
author
Brent Cook
committed
Land rapid7#8587, Add android wakelock command to turn the screen on
2 parents 225629a + a659364 commit eb4c4c9

File tree

1 file changed

+4
-0
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher

1 file changed

+4
-0
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/android.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ def cmd_wakelock(*args)
701701
wakelock_opts = Rex::Parser::Arguments.new(
702702
'-h' => [ false, 'Help Banner' ],
703703
'-r' => [ false, 'Release wakelock' ],
704+
'-w' => [ false, 'Turn screen on' ],
704705
'-f' => [ true, 'Advanced Wakelock flags (e.g 268435456)' ],
705706
)
706707

@@ -713,6 +714,9 @@ def cmd_wakelock(*args)
713714
return
714715
when '-r'
715716
flags = 0
717+
when '-w'
718+
client.android.wakelock(0)
719+
flags = 268435482
716720
when '-f'
717721
flags = val.to_i
718722
end

0 commit comments

Comments
 (0)