Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added -m 23700/23800 = RAR3-p cracking
- Loading branch information
Showing
13 changed files
with
5,161 additions
and
22 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* Author......: See docs/credits.txt | ||
* License.....: MIT | ||
*/ | ||
|
||
// CREDITS go to the UnRAR project from rarlab.com | ||
// see license.txt file | ||
|
||
#include "rar.hpp" | ||
|
||
#define WINSIZE 0x100000 // minimum window size 0x20000 (MinAllocSize is 0x40000), 1 MiB | ||
#define SOLID false | ||
#define METHOD VER_UNPACK // 29 for RAR3 archives | ||
|
||
extern "C" unsigned int hc_decompress_rar (unsigned char *Win, unsigned char *Inp, unsigned char *VM, unsigned char *PPM, const unsigned int OutputSize, const unsigned char *Input, const unsigned int PackSize, const unsigned int UnpackSize, const unsigned char *Key, const unsigned char *IV) | ||
{ | ||
ComprDataIO DataIO; | ||
|
||
DataIO.InitRijindal ((byte *) Key, (byte *) IV); | ||
|
||
DataIO.SetPackedSizeToRead (PackSize); | ||
|
||
DataIO.SetTestMode (false); | ||
DataIO.SetSkipUnpCRC (false); // or 'true', if we use our own crc32 code | ||
DataIO.UnpHash.Init (HASH_CRC32, 1); // 1: 1 single thread ? | ||
|
||
DataIO.SetUnpackFromMemory ((byte *) Input, PackSize); | ||
DataIO.SetUnpackToMemory ((byte *) NULL, UnpackSize); | ||
|
||
Unpack *Unp = new Unpack (&DataIO); | ||
|
||
// not needed in our tests (no false positives): | ||
// memset (Win, 0, UnpackSize); | ||
// #define INPSIZE 0x50000 | ||
// memset (Inp, 0, INPSIZE); | ||
// memset (VM, 0, INPSIZE); | ||
// #define PPMSIZE 216 * 1024 * 1024 | ||
// memset (PPM, 0, PPMSIZE); | ||
|
||
Unp->SetWin (Win); | ||
Unp->SetPPM (PPM); | ||
|
||
Unp->Init (WINSIZE, SOLID); | ||
Unp->SetDestSize (UnpackSize); | ||
|
||
Unp->SetExternalBuffer (Inp, VM); | ||
|
||
Unp->DoUnpack (METHOD, SOLID); // sets output | ||
|
||
unsigned int crc32 = (unsigned int) DataIO.UnpHash.GetCRC32 (); | ||
|
||
delete Unp; | ||
|
||
return crc32; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
****** ***** ****** UnRAR - free utility for RAR archives | ||
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
****** ******* ****** License for use and distribution of | ||
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
** ** ** ** ** ** FREE portable version | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The source code of UnRAR utility is freeware. This means: | ||
|
||
1. All copyrights to RAR and the utility UnRAR are exclusively | ||
owned by the author - Alexander Roshal. | ||
|
||
2. UnRAR source code may be used in any software to handle | ||
RAR archives without limitations free of charge, but cannot be | ||
used to develop RAR (WinRAR) compatible archiver and to | ||
re-create RAR compression algorithm, which is proprietary. | ||
Distribution of modified UnRAR source code in separate form | ||
or as a part of other software is permitted, provided that | ||
full text of this paragraph, starting from "UnRAR source code" | ||
words, is included in license, or in documentation if license | ||
is not available, and in source code comments of resulting package. | ||
|
||
3. The UnRAR utility may be freely distributed. It is allowed | ||
to distribute UnRAR inside of other software packages. | ||
|
||
4. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED "AS IS". | ||
NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT | ||
YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, | ||
DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING | ||
OR MISUSING THIS SOFTWARE. | ||
|
||
5. Installing and using the UnRAR utility signifies acceptance of | ||
these terms and conditions of the license. | ||
|
||
6. If you don't agree with terms of the license you must remove | ||
UnRAR files from your storage devices and cease to use the | ||
utility. | ||
|
||
Thank you for your interest in RAR and UnRAR. | ||
|
||
|
||
Alexander L. Roshal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.