[Module] PackEx - Module (all OS)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

[Module] PackEx - Module (all OS)

Post by Thorsten1867 »

PackEx - Module (PB V5.7x / all OS / 64Bit)

Extended Packer - Module
  • Add or replace a file to an open archive
  • Remove a file from an open archive
  • Move files back to the archive or update them when the archive is closed. [#MoveBack/#Update]
  • Add encrypted files to the archive or or decrypt files during unpacking
  • Save XML, JSON and Images directly in the archive and load them directly from the archive
  • Add sound, music or sprite files to the archiv and load them directly from the archive

Code: Select all

; PackEx::AddFile()          - similar to AddPackFile()
; PackEx::AddImage()         - similar to SaveImage(), but for archive
; PackEx::AddJSON()          - similar to SaveJSON(), but for archive
; PackEx::AddMemory()        - similar to AddPackMemory()
; PackEx::AddXML()           - similar to SaveXML(), but for archive
; PackEx::Close()            - similar to ClosePack()  [#MoveBack/#Update]
; PackEx::Create()           - similar to CreatePack()
; PackEx::DecompressFile()   - similar to UncompressPackFile()
; PackEx::DecompressImage()  - similar to LoadImage(), but for archive
; PackEx::DecompressJSON()   - similar to LoadJSON(), but for archive
; PackEx::DecompressMemory() - similar to UncompressPackMemory()
; PackEx::DecompressMusic()  - similar to LoadMusic(), but for archive
; PackEx::DecompressSound()  - similar to LoadSound(), but for archive
; PackEx::DecompressXML()    - similar to LoadXML(), but for archive
; PackEx::IsEncrypted()      - checks if the packed file is encrypted
; PackEx::Open()             - similar to OpenPack()
; PackEx::RemoveFile()       - remove file from archive
; PackEx::SetSalt()          - add your own salt
; PackEx::CreateSecureKey()  - use secure keys to make brute force attacks more difficult
Download: PackExModule.pbi

Download: qAES-Packer.exe (+ SourceCode)
Download: UnPackEx.exe (+ SourceCode)
Last edited by Thorsten1867 on Sat Nov 23, 2019 1:02 pm, edited 2 times in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Captn. Jinguji
User
User
Posts: 92
Joined: Sun Oct 24, 2004 9:25 am

Re: [Module] PackEx - Module (all OS)

Post by Captn. Jinguji »

Hi, Thorsten.

First of all:Thanks for your effort, basically it's what many need and have written about it many times

Minor problem: Seems like the module prefix is missing in line 1673.

Bigger problem:
* Even with that prefix added, the ZIP file is being created with the two jpgs in unreadable format.
* 7zip doesn't prompt me to enter the decryption pwd.
* IrfanView complains that it can not interpret any of the two files
(complains about unreadable file header). That's already the case with the files in the example .zip you provided.

The jpg file outside the archive is ok, though.

Best reagrds
CJ
Is this an artifact or should it be disposed of ?
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] PackEx - Module (all OS)

Post by Thorsten1867 »

Minor problem: Seems like the module prefix is missing in line 1673.
Bug fixed.
* Even with that prefix added, the ZIP file is being created with the two jpgs in unreadable format.
* 7zip doesn't prompt me to enter the decryption pwd.
* IrfanView complains that it can not interpret any of the two files
(complains about unreadable file header).
This is not an error because the datas in the archive are encrypted and therefore cannot be read.

PureBasic does not support password protected archives and this would not be really secure (BruteForce!).
With me the files themselves are encrypted and then packed into a normal archive.
To be able to read them, they must first be unpacked (and decrypted) again.
So you can only read the pictures in your program or put a small unpacker in the archive.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Captn. Jinguji
User
User
Posts: 92
Joined: Sun Oct 24, 2004 9:25 am

Re: [Module] PackEx - Module (all OS)

Post by Captn. Jinguji »

Well, thank you Thorsten.
The missing prefix was surely rather a "glitch" than a "bug".

I obviously somehow misunderstood this part.
"Add encrypted files to the archive or or decrypt files during unpacking"
Never mind, good work though.
Thanks for the quick reply
CJ
Is this an artifact or should it be disposed of ?
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] PackEx - Module (all OS)

Post by Thorsten1867 »

I wrote a small unpacker, because the normal unpacker can unpack the encrypted files, but not decrypt them.
The source code also demonstrates the practical use of several of my modules.

Image

Download: UnPackEx.exe (+ SourceCode)
Last edited by Thorsten1867 on Fri Dec 20, 2019 4:07 pm, edited 1 time in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Module] PackEx - Module (all OS)

Post by Thorsten1867 »

A complete packer with support for qAES encrypted files and a preview of supported files. (Image/Text/XML/JSON).

Image

Download: qAES-Packer.exe (+ SourceCode)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
Post Reply