Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. It automatically downloads the first 1000 results for the required country using its tld from Google.
  2. Using regular expressions and pattern matching it searches for hostnames in the results.
  3. After elimination of any duplicate hostnames in the list it starts pinging them individually. At this stage the user can configure the number of pings he wants to send out to each host and the time-out value of the whole ping command. The default value is 10 sec timeout for 10 pings.
  4. After the results of the pings come in, the program filters out hosts which block pings and also those with multiple hostnames for the same IP address, keeping one copy for a single IP address. It also stores the min_rtt for all the hosts in the filtered list.
  5. Finally it checks the hosts in the filtered list on GeoIptool, again using pattern matching to show the top level domain, country, city and lat/long for each host. This information has no guarantee of being absolutely correct but on numerous occasions it was observed that it does possess a high degree of accuracy. The results at this stage can be configured by command line to be filtered optionally by either a threshold min_rtt or the top level domain of the results or both.

The program is available on SVN on /afs/slac.stanford.edu/g/scs/net/netmon/repo/svn/pinger/trunk/bin/HostSearcher.pl

Code Block
akbar@pinger $ perl HostSearcher.pl

    usage: HostSearcher.pl --tld top_level_domain [--max_hosts] [--max_pings] [-max_time] [--filter] [--pingserver] [--file]

    Options:
        --tld                   The two letters of the top level domain of the country.
        --max_hosts             Maximum number of hosts to download from Google ( >= 100 and <=1000 ) Default is 1000
        --max_pings             Maximum number of pings to send to a host. Default is 10
        --max_time              Time before the ping to an individual host times out and returns. Default is 10 sec
        --filter                Filter out the results. Possible values are 'tld' , 'rtt' or 'off'. Default is 'off'
        --pingserver            Use a pingserver to ping rather than using the current host (To be implemented)
        --file                  File to store the results. Default is a file named tld.txt in the current folder

    example: HostSearcher.pl --tld pk

...