sayem314 / hooman

http interceptor to hoomanize cloudflare requests
https://www.npmjs.com/package/hooman
MIT License
146 stars 18 forks source link

403 on server #2

Closed mursang closed 4 years ago

mursang commented 4 years ago

Hello!

I'm getting 403 on all requests when running my code on a server machine. Tested on Windows server and also Ubuntu 18. Running on mac or windows 10 will get good responses.

const got = require("hooman");

got("https://www.grosbasket.com/")
  .then(response => {
    console.log(response.body);
  })
  .catch(error => {
    console.error(error);
  });

What could make the difference on these scenarios?

Thank you!

sayem314 commented 4 years ago

403 error code is thrown on captcha. Hooman only solves js-challenge (error code 503).

sayem314 commented 4 years ago

hooman now support solving captchas > https://github.com/sayem314/hooman#hcaptcha

mursang commented 4 years ago

Hello, sorry for the delay. I need to reopen this, as I'm not able to run it on my server as I'm always getting 403 with proxies and on my local machine (macOS) I'm getting good responses. Same setup, same proxies. Seems like a trouble at network level or so with Ubuntu.

I'm getting this error on Ubuntu:

HTTPError: Response code 403 (Forbidden)
     at PromisableRequest.<anonymous> (/home/ubuntu/node_modules/got/dist/source/as-promise/index.js:124:28)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5) {
    code: undefined,
    timings: {
      start: 1590571248110,
      socket: 1590571248111,
      lookup: 1590571248111,
      connect: 1590571248111,
      secureConnect: 1590571248111,
      upload: 1590571248112,
      response: 1590571248132,
      end: 1590571248133,
      error: undefined,
      abort: undefined,
      phases: {
        wait: 1,
        dns: 0,
        tcp: 0,
        tls: 0,
        request: 1,
        firstByte: 20,
        download: 1,
        total: 23
      }
    }
}

It's not captcha problem, as I said, on macOS with the same proxy I'm getting a good response.