Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 450514f01c04e8b257f65519be0f77ea > files > 20

bind-9.4.2-1.3mdv2008.0.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<='0'))
			key[i++]=tmp;
	}
	puts(key);
	fclose(f);
}