Sponsored Content
Full Discussion: whois VS jwhois and timeout
Top Forums Shell Programming and Scripting whois VS jwhois and timeout Post 302167617 by PWSwebmaster on Friday 15th of February 2008 01:54:04 AM
Old 02-15-2008
Just in case someone ever finds this thread searching for the same thing, I did find a solution a while back.

Code:
  $timeout = 20; #seconds
  eval {
    local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
    alarm $timeout;
    system ("jwhois $domain >> $filename");
    alarm 0;
  };
  alarm 0;

  if ($@ =~ /alarm/) { #system call timed out
#    do whatever in the event of a timeout
  }

 

7 More Discussions You Might Find Interesting

1. IP Networking

Traceroute and Whois mystery

Hey folks, I've been charged with the job of finding out who's been screwing around with the download counts on our site. So now I have this huge list of IP's that I supposed to match to such and such developer. I was told by one guy that I should just do a traceroute and that'd tell me where... (2 Replies)
Discussion started by: DumDum
2 Replies

2. Shell Programming and Scripting

whois scripting

Hi guys, I need a script that given an IP address, say IPA, do the following: - queries "whois IPA" - extracts, from the whois answer, the IP network string indicated after the string "route:", - searches the IP network string in a given text file, say CIDR2ASN.txt, which has several lines,... (1 Reply)
Discussion started by: stesecci
1 Replies

3. Shell Programming and Scripting

whois country help

Hello folks, I have list of ips like 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4 whois 1.1.1.1 |grep -E 'country|Country' it show country=US or whatever. so i have number of ips in text file, how i can use above script to automate output like 1.1.1.1 US 2.2.2.2 CA 3.3.3.3 FR (3 Replies)
Discussion started by: learnbash
3 Replies

4. UNIX for Dummies Questions & Answers

How can I do whois -r with a input file?

Hello, I was wondering how I can do a whois from a file with lots of ip's in this format 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 And so on, then print the whois data from all the ip's to one single file sort of like this "whois -r 'ipfile' > 'whoisfile'" Thanks in advance! ... (3 Replies)
Discussion started by: uxfuser
3 Replies

5. Shell Programming and Scripting

How to obtain info from whois?

Hello, do you know any clever way to get information whether certain domain name become avaialble for registration from bash script? Would be good to check for the availability like every 100miliseconds, i want to catch domain. (1 Reply)
Discussion started by: postcd
1 Replies

6. IP Networking

Whois or nslookup.. for domain availability?

Hi, i want to make linux bash script which will periodically check for certain domain availability, i mean like every 100miliseconds. I want to ask which command i need to use, so the result is not cached and i dont cause any inappropriate overload? i see: whois domainname.com (when No... (1 Reply)
Discussion started by: postcd
1 Replies

7. What is on Your Mind?

Whois Lookup

Hi. I've just made our internal Whois lookup service available for all forum users, not only moderators and admins. Whois Database It's basically the same whois info you can get from your command line and many other web sites. If you would like to see other features, please post in... (0 Replies)
Discussion started by: Neo
0 Replies
jwhois(1)						      General Commands Manual							 jwhois(1)

NAME
jwhois - client for the whois service SYNOPSIS
jwhois [ OPTIONS ]... [ QUERY ] DESCRIPTION
jwhois searches Whois servers for the object on the command line. The host to query is taken from a global configuration file, a configuration file specified on the command line, or selected directly on the command line. OPTIONS
--version display version, authors and licensing information. --help display a short help text. -c FILE --config=FILE uses FILE as a configuration file instead of the default. -h HOST --host=HOST overrides any hosts in the configuration file and queries HOST directly. -p PORT --port=PORT specifies a port number to use when querying a HOST. -f --force-lookup forces a query to be made to a host even if a current object is available from the cache. -v --verbose outputs verbose debugging information while running (use this before sending a bugreport to ensure that it's indeed a bug and not a misconfiguration). You can increase the verbosity by giving several verbose commands to jwhois, such as -vv. -n --no-redirect disable features that redirect queries from one server to another. -s --no-whoisservers disable the built-in support for whois-servers.net. -a --raw send query verbatim to receiving hosts instead of rewriting them according to the configuration. -i --display-redirections display every step in a redirection (default is to display only the last answer). -d --disable-cache completely disable both reading and writing to cache. -r --rwhois force the query to use the rwhois protocol instead of HTTP or whois. --rwhois-display=DISPLAY asks receiving rwhois servers to display the results in the DISPLAY display instead of the default dump display. --rwhois-limit=LIMIT asks receiving rwhois servers to limit their responses to LIMIT matches. RIPE EXTENSIONS To use the options specified in RIPE Document 157, you need to change the format of the query slightly. If you were to search for all entries in the RIPE database which lists the admin-c, tech-c or zone-c as CO19-RIPE, you could use the following command syntax: jwhois -h whois.ripe.net -- -i admin-c,tech-c,zone-c CO19-RIPE -- is used to separate the RIPE options from the jwhois options. SEE ALSO
whois(1) GNU
November 2001 jwhois(1)
All times are GMT -4. The time now is 04:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy