Scan all ports in a CIDR block with the doscommand

Source: Internet
Author: User
Tags exit in
Open a DOS window in Win2000 and then execute
For/L % A in (1, 1, 254) do start/MIN/low Telnet 192.168.0.% A 3389
In this way, all open ports 3389 in the 192.168.0.x segment will be exposed to hosts.
After this command is executed
254 small windows will be opened in the taskbar
Then, the window that fails the Telnet link will automatically exit in about 5 seconds.
The remaining window is the host with the corresponding port opened.
Check the title of the small window to learn the Host IP address.
If you think the machine performance is good, you can set the/low parameter.

Scan multiple ports of a host as follows:
For/L % A in (1, 1, 65535) do start/low/min Telnet 192.168.0.1%
In this way, Port 1 to port 65535 of 192.168.0.1 is scanned.

Scan all ports in a CIDR Block
For/L % A in (254, 65535) do for/L % B in (,) do start/low/min Telnet 192.168.0.% A % B
This will scan all ports 1 to 65535 in the 192.168.0.x segment.

The above commands can only be used in Win2000, because the/L accumulate parameter is an extension of Win2000.
Of course, both WINXP and win. Net can be used. I have not tried winme, because there is no winme machine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.