1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-08-04 12:56:00 +00:00

Modules: Check UnpackSize to raise false positive with hc_decompress_rar

This commit is contained in:
Gabriele Gristina 2025-04-22 23:46:58 +02:00
parent 6716447dfc
commit c105104b92
3 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,10 @@ extern "C" unsigned int hc_decompress_rar (unsigned char *Win, unsigned char *In
Unp.DoUnpack (METHOD, SOLID); // sets output
unsigned int wfs = (unsigned int) Unp.GetWrittenFileSize();
if (wfs != UnpackSize) return 0;
unsigned int crc32 = (unsigned int) DataIO.UnpHash.GetCRC32 ();
return crc32;

View File

@ -383,6 +383,7 @@ class Unpack:PackDef
bool IsFileExtracted() {return(FileExtracted);}
void SetDestSize(int64 DestSize) {DestUnpSize=DestSize;FileExtracted=false;}
void SetSuspended(bool Suspended) {Unpack::Suspended=Suspended;}
int64 GetWrittenFileSize() {return(WrittenFileSize);}
#ifdef RAR_SMP
void SetThreads(uint Threads);

View File

@ -129,6 +129,7 @@
- Metal Backend: added workaround to prevent 'Infinite Loop' bug when build kernels
- Metal Backend: allow use of devices with Metal if runtime version is >= 200
- Metal Backend: disable Metal devices only if at least one OpenCL device is active
- Modules: Check UnpackSize to raise false positive with hc_decompress_rar
- User Options: added --metal-compiler-runtime option
- Hardware Monitor: avoid sprintf in src/ext_iokit.c
- Help: show supported hash-modes only with -hh