emileaben / django-openipmap Goto Github PK
View Code? Open in Web Editor NEWDjango app for OpenIPMap
License: GNU General Public License v3.0
Django app for OpenIPMap
License: GNU General Public License v3.0
It would be useful to put in states, countries or continents. without having to provide the full city, state, country location.
This might also be useful for guesses
It would be helpfull to add user comments, I have seen hops being incorrectly corrected because the PTR name suggestio a location which is incorrect.
Small text comments would help that a hop is in a location and the PRT is just wrong.
To improve accuracy of the suggestions the code could look at the previous and next hop location, when these are the same and have a confidence above -test say- 50. It's very likely that this current hop is in the same location.
hop4 Amsterdam
hop5 ??
hop6 Amsterdam
Hop5 is likely Amsterdam.
This would mostlikely happen in template/oim/tracemap.html
Use locations in atlas probe database as suggestion for ip address
Have seen several traces in which there are several "?? undefined" locations that get mapped to a city and maybe receive a high confidence as the route is marked in blue.
system guesses are already RTT constrained, due to frontend now calling this new URL:
/openipmap/iprtt?q=|||
What isn't done is to make the crowdsourced info returned by the per-ip call info also geo-constrained.
ie. if somebody put in something that doesn't make sense RTT wise, then don't return it.
sometimes errors/config make hostnames hard to parse, or even to get to.
Examples of things to correct for before analysing host/ip are:
kartal-t3-2-acibadem-t2-1.turktelekom.com.tr.208.212.81.in-addr.arpa (remove in-addr-arpa)
$host ::ffff:130.117.50.133
Host 5.8.2.3.5.7.2.8.f.f.f.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa not found: 3(NXDOMAIN)
$host 130.117.50.133
133.50.117.130.in-addr.arpa domain name pointer be2108.agr22.par01.atlas.cogentco.com.
invalid literal for int() with base 10: '"georesult": "?? London'
Request Method: POST
Request URL: http://localhost:8000/openipmap/bulk-upload/
Django Version: 1.6.6
Exception Type: ValueError
Exception Value:
invalid literal for int() with base 10: '"georesult": "?? London'
Exception Location: /home/vagrant/openipmap/models.py in from_file, line 105
Like storing positive assertions about hostname to loc. mapping it would be useful to capture the same information about wrong guesses. In the UI this should be a separate button, next to OK. All negative suggestions should be ignored on next guess.
See: Leaflet/Leaflet#82
In leaflet it should be possible to draw lines across the dateline (ie. shortest distance between the points). This should be implemented for openipmap traceroute viz. instead of the current default behaviour for leaflet.
Current data exports are raw data of all available data in openipmap, but these are not immediately useful for people wanting to download openipmap data for offline use, because they contain all assertions anybody ever made in the openipmap system about ip to location and hostname to location. Furthermore for ip->location mapping you'd need ip->hostname mapping which is cached in openipmap but not exposed.
A single datafile that has ip->location mappings would solve this.
Steps to do this:
tracemap allows max_probes parameter. Add that to UI
When starting a local vagrant installation with openIPmap an error appears.
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
/home/vagrant/djangoproject/templates/index.html (File does not exist)
shouldn't /home/vagrant/openipmap/templates/idx.html be index.html ?
User interface currently only allows mappings of hostname->location, users should also be able to create IP->location mappings via the UI.
Presently map tiles are accessed via http vs https and yet the actual webpage is always https based.
function init_map() {
map = L.map('map');
var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var mapqUrl='http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg';
//var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib});
var osm = new L.TileLayer(mapqUrl, {attribution: osmAttrib});
map.setView([20, 0], 3);
map.addLayer(osm);
}
The following would be required in order to remove the browser errors when accessing the webpage [1].
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var mapqUrl='https://otile1-s.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg';
Alternately; there could be additional code to select the URL for MapQuest (OpenStreetMap doesn't need code; it just needs less in the url string).
var osmUrl='//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var mapqUrl = (document.location.protocol == 'https:' ?
''//otile1-s.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg''
:
''//otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg'';
There are references to https within the code.
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js'></script>
These could also be removed and just //
used instead.
Finally (and this is being pedantic), the only other reference to http is in a comment:
// sprintf (from http://stackoverflow.com/questions/610406/javascript-equivalent-to-printf-string-format )
Which does not need editing; however also works with https. :)
[1] Found on http://developer.mapquest.com/widget/web/products/open/forums/-/message_boards/view_message/361015
current openipmap prototype doesn't take expression->hostname mappings (ie. regex). Big problem with this is that there is a large potential for large scale error.
i've been thinking of a process like this, to
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.