@@ -9,6 +9,8 @@ class Metasploit3 < Msf::Post
9
9
10
10
include Msf ::Post ::File
11
11
12
+ PLAY_OPTIONS = 'sautoplay=1&loop=1&disablekb=1&modestbranding=1&iv_load_policy=3&controls=0&showinfo=0&rel=0'
13
+
12
14
def initialize ( info = { } )
13
15
super ( update_info ( info ,
14
16
'Name' => 'Multi Manage YouTube Broadcast' ,
@@ -38,7 +40,7 @@ def peer
38
40
# The OSX version uses an apple script to do this
39
41
#
40
42
def osx_start_video ( id )
41
- url = "https://youtube.googleapis.com/v/#{ id } ?fs=1&autoplay=1&loop=1&disablekb=1&modestbranding=1&iv_load_policy=3&controls=0&showinfo=0&rel=0 "
43
+ url = "https://youtube.googleapis.com/v/#{ id } ?fs=1&#{ PLAY_OPTIONS } "
42
44
script = ''
43
45
script << %Q|osascript -e 'tell application "Safari" to open location "#{ url } "' |
44
46
script << %Q|-e 'activate application "Safari"' |
@@ -59,7 +61,7 @@ def osx_start_video(id)
59
61
def win_start_video ( id )
60
62
iexplore_path = "C:\\ Program Files\\ Internet Explorer\\ iexplore.exe"
61
63
begin
62
- session . sys . process . execute ( iexplore_path , "-k http://youtube.com/embed/#{ id } ?autoplay=1&loop=1&disablekb=1&modestbranding=1&iv_load_policy=3&controls=0&showinfo=0&rel=0 " )
64
+ session . sys . process . execute ( iexplore_path , "-k http://youtube.com/embed/#{ id } ?#{ PLAY_OPTIONS } " )
63
65
rescue Rex ::Post ::Meterpreter ::RequestError => e
64
66
return false
65
67
end
@@ -86,7 +88,7 @@ def linux_start_video(id)
86
88
write_file ( "/tmp/#{ profile_name } /prefs.js" , s )
87
89
88
90
# Start the video
89
- url = "https://youtube.googleapis.com/v/#{ id } ?fs=1&autoplay=1&loop=1&disablekb=1&modestbranding=1&iv_load_policy=3&controls=0&showinfo=0&rel=0 "
91
+ url = "https://youtube.googleapis.com/v/#{ id } ?fs=1&#{ PLAY_OPTIONS } "
90
92
data_js = %Q|"data:text/html,<script>window.open('#{ url } ','','width:100000px;height:100000px');</script>"|
91
93
joe = "firefox --display :0 -p #{ profile_name } #{ data_js } &"
92
94
cmd_exec ( "/bin/sh -c #{ joe . shellescape } " )
0 commit comments