Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://whois-murple-1.00-1.src.rpm:8526/whois-murple.tar.gz  info  downloads

whois-murple-1.00/ 42755      0      0           0  6544002617  12055 5ustar  rootrootwhois-murple-1.00/Makefile100644      0      0         620  6544003126  13562 0ustar  rootrootCC	= cc
CFLAGS	= -O2
PROG	= whois
BINDIR  = /usr/bin
SOURCE	= whois.c
MANFILE = whois.1
MANDIR  = /usr/man/man1
STRIP	= strip

all: whois

whois:
	$(CC) $(CFLAGS) -o $(PROG) $(SOURCE)
	$(STRIP) $(PROG)

install: all
	chmod 755 $(PROG)
	chmod 644 $(MANFILE)
	cp $(PROG) $(BINDIR)
	cp $(MANFILE) $(MANDIR)

uninstall:
	rm -f $(BINDIR)/$(PROG)
	rm -f $(MANDIR)/$(MANFILE)

clean:
	rm -f core *~ $(PROG)
whois-murple-1.00/README100644      0      0        2131  6544002053  13017 0ustar  rootrootThis is Murple's hacked up version of fwhois by Chris Cappuccio. I have
made a few minor changes to the source code, but the primary difference
is that there is now a -d flag. The -d flag will produce output in the
machine readable dump format.

From the original fwhois README:

"Fwhois is a finger-style whois for BSD systems. It is smaller and more
compact then the standard InterNIC whois.c, and also runs in a different
manner. fwhois user@whois.internic.net would be the same as 'whois -h
whois.internic.net user'. This command is espically useful in environments
where different servers are queued, e.g. an organization with multiple
whois servers running for different purposes. This type of command
can also be useful when a user or group of users makes frequent use
of many different whois servers. If a user simply types 'fwhois user'
without a hostname, fwhois will automatically use host
whois.internic.net."

To compile, type: make
To install, type: make install

Please direct any bug reports to murple@erols.com, rather than bothering
Chris with a bug that in all likelyhood was introduced by me.
whois-murple-1.00/whois100755      0      0       11624  6544002617  13253 0ustar  rootrootELF<4$4 (444ԀԀ


(((/lib/ld-linux.so.2%&# %
$!	"
 (#ĝ91?hE|W>^cPoL(ẇ"\P${h"",",@"iX!<F"C"C"܇l:X)X!1<
8?FR\__gmon_start__libc.so.6_DYNAMIC_GLOBAL_OFFSET_TABLE__fini_init__libc_init_firstatexitexit_IO_stderr_fprintf__ctype_bfclosestrcat_IO_stdout_printfperrorfdopen_IO_getc_IO_putcindexrindexbcopyclosegetservbyname_environwritesocketconnectgethostbynameinet_addr__environenviron_start_etext_edata__bss_start_end$	XНԝ؝ܝ

 US[`t2y]]5ȝ%̝%Нh%ԝh%؝h%ܝh%h %h(%h0%h8p%h@`%hHP%hP@%hX0%h` %hh%hp%hx%h%h%h%h% h1tRX.^DXPPRVJhX:PUS=tЃ;u]ÍvUÐUWVUJE~ 0u
J1u%8j@WuphWUǃ^h#hNhPhhNhh֌h jVW	jU0WVSj@uÃujmCS2ǃuPSEԃuSh#hxj1]M؉MMԉMEEE}h<h@ÃuhFh"jvGfEwM܉MЍEPG0:CfEjjwÃ}hj7h`juSe}hdS~jWv}u>jhSq0}HPuSUjhSH$/v0}HPuS$jhShSyÃt\SZƒtL
u

(DP`u@
u
tv
뵐hR뤃
thj
sSe[^_ÐUS=tЃ;u]ÍvUÐUS[{]]-d@whois.internic.netUsage: whois [-d] target[@<whois.server>]

The -d flag causes whois to output in dump format,
which is more machine readable.
Whois server will default to whois.internic.net
unless an alternate server is specified with the
@<whois.server> notation.
whois: unknown host: %s
tcpwhoiswhois: tcp/whois: unknown service - add to /etc/services
whois: socket[%s]
fwhois: connectdump 
r("2BRbr‡҇"2
|
Wĝԅ(GCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.301.0101.0101.0101.0101.01.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.got.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.comment.noteԀ#4)`1||W9	ԅB	܅ K		T,Z܆`_<<eks
y

ĝ
d((dddxwhois-murple-1.00/whois.1100644    764    764        2705  6544004550  14371 0ustar  murplemurple
WHOIS(1)		Megariffic Murpadelic Commands  	      WHOIS(1)

NNAAMMEE
     wwhhooiiss - Internet domain name and network number directory
     service lookup

SSYYNNOOPPSSIISS
     wwhhooiiss [--dd] ttaarrggeett[[@@<<wwhhooiiss..sseerrvveerr>>]]

DDEESSCCRRIIPPTTIIOONN
     WWhhooiiss looks up records in the whois databases maintained by
     several Network Information Centers (NICs), such as
     InterNIC.

     The options are as follows:

     --dd      Cause whois to return information in dump format,
             which is much more machine readable than the
             standard output, making it more useful for use
             in scripts.

     If a target is specified without a tailing @<whois.server>,
     it will default to using whois.internic.net.

     The default action, unless directed otherwise with a special
     _n_a_m_e, is to do a very broad search, looking for matches to
     _n_a_m_e in all types of records and most fields (name,
     nicknames, hostname, net address, etc.) in the database.
     For more information as to what _n_a_m_e operands have special
     meaning, and how to guide the search, use the special name
     ``_h_e_l_p''. If you are using a _n_a_m_e that takes an argument,
     enclose the whole string in quotes, for example:

             whois "DO murple.net"@whois.internic.net

SSEEEE AALLSSOO
     RFC 812: Nicname/Whois
whois-murple-1.00/whois.c100644      0      0       12556  6543777303  13510 0ustar  rootroot/* whois.c by Murple (Craig Schenk) <murple@erols.com> is hacked from:
 *
 * fwhois.c by Ang3ldust (Chris Cappuccio) <ccappuc@santafe.edu>
 * Networking code taken and modified from net.c in the finger source code
 */

/*
 * Copyright (c) 1989 The Regents of the University of California.
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Tony Nardo of the Johns Hopkins University/Applied Physics Lab.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <sys/param.h>
#include <sys/file.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <ctype.h>

int	main(int argc, char **argv);
void	do_whois(char *name, int dump_mode);

int main(int argc, char **argv)
{
	char	*program_name;
	char	*target_string;
	char	*tmp_string;
	int	dump_mode;
	
	/* Save the program name for errors and such */
	program_name = argv[0];

	argc--, argv++;

	if (argc > 1 && strcmp(*argv, "-d") == 0) {
		dump_mode = 1;
		argc--, argv++;
	} else {
		dump_mode = 0;
	}

	if (argc == 1) {
		target_string = argv[0];

		/* If no host specified, use whois.internic.net */
		if(!index(argv[0], '@')) {
			tmp_string = strcat(target_string, "@whois.internic.net");
			target_string = tmp_string;
		}
	}

	/* If the user entered an invalid argument, here they go */
	if (argc != 1) {
		printf("Usage: whois [-d] target[@<whois.server>]\n");
		printf("\n");
		printf("The -d flag causes whois to output in dump format,\n");
		printf("which is more machine readable.\n");
		printf("\n");
		printf("Whois server will default to whois.internic.net\n");
		printf("unless an alternate server is specified with the\n");
		printf("@<whois.server> notation.\n"); 
		exit(1);
	}

	do_whois(target_string, dump_mode);

	exit(0);
}

void do_whois(char *name, int dump_mode)
{
	register FILE *fp;
	register int c, lastc;

	struct in_addr defaddr;
	struct hostent *hp, def;
	struct servent *sp;
	struct sockaddr_in sin;

	int s;

	char *alist[1], *host, *rindex();

	u_long inet_addr();

	if (!(host = rindex(name, '@')))
		exit(1);

	*host++ = NULL;

	if (!(hp = gethostbyname(host))) {
		defaddr.s_addr = inet_addr(host);
		if (defaddr.s_addr == -1) {
			(void) fprintf(stderr, "whois: unknown host: %s\n", host);
			exit(1);
		}
		def.h_name = host;
		def.h_addr_list = alist;
		def.h_addr = (char *)&defaddr;
		def.h_length = sizeof(struct in_addr);
		def.h_addrtype = AF_INET;
		def.h_aliases = 0;
		hp = &def;
	}

	if (!(sp = getservbyname("whois", "tcp"))) {
		(void) fprintf(stderr, "whois: tcp/whois: unknown service - add to /etc/services\n");
		exit(1);
	}

	sin.sin_family = hp->h_addrtype;
	bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length);
	sin.sin_port = sp->s_port;
	if ((s = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) {
		perror("whois: socket");
		exit(1);
	}

	/* have network connection; identify the host connected with */
	(void)printf("[%s]\n", hp->h_name);
	if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
		perror("fwhois: connect");
		(void) close(s);
		exit(1);
	}

	/* Write the request to the server */
	if (dump_mode == 1) {
		/* We want dump mode */
		(void) write(s, "dump ", 5);
		(void) write(s, name, strlen(name));
		(void) write(s, "\r\n", 2);
	} else {
		/* Normal mode */
		(void) write(s, name, strlen(name));
		(void) write(s, "\r\n", 2);
	}

	if (fp = fdopen(s, "r"))
		while ((c = getc(fp)) != EOF) {
			c &= 0x7f;
			if (c == 0x0d) {
				c = '\n';
				lastc = '\r';
			} else {
				if (!isprint(c) && !isspace(c))
					c |= 0x40;
				if (lastc != '\r' || c != '\n')
					lastc = c;
				else {
					lastc = '\n';
					continue;
				}
			}
			putchar(c);
		}
	if (lastc != '\n')
		putchar('\n');
	(void) fclose(fp);

	return;
}
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 IT MARUHN