Git Product home page Git Product logo

zoneh's Introduction

zoneh

Zone-H cybercrime archive monitoring telegram bot.

zoneh

Disclaimer

Intended to use only for investigation/research purpose.

Installation

Make sure you have Python >= 3.6

clone repo and install dependencies using pip3.

git clone https://github.com/tropicoo/zoneh.git
pip3 install -r requirements.txt

Configuration

First of all you need to create Telegram Bot and obtain its token.

Before starting bot needs to be configured. Configuration is simply stored in JSON format.

Copy default configuration file config-template.json, which comes with default template, to config.json and edit:

{
  "telegram": {
    "token": "",
    "allowed_user_ids": []
  },
  "log_level": "DEBUG",
  "zoneh": {
    "archive": "special",
    "filters": {
      "countries": [],
      "domains": [],
      "notifiers": []
    },
    "rescan_period": 1800,
    "random_ua": true
  }
}

To get things done follow the next steps:

  1. Put the obtained bot token to token key as string.

  2. Find your Telegram user id and put it to allowed_user_ids list as integer value. Multiple ids can be used, just separate them with a comma.

  3. Choose Zone-H archive type to monitor: archive, special or onhold. Write to the archive key.

  4. Write preferred filters to filters key:

    1. countries: ISO 3166-1 alpha-2 country codes, e.g ["FR", "BR"] for France and Brazil.
    2. domains: ending parts of domains e.g. [".go.id"]
    3. notifiers: watch for submissions of specific notifiers.
  5. Modify User-Agent headers written in HEADERS constant in zoneh/const.py if needed.

Example configuration

{
  "telegram": {
    "token": "3468953:ASOPFagAJCdPEZIVALKYhUFPVA",
    "allowed_user_ids": [
      111000111
    ]
  },
  "log_level": "DEBUG",
  "zoneh": {
    "archive": "special",
    "filters": {
      "countries": ["FR", "BR"],
      "domains": [".go.id"],
      "notifiers": ["BrB"]
    },
    "rescan_period": 1800,
    "random_ua": true
  }
}

Usage

Manual run

Simply run and see for welcome message in Telegram client.

Note: This will log the output to the stdout/stderr (your terminal). Closing the terminal will shutdown the bot.

python3 zbot.py

# Or make the script executable by adding 'x' flag
chmod +x zbot.py
./zbot.py

Running by Docker Compose

Build image and run the container

sudo docker-compose build && sudo docker-compose up

Misc

Command Description
/start Show help
/help Show help
/run Start data scraping
/csv Get csv data of gathered records during bot run
/stop Fully terminate the bot

zoneh's People

Contributors

raminat avatar tropicoo avatar

Watchers

 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.