Mapsies | A program to 'automatically' map IP addresses to a geographical map

Mapsies | A program to 'automatically' map IP addresses to a geographical map

Dec 8th 2019

Project: Mapsies

Issue: I needed an easier way to associate malicious IP addresses with their geographic location

Note: Prereqs
clone https://github.com/pieqq/PyGeoIpMap
(& install)
sudo apt install python3-numpy python3-matplotlib libgeos-dev python3-geoip2 python3-mpltoolkits.basemap


#!/bin/bash
attackerip="$(cat /var/log/privoxy/logfile | grep -Eoa '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | tail -1)"
if grep -q $attackerip /tmp/ip.txt; then
echo $attackerip is already on the map. What a azzhowl.
exit 0
else
echo $attackerip >> /tmp/ip.txt
python3 /root/PyGeoIpMap/pygeoipmap.py -i /tmp/ip.txt --service m --db /root/GeoLite2-City_20191203/GeoLite2-City.mmdb -o /var/www/html/
fi
exit 0

View live...while live @ http://167.172.195.178/