Do you have many Raspberry Pi’s on your network, with DHCP (dynamic IP addresses)?
If so – then I have a script for you!
I have put together a python script that will scan your network for Raspberry Pi’s and then try and connect to them via SSH.
So not only can you find your Raspberry Pi’s, but you can confirm that any on the network have changed the default password!
This code uses several python libraries not installed by default, so you will need to get them installed before this will run.
sudo pip install pexpect
sudo pip install python-nmap
sudo pip install
sudo apt-get install libjpeg-dev
sudo apt-get install python-dev
I may have missed some, so please let me know if you get any errors!
Here is a quick video showing it scanning my home network:
Here is the code that makes this all work:
Special thanks goes to Keith Ellis from the Ipswich Makerspace (https://www.facebook.com/groups/ipswichhackspace/) for the code that got me started with this project!