Use constant for play options

bug/bundler_fix
jvazquez-r7 2015-01-19 12:50:34 -06:00
parent 652400451e
commit 79a24f80b8
1 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,8 @@ class Metasploit3 < Msf::Post
include Msf::Post::File
PLAY_OPTIONS = 'sautoplay=1&loop=1&disablekb=1&modestbranding=1&iv_load_policy=3&controls=0&showinfo=0&rel=0'
def initialize(info={})
super( update_info( info,
'Name' => 'Multi Manage YouTube Broadcast',
@ -38,7 +40,7 @@ class Metasploit3 < Msf::Post
# The OSX version uses an apple script to do this
#
def osx_start_video(id)
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"
url = "https://youtube.googleapis.com/v/#{id}?fs=1&#{PLAY_OPTIONS}"
script = ''
script << %Q|osascript -e 'tell application "Safari" to open location "#{url}"' |
script << %Q|-e 'activate application "Safari"' |
@ -59,7 +61,7 @@ class Metasploit3 < Msf::Post
def win_start_video(id)
iexplore_path = "C:\\Program Files\\Internet Explorer\\iexplore.exe"
begin
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")
session.sys.process.execute(iexplore_path, "-k http://youtube.com/embed/#{id}?#{PLAY_OPTIONS}")
rescue Rex::Post::Meterpreter::RequestError => e
return false
end
@ -86,7 +88,7 @@ class Metasploit3 < Msf::Post
write_file("/tmp/#{profile_name}/prefs.js", s)
# Start the video
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"
url = "https://youtube.googleapis.com/v/#{id}?fs=1&#{PLAY_OPTIONS}"
data_js = %Q|"data:text/html,<script>window.open('#{url}','','width:100000px;height:100000px');</script>"|
joe = "firefox --display :0 -p #{profile_name} #{data_js} &"
cmd_exec("/bin/sh -c #{joe.shellescape}")