Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 380afce561c36ae3b99722c7c6f91cfb > files > 25

bind-9.10.1.P2-2.mga5.src.rpm

#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
	FILE *f=fopen("/dev/urandom", "r");
	char key[61];
	int i=0;
	char tmp;
	memset(key, 0, 61);
	while(i<60) {
		tmp=fgetc(f);
		if((tmp>='a' && tmp<='z') ||
		   (tmp>='A' && tmp<='Z') ||
		   (tmp>='0' && tmp<='9'))
			key[i++]=tmp;
	}
	puts(key);
	fclose(f);
	return(0);
}