Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > main-updates-src > by-pkgid > d4de3e6ce0ef2aef959c614fce0f30ad > files > 19

bind-9.8.4-0.0.P1.0.1.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);
}