From d7044aecaeb2bbb33e0f5cc2080d5b2995bd79d5 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Mon, 25 Aug 2014 12:59:01 +0200 Subject: + Added support for newest Spazzler protector --- test/StormTest.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test/StormTest.cpp') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index bac7c2a..dda622d 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -1436,6 +1436,13 @@ static TFileData * LoadMpqFile(TLogHelper * pLogger, HANDLE hMpq, const char * s nError = pLogger->PrintError("Failed to query the file size"); } + // Spazzler protector: Creates fake files with size of 0x7FFFE7CA + if(nError == ERROR_SUCCESS) + { + if(dwFileSizeLo > 0x1FFFFFFF) + nError = ERROR_FILE_CORRUPT; + } + // Allocate buffer for the file content if(nError == ERROR_SUCCESS) { @@ -3556,7 +3563,7 @@ int main(int argc, char * argv[]) // Search all testing archives and verify their SHA1 hash // if(nError == ERROR_SUCCESS) // nError = FindFiles(ForEachFile_VerifyFileChecksum, szMpqSubDir); - +/* // Test reading linear file without bitmap if(nError == ERROR_SUCCESS) nError = TestFileStreamOperations("MPQ_2013_v4_alternate-original.MPQ", 0); @@ -3608,7 +3615,7 @@ int main(int argc, char * argv[]) // Open a stream, paired with remote master (takes hell lot of time!) // if(nError == ERROR_SUCCESS) // nError = TestReadFile_MasterMirror("MPQ_2013_v4_alternate-downloaded.MPQ", "http://www.zezula.net\\mpqs\\alternate.zip", false); - +*/ // Search in listfile if(nError == ERROR_SUCCESS) nError = TestSearchListFile("ListFile_Blizzard.txt"); @@ -3664,6 +3671,9 @@ int main(int argc, char * argv[]) if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2014_v1_ProtectedMap_Spazzler2.w3x"); + if(nError == ERROR_SUCCESS) + nError = TestOpenArchive("MPQ_2014_v1_ProtectedMap_Spazzler3.w3x"); + // Open an Warcraft III map locked by the BOBA protector if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2002_v1_ProtectedMap_BOBA.w3m"); -- cgit v1.2.3