Step by step Basic Command Prompt For Looping to Find Live IP Address:

1. If you already understand about basic FOR looping in programming, I believe this tips and trick should be easy for you

.

Open your command prompt (Windows keyboard + R and type cmd).

2. Firstly, the most important one is reading the manual. We can see the help by typing help for to view the manuals.                                          1

3. My computer was resides on 192.168.8.0/24 network. We will try to scan the live IP address on this network using command prompt FOR looping. Here is my command

for /L %h IN (87,1,99) DO ping 192.168.8.%h -l 1 -n 12

Information:

for /L %h –> perform a command for a range of numbers where %h is the variable

IN (87, 1, 99) –> start looping from 87 with step amount 1 until 99

DO ping 192.168.8.%h -l 1 -n 1 –> do the ping to specified IP address. We only send 1 byte buffer size(-l 1) and 1 times echo request(-n 1).

Here is the result (I snip some information and show some live IP address).

 

Conclusion:

1. This method will work if the target IP not blocking the ICMP request.

2. To save the result to .txt file you can add >> result.txt

3

3. For more advanced data extraction, maybe we will cover it on another tips and trick.

Hope it useful

Leave a comment