fix play_youtube to work on Android

bug/bundler_fix
Tim 2016-01-12 08:13:29 +00:00
parent e8cc818126
commit e738b5922d
1 changed files with 15 additions and 0 deletions

View File

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