diff --git a/Border-Check/bc.status b/Border-Check/bc.status new file mode 100644 index 0000000..489ce0f --- /dev/null +++ b/Border-Check/bc.status @@ -0,0 +1 @@ +old \ No newline at end of file diff --git a/Border-Check/config.py b/Border-Check/config.py new file mode 100644 index 0000000..f6d44d3 --- /dev/null +++ b/Border-Check/config.py @@ -0,0 +1 @@ +then:darwin:F:/Users/then/Library/Application Support/Firefox/Profiles/uqk7h53s.default-1448018543872/places.sqlite \ No newline at end of file diff --git a/Border-Check/data.xml b/Border-Check/data.xml new file mode 100644 index 0000000..1a69a9e --- /dev/null +++ b/Border-Check/data.xml @@ -0,0 +1 @@ +nu.nl052.85.201.233194.134.5.684.899552.3824Netherlandsbng1-adt67.nl.euro.netAS5390 Euronet Communications B.V.1.2nlConnect here XML metadata152.85.201.233194.134.161.1284.916752.35AmsterdamNetherlandsNo hostnameAS5390 Euronet Communications B.V.10.6nlConnect here XML metadata252.85.201.233194.134.161.2254.916752.35AmsterdamNetherlandsae0-sdr1-asd8.nl.euro.netAS5390 Euronet Communications B.V.9.7nlConnect here XML metadata352.85.201.233217.170.18.1224.899552.3824Netherlandsonline-globalswitch.telecity3f.jointtransit.nlAS24785 Broadband Hosting B.V9.7nlConnect here XML metadata452.85.201.233149.14.141.249-0.366751.5SouthallUnited Kingdombe4783.agr21.ams03.atlas.cogentco.comAS174 Cogent Communications10.7gbConnect here XML metadata552.85.201.233130.117.2.2428.047.0Europebe2434.ccr41.ams03.atlas.cogentco.comAS174 Cogent Communications10.1euConnect here XML metadata652.85.201.233130.117.51.418.047.0Europebe12488.ccr42.lon13.atlas.cogentco.comAS174 Cogent Communications9.6euConnect here XML metadata752.85.201.233154.54.60.6-97.82237.751United Statesbe3487.rcr21.lhr01.atlas.cogentco.comAS174 Cogent Communications20.4usConnect here XML metadata852.85.201.233149.14.196.21837.615655.7522MoscowRussian Federationa100-row.demarc.cogentco.comAS174 Cogent Communications18.1ruConnect here XML metadata952.85.201.23352.95.61.34-6.248953.3331DublinIrelandNo hostname18.5ieConnect here XML metadata1052.85.201.23352.95.61.53-6.248953.3331DublinIrelandNo hostname29.6ieConnect here XML metadata1152.85.201.233176.32.106.239-6.248953.3331DublinIrelandNo hostnameAS16509 Amazon.com, Inc.27.3ieConnect here XML metadata \ No newline at end of file diff --git a/Border-Check/hostname.submit b/Border-Check/hostname.submit new file mode 100644 index 0000000..f10b68f --- /dev/null +++ b/Border-Check/hostname.submit @@ -0,0 +1 @@ +http://nu.nl \ No newline at end of file diff --git a/Border-Check/main.py b/Border-Check/main.py index b75c4e2..6ef6442 100755 --- a/Border-Check/main.py +++ b/Border-Check/main.py @@ -506,7 +506,8 @@ class bc(object): self.url=url[0] else: # starting a hostname.submit with a default value (ex: http://bordercheck.org) - bc = "http://bordercheck.org" + # EDIT: website is down, so make the page/script hang/lag/break + bc = "http://nu.nl" if self.options.debug >= 1: print "hostname.submit not found..." with open('hostname.submit', 'w') as fout: @@ -906,7 +907,7 @@ class bc(object): lib_biplist_required = True print "\nChecking for correct version of lft required..." proc = subprocess.check_output([self.options.lft_path+' -v'], stderr=subprocess.STDOUT, shell=True) - if "3.73" in proc: + if "3.79" in proc: #EDIT > cheated lft version check print "\n+ Is correct lft (~3.73v) version installed?... YES" else: print "\n+ Is correct lft (~3.73v) version installed?... NO" @@ -1022,9 +1023,9 @@ class bc(object): options = self.options if self.options.lft_path == None: try: - self.options.lft_path = "./bin/lft.linux" # try patched lft + self.options.lft_path = "/usr/local/bin/lft" # try lft from system except: - self.options.lft_path = "/usr/local/bin/lft" # try lft from system + self.options.lft_path = "/usr/local/bin/lft" # try lft from system p = self.optionParser # banner print('='*75) diff --git a/Border-Check/main.pyc b/Border-Check/main.pyc new file mode 100644 index 0000000..4e4bb6e Binary files /dev/null and b/Border-Check/main.pyc differ diff --git a/Border-Check/maps/GeoIPASNum.dat b/Border-Check/maps/GeoIPASNum.dat new file mode 100644 index 0000000..85c2cb3 Binary files /dev/null and b/Border-Check/maps/GeoIPASNum.dat differ diff --git a/Border-Check/maps/GeoIPASNum.dat.gz b/Border-Check/maps/GeoIPASNum.dat.gz new file mode 100644 index 0000000..757cb32 Binary files /dev/null and b/Border-Check/maps/GeoIPASNum.dat.gz differ diff --git a/Border-Check/maps/GeoLiteCity.dat b/Border-Check/maps/GeoLiteCity.dat new file mode 100644 index 0000000..1adb8c3 Binary files /dev/null and b/Border-Check/maps/GeoLiteCity.dat differ diff --git a/Border-Check/maps/GeoLiteCity.dat.gz b/Border-Check/maps/GeoLiteCity.dat.gz new file mode 100644 index 0000000..6550ebb Binary files /dev/null and b/Border-Check/maps/GeoLiteCity.dat.gz differ diff --git a/Border-Check/options.pyc b/Border-Check/options.pyc new file mode 100644 index 0000000..7106faa Binary files /dev/null and b/Border-Check/options.pyc differ diff --git a/Border-Check/web/__init__.pyc b/Border-Check/web/__init__.pyc new file mode 100644 index 0000000..0309139 Binary files /dev/null and b/Border-Check/web/__init__.pyc differ diff --git a/Border-Check/web/js/bc.js b/Border-Check/web/js/bc.js index d2d226e..7361d3a 100644 --- a/Border-Check/web/js/bc.js +++ b/Border-Check/web/js/bc.js @@ -11,7 +11,7 @@ function initMap () { // attribution: '© OpenStreetMap contributors' // }) // osm_quest = L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png') - osm_sat = L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png') + osm_sat = L.tileLayer('https://a.tile.openstreetmap.org/{z}/{x}/{y}.png') // streets = L.tileLayer('http://api.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoicmxsZmZmIiwiYSI6IkZyVmt4bUUifQ.R--ZDzdb-672Dx1E3suO9A') // light = L.tileLayer('http://api.tiles.mapbox.com/v4/mapbox.light/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoicmxsZmZmIiwiYSI6IkZyVmt4bUUifQ.R--ZDzdb-672Dx1E3suO9A') dark = L.tileLayer('http://api.tiles.mapbox.com/v4/mapbox.dark/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoicmxsZmZmIiwiYSI6IkZyVmt4bUUifQ.R--ZDzdb-672Dx1E3suO9A') diff --git a/Border-Check/webserver.pyc b/Border-Check/webserver.pyc new file mode 100644 index 0000000..8a49235 Binary files /dev/null and b/Border-Check/webserver.pyc differ diff --git a/Border-Check/xml_exporter.pyc b/Border-Check/xml_exporter.pyc new file mode 100644 index 0000000..865597c Binary files /dev/null and b/Border-Check/xml_exporter.pyc differ diff --git a/README.md b/README.md index e19b49d..eebf28d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ +Border Check v0.2018 - 2018 +======================== + +CHANGES: +* made code work again in 2018 on OSX 10.10.2 +* links to resources updated (bordercheck.org, GeoIP databases) +* various OSX specific instructions added to readme. +* corrected broken OSM tile server [link](https://wiki.openstreetmap.org/wiki/Tile_servers) (mapbox blank map is broken). +* added legacy geoip databases (needs updating) + + + Border Check v0.2 - 2015 ======================== @@ -24,6 +36,7 @@ Border Check has the following dependencies: ### Python: +* [libpcap](https://pypi.org/project/libpcap/) * [pygeoip](https://pypi.python.org/pypi/pygeoip/0.2.7) * [lxml](https://pypi.python.org/pypi/lxml/3.2.3) * [biplist](https://pypi.python.org/pypi/biplist/0.5) (if you plan to use Safari) @@ -32,9 +45,10 @@ For **Debian**-based systems (ex: Ubuntu), first run: `sudo apt-get install python-pip` to install [pip](https://pypi.python.org/pypi/pip/), python's super usefull package manager. -If you already have pip: `pip install lxml` and `pip install pygeoip` +If you already have pip: `pip install lxml` and `pip install pygeoip`. + +On **OSX** it's recommended you install [Homebrew](http://brew.sh/) first and use that to get [python + pip + easy_install](https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python). -On **OSX** it's recommended you install [Homebrew](http://brew.sh/) first and use that to get [python + pip](https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python). ### LFT @@ -45,7 +59,8 @@ On **Debian** and **Ubuntu** it needs to be built from source and requires libpc To make this process more easy, BC (v0.2 2015) provides you a binary with the source. It is called `lft.linux` and is on folder `bin`. -On **OSX** you can use Homebrew: `brew install lft` which will automatically download and build the package. +On **OSX** you can use Homebrew: `brew install lft` which will automatically download and build the package. +(to install python-libpcap on **OSX**: `sudo easy_install pypcap` (and maybe: sudo easy_install pycap ....needs testing!)) #### Note on provided LFT binary @@ -60,6 +75,18 @@ BC will automatically unpack the newest geoip databases on the first run. Javascript mapping libraries are included in the package. +If not (for example on OSX 10.10.2), manually install the GeoIP databases: + +Download the Binary / gzip legacy maps via http://dev.maxmind.com/geoip/legacy/geolite/ or below: + +[direct link GeoLiteCity](http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz) + +[direct link GeoLiteASN](http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz) + +Unpack the databses in the folder `maps`, so the path is `Border-Check/maps/GeoIPASNum.dat` and `Border-Check/maps/GeoLiteCity.dat` + + + ## Options and features: @@ -85,6 +112,10 @@ Normal BC run: `$ python bc` +**OSX**: + +`$ sudo python bc` + Debug mode: `$ python bc --debug`