C ( gcc -O2 -lcrypt)
Ubuntu 10.04.1
#define _XOPEN_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
void inc(char *p)
{
int i;
for (i=0 ; i<8 && p[i]=='z' ; i++);
if (i >= 8) exit(printf("Not found :-(\n"));
if (!p[i]) p[i]='a';
else p[i]++;
while (--i >= 0) p[i]='a';
}
int main ()
{
char *salt = "XY";
char *buzz = "XYaAbBcCZ0123";
char pass[] = { 'a',0,0,0,0,0,0,0,0 };
while(1)
if ( ! strcmp(crypt(pass, salt), buzz))
exit(printf("Found %s :-)\n", pass));
else
inc(pass);
}
(2.10 ^ 11 ) , , "a" "gzzzzzzz", - "haaaaaaa" "nzzzzzzz" " .., .