Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'isVariableDeclaration') #69

Open
manbaum opened this issue Mar 22, 2024 · 1 comment
Labels
bug Something isn't working transpile

Comments

@manbaum
Copy link

manbaum commented Mar 22, 2024

Error raised when deobfuscate main.js file.

main.zip

The console output:

$ webcrack -o crack app/main.js
  webcrack:transforms prepare: started +0ms
  webcrack:transforms prepare: finished with 23537 changes +5s
  webcrack:transforms deobfuscate: started +1ms
  webcrack:deobfuscate String Array: no +0ms
  webcrack:transforms deobfuscate: finished with 0 changes +4s
  webcrack:transforms transpile, unminify: started +0ms
  webcrack:transforms transpile, unminify: finished with 215971 changes +7s
  webcrack:transforms self-defending, debug-protection, jsx, jsx-new: started +1ms
  webcrack:transforms self-defending, debug-protection, jsx, jsx-new: finished with 0 changes +1s
  webcrack:transforms merge-object-assignments: started +1ms
E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\scope\index.js:520
    if (path.isVariableDeclaration()) {
             ^

TypeError: Cannot read properties of undefined (reading 'isVariableDeclaration')
    at Scope.registerBinding (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\scope\index.js:520:14)
    at Object.Function (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\scope\index.js:267:18)
    at NodePath._call (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\path\context.js:46:20)
    at NodePath.call (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\path\context.js:36:17)
    at NodePath.visit (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\path\context.js:82:31)
    at TraversalContext.visitQueue (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\context.js:86:16)
    at TraversalContext.visitSingle (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\context.js:65:19)
    at TraversalContext.visit (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\context.js:109:19)
    at traverseNode (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\traverse-node.js:22:17)
    at NodePath.visit (E:\.nvm\versions\node\v20.11.1\bin\node_modules\webcrack\node_modules\@babel\traverse\lib\path\context.js:88:52)

Node.js v20.11.1
@j4k0xb j4k0xb added the bug Something isn't working label Mar 22, 2024
j4k0xb added a commit that referenced this issue Mar 22, 2024
@j4k0xb
Copy link
Owner

j4k0xb commented Mar 22, 2024

fixed, now temporary parameters are added in the default parameter transform instead of undefined

const d = function (e) {
  let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
  let n = arguments.length > 5 ? arguments[5] : void 0;

->

const d = function (e, t = {}, _param, _param2, _param3, n) {};

can test it in the website, the cli will be released later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transpile
Projects
None yet
Development

No branches or pull requests

2 participants