mpyq icon indicating copy to clipboard operation
mpyq copied to clipboard

Support for encrypted MPQs

Open eagleflo opened this issue 14 years ago • 3 comments

I still haven't encountered any, but according to references encrypted MPQs are possible. Possibly Warcraft III maps?

eagleflo avatar May 23 '10 02:05 eagleflo

I think I might have found one such replay.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/mpyq-0.1.5-py2.6.egg/mpyq.py", line 100, in __init__
    self.files = self.read_file('(listfile)').splitlines()
  File "/usr/local/lib/python2.6/dist-packages/mpyq-0.1.5-py2.6.egg/mpyq.py", line 201, in read_file
    raise NotImplementedError("Encryption is not supported yet.")
NotImplementedError: Encryption is not supported yet.

Download it here

GraylinKim avatar Aug 07 '11 22:08 GraylinKim

Custom maps for WC3 are very likely to use encryption. But mpyq works great with WC3 maps which use no encryption, such as the melee maps that come preinstalled with WC3, if header skipping is added (WC3 maps have a 512 byte header before the MPQ data).

RenolY2 avatar Jan 28 '14 08:01 RenolY2

In my fork (https://github.com/TheSil/mpyq) I've added very basic support for encryption (method determined from https://github.com/ladislav-zezula/StormLib). Feel free to check it out, although its quite dirty (though works just for my case where I just wanted to print map commands, see https://github.com/TheSil/w3mpq/blob/master/get_commands.py)

TheSil avatar Mar 08 '20 17:03 TheSil