GithubHelp home page GithubHelp logo

evyatarmeged / humanoid Goto Github PK

View Code? Open in Web Editor NEW
202.0 5.0 27.0 80 KB

Node.js package to bypass CloudFlare's anti-bot JavaScript challenges

License: MIT License

HTML 31.19% JavaScript 68.81%
bot anti-bot anti-bot-page bypass humanoid bypass-waf scrape scraping web-scraping

humanoid's Introduction

GitHub Statistics

Top Languages

I do stuff with Kubernetes and Go. I also hack for the lolz.

humanoid's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

humanoid's Issues

Bypass pooky.js

Hi I was looking into this github and I was wondering if this could be used to bypass the anti bot detection script on the website:

https://www.supremenewyork.com/shop/all

They use a security system called Pooky.js

and Im not sure if it is a WAF.

(btw they only turn on this anti bot script every thursday at 11 am EST. Because that is when they release their items so they only turn it on at that time.

pooky.min.js.zip

That is the js file that I found in their html page

Example does not work

Installed. Trying to run your example with my own url:

#!/usr/bin/env nodejs

const Humanoid = require("humanoid-js");

let humanoid = new Humanoid();
humanoid.get("https://www.psacard.com/cert/47002793")
.then(res => {
console.log(res.body) // ...
console.log(res.isChallengeSolved);
humanoid.bypassJSChallenge(res);
})
.catch(err => {
console.error(err)
})

Response is the challenge page plus the text below. I do not get the protected page. Any ideas?

false
(node:13573) UnhandledPromiseRejectionWarning: Error: Could not solve or parse JavaScript challenge. Caused due to error:
TypeError: Cannot read property 'length' of null
at Function.solveChallenge (/home/ubuntu/node_modules/humanoid-js/src/solver.js:89:10)
at Humanoid.bypassJSChallenge (/home/ubuntu/node_modules/humanoid-js/index.js:71:30)
at /home/ubuntu/test.js:10:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:13573) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13573) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Setting headers blows out default headers.

headers = headers || this._getRequestHeaders(url);

This line blows out the default header values when passing any header which is probably not expected behavior and it causes humanoid to fail to the cloudflare check, at least in my case. It would be a simple fix to merge objects headers = {...this._getRequestHeaders(url), ...headers}. A temporary/hacky work around for this would be to merge in headers from humanoid._getRequestHeaders(url) before passing them to the request,

empty body

I'm receiving the empty body, CAPTCHA, I do not think there's a solution ..

Could this be used in an Electron project?

Hi,

I'm in dire need of a cloud-flare bypass library, and currently there aren't many out there. This seems to be a good candidate, but I would like to know if it would be possible to use it inside an Electron desktop application.

Thanks !

Basic implementation does not work, cloudflare changed?

My code:

const Humanoid = require('humanoid-js');
const humanoid = new Humanoid();

const res = await humanoid.get(url);

Result is
isSessionChallenged: false,
isChallengeSolved: false,
statusCode: 503

Body contains a challenge which I won't paste here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.