/* Newsgroups: alt.security.pgp,sci.crypt
 * From: karn@servo.qualcomm.com (Phil Karn)
 * Subject: Re: PGP v. 2.1 Released
 * Nntp-Posting-Host: servo.qualcomm.com
 * Organization: Qualcomm, Inc
 * Date: Wed, 16 Dec 1992 00:27:12 GMT
 * 
 * In article <1992Dec11.070917.4744@ucsu.Colorado.EDU> frechett@spot.Colorado.EDU (-=Runaway Daemon=-) writes:
 * >Put -----BEGIN PGP etc etc.. around all your messages.. encrypted or not.
 * >-----END PGP MESS-----   ;)
 * 
 * Okay, I can't take it anymore. Take this program. Please. I'm placing
 * it in the public domain. Do whatever you want with it. Annoy your snoopy
 * sysadmins. Confound the spooks. Have fun. --Phil
 */

#include <stdio.h>
char table[] =
  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

main(argc,argv)
int argc;
char *argv[];
{
	int lines;
	int chars;
	long t;

	if(argc < 2){
		fprintf(stderr,"Usage: %s #lines\n",argv[0]);
		exit(1);
	}
	lines = atoi(argv[1]);
	time(&t);
	srandom((unsigned)t);
	printf("-----BEGIN PGP MESSAGE-----\nVersion: 2.1\n\n");
	while(lines-- != 0){
		for(chars=64;chars != 0;chars--)
			putchar(table[random() % 64]);
		putchar('\n');
	}
	chars = random() % 64;
	while(chars-- != 0)
		putchar(table[random() % 64]);
	printf("\n=");
	for(chars=4;chars !=0;chars--)
		putchar(table[random() % 64]);
	putchar('\n');
	printf("-----END PGP MESSAGE-----\n");
}
