close

Privacy guaranteed - Your email is not shared with anyone.

Ping Multiple Nics Simultaneously

Discussion in 'Tech Talk' started by Highspeedlane, Jul 22, 2011.

  1. Highspeedlane

    Highspeedlane NRA Life Member

    3,345
    3
    Jan 25, 2008
    New England
    I've been meaning to ask this for a while so figured I would while I have it in mind.

    I have a Windows 2003/XP based network with about 40 managed PC's. Monthly I have to use eEye Retina to do a vulnerability scan and upchannel/remediate the findings.

    The problem is, if I run the scan and a user has shut down the PC, Retina is denied access and I then I have to track down the offending PC and have it powered up, then re-scan.

    Is there a script or command line argument that would allow me to ping a range of PC's either by name or IP range?

    This way I can find the offending PC and power it up before running the initial scan (I can't deny users the right to power down, btw, just would rather they not do it inadvertently).

    Thanks.
     
  2. HerrGlock

    HerrGlock Scouts Out CLM

    23,792
    198
    Dec 28, 2000
    http://nmap.org/book/inst-windows.html

    If you use a Mac or any *NIX machine as your checker-outer machine it would be simple to just script the thing, something like

    Code:
     for ((i=0;i<255;i+=1)); do
         if ping -a -t 1 192.168.0.$i > /dev/null; then
     echo "Success: 192.168.0.$i"
       else
           echo -n "*"
       fi
    done
    Yeah, there are a thousand ways to do it and that's a real painful one of them but it would work.
     

  3. BobbyT

    BobbyT

    1,817
    2
    Jul 27, 2008
    Are they laptops, or desktops with fixed connections?

    You could use Wake-on-LAN to bring any sleepers up, run your software, then even put them back to sleep / shutdown if you want.
     
  4. tous

    tous GET A ROPE!

    31,772
    28,498
    Jan 7, 2001
    Plano, Texas, Republic of
    nmap is a great utility and there is a Windows version with a GUI (Zenmap) for those that are a-skeered of a shell. For Windows it can be scripted with PowerShell.

    HerrGlock, your if ... else ... fi don't line up. :tease:
     
  5. Angry IP Scanner is a nice open source utility that scans a range of IP addresses. Binaries available for Win/Mac/Linux.

    http://www.angryip.org/w/Home

    [​IMG]
     
  6. Highspeedlane

    Highspeedlane NRA Life Member

    3,345
    3
    Jan 25, 2008
    New England
    Thanks everyone for the recommendations. Definitely given me something to go on.

    Appreciate it.
     
  7. Linux3

    Linux3

    1,399
    0
    Dec 31, 2008
    create a text file with the ip addresses;
    vi iplist.txt
    192.168.3.0
    192.168.3.1
    and whatever else you have.
    Sure it takes a little time but saves in the end.

    Then a script ping.sh

    for i in cat `cat ./iplist.txt`;do #Note those are back ticks
    fping $i |grep unreachable
    done
     
  8. HerrGlock

    HerrGlock Scouts Out CLM

    23,792
    198
    Dec 28, 2000
    Yeah, yeah, yeah. I pulled it out of a longer script. I'm just happy it didn't look a lot more horrible.
     
  9. tous

    tous GET A ROPE!

    31,772
    28,498
    Jan 7, 2001
    Plano, Texas, Republic of
    Vestal Virgins appreciate neatness.

    :wavey:
     
  10. Ditto for nmap, good for all sorts of outside the box problem solving... like a poor mans inventory sniffer....
     
  11. G33

    G33 Frisky! Millennium Member CLM

    28,450
    2,512
    May 29, 1999
    With G29
    No see virgins!
    :tongueout::wavey:
     
  12. tous

    tous GET A ROPE!

    31,772
    28,498
    Jan 7, 2001
    Plano, Texas, Republic of
    But, if you do, they will be very neat and orderly virgins.