Skip to content

Commit 50d43f1

Browse files
author
IMcPwn
committed
Make URLs better
Removes YouTube logo, loops, hides video controls at bottom, disables keyboard controls, doesn't show info about the video on the top, hides video annotations, and doesn't show related videos at the end.
1 parent 923d1ef commit 50d43f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/post/multi/manage/play_youtube.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def peer
3838
# The OSX version uses an apple script to do this
3939
#
4040
def osx_start_video(id)
41-
url = "https://youtube.googleapis.com/v/#{id}?fs=1&autoplay=1"
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"
4242
script = ''
4343
script << %Q|osascript -e 'tell application "Safari" to open location "#{url}"' |
4444
script << %Q|-e 'activate application "Safari"' |
@@ -59,7 +59,7 @@ def osx_start_video(id)
5959
def win_start_video(id)
6060
iexplore_path = "C:\\Program Files\\Internet Explorer\\iexplore.exe"
6161
begin
62-
session.sys.process.execute(iexplore_path, "-k http://youtube.com/embed/#{id}?autoplay=1")
62+
session.sys.process.execute(iexplore_path, "-k k http://youtube.com/embed/#{id}?autoplay=1&loop=1&disablekb=1&modestbranding=1&iv_load_policy=3&controls=0&showinfo=0&rel=0")
6363
rescue Rex::Post::Meterpreter::RequestError => e
6464
return false
6565
end
@@ -86,7 +86,7 @@ def linux_start_video(id)
8686
write_file("/tmp/#{profile_name}/prefs.js", s)
8787

8888
# Start the video
89-
url = "https://youtube.googleapis.com/v/#{id}?fs=1&autoplay=1"
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"
9090
data_js = %Q|"data:text/html,<script>window.open('#{url}','','width:100000px;height:100000px');</script>"|
9191
joe = "firefox --display :0 -p #{profile_name} #{data_js} &"
9292
cmd_exec("/bin/sh -c #{joe.shellescape}")

0 commit comments

Comments
 (0)