X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Client%20Applications%2Frcracki_mt%2FHashAlgorithm.cpp;fp=Client%20Applications%2Frcracki_mt%2FHashAlgorithm.cpp;h=bf04682e6792e0ecbee9ef9dc89960d4308a5629;hb=371055825f09b5dc2ad00e5702ef4ffe18c419b0;hp=caf30d63c38648b9851b674d042ad2893340a4d7;hpb=dd1ecec588c8c5773cf1c4216039c600263d9eaa;p=freerainbowtables diff --git a/Client Applications/rcracki_mt/HashAlgorithm.cpp b/Client Applications/rcracki_mt/HashAlgorithm.cpp index caf30d6..bf04682 100644 --- a/Client Applications/rcracki_mt/HashAlgorithm.cpp +++ b/Client Applications/rcracki_mt/HashAlgorithm.cpp @@ -7,7 +7,7 @@ * Copyright 2009, 2010 Daniël Niggebrugge * Copyright 2009, 2010 James Nobis * - * This file is part of racrcki_mt. + * This file is part of rcracki_mt. * * rcracki_mt is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,13 +32,12 @@ #include //#include #include -//#include #include //#include #include "fast_md5.h" #include "md4.h" //#include "sha1.h" -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__GNUC__) #pragma comment(lib, "libeay32.lib") #endif @@ -166,7 +165,6 @@ void HashNTLMCHALL(unsigned char* pPlain, int nPlainLen, unsigned char* pHash) des_ecb_encrypt((des_cblock*)spoofed_challange, (des_cblock*)&pHash[16], ks, DES_ENCRYPT); } - void HashORACLE(unsigned char* pPlain, int nPlainLen, unsigned char* pHash) { char ToEncrypt[256]; @@ -177,11 +175,17 @@ 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; - - strcpy (username, "SYS"); +#if defined(_WIN32) && !defined(__GNUC__) + strcpy_s(username, sizeof(username), "SYS"); +#else + strcpy(username, "SYS"); +#endif int userlen = 3; - - strupr ((char*) pPlain); +#if defined(_WIN32) && !defined(__GNUC__) + _strupr((char*) pPlain); +#else + strupr((char*) pPlain); +#endif memset (ToEncrypt,0,sizeof(ToEncrypt)); for (i=1,j=0; j