Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: Looking for c source code to generate cvs passwords
- To: tlug@example.com
- Subject: Re: Looking for c source code to generate cvs passwords
- From: Austin Kurahone <austin@example.com>
- Date: Tue, 1 May 2001 21:23:09 +0900
- Content-Disposition: inline
- Content-Type: multipart/signed; micalg=pgp-md5;protocol="application/pgp-signature"; boundary="WfZ7S8PLGjBY9Voh"
- In-Reply-To: <20010501121634.38853.qmail@example.com>; from jake_morrison@example.com on Tue, May 01, 2001 at 05:16:34AM -0700
- References: <15086.38408.529511.137821@example.com> <20010501121634.38853.qmail@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <oSCneB.A.YiH.-rq76@example.com>
- Resent-Sender: tlug-request@example.com
- User-Agent: Mutt/1.2.5i
On Tue, May 01, 2001 at 05:16:34AM -0700, Jake Morrison wrote: > Yes, the passwords stored in .cvslogin are trivially > encoded, as they need to be sent to the server in cleartext. > But the passwords on the server are in crypt format. The attached .c file should do the trick. Compile as neccecary. (I plucked this out of a IRC daemon source tarball) -- Austin K. Kurahone Tokyo Linux Users Group / SIGUSR1 R&D Hail Eris! All Hail Discordia! "One must still have chaos in one to give birth to a dancing star!" --Nietzshe/*********************************************************************** * IRC - Internet Relay Chat, src/mkpasswd.c * Copyright (C) 2000 Alasdair McWilliam. RageIRCd, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <stdio.h> #include <stdlib.h> #include <string.h> extern char *getpass(); int main(argc, argv) int argc; char *argv[]; { static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; char salt[3]; char *plaintext; int i; if (argc < 2) { srandom(time(0)); salt[0] = saltChars[random() % 64]; salt[1] = saltChars[random() % 64]; salt[2] = 0; } else { salt[0] = argv[1][0]; salt[1] = argv[1][1]; salt[2] = '\0'; if ((strchr(saltChars, salt[0]) == NULL) || (strchr(saltChars, salt[1]) == NULL)) { (void)fprintf(stderr, " \n"); (void)fprintf(stderr, "ERROR: Illegal salt %s\n", salt); (void)fprintf(stderr, " \n"); exit (1); } } (void)fprintf(stderr, " \n"); plaintext = getpass("Plain text: "); (void)fprintf(stderr, " \n"); (void)fprintf(stderr, "Encrypted text: %s\n", crypt(plaintext, salt)); (void)fprintf(stderr, " \n"); return 0; }
- Follow-Ups:
- Re: Looking for c source code to generate cvs passwords
- From: SL Baur <steve@example.com>
- References:
- Re: Looking for c source code to generate cvs passwords
- From: "Stephen J. Turnbull" <turnbull@example.com>
- Re: Looking for c source code to generate cvs passwords
- From: Jake Morrison <jake_morrison@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: Looking for c source code to generate cvs passwords
- Next by Date: Re: gjiten 0.8
- Prev by thread: Re: Looking for c source code to generate cvs passwords
- Next by thread: Re: Looking for c source code to generate cvs passwords
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links