Wednesday, May 21, 2014

Raspberry Pi is really really fun...

Raspberry Pi is really really fun to use.  Really. I keep expanding my list of things to do.

1. Map the network and post results to RabbitMQ queue
2. Install NoSQL datastore (perhaps Redis or MongoDB) to store network info
3. Make an RaspBMC Server (following an XBMC DIY blog post)
4. Create a grid computing system based on nothing but Raspberry Pis, and use the computing power to take over the world!

Okay, I might be getting a little carried away, but it's crazy how many things you can do with the Raspberry Pi!

I continued with the "mapping the network" idea.

This is what I have done so far:

1. Installed RabbitMQ on the Raspberry Pi
2. Created a queue for holding nmap (network mapping program) info
3. Installed Java on the Raspberry Pi
4. Created a Java app that will parse nmap results and can send the results to the RabbitMQ nmap info queue
5. Created a cron job that will run the nmap command, and then execute the Java app
6. Created an Android app that will read from the queue and display the results

I plan to expand the Android app so that it will do something with the info.  One idea is to install OpenAP on a wireless AP hub, and then have the app block specific MAC addresses.  Or perhaps permanently assign specific IPs to certain MAC addresses.  Not sure yet.  Ideas?

Below is a screen shot of the Android app. It shows the OS type based on info that nmap was able to fetch from the machine. The grey WiFi symbol is for a machine that nmap wasn't able to determine the OS type.  Also, nmap wasn't able to recognize the Raspberry Pi, so I added code to check the vendor of the MAC address.  If the vendor name started with "edimax" (Edimax is the manufacturer of the WiFi dongle the Raspberry Pi is using), then I set the OS type to Raspberry Pi. I made a similar assumption for my Samsung phone - which is not shown below, but is displayed using an Android icon. The app is named NetHutch - which doesn't necessarily make sense except that I happen to be pulling network info from RabbitMQ.

I'll create a post with some of the Android code soon. Until then, I will update the app to list the date and times that network mappings were performed on the main screen, and the details of which hosts were found on the next screen.

Here is a wire frame view of what the update will look like (once I get the time to make the changes). I used Evolus Pencil to create the wire frame. The numbers to the right of the date on the first screen will be the number of hosts found.

No comments:

Post a Comment