Work needs, how to make the computer realize batch ping multiple ip? Batch scanning network segment skills

time:2023-01-27 22:07:15 source:scripttoolbox.com author:Loudspeaker box
Work needs, how to make the computer realize batch ping multiple ip? Batch scanning network segment skills

Many people have to ping an IP segment because of their work needs, so as to check whether the IP address is in use. Some group PING software downloaded from the Internet must be reported by anti-virus software, or the results will be different every time, so I have combined them. After various batch processing Ping commands on the Internet, I sorted out a batch processing method, hoping to help friends in need. Now I will first demonstrate the whole process of the application, and finally give the batch processing code. 1. Double-click the mouse to run the batch file. At this time, a command window will pop up, specifying the input IP segment. If you don't enter it, just press Enter, the default is 192.168.16 segment. Here I enter the IP segment assigned by my router, 192.168.3 and press Enter 2, and then enter the IP address start bit as specified. If you don't enter it, press Enter immediately, the default is 1. Here I enter 103, and finally enter the IP address end bit according to the regulations. If you don't enter it, press Enter immediately, and the default is 255. Here I enter 404, start scanning, and the start and end IP addresses will be displayed to determine if there is any incorrect input before. There will be no other reminders during the running process. If you do not need to wait, you can immediately close the window to end the scan earlier. 5. After scanning, press any key to exit, the window will automatically close. 6. In the folder to which the batch command file belongs, it will be converted into a corresponding text file, and there will be the results of this scan (only the results of the ping pass are recorded) 7. The following is the original text of the batch code, save it In the text file, replace the suffix txt of the text file with bat. echooffcolorF0rem set the window background color to white and the text color to black title batch scan network segment (ByTaoGe)rem set the window title echo.echo Enter the IP segment you want to scan, and press Enter directly to be 192.168.16: set/pIpDuan= rem assigns the user input to the IpDuan variable if "%IpDuan%"==""(setIpDuan=192.168.16) rem judges whether the IpDuan variable is assigned a value, if it is empty, assign it to 192.168.16echo input the IP start you want to scan Bit, press Enter directly, it is 1: set/pQiShi=rem assigns the user input to the QiShi variable if "%QiShi%"==""(setQiShi=1)rem judges whether the QiShi variable is assigned a value, if it is empty, assign the value Enter the IP end bit you want to scan for 1echo, and press Enter directly, it will be 255: set/pJieShu=rem Assign the user input to the JieShu variable if "%JieShu%"==""(setJieShu=255)rem to judge the JieShu variable Whether to assign a value, if it is empty, it will be assigned as 255echo starting IP: %IpDuan%.%QiShi%rem shows starting IPecho ending IP: %IpDuan%.%JieShu%rem shows ending IPecho========== =================================================>>Ping- %IpDuan%.txtrem record split line echo start time: %date%%time%>>Ping-%IpDuan%.txtrem record start time echo start IP: %IpDuan%.%QiShi%>>Ping-%IpDuan%. txtrem record start IPecho end IP: %IpDuan%.%JieShu%>>Ping-%IpDuan%.txtrem record end IPecho is scanning, please wait...echo ends early, please close the window directly @for/l%%nin( %QiShi%,1,%JieShu%)[email protected]%IpDuan%.%%n|find/i"ttl">>Ping-%IpDuan%.txtrem start echo End time: %date%% time%>>Ping-%IpDuan%.txtrem record end time echo =================================== =====================>>Ping-%IpDuan%.tx After trem records the split line echo scan, press any key to exit...&pause>nul8. Finally, I declare that this batch is synthesized after checking various batch commands by myself. Welcome everyone to communicate and correct. The above is the technique of batch scanning ip segment, I look forward to your love, please pay attention to the president of the system again.

(Responsible editor:Graphics card)

Related content