LINUX.ORG.RU

История изменений

Исправление Dron, (текущая версия) :

Больше какакода ::)


#include <stdio.h>
#include <stdlib.h>
#include <openssl/md5.h>
#include <string.h>

int main()
{
    long int i;
    MD5_CTX md5handler;
    unsigned char md5digest[MD5_DIGEST_LENGTH];
    char toostrbuff[100];
    long int len;
    MD5_Init(&md5handler);

    system("echo Start minner ;date");
    for (long long int count = 0; count < 99999999999; count++)
    {
        sprintf(toostrbuff,"%i",count);
        len = strlen(toostrbuff);
        MD5_Update(&md5handler, "moroz", 5);
        MD5_Update(&md5handler, toostrbuff, len);
        MD5_Final(md5digest,&md5handler);



        sprintf(toostrbuff,"%02x",md5digest[0]);
        if(strcmp(toostrbuff,"00")!=0) goto go_new;
        sprintf(toostrbuff,"%02x",md5digest[1]);
        if(strcmp(toostrbuff,"00")!=0) goto go_new;
        sprintf(toostrbuff,"%02x",md5digest[2]);
        if(strcmp(toostrbuff,"00")!=0) goto go_new;
        sprintf(toostrbuff,"%02x",md5digest[3]);
        if(toostrbuff[0]!='0') goto go_new;




        printf("FOUNT HASH => ");
        for (i=0; i<MD5_DIGEST_LENGTH; i++)
        {
            printf("%02x",md5digest[i]);
        };
        printf("\n");
        go_new:;
    }

    return 0;
};



dron@gnu:~$ gcc moroz.c -lcrypto
dron@gnu:~$ ./a.out 
Start minner
Вс дек 13 02:00:22 MSK 2015
FOUNT HASH => 0000000b72869f54b00b15a8f24f222b
^C

Исходная версия Dron, :

Больше какакода


#include <stdio.h>
#include <stdlib.h>
#include <openssl/md5.h>
#include <string.h>

int main()
{
    long int i;
    MD5_CTX md5handler;
    unsigned char md5digest[MD5_DIGEST_LENGTH];
    char toostrbuff[100];
    long int len;
    MD5_Init(&md5handler);

    system("echo Start minner ;date");
    for (long long int count = 0; count < 99999999999; count++)
    {
        sprintf(toostrbuff,"%i",count);
        len = strlen(toostrbuff);
        MD5_Update(&md5handler, "moroz", 5);
        MD5_Update(&md5handler, toostrbuff, len);
        MD5_Final(md5digest,&md5handler);



        sprintf(toostrbuff,"%02x",md5digest[0]);
        if(strcmp(toostrbuff,"00")!=0) goto go_new;
        sprintf(toostrbuff,"%02x",md5digest[1]);
        if(strcmp(toostrbuff,"00")!=0) goto go_new;
        sprintf(toostrbuff,"%02x",md5digest[2]);
        if(strcmp(toostrbuff,"00")!=0) goto go_new;
        sprintf(toostrbuff,"%02x",md5digest[3]);
        if(toostrbuff[0]!='0') goto go_new;




        printf("FOUNT HASH => ");
        for (i=0; i<MD5_DIGEST_LENGTH; i++)
        {
            printf("%02x",md5digest[i]);
        };
        printf("\n");
        go_new:;
    }

    return 0;
};



dron@gnu:~$ gcc moroz.c -lcrypto
dron@gnu:~$ ./a.out 
Start minner
Вс дек 13 02:00:22 MSK 2015
FOUNT HASH => 0000000b72869f54b00b15a8f24f222b
^C