Ping a network and create a text file of alive hosts

This is to make it quick and easy to find machines that are on a network (that are responding to ICMP requests)

[root:~/Desktop]# fping -g $iprange -a > ips.txt 2> /dev/null

-g = generate a list

-a = only show alive hosts

2> /dev/null = output unresponsive to dev null instead of to terminal (std1)

In use:

[root:~/Desktop]# fping -g -a > ips.txt 2> /dev/null
[root:~/Desktop]# cat ips.txt

Once you have a text file you can do things like nmap scans from that file. Let me know what other things you would use this text file for.



Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.