Shell IP Scanning

Source: Internet
Author: User
# Shell scriptecho Ping scan echo start scanning... ECHO to get the IP address of the local machine... myip = 'ifconfig eth0 | awk '{print $2}' | egrep "ADDR: [0-9]" | awk 'begin {FS = ": "} {print $2} ''echo" local IP: "$ myipnet_ip =$ {myip %. *}. echo "network scan start address:" $ net_ip '1' echo "Ping scan">. /up_host.txtfor scan_ip in $ (SEQ 255) doping-C 3 $ net_ip "$ scan_ip">/dev/null & Echo "the host is up ----" $ net_ip "$ scan_ip" & Echo $ net_ip "$ scan_ip" >. /up_host.txt | echo "the host is down --" $ net_ip "$ scan_ip" done

Related Article

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.