From e738b5922d74a823687bac558fb2b54ca47f08a9 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 12 Jan 2016 08:13:29 +0000 Subject: [PATCH 1/2] fix play_youtube to work on Android --- modules/post/multi/manage/play_youtube.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/post/multi/manage/play_youtube.rb b/modules/post/multi/manage/play_youtube.rb index 0c5d85ce3d..3d44dba25c 100644 --- a/modules/post/multi/manage/play_youtube.rb +++ b/modules/post/multi/manage/play_youtube.rb @@ -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 From b58166a9a84f1bbb045c2dccd43472ab57722012 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 18 Feb 2016 20:13:39 -0600 Subject: [PATCH 2/2] add android platform to the hash --- modules/post/multi/manage/play_youtube.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/post/multi/manage/play_youtube.rb b/modules/post/multi/manage/play_youtube.rb index 3d44dba25c..b4b18d615c 100644 --- a/modules/post/multi/manage/play_youtube.rb +++ b/modules/post/multi/manage/play_youtube.rb @@ -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' ] ))