10000 GitHub - hibare/VT-IP-Monitor: IP monitor script using VT API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jul 2, 2023. It is now read-only.

hibare/VT-IP-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IP Monitor

A Python 3 script to monitor your IP for malicious domains/URL.

Script uses VT API to do the IP lookups and PDNS. Notification is sent via Slack.

Dependencies

Scripts require following modules to function.

  1. requests
  2. python-decouple

Execution

There are three ways to run this script.

  1. Run directly on host
  2. Run in a docker container
  3. Run using tasker

Run directly on host

Install all dependencies using following command.

python3 pip install -r requirements.txt

Rename file .env.example to .env (under src).

Populate enviroment variables memntioned in .env

Navigate to src and execute the script as follow.

python3 VT_IP_Monitor.py

OR

Schedule the script execution using cron. Edit crontab file using command crontab -e and add following line at the end of the file.

0 */12 * * * python3 <path_to_src>/src/VT_IP_Monitor.py

This runs the script every 1 hour.

To periodically check for popular downloads, schedule the script using cron.

Run in docker container

Pull the latest docker image from Docker Hub using following command.

docker pull hibare/vt_ip_monitor

Alternatively, you can build the docker image using following command.

docker build --rm -t vt_ip_monitor . --no-cache

Create following file.

  1. env

Populate the first file (env) with following values.

VT_API_KEY=<YOUR_VALUE>
IP_TO_MONITOR=<YOUR_VALUE>
VT_ENDPOINT=<YOUR_VALUE>
VT_LOCAL_SETTINGS_FILE=<YOUR_VALUE>
SLACK_ENDPOINT=<YOUR_VALUE>
PRESENT_RESOLUTIONS=<YOUR_VALUE>

Run the container using following command.

docker run -d -v $PWD/.env:/app/.env hibare/vt_ip_monitor:latest

Run using tasker

tasker is a docker image to schedule the execution of the containers. Its kind of cron for docker container execution.

Rename file .env.example to .env (under src).

Populate enviroment variables memntioned in .env

Replace <absolute path to src> with absolute path to the src directory in file docker-compose.yml.

Start stack using following command.

docker-compose up

❗ All cron jobs are scheduled to run every 1 hour.

About

IP monitor script using VT API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0