XielQs / httptoolkit-pro-patcher

Basic program that patches pro version to HTTP Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is this user error or a patcher issue?

tkirkland opened this issue · comments

file:///home/me/Downloads/HttpToolkit-linux-x64-1.18.1/httptoolkit:1
ELF
^

SyntaxError: Invalid or unexpected token
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
at callTranslator (node:internal/modules/esm/loader:279:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
at async link (node:internal/modules/esm/module_job:78:21)

Node.js v20.12.2

commented

Most likely a user error, have you tried reinstalling HTTP Toolkit?

Yep. Twice. Here are my steps:

From the httptoolkit site, I grab this is the zip:
image
image
Then, I unzip. After unzipping, I clone this repo.
image
Then, change dir to the patcher dir:
image
According to your instructions, run 'npm install':

npm install
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 40 packages, and audited 41 packages in 3s

(no download is required as the packages are cached.)

~/Downloads/httptoolkit-pro-patcher$ node . patch
[-] HTTP Toolkit not found

image
If I explicitly specify the path to the Linux httptoolkit binary, I get the error.

node /home/me/Downloads/httptoolkit/httptoolkit patch
file:///home/me/Downloads/httptoolkit/httptoolkit:1
ELF
^

SyntaxError: Invalid or unexpected token
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
    at callTranslator (node:internal/modules/esm/loader:279:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
    at async link (node:internal/modules/esm/module_job:78:21)

Node.js v20.12.2
commented

hmm maybe the portable version has a different code inside of it, i will try to fix it!!

commented

Yep. Twice. Here are my steps:

From the httptoolkit site, I grab this is the zip: image image Then, I unzip. After unzipping, I clone this repo. image Then, change dir to the patcher dir: image According to your instructions, run 'npm install':

npm install
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 40 packages, and audited 41 packages in 3s

(no download is required as the packages are cached.)

~/Downloads/httptoolkit-pro-patcher$ node . patch
[-] HTTP Toolkit not found

image If I explicitly specify the path to the Linux httptoolkit binary, I get the error.

node /home/me/Downloads/httptoolkit/httptoolkit patch
file:///home/me/Downloads/httptoolkit/httptoolkit:1
ELF
^

SyntaxError: Invalid or unexpected token
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
    at callTranslator (node:internal/modules/esm/loader:279:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)
    at async link (node:internal/modules/esm/module_job:78:21)

Node.js v20.12.2

Oh i understood now, you need to start the patcher not the httptoolkit itself!

commented

so run this in patcher node . patch --path ~/Downloads/httptoolkit (or where is your httptoolkit installation)

image

So, in this example, you are stating that I should cd to the patcher directory, then run either of the following:
image
Point directly to the executable...

or

image
Point to the directory that the binary is in...

If I understand you correctly, both of these commands result in:
image

Does this mean that it isn't finding the binary executable or the bytes to patch inside the executable?

commented

you need to re-clone the repo (or use git pull) then specify the httptoolkit folder not the binary

okay, I try now

image
Works!