Search This Blog

2020-08-15

Windows cmd ping sweep

Instead of installing a third party application which has the possibility to have spyware or other bad stuff in it. If you only need to do a ping sweep with no additional features it's probably easier just to do it in CMD.
  1. Open up cmd
  2. Run the following
  3. for /L %z in (1,1,254) do @ping 10.0.0.%z -w 10 -n 1 | find "Reply"

Where:

  • (1,1,254) indicates to test every address from 1-254
  • 10.0.0. is the network address prefix of addresses you want to test
  • %z is filled in with numbers from (1,1,254)
  • -w 10 - only waits 10ms before moving on
  • -n 1 - only tries once before moving on
  • find "Reply" looks for a succesful ping result and ignores unsuccessful

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.