Stops most (not all) anti-debugging implementations by JavaScript obfuscators and stops the console logs from being automatically cleared.
< Părere la script-ul Anti Anti-debugger
Thanks I haven't noticed this script giving any bugs on any websites though...
I tried the codes below, and the include error was fixed, but then I ran into another problem
Bug 1 Fix:
// Change this line:
if (callerContent.includes(/\bdebugger\b/gi)) {
// To this:
if (typeof callerContent === 'string' && callerContent.includes('debugger')) {
Bug 2 Fix:
// Add this code after line 24:
const _Function = unsafeWindow.Function;
unsafeWindow.Function = function() {
if (arguments[0] && arguments[0].includes('debugger')) {
return function() {};
}
return _Function.apply(this, arguments);
};
[BUG] There are some bugs that affect usage
the demo page is here
(I'm sorry but I couldn't beautify my issue content because most HTML style is not allowed in GF)
Steps to reproduce
Bug is caused by
Line 32
if (callerContent.includes(/\bdebugger\b/gi)) { //Eliminate all debugger statements from the caller, if anyAs the MDN Web Docs said,String.prototype.includes is not allowed to pass an argument which is a RegExp. It should be considered to use other ways to do this.Importance
This bug affects some normal app logic in some website.
Steps to reproduce
Function('debugger')/* No "new" keyword is used*/Bug is caused by
The script overrided
Function.prototype.constructorbut keptFunctionitself.How to fix (my personal opinion)
override
FunctionExample
the demo page is here. Learn more by opening DevTools on that page.