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

Error when running jwt-cracker #21

Open
Tr4pSec opened this issue Jan 11, 2023 · 132 comments
Open

Error when running jwt-cracker #21

Tr4pSec opened this issue Jan 11, 2023 · 132 comments

Comments

@Tr4pSec
Copy link

Tr4pSec commented Jan 11, 2023

Running:

sudo jwt-cracker eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbGFnIjoiQlRMe180X0V5ZXN9IiwiaWF0Ijo5MDAwMDAwMCwibmFtZSI6IkdyZWF0RXhwIiwiYWRtaW4iOnRydWV9.jbkZHll_W17BOALT95JQ17glHBj9nY-oWhT1uiahtv8 6

Getting:

file:///usr/local/lib/node_modules/jwt-cracker/index.js:7
const pkg = JSON.parse(await readFile(new URL('./package.json', import.meta.url)))
                       ^^^^^

SyntaxError: Unexpected reserved word
@lmammino
Copy link
Owner

Try to update your version of node to (at least) version 14

@Tr4pSec
Copy link
Author

Tr4pSec commented Jan 11, 2023

updated to version 18.
Running

sudo jwt-cracker "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbGFnIjoiQlRMe180X0V5ZXN9IiwiaWF0Ijo5MDAwMDAwMCwibmFtZSI6IkdyZWF0RXhwIiwiYWRtaW4iOnRydWV9.jbkZHll_W17BOALT95JQ17glHBj9nY-oWhT1uiahtv8"

Throws a lot of erros

node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '/home/max/process-chunk.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.12.1
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '/home/max/process-chunk.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.12.1
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '/home/max/process-chunk.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.12.1
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '/home/max/process-chunk.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.12.1
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '/home/max/process-chunk.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.12.1
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '/home/max/process-chunk.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

@Ldarm
Copy link

Ldarm commented Jan 24, 2023

Same error for me

It searchs the file 'process-chunk.js" where you run jwt-cracker

@lmammino
Copy link
Owner

@Ldarm @Tr4pSec I just drafted a new release (2.1.0) that should solve this problem. Please let me know if it persists!

@Deykun
Copy link

Deykun commented Jan 24, 2023

I have 2.1.0 installed and unfortunately, it still exists.

Node.js v18.7.0
node:internal/modules/cjs/loader:959
  throw err;
  ^

Error: Cannot find module 'C:\C:\Users\stdey\AppData\Roaming\nvm\v18.7.0\node_modules\jwt-cracker\process-chunk.js'
←[90m    at Module._resolveFilename (node:internal/modules/cjs/loader:956:15)←[39m
←[90m    at Module._load (node:internal/modules/cjs/loader:804:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)←[39m
←[90m    at node:internal/main/run_main_module:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}

@lmammino
Copy link
Owner

@Deykun thanks a lot for reporting this.

This seems a slightly different one.

It is now looking into the right place (-ish) as it's looking inside the jwt-cracker project folder (rather than the current working directory) for process-chunk.js.

Still, it's really weird that repeated C:\C:\ at the beginning of your path...

Let me investigate if there's some issue with path in Node.js

@lmammino
Copy link
Owner

@Deykun v 2.2.0 is being published right now and it should address this problem. I don't use windows, so please let me know if the problem persists for you.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@lmammino @Deykun @Tr4pSec @Ldarm and others