Giter Site home page Giter Site logo

challenger's Introduction

Challenger - Browser fingerprinting and antibot framework

Challenger is a custom express-inspired webserver that you can use to protect your site against bad bots and browser automation. It is not a replacement for a real antibot vendor, and you should look at it like a PoC.

It can let the client solve challenges and fingerprint the TLS client hello that the client sends.

It has 0 dependencies!

Demo

$ npm run demo

Usage

const ChallengerPassive = require('./challenger/custom_server');
const ChallengerActive = require('./challenger');
const challenges = require('./exampleChallenges');

const app = new ChallengerPassive({
  tls: {
    key: ChallengerPassive.loadFile('./example_cert/key.pem'),
    cert: ChallengerPassive.loadFile('./example_cert/cert.pem'),
  },
});

const host = 'localhost';
const port = 8443;

const challenger = new ChallengerActive();
challenger.setupApp(app);

// Register a challenge
// This will flag puppeteer extra
// https://github.com/berstend/puppeteer-extra/issues/407
Challenger.registerChallenge({
  // The weight of the challenge, basically how important it is it be correct
  weight: 10,

  // the code that will be executed on the clientside
  exec: `navigator.plugins.item(4294967296) === navigator.plugins[0]`,

  // this is the expected result. You can do complex stuff here!
  verifier: (res) => res === true,
});

app.get('/', async (req, res) => {
  console.log('New request: /');
  res.send(`You are verified! Your JA3 is: ${req.tls.ja3Hash}`);
});

app.get('/submit', async (req, res) => {
  res.redirect('/');
});

app.start(host, port, (e) =>
  console.log(`Server listening on https://${host}:${port}`)
);

challenger's People

Contributors

wwhtrbbtt avatar

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.