Live data from Hacker News

Show HN: X11 desktop widget that shows location of your network peers on a map

github.com

21–30 of 90 posts

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#21
post #10
post #8

Earlier quoted context omitted.

Basically, any path longer than 256 characters for `mapFilename` would cause a buffer overrun. An unprivileged app could run your app (say, with more privileges), with a very long `HOME` environment path, causing a buffer overflow, and potentially exploit it to use your app's privileges to do more stuff than it was supposed to. Basically, you should never use strcpy and strcat and but use the secure alternatives like…

> (say, with more privileges) Isn't it a moot point if unprivileged app can already run anything with more privileges? In normal operation, connmap requires no special privileges.

Sure, but since there's no enforced standard for how privileges are configured on a system, there's always the possibility that your app to be the only escape ticket.

You can dismiss that possibility of course. But, as a general habit, it's best to use secure alternatives instead of mulling over probabilities every other line.

As a positive side-effect, the change would make your app not crash on systems with long HOME env paths.:)

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#26
post #25
post #24

Neat! This runs fully offline (i.e. without calls to a GeoIP database), right?

Correct! GeoIP database is local.

Nice! Where is it from, and do you know if it incorporates geofeed [1] data for networks that publish it?

[1] https://ipregistry.co/blog/geofeeds

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#27
post #24

Neat! This runs fully offline (i.e. without calls to a GeoIP database), right?

From what I was able to tell looking at the code, yes.

The database is embedded in the program. Specifically, it is this file:

https://github.com/h2337/connmap/blob/master/connmap/resourc...

Presumably generated by the author with this Python script

https://github.com/h2337/connmap/blob/master/tools/get-ip-da...

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#29
post #24

Neat! This runs fully offline (i.e. without calls to a GeoIP database), right?

From what I was able to tell looking at the code, yes. The database is embedded in the program. Specifically, it is this file: https://github.com/h2337/connmap/blob/master/connmap/resourc... Presumably generated by the author with this Python script https://github.com/h2337/connmap/blob/master/tools/get-ip-da...

Ah, cool, this should incorporate location data at least as good as what the networks self-report! (I suspect that these databases, on top of ingesting all geofeed data, do something similar to Wi-Fi positioning, i.e. correlate the IP address of various GPS-enabled devices with their physical location to try and deduce undocumented/non-public allocation patterns.)

Re: Show HN: X11 desktop widget that shows location of your network peers on a map

#30
post #24

Neat! This runs fully offline (i.e. without calls to a GeoIP database), right?

Of course it works fully offline, since then you don't have any network peers to draw on the map.

Localhost has to be somewhere too :)
Post reply on HN