Window/linux Bulk Scan IP Port program script

Source: Internet
Author: User

Suppose the 1.txt file content is
127.0.0.1
192.168.1.1
Then we get the file content IP for scanning
window. bat version

: 1.txt is the filename, modify according to the requirement
: C:\nmap\nmap-6.46\nmap.exe as Namp path, modified according to requirements
: Put the 1.txt together with the scan script

The code is as follows Copy Code
@echo off
For/f "delims=,"%%i in (1.txt) do C:\nmap\nmap-6.46\nmap.exe-T3-A
-v-p-%%i >%%i.txt

Linux shell version

The code is as follows Copy Code
echo ' Start scan IP port! '
Cat 1.txt|while Read Line
Todo
Nmap-t3-a-v-p-$line > $line. txt
echo "Scan $line port ok!"
Done
echo "Scan all IP port ok!"

Attach the Linux scan result map


I then use the scanned files, to filter out the IP, Port, status, service synthesis of a file, and then statistics Excel document is very fast:

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.