From e61aec9d3b1f96d34db8dc598cb63f14c386cfde Mon Sep 17 00:00:00 2001 From: linuxnico Date: Fri, 23 Jun 2017 10:08:35 +0200 Subject: [PATCH 1/3] Create divers.md --- divers.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 divers.md diff --git a/divers.md b/divers.md new file mode 100644 index 0000000..1b33097 --- /dev/null +++ b/divers.md @@ -0,0 +1,3 @@ + +config et changement d'ip locator +https://rackerjack.uk/fail2ban-map/ From 44b653fbe52c029393dd3d8c182b8c0dcb2d8125 Mon Sep 17 00:00:00 2001 From: linuxnico Date: Sat, 24 Jun 2017 15:06:40 +0200 Subject: [PATCH 2/3] add GEOIP server telize is out (404) so i choose ip-api.com so longitude is lon and latitude is lat on line 31 --- fail2map.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fail2map.py b/fail2map.py index 0cd7037..6c72db9 100644 --- a/fail2map.py +++ b/fail2map.py @@ -8,7 +8,8 @@ import random JSON_FILE = "places.geojson" -GEOIP_API = "http://www.telize.com/geoip/%s" +GEOIP_API = "http://ip-api.com/json/%s" +#GEOIP_API = "http://www.telize.com/geoip/%s" ----------------- HS 404 error # free IP geolocation usually gives very approximate results # there is a big chance that we get the same place multiple times, so @@ -27,7 +28,7 @@ def find_lat_lng(ipaddr): geo_value = json.loads(req.read()) if len(geo_value) > 0: - point["geometry"]["coordinates"] = [float(geo_value['longitude']), float(geo_value['latitude'])] + point["geometry"]["coordinates"] = [float(geo_value['lon']), float(geo_value['lat'])] point["properties"]["place"] = "{0}, {1}".format(geo_value.get('city', ''), geo_value.get('country', '')) point["properties"]["show_on_map"] = True From 14b8fb0f67529ae376a85f2c0d7228f23c0122fc Mon Sep 17 00:00:00 2001 From: linuxnico Date: Tue, 25 Jul 2017 09:17:37 +0200 Subject: [PATCH 3/3] Update maps.js changement de type de map --- js/maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/maps.js b/js/maps.js index 4157b16..cb4b949 100644 --- a/js/maps.js +++ b/js/maps.js @@ -42,7 +42,7 @@ window.onload = function() { map = L.map('map').setView([23.26, 0], 3); // list of tile providers can be seen here: http://leaflet-extras.github.io/leaflet-providers/preview/ - baseLayer = L.tileLayer.provider('Thunderforest.Landscape', { + baseLayer = L.tileLayer.provider('OpenStreetMap.Mapnik', { //Thunderforest.Landscape', { // write options and credentials here // id: 'MAPBOX_ID', // accessToken: 'MAPBOX_TOKEN'