asp – Discovers present ip-address of dynamically connected hosts
In order to simplify the management of the associations between hostnames and addresses, asp searches in a specified directory a text file containing the possible IP addresses of the looked for host. The name of the text file has to be formed by the hostname followed by an optional extension of your choice.
Install asp on ubuntu
Open the terminal and run the following command
sudo apt-get install asp
asp [-uv] [-f | [-d dir] [-e ext]] [-a addresses] [-r repetitions] [-s send_delay] [-w wait_time] [-p port] hostname
-u -- Update the file /etc/hosts with the IP address of hostname or delete the possible old entry if the address is not found. Obviously the file have to by writable by the user.
-v -- Include more verbiage to make output readable by humans. Default consists only of dotted quad IP address, which is intended for output substitution in scripts.
-f -- Force the reading of addresses from standard input instead that from the hostname's file.
-d dir -- Set the directory containing the addresses file referred by hostname to dir. Default is ~/.asp.
-e ext -- Set addresses files extension to ext. Default is no extension.
-a addresses -- Set the number of queries to send before make a pause of send_delay seconds. Default is 12 queries.
-r repetitions -- Set the number of times to try the same address. Default is 3 times.
-s send_delay -- Delay the sending of the next group of addresses send_delay seconds. Default is 2 seconds.
-w wait_time -- Wait the peer reply for wait_time seconds. Default is 5 seconds.
-p port -- Specify an alternative port number. For default the port number is obtained searching the asp entry in /etc/services.
For example to find the author's dynamic IP address, obviously if I am on line, you can provide my metaip address on standard input with the command:
echo "22.214.171.124-62 126.96.36.199-18" | asp -f atomic
or you can put my metaip address in a file called atomic in your ~/.asp directory, like this:
echo "188.8.131.52-62 184.108.40.206-18" > ~/.asp/atomic
and then you can simply do:
Source from Man page