Crashed during function evaluate even though no execute directive used
See original GitHub issue/project/dist/modifications/execution/functionExecutor.js:62
const directive = node.body.directives.find((d) => d.rawValue.startsWith('#execute'));
^
TypeError: Cannot read properties of undefined (reading 'find')
at Controller.enter (/project/dist/modifications/execution/functionExecutor.js:62:60)
at Controller.__execute (/project/node_modules/estraverse/estraverse.js:397:31)
at Controller.traverse (/project/node_modules/estraverse/estraverse.js:501:28)
at Object.traverse (/project/node_modules/estraverse/estraverse.js:713:27)
at FunctionExecutor.findExecutedFunctions (/project/dist/modifications/execution/functionExecutor.js:59:27)
at FunctionExecutor.execute (/project/dist/modifications/execution/functionExecutor.js:47:14)
at /project/dist/index.js:59:34
at Array.forEach (<anonymous>)
at Object.deobfuscate (/project/dist/index.js:59:19)
at Object.<anonymous> (/project/dist/run.js:27:24)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Program only crashes as release build -- how to debug?
In debug mode the code in the if is not executed but in release mode p contains an undefined value, which is unlikely...
Read more >Directive Link, $observe, And $watch Functions Execute ...
The link functions. The attribute $observe() handlers. The $scope $watch() handlers. If you make changes to the $scope inside the synchronous ...
Read more >The System is Crashing - Oracle Help Center
The System is Crashing. A Java application may stop running for several reasons. The most common reason is of course that the application...
Read more >My program crashed. How do I find out why?
There's no easy answer to that. Here's what I do, though, when faced with a crash that I just don't understand: Look at...
Read more >Modern C++ best practices for exceptions and error handling
And the Win32 API has the GetLastError function to retrieve the last error that was reported by the call stack. In both of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve added support for proxy function reassignments in https://github.com/ben-sb/javascript-deobfuscator/commit/bd7564db5d87e07bd39d5974cfe4f5f6c3e621b6
Thanks for letting me know, the problem was actually with the shift-spec module not being up to date, I employed a hacky solution to force estraverse to use the up to date spec in https://github.com/ben-sb/javascript-deobfuscator/commit/e8daa25756f3582f38785d1effdf2845038f8c65
Most of my projects nowadays use babel as the AST rather than Shift as it’s more actively developed, at some point I rewrite this repo to use babel to avoid something like this happening again.