5 ms·
Show HN: Findpi find raspberry pis on your network faster than NMAP
- jamescampbell 7y agoHello all! I was sick of waiting for the arp / nmap commands to work single-threaded to find the raspberry pi's on my network. Also, arp only works for devices you have seen previously, so you could easily miss things. I posted benchmarks on the readme. Interested in feedback, suggestions, and please pull requests if you want to help improve it. Installs via pip and python 3x only! PS - since I am lazy, it also auto-suggests the network range you are connected to to be the network it searches, so you don't have to type it in.
- jjjbokma 7y agoWhat nmap command exactly did you use? I understand you can change the number of hosts it scans in parallel, see: https://nmap.org/book/man-performance.html https://nmap.org/book/man-performance.html Not a criticism, just curious.
- jamescampbell 7y agoI thought I posted the command in the readme, nmap -sP. Yeah I remember reading about nmap adding parallelization. According to the link you shared: "By default, Nmap calculates an ever-changing ideal parallelism based on network performance". So my benchmarks are based on comparing against that. I don't know why my implementation is faster, but the three tests I performed show that findpi is faster. I guess because I am forcing more threads than nmap's ever-changing ideal is allocating?
- jjjbokma 7y agoYou might want to add `DC:A6:32` to `checker`, see: https://udger.com/resources/mac-address-vendor-detail?name=raspberry_pi_foundation https://udger.com/resources/mac-address-vendor-detail?name=r...
- jamescampbell 7y agoThanks, interesting, I was going off of this, I thought, canonical list: https://gist.github.com/aallan/b4bb86db86079509e6159810ae9bd3e4 https://gist.github.com/aallan/b4bb86db86079509e6159810ae9bd... that only has the one Mac Address on it. I also found a second source to back up the claim that DC:A6:32 should be added as well here: https://dnslytics.com/mac-address-lookup https://dnslytics.com/mac-address-lookup by searching for Raspberry Pi. Thanks for pointing this out!
- jamescampbell 7y agoAh, just found it, https://raspberrypi.stackexchange.com/a/100513/36948 https://raspberrypi.stackexchange.com/a/100513/36948 The Raspberry Pi 4 has the new standard mac address, so findpi would miss that right now! Will fix this and push 1.0.4 release asap.
- jamescampbell 7y agofixed and pushed, 1.0.4 released.
- jjjbokma 7y agoYou're welcome. I recently set up a wireless and headless pi [0] and recalled there where two ranges. [0] http://johnbokma.com/blog/2019/10/17/wireless-headless-raspberry-pi.html http://johnbokma.com/blog/2019/10/17/wireless-headless-raspb...
- jamescampbell 7y agoThat is a great guide as well, most of my setups are headless and wireless. Cheers
- thepapanoob 7y agoi would just use zmap since its not only for such a niche usecase :D
- jamescampbell 7y agonice!