summaryrefslogtreecommitdiffstats
path: root/usr.bin/whois
Commit message (Collapse)AuthorAgeFilesLines
* Send whois queries for gov.uk names to JANET.fanf2016-05-251-0/+1
|
* whois(1): Fix potential double-close and logic mistakescem2016-05-111-3/+9
| | | | | | | | | | | | | | Close the fd the poll error was detected on, rather than the last opened fd, to fix the double-close. Use -1 to make it explict which int variables no longer own socket file descriptors. Actually shrink, rather than grow, the poll timeout to match comment. Reported by: Coverity CID: 1304860, 1305616 Sponsored by: EMC / Isilon Storage Division
* whois(1): Pull out async multiple host connection code into a routinecem2016-05-111-12/+22
| | | | | | | | | | This logic was added to the whois() function in r281959, but could easily be its own routine. In this case, I think the abstraction makes both functions easier to reason about. This precedes some Coverity-suggested cleanup. Sponsored by: EMC / Isilon Storage Division
* Example RIPE whois query with options and spaces.fanf2016-04-251-6/+26
| | | | | Since it is used in the example, mention the -- option in the synopsis even though it is a universal standard, and tweak to fit it on one line.
* Handle whois referrals between RIRsfanf2016-04-081-0/+13
| | | | | | | | | | | | | | | | | | | | This is rather ugly, because the RIPE and APNIC whois servers do not provide referrals for address blocks that they do not manage. However ARIN is usually the right place or knows the right place so we try there. The particular instance which clued me in to this bug is U.Mich. 141.211.0.0/16 for which the referral chain should be IANA -> RIPE -> ARIN. RIPE's RDAP does provide useful redirects (for example try `curl -I http://rdap.db.ripe.net/ip/141.211.0.0) so maybe their whois server can be improved. AfriNIC's whois server gives more direct referrals, but they are designed to be human-readable. Ugly, but we can manage. The issue of referrals between RIRs is likely to become more important in the future whith the increasing number of cross-region IP address block transfers increases.
* Fix whois queries for ARIN AS numbers.fanf2016-03-311-3/+7
| | | | | The ARIN whois server likes AS number queries to be in the form "a 8075" rather than "as7085".
* Fix a regression in the .de and .dk whois special casesfanf2016-01-231-7/+15
| | | | | | | | | | Ensure the special cases trigger whether we come via a referral or via the -c option. Match host names case-insensitively. Use the default character set supported by .de (UTF-8) since that is more compatible with the modern world than ISO 8859-1. Persuade them to give us a useful answer whether an internationalized domain name is given in UTF-8 or in punycode.
* A lot of the cleverness in whois is no longer needed!fanf2016-01-232-189/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | The IANA whois server has the right referral information for domain names, IP addresses, and AS numbers, so whois does not need to be able to choose servers itself (except for a few cases where referrals do not work). We can delete a chunk of code, which is always fun. This change improves the referral handling to be less sensitive to all the various formats, and to allow multi-hop referral chains, such as IANA -> registry -> registrar. ARIN queries have the "+" flag added if no flags are present, so we get full details if the query matches multiple objects. The Verisign anti-spam logic is also now suppressed if the user provided a non- trivial query string. Uninformative rubric is now trimmed by default. The -S option turns off trimming, and disables query fettling. The -i option is back to its traditional pre-1999 hostname, since whois.internic.net is more useful than whois.networksolutions.com. Note that the old fallback/default server whois.crsnic.net is an alias for whois.internic.net. The manual is more informative about query syntax.
* Update whois synopsis and usage with new optionsfanf2016-01-222-2/+2
|
* Bump .Dd after r294575bjk2016-01-221-1/+1
|
* A few `whois` usability improvementsfanf2016-01-222-56/+80
| | | | | | | | | Look up AS numbers at ARIN. Handle more referral formats. Suppress spammy nameserver objects when querying the .com and .net whois servers by explicitly querying for domain names by default.
* Although the website [1] says US-ASCII is accepted, ISO-8859-1 seems todelphij2015-08-231-1/+1
| | | | | | | | | be the only accepted character that is close enough to US-ASCII (and this is also done on OpenBSD; the alternative would be to use UTF-8). [1] http://www.denic.de/en/domains/technik/denic_whois-server/index.html MFC after: 2 weeks
* Add META_MODE support.sjg2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-272-126/+269
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-191-4/+6
| |\
| * | Updated dependenciessjg2014-05-161-1/+0
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Merge headsjg2014-04-282-10/+9
| |\ \
| * | | Updated dependenciessjg2013-03-111-0/+1
| | | |
| * | | Updated dependenciessjg2013-02-161-2/+0
| | | |
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+20
| | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | whois: add an option to query the PeeringDBfanf2015-05-142-2/+10
| | | |
* | | | Update whois(1) synopsis.fanf2015-05-141-1/+1
| | | |
* | | | Bump whois(1) date.fanf2015-05-141-1/+1
| | | | | | | | | | | | | | | | (Thanks to bz@ for the reminder!)
* | | | whois: alphabetize whois server listfanf2015-05-141-10/+12
| | | |
* | | | whois: do not clobber command-line flags when tweaking O_NONBLOCKfanf2015-05-141-4/+4
| | | | | | | | | | | | | | | | | | | | This can make whois fail to follow referrals when it should. The bug was introduced in r281959.
* | | | whois: try whois.nic.TLD if TLD.whois-servers.net does not existfanf2015-05-142-26/+47
| | | | | | | | | | | | | | | | Based on an idea from OpenBSD.
* | | | whois: check WHOIS_SERVER as well as RA_SERVER environment variablesfanf2015-05-142-3/+13
| | | | | | | | | | | | | | | | WHOIS_SERVER is used by Debian's whois client.
* | | | whois: code cleanupfanf2015-05-141-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | Remove deprecated options. Use pedantically correct types.
* | | | whois: special case certain query suffixesfanf2015-05-141-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the existing support for -NORID handles to include -NICAT, -ARIN, and -RIPE handles. The suffix machinery is also used to work around a problem with lack of referrals from the Nominet server for .uk: names under .ac.uk need to be queried directly at JANET's whois server.
* | | | Clean up whois manual.fanf2015-05-141-67/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the RA_SERVER environment variable. Remove the obsolete -R option, and discourage people from trying to use the Network Solutions server. Describe the default behaviour in the DESCRIPTION section, not buried in the options.
* | | | Try alternate addresses more agressively.delphij2015-04-251-9/+127
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to connect to alternate addresses if the connect doesn't succeed in 180ms, and cut wait time between connection attempts in half for each additional, if no connection was established. Take the first connection to succeed and close the others. This makes whois more responsive when e.g. IPv6 service took long time or fail to respond. PR: 158125 Submitted by: Mark Andrews <marka isc org> (with changes from me) MFC after: 2 weeks
* | | Introduce $RA_SERVER to set default whois server.ume2014-06-251-4/+6
| |/ |/| | | | | | | | | Requested by: nork Reviewed by: nork MFC after: 1 week
* | mdoc: minor paragraph fixes.joel2014-02-081-1/+0
| |
* | The whois() function is called in a loop so make sure we close thekevlo2014-01-041-9/+9
|/ | | | | | socket to the whois server before returning. Obtained from: OpenBSD
* General mdoc(7) and typo fixes.gjb2012-05-101-1/+1
| | | | | | PR: 167696 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days
* Mark global functions and/or variables in whois(1) static where possible.ed2011-11-061-3/+3
| | | | This allows compilers and static analyzers to more thorough analysis.
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-112-8/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Make whois capable of searching for IPv6 addresses just like it canedwin2010-01-141-0/+4
| | | | | | | | | do for IPv4 addresses without having to explicetly specify that the ARIN server should be used to get the initial information PR: bin/128725 Submitted by: "Matt D. Harris" <mdh_lists@yahoo.com> MFC after: 1 week
* Remove -d option, whois.nic.mil doesn't exist anymore.edwin2010-01-142-12/+3
| | | | | | PR: bin/142507 Submitted by: Dan Mahoney <danm@prime.gushi.org> MFC after: 1 week
* The 6bone was decommissioned on 6/6/06, so remove references to it.dougb2009-10-032-19/+8
|
* Use proper type cast for ctype macroache2007-04-141-1/+1
|
* Make DK-HOSTMASTER show contact info for .dk domains.phk2007-01-191-0/+2
| | | | Submitted by: Søren Hansen <shan@soeren-hansen.dk>
* Markup fixes.ru2006-09-291-2/+3
|
* Add AfriNIC as a RIR.jhay2006-01-232-6/+16
| | | | | | PR: 80421 Submitted by: Adrian Frith <adrian at frith.homelinux.org> MFC after: 6 days
* Reduce compiler warning: variable might be used uninitialized, by givingcharnier2005-05-291-0/+1
| | | | an initial value.
* Bump document date before ru gets me.ceri2004-12-111-1/+1
|
* Add a -k flag for querying whois.krnic.net (the National Internetceri2004-12-112-3/+13
| | | | | | | Development Agency of Korea) which hold details of IP address allocations within Korea. Approved by: bms
* Add special case for the german whois nameserver. Without thembr2004-08-251-1/+6
| | | | | | | | | | | | | | | '-T dn,ace -C US-ASCII' option one does only get: $ whois nic.de domain: nic.de status: connect More information available on: http://www.denic.de/en/domains/technik/denic_whois-server/index.html MFC: 3 days
OpenPOWER on IntegriCloud