summaryrefslogtreecommitdiff
path: root/usr.bin/whois
Commit message (Collapse)AuthorAgeFilesLines
* whois: Handle referrals to rwhois servers.Mark Johnston2020-07-091-16/+41
| | | | | | | | | PR: 243862 Submitted by: ben@desync.com Differential Revision: https://reviews.freebsd.org/D25156 Notes: svn path=/head/; revision=363052
* Update RFC references in the whois(1) man page.Mark Johnston2019-08-081-6/+14
| | | | | | | | | PR: 239720 Submitted by: Gordon Bergling <gbergling@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=350781
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Add missing -width after -Bl -tagBaptiste Daroussin2017-02-111-1/+1
| | | | | | | | Reported by: make manlint MFC after: 2 days Notes: svn path=/head/; revision=313662
* More robust handling of whois referrals from RIRs.Tony Finch2016-11-171-4/+75
| | | | | | | | | | | | | | An example problem case is 163.1.0.0 (University of Oxford) which is in an APNIC ERX address range. Previously we assumed that ARIN has the correct information for all ERX allocations, but in this case ARIN refers back to APNIC, rather than referring to RIPE. This caused whois to loop. Whois will no longer loop back and forth forever between two RIRs that don't have an answer, but instead try the other RIRs in turn. Notes: svn path=/head/; revision=308762
* Send whois queries for gov.uk names to JANET.Tony Finch2016-05-251-0/+1
| | | | Notes: svn path=/head/; revision=300678
* whois(1): Fix potential double-close and logic mistakesConrad Meyer2016-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 Notes: svn path=/head/; revision=299476
* whois(1): Pull out async multiple host connection code into a routineConrad Meyer2016-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 Notes: svn path=/head/; revision=299473
* Example RIPE whois query with options and spaces.Tony Finch2016-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. Notes: svn path=/head/; revision=298581
* Handle whois referrals between RIRsTony Finch2016-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. Notes: svn path=/head/; revision=297708
* Fix whois queries for ARIN AS numbers.Tony Finch2016-03-311-3/+7
| | | | | | | | The ARIN whois server likes AS number queries to be in the form "a 8075" rather than "as7085". Notes: svn path=/head/; revision=297449
* Fix a regression in the .de and .dk whois special casesTony Finch2016-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. Notes: svn path=/head/; revision=294613
* A lot of the cleverness in whois is no longer needed!Tony Finch2016-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. Notes: svn path=/head/; revision=294611
* Update whois synopsis and usage with new optionsTony Finch2016-01-222-2/+2
| | | | Notes: svn path=/head/; revision=294591
* Bump .Dd after r294575Benjamin Kaduk2016-01-221-1/+1
| | | | Notes: svn path=/head/; revision=294579
* A few `whois` usability improvementsTony Finch2016-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. Notes: svn path=/head/; revision=294575
* Although the website [1] says US-ASCII is accepted, ISO-8859-1 seems toXin LI2015-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 Notes: svn path=/head/; revision=287030
* Add META_MODE support.Simon J. Gerraty2015-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 Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-126/+269
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-191-4/+6
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge headSimon J. Gerraty2014-04-282-10/+9
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | whois: add an option to query the PeeringDBTony Finch2015-05-142-2/+10
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=282893
* | | | Update whois(1) synopsis.Tony Finch2015-05-141-1/+1
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=282892
* | | | Bump whois(1) date.Tony Finch2015-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (Thanks to bz@ for the reminder!) Notes: svn path=/head/; revision=282891
* | | | whois: alphabetize whois server listTony Finch2015-05-141-10/+12
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=282889
* | | | whois: do not clobber command-line flags when tweaking O_NONBLOCKTony Finch2015-05-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can make whois fail to follow referrals when it should. The bug was introduced in r281959. Notes: svn path=/head/; revision=282888
* | | | whois: try whois.nic.TLD if TLD.whois-servers.net does not existTony Finch2015-05-142-26/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on an idea from OpenBSD. Notes: svn path=/head/; revision=282887
* | | | whois: check WHOIS_SERVER as well as RA_SERVER environment variablesTony Finch2015-05-142-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | WHOIS_SERVER is used by Debian's whois client. Notes: svn path=/head/; revision=282886
* | | | whois: code cleanupTony Finch2015-05-141-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove deprecated options. Use pedantically correct types. Notes: svn path=/head/; revision=282885
* | | | whois: special case certain query suffixesTony Finch2015-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. Notes: svn path=/head/; revision=282884
* | | | Clean up whois manual.Tony Finch2015-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. Notes: svn path=/head/; revision=282883
* | | | Try alternate addresses more agressively.Xin LI2015-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 Notes: svn path=/head/; revision=281959
* | | Introduce $RA_SERVER to set default whois server.Hajimu UMEMOTO2014-06-251-4/+6
| |/ |/| | | | | | | | | | | | | | | Requested by: nork Reviewed by: nork MFC after: 1 week Notes: svn path=/head/; revision=267871
* | mdoc: minor paragraph fixes.Joel Dahl2014-02-081-1/+0
| | | | | | | | Notes: svn path=/head/; revision=261634
* | The whois() function is called in a loop so make sure we close theKevin Lo2014-01-041-9/+9
|/ | | | | | | | | socket to the whois server before returning. Obtained from: OpenBSD Notes: svn path=/head/; revision=260259
* General mdoc(7) and typo fixes.Glen Barber2012-05-101-1/+1
| | | | | | | | | PR: 167696 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Notes: svn path=/head/; revision=235211
* Mark global functions and/or variables in whois(1) static where possible.Ed Schouten2011-11-061-3/+3
| | | | | | | This allows compilers and static analyzers to more thorough analysis. Notes: svn path=/head/; revision=227246
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-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 Notes: svn path=/head/; revision=216370
* Make whois capable of searching for IPv6 addresses just like it canEdwin Groothuis2010-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 Notes: svn path=/head/; revision=202281
* Remove -d option, whois.nic.mil doesn't exist anymore.Edwin Groothuis2010-01-142-12/+3
| | | | | | | | | PR: bin/142507 Submitted by: Dan Mahoney <danm@prime.gushi.org> MFC after: 1 week Notes: svn path=/head/; revision=202280
* The 6bone was decommissioned on 6/6/06, so remove references to it.Doug Barton2009-10-032-19/+8
| | | | Notes: svn path=/head/; revision=197725
* Use proper type cast for ctype macroAndrey A. Chernov2007-04-141-1/+1
| | | | Notes: svn path=/head/; revision=168721