• 26,952
  • +1,026
  • 3,065
Basic Command Prompt For Looping to Find Live IP Address

Basic Command Prompt For Looping to Find Live IP Address

Bookmark

After saw many reader learn about 16 steps tutorial basic command prompt, now we will continue the tips and trick Basic Command Prompt For Looping to Find Live IP Address.

Actually there is many ways to do looping the program in command prompt, but for today we will focus on FOR looping.

According to wikipedia

In computer science a for loop is a programming language statement which allows code to be repeatedly executed. A for loop is classified as an iteration statement.

Unlike many other kinds of loops, such as the while loop, the for loop is often distinguished by an explicit loop counter or loop variable. This allows the body of the for loop (the code that is being repeatedly executed) to know about the sequencing of each iteration. For loops are also typically used when the amount of iterations is known before entering the loop. For loops are the shorthand way to make loops when the number of iterations is known, as a for loop can be written as a while loop.

For this tips and trick, we will create a simple FOR to check active computer on the network, even it's outdated but we can learn about the logic ๐Ÿ™‚

Requirement:

1. Command Prompt

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.

Basic Command Prompt For Looping to Find Live IP Address

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 1

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).

Basic Command Prompt For Looping to Find 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

Basic Command Prompt For Looping to Find Live IP Address

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

Hope it useful ๐Ÿ™‚

Share this article if you found this post was useful:

Blogger at hacking-tutorial.com. Love PHP, offensive security and web. Contact him at me[-at-]vishnuvalentino.com

See all posts by || Visit Website : http://www.vishnuvalentino.com

  • akshay

    very informative for information gathering…..thumps up

  • simplexer

    It’s really cool man. But If I just want only the live what I’ve to do?

    And thanks again ๐Ÿ™‚

  • Scott Harrington

    Tired of being ripped off by scammers?…..Inbox hackington49@gmail.com or text +16209040586 for the services of a certified ethical hacker…who offers a wide range of services which includes changing of grades,spying on partners and spouses,key logging etc in good time too……..hit me up with serious inquiries and it’s done!

  • Emmanuel Vincent Nuestro

    it is possible to scan the network using cmd? how?