lmammino / jwt-cracker

Simple HS256, HS384 & HS512 JWT token brute force cracker.
https://lmammino.github.io/jwt-cracker/
MIT License
1.05k stars 165 forks source link

Sintaxis error #2

Closed yhojann-cl closed 7 years ago

yhojann-cl commented 7 years ago
$jwt-cracker "..." "demo" 4

/usr/local/lib/node_modules/jwt-cracker/index.js:49
const [header, payload, signature] = token.split('.');
      ^

SyntaxError: Unexpected token [
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3
lmammino commented 7 years ago

Hey @whk102, You have to use node v 6.0 or higher. the codebase uses some es2015 features that are supported only from node 6 on.

Closing the issue now. Let me know if you have other issues.