X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Common%2Frt%20api%2FHashAlgorithm.cpp;fp=Common%2Frt%20api%2FHashAlgorithm.cpp;h=4815fc6ac83d650de88e160c5fec597682516187;hb=0fb676244827a448dc60118d6558c4a4e346ffee;hp=e6f92c0c17a586e969c7380fee5bfc9b71ff031d;hpb=59bc65eea1e9a2cab6b1d51f4567cffc033fe938;p=freerainbowtables diff --git a/Common/rt api/HashAlgorithm.cpp b/Common/rt api/HashAlgorithm.cpp index e6f92c0..4815fc6 100644 --- a/Common/rt api/HashAlgorithm.cpp +++ b/Common/rt api/HashAlgorithm.cpp @@ -175,13 +175,13 @@ void HashORACLE(unsigned char* pPlain, int nPlainLen, unsigned char* pHash) DES_key_schedule ks1,ks2; unsigned char deskey_fixed[]={ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}; int i,j; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__GNUC__) strcpy_s(username, sizeof(username), "SYS"); #else strcpy(username, "SYS"); #endif int userlen = 3; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__GNUC__) _strupr((char*) pPlain); #else strupr((char*) pPlain); @@ -210,6 +210,7 @@ void HashORACLE(unsigned char* pPlain, int nPlainLen, unsigned char* pHash) memcpy (pHash,iv2,8); } */ + void HashNTLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash) { unsigned char UnicodePlain[MAX_PLAIN_LEN * 2]; @@ -392,10 +393,6 @@ void HashPIX(unsigned char* pPlain, int nPlainLen, unsigned char* pHash) memcpy (pass,pPlain,nPlainLen); - MD5_CTX ctx; - MD5_Init(&ctx); - MD5_Update(&ctx, (unsigned char *) pass, MD5_DIGEST_LENGTH); - MD5_Final(final, &ctx); MD5_NEW((unsigned char *) pass, MD5_DIGEST_LENGTH, final); char* p = (char*) temp;