Land #6572, update play_youtube module with android support

This commit is contained in:
Brent Cook 2016-02-18 20:16:58 -06:00
commit 45d1cd5111
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 16 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class Metasploit3 < Msf::Post
},
'License' => MSF_LICENSE,
'Author' => [ 'sinn3r'],
'Platform' => [ 'win', 'osx', 'linux' ],
'Platform' => [ 'win', 'osx', 'linux', 'android' ],
'SessionTypes' => [ 'shell', 'meterpreter' ]
))
@ -94,6 +94,19 @@ class Metasploit3 < Msf::Post
true
end
#
# The Android version is launched via an Intent
#
def android_start_video(id)
intenturl = "intent://youtube.com/watch?v=#{id}&autoplay=1#Intent;scheme=http;action=android.intent.action.VIEW;end"
begin
session.android.activity_start(intenturl)
rescue Rex::Post::Meterpreter::RequestError => e
return false
end
true
end
def start_video(id)
case session.platform
when /osx/
@ -102,6 +115,8 @@ class Metasploit3 < Msf::Post
win_start_video(id)
when /linux/
linux_start_video(id)
when /android/
android_start_video(id)
end
end