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);
memcpy (pHash,iv2,8);
}
*/
+
void HashNTLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
{
unsigned char UnicodePlain[MAX_PLAIN_LEN * 2];
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;