6
votes
5answers
381 views

Assigning IP address to environment variable

How can I assign the IP address of eth0 to an environment variable, say $ip, as easily as possible? Update: Distro is Ubuntu Server 12.04 LTS.
1
vote
4answers
1k views

script to scan ip range and return results in a certain format

This script scans IP's and returns a status of Up or Down. How can I alter it so it doesn't scan everything twice? As it sits it scans everything and returns the "Up" addresses only and then scans all ...
-1
votes
2answers
672 views

How to generate random IP addresses

$ nmap -n -iR 0 -sL > RANDOM-IPS-TMP.txt $ grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" RANDOM-IPS-TMP.txt | egrep -v "10.*|172.[16-32].*|192.168.*|[224-255].*" > RANDOM-IPS.txt egrep: Invalid ...