Zone-H cybercrime archive monitoring telegram bot.
Intended to use only for investigation/research purpose.
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
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:
-
Put the obtained bot token to
token
key as string. -
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. -
Choose Zone-H archive type to monitor:
archive
,special
oronhold
. Write to thearchive
key. -
Write preferred filters to
filters
key:countries
: ISO 3166-1 alpha-2 country codes, e.g["FR", "BR"]
for France and Brazil.domains
: ending parts of domains e.g.[".go.id"]
notifiers
: watch for submissions of specific notifiers.
-
Modify User-Agent headers written in
HEADERS
constant inzoneh/const.py
if needed.
{
"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
}
}
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
Build image and run the container
sudo docker-compose build && sudo docker-compose up
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 |