Git Product home page Git Product logo

huntrbot's Introduction

HuntrBot

WhatsApp bot for huntr.dev bug notification


Huntr.dev is a platform to find and fix opensource vulnerabilities, you could login with your GitHub account, choose a program and start fixing. HuntrBot is a WhatsApp bot which checks for new submissions added to huntr platform.

Made using Twilio API for Whatsapp and Flask framework for python, hosted on heroku.

You can either use the app hosted on Heroku(https://huntr-bot.herokuapp.com/), or clone the repo and host it somewhere else. You will need a Twilio account and an active WhatsApp sandbox for the bot to work.

Usage:

Currently it's configured for only two functions:

  • all - returns all the bugs/vulnerable packages currently active.
  • new - returns only the new submission made in that current day.

Setup:

  • Connect your whatsapp to Twilio WhatsApp sandbox: From your Twilio Console, select Programmable Messaging, then click on "Try it Out" and finally click on Try WhatsApp. The WhatsApp sandbox page will show you the sandbox number assigned to your account, and a join code.

  • To enable the WhatsApp sandbox for your smartphone send a WhatsApp message with the given code to the number assigned to your account. The code is going to begin with the word join, followed by a randomly generated two-word phrase. Shortly after you send the message you should receive a reply from Twilio indicating that your mobile number is connected to the sandbox and can start sending and receiving messages.

  • In order to deploy the flask app to heroku, here's a article https://devcenter.heroku.com/articles/git

  • After generating a public app URL, bo back to the Twilio Console, click on Programmable Messaging, then on Settings, and finally on WhatsApp Sandbox Settings. Copy the https:// URL from the Heroku app and then paste it on the “When a message comes in” field and append /bot endpoint. Make sure the request method is set to HTTP Post.

If you are running the bot locally,

$ python bot.py
 * Serving Flask app "bot" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Happy Hunting!

✨🍰

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.