Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to avoid breaking on a debugger statement in Chrome?

I'm trying to reverse engineer a heavily obfuscated JS and one of the tricks the author does is to continuously call the debugger statement from within an anonymous function:

demo

Unfortunately, I cannot right click and Never pause it, because each time the function is called a new anonymous function is spawned. The only way for me to inspect the code with DevTools open is to toggle the Disable all breakpoints button, but that disables my breakpoints too.

Is there any way to disable exclusively all debugger statements in Chrome?

In case there isnt, what could be done to bypass this anti-tampering trick?

like image 728
emi Avatar asked Dec 29 '18 15:12

emi


1 Answers

Download the offending webworker.js file to your local drive, and use a text editor to replace all occurrences of "debugger" with ";".

Then use a Chrome extension to replace the remote resource with your local modified version.

https://chrome.google.com/webstore/detail/resource-override/pkoacgokdfckfpndoffpifphamojphii?hl=en

FYI: I do not endorse the above extension. It was just the first I found via Google.

like image 79
Reactgular Avatar answered Sep 28 '22 03:09

Reactgular