ping sweeper

I found some code to ping sweep a range of node (other computers) on a network, which bascially does the same as nmap -sP or something called fping.

So this program takes a range of numbers e.g (10,20) and pings each one in turn.

I decided to do several things with this,  firstly keep having to change the program to specifiy what to ping is a pain so i have changed the program to ask for this information.  Using code I have learnt previously for asking for input, checking the input is a number (isdigit).

ping sweep1

This works great,  however as I am also doing things with tkinter I have made a 1/2 graphical version. I say 1/2 graphical as the output is still on the console, for now at least.


The resulting output is similar to the lower 1/2 of this screen shot.


You need to allow for a few quirks, mainly in that if you specify 10, 20 as your range it won’t ping 20, so you need to specify the range 10 , 21,  this is due to the way the for loop works, but you can work round it.

I was going to add code to make sure user puts in a number between 0,255 but the user is told that is the range so there should be no need to.

I will get the code uploaded, ( probably to git hub ) at some point.