theajack / disable-devtool

Disable web developer tools from the f12 button, right-click and browser menu

Home Page:https://theajack.github.io/disable-devtool/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Just for Discussion] If re-define the console object, currently the tool cannot be practiced as the expected

JerryWenlong opened this issue · comments

Well, this is just for discussion.
The tool is amazing!

I research out that it relaies on the Console object, so here 's an unexpected scenarrio:

(I use Chrome)

The Steps:

  1. Open the browser (Chrome).
  2. Open the dev-tool firstly before we open the website.
  3. Click 'Sources' Tab, find the 'Event Listener Breakpoints' selectors on the right panel.
  4. Checked 'Script' - 'Script First Statement'
  5. Then we inject a scripts in the console drawer like:
Object.defineProperty(window, 'console', {
  value: {
      table: () => {},
      log: () => {},
      clear: () => {},
      debug: () => {},
      warn:() => {}
    }
});
  1. Then unchecked the 'Script' and resume the script running.

Hope we may find a way~

Thank you for your issue, but if the function of disable-devtool takes effect as expected, then others will not have the opportunity to redefine the console in the console.

However, there are still many solutions to bypass the restrictions of disable-devtool, such as disabling js, network packet capture, and using browser plug-ins to inject scripts. This is a limitation of web applications. We can only prevent it as much as possible.

@JerryWenlong