Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Border-Check/bc.status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
old
1 change: 1 addition & 0 deletions Border-Check/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
then:darwin:F:/Users/then/Library/Application Support/Firefox/Profiles/uqk7h53s.default-1448018543872/places.sqlite
1 change: 1 addition & 0 deletions Border-Check/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<travel>nu.nl<hop>0<host>52.85.201.233</host><hop_ip>194.134.5.68</hop_ip><longitude>4.8995</longitude><latitude>52.3824</latitude><city /><country>Netherlands</country><server_name>bng1-adt67.nl.euro.net</server_name><asn>AS5390 Euronet Communications B.V.</asn><timestamp>1.2</timestamp><country_code>nl</country_code><meta>Connect here XML metadata</meta></hop><hop>1<host>52.85.201.233</host><hop_ip>194.134.161.128</hop_ip><longitude>4.9167</longitude><latitude>52.35</latitude><city>Amsterdam</city><country>Netherlands</country><server_name>No hostname</server_name><asn>AS5390 Euronet Communications B.V.</asn><timestamp>10.6</timestamp><country_code>nl</country_code><meta>Connect here XML metadata</meta></hop><hop>2<host>52.85.201.233</host><hop_ip>194.134.161.225</hop_ip><longitude>4.9167</longitude><latitude>52.35</latitude><city>Amsterdam</city><country>Netherlands</country><server_name>ae0-sdr1-asd8.nl.euro.net</server_name><asn>AS5390 Euronet Communications B.V.</asn><timestamp>9.7</timestamp><country_code>nl</country_code><meta>Connect here XML metadata</meta></hop><hop>3<host>52.85.201.233</host><hop_ip>217.170.18.122</hop_ip><longitude>4.8995</longitude><latitude>52.3824</latitude><city /><country>Netherlands</country><server_name>online-globalswitch.telecity3f.jointtransit.nl</server_name><asn>AS24785 Broadband Hosting B.V</asn><timestamp>9.7</timestamp><country_code>nl</country_code><meta>Connect here XML metadata</meta></hop><hop>4<host>52.85.201.233</host><hop_ip>149.14.141.249</hop_ip><longitude>-0.3667</longitude><latitude>51.5</latitude><city>Southall</city><country>United Kingdom</country><server_name>be4783.agr21.ams03.atlas.cogentco.com</server_name><asn>AS174 Cogent Communications</asn><timestamp>10.7</timestamp><country_code>gb</country_code><meta>Connect here XML metadata</meta></hop><hop>5<host>52.85.201.233</host><hop_ip>130.117.2.242</hop_ip><longitude>8.0</longitude><latitude>47.0</latitude><city /><country>Europe</country><server_name>be2434.ccr41.ams03.atlas.cogentco.com</server_name><asn>AS174 Cogent Communications</asn><timestamp>10.1</timestamp><country_code>eu</country_code><meta>Connect here XML metadata</meta></hop><hop>6<host>52.85.201.233</host><hop_ip>130.117.51.41</hop_ip><longitude>8.0</longitude><latitude>47.0</latitude><city /><country>Europe</country><server_name>be12488.ccr42.lon13.atlas.cogentco.com</server_name><asn>AS174 Cogent Communications</asn><timestamp>9.6</timestamp><country_code>eu</country_code><meta>Connect here XML metadata</meta></hop><hop>7<host>52.85.201.233</host><hop_ip>154.54.60.6</hop_ip><longitude>-97.822</longitude><latitude>37.751</latitude><city /><country>United States</country><server_name>be3487.rcr21.lhr01.atlas.cogentco.com</server_name><asn>AS174 Cogent Communications</asn><timestamp>20.4</timestamp><country_code>us</country_code><meta>Connect here XML metadata</meta></hop><hop>8<host>52.85.201.233</host><hop_ip>149.14.196.218</hop_ip><longitude>37.6156</longitude><latitude>55.7522</latitude><city>Moscow</city><country>Russian Federation</country><server_name>a100-row.demarc.cogentco.com</server_name><asn>AS174 Cogent Communications</asn><timestamp>18.1</timestamp><country_code>ru</country_code><meta>Connect here XML metadata</meta></hop><hop>9<host>52.85.201.233</host><hop_ip>52.95.61.34</hop_ip><longitude>-6.2489</longitude><latitude>53.3331</latitude><city>Dublin</city><country>Ireland</country><server_name>No hostname</server_name><asn /><timestamp>18.5</timestamp><country_code>ie</country_code><meta>Connect here XML metadata</meta></hop><hop>10<host>52.85.201.233</host><hop_ip>52.95.61.53</hop_ip><longitude>-6.2489</longitude><latitude>53.3331</latitude><city>Dublin</city><country>Ireland</country><server_name>No hostname</server_name><asn /><timestamp>29.6</timestamp><country_code>ie</country_code><meta>Connect here XML metadata</meta></hop><hop>11<host>52.85.201.233</host><hop_ip>176.32.106.239</hop_ip><longitude>-6.2489</longitude><latitude>53.3331</latitude><city>Dublin</city><country>Ireland</country><server_name>No hostname</server_name><asn>AS16509 Amazon.com, Inc.</asn><timestamp>27.3</timestamp><country_code>ie</country_code><meta>Connect here XML metadata</meta></hop></travel>
1 change: 1 addition & 0 deletions Border-Check/hostname.submit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://nu.nl
9 changes: 5 additions & 4 deletions Border-Check/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,8 @@ def getURL(self):
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:
Expand Down Expand Up @@ -906,7 +907,7 @@ def wizard(self):
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"
Expand Down Expand Up @@ -1022,9 +1023,9 @@ def run(self, opts=None):
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)
Expand Down
Binary file added Border-Check/main.pyc
Binary file not shown.
Binary file added Border-Check/maps/GeoIPASNum.dat
Binary file not shown.
Binary file added Border-Check/maps/GeoIPASNum.dat.gz
Binary file not shown.
Binary file added Border-Check/maps/GeoLiteCity.dat
Binary file not shown.
Binary file added Border-Check/maps/GeoLiteCity.dat.gz
Binary file not shown.
Binary file added Border-Check/options.pyc
Binary file not shown.
Binary file added Border-Check/web/__init__.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion Border-Check/web/js/bc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function initMap () {
// attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> 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')
Expand Down
Binary file added Border-Check/webserver.pyc
Binary file not shown.
Binary file added Border-Check/xml_exporter.pyc
Binary file not shown.
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
========================

Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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:

Expand All @@ -85,6 +112,10 @@ Normal BC run:

`$ python bc`

**OSX**:

`$ sudo python bc`

Debug mode:

`$ python bc --debug`
Expand Down