This file is indexed.

/usr/bin/cwhois is in asused 3.72-12.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/usr/bin/perl
# Copyright (c) 2000						RIPE NCC
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation, and that the name of the author not be
# used in advertising or publicity pertaining to distribution of the
# software without specific, written prior permission.
#
# THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
# AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

#------------------------------------------------------------------------------
# Module Header
# Filename          : RipeWhois.pm
# Purpose           : Make whois queries to RIPE-like servers
# Author            : Timur Bakeyev <timur@ripe.net>
# Date              : 08082000
# Description       : Simpe whois client that gives you back output, compatiable with
#		      RIPE DB v2, if you'llask it to :)
# Language Version  : Perl5
# OSs Tested        : BSD/OS 3.1
# Command Line      : None
# Input Files       : None
# Output Files      : None
# External Programs : None
# Problems          : None known
# To Do             : None
# Comments          :
# $Id: cwhois,v 1.1 2001/04/19 11:33:24 timur Exp $
#------------------------------------------------------------------------------

use RipeWhois;
use Getopt::Long;

my @cmdline = (
    'host=s',
    'port=s',
    'mode=i',
);

my %opt = ('Host' => 'whois.ripe.net', 'Port' => '43', 'FormatMode' => 0);

    # Getopt configuration
    Getopt::Long::Configure('pass_through');

    GetOptions(\%opt, @cmdline);
        
    my $whois = new RipeWhois(Host => $opt{'host'}, 
			      Port => $opt{'port'},
			      FormatMode => $opt{'mode'});
    
    my $query = join(' ', @ARGV);

    unless(ref($whois)) {
	print STDERR "Failed\n";
	exit 1;
    }
    
    if($whois->GetErrorCode()) {
	printf(STDERR "Error: %s\n", $whois->GetErrorString());
	exit 2;
    }
    
    my @result = $whois->QueryObjects($query);
    
    unless(@result) {
	printf(STDERR "Query error: %s\n", $whois->GetErrorString());
	exit 3;
    }

print <<HEADER;
% Objects here are RPSL compliant.
% For more information, please see http://www.ripe.net/rpsl

% Rights restricted by copyright.
% See http://www.ripe.net/ripencc/pub-services/db/copyright.html

HEADER
    
    foreach my $object (@result) {
	print "$object\n\n";
    }

    print "\n\n";

    
__END__

print STDERR <<USAGE;

Usage: whois [-aFLmMrSvR] [-h hostname] [-s sources] [-T types] [-i attr] keys
       whois -t type       whois -v type

Where:

-a                         search all databases
-F                         fast raw output
-h hostname                search alternate server
-i [attr][[,attr] ... ]    do an inverse lookup for specified attributes
-L                         find all Less specific matches
-m                         find first level more specific matches
-M                         find all More specific matches
-p port                    port to connect to
-r                         turn off recursive lookups
-s source[[,source] ... ]  search databases with source 'source'
-S                         tell server to leave out 'syntactic sugar'
-t type                    requests template for object of type 'type'
-v type                    requests verbose template for object of type 'type'
-R                         force to show local copy of the domain object even if it contains referral
-T type[[,type] ... ]      only look for objects of type 'type'

Please note that most of these flags are NOT understood by
non RIPE whois servers

USAGE