From 39335190a55951e98980612463c28eee669e47b8 Mon Sep 17 00:00:00 2001 From: rscmbbng Date: Thu, 26 Sep 2013 17:08:17 +0200 Subject: [PATCH] changed map attributions, index.py no longer saves a html copy --- web/index.py | 19 ++++++------------- web/js/bc.js | 10 ++++++---- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/web/index.py b/web/index.py index 959a46b..aee1453 100755 --- a/web/index.py +++ b/web/index.py @@ -6,8 +6,8 @@ GPLv3 - 2013 by psy (epsylon@riseup.net) """ from xml.dom.minidom import parseString import xml.etree.ElementTree as ET + # extract data from a xml file -# try: f = open('data.xml', 'r') f2 = open('data.xml', 'r') xml = ET.parse(f) @@ -50,7 +50,7 @@ for counter in range(0, last_hop+1): unique_country_code_list = set(country_code_list) -x = open('testmap.html','w') + # HTML + JS container output = """ @@ -88,10 +88,9 @@ output = """
>
-

Border Check (BC) allows you to see all the servers you visit while you browse to a specific website.

-

As one surfs the net, data packets are sent from the user's computer to the target server. These data packets go on a journey hopping from server to server, potentially crossing multiple countries, until the packets reach the desired website. In each of the countries that are passed different laws and practices can apply to the data, influencing whether or not authorities can inspect, store or modify that data.

-

In realtime BC lets you know which countries you surf through as you browse the web. Additionally BC will illustrate this process on a world map and (where available) provide you with contextualizing information on that country's laws and practices regarding your data.

-

Currently supporting the following browsers on OSX and Unix systems:
Firefox, Chromium, Chrome, Safari

+

Border Check allows you to retrace your path across the internet's infrastructure, it will map you all the servers you pass while you browse to a specific website.

+ As you surf the net, data packets are sent from your computer to the target server. These data packets go on a journey hopping from server to server, potentially crossing multiple countries and networks, until the packets reach the desired website. In each of the countries different laws and practices can apply to the data, influencing whether or not authorities can inspect, store or modify that data.

+
@@ -110,10 +109,4 @@ output = """ unique_country_code_list = """+str(list(unique_country_code_list))+""" -""" -x.write(output) -x.close -# except: -# output = """ -# loading -# """ +""" \ No newline at end of file diff --git a/web/js/bc.js b/web/js/bc.js index 38beb4a..9de5e3c 100644 --- a/web/js/bc.js +++ b/web/js/bc.js @@ -1,6 +1,8 @@ window.onload = function () { index = 0 - cables = L.tileLayer('http://{s}.tiles.mapbox.com/v3/rllfff.kaart-drie/{z}/{x}/{y}.png') + cables = L.tileLayer('http://{s}.tiles.mapbox.com/v3/rllfff.kaart-drie/{z}/{x}/{y}.png',{ + attribution: 'Cable data: cablemap.info' + }) blank_map = L.tileLayer('http://{s}.tiles.mapbox.com/v3/rllfff.blank-populations/{z}/{x}/{y}.png') osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' @@ -9,8 +11,7 @@ window.onload = function () { minZoom: 2, maxZoom:6, zoomControl:false, - layers: [osm, cables, blank_map] - + layers: [blank_map] }).setView(latlong[index], 3); blank_map.addTo(map) @@ -27,6 +28,7 @@ window.onload = function () { new L.Control.Zoom({ position: 'topright'} ).addTo(map) + new L.Control.Attribution //custom markers: @@ -105,7 +107,7 @@ window.onload = function () { var marker = L.marker([src[0], src[1]],{icon: makeCustomMarker(index)}) var popup = L.Popup({ maxHeight: 50}) - var popupcontent = "

Hop no:"+hop_list[index]+"
Server name:
"+server_name_list[index]+"
Network owner:
"+asn_list[index]+"

" + var popupcontent = "Server name:
"+server_name_list[index]+"
Network owner:
"+asn_list[index]+"

" marker.bindPopup(popupcontent) AddMarkerCluster(marker, index) }