hazzik / mpqtool-export

Automatically exported from code.google.com/p/mpqtool
0 stars 1 forks source link

Unable to determine encyption seed #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The file is valid mpq file -- it's a playable war3 map, it could be opened
by Mpq Editor (http://www.zezula.net/en/mpq/download.html). But when using
MpqTool to extract "war3map.w3e" (the same task could be done with Mpq
Editor), it throws a exception.

Code:
            string map = "(10)LostTemple_3C Air c s5.w3x";
            MpqArchive ar = new MpqArchive(map);
            using (MpqStream stream = ar.OpenFile("war3map.w3e"))
            {
                while (stream.Position < stream.Length)
                {
                    stream.ReadByte();
                }
            }

Exeption:
System.Exception : Unable to determine encyption seed

Call Stack:
   在 MpqReader.MpqStream.LoadBlockPositions()
   在 MpqReader.MpqStream..ctor(MpqArchive File, MpqBlock Block)
   在 MpqReader.MpqArchive.OpenFile(String Filename)

Original issue reported on code.google.com by deerc...@gmail.com on 23 Jul 2007 at 9:06

Attachments:

GoogleCodeExporter commented 9 years ago
Ladik's MPQ Editor (vv 1.8.1.177) has the same problem with war3map.w3e and
war3map.doo in this archive.  I'm guessing that StormLib will have the same 
problem.  

I will look into it further.

Original comment by fool...@gmail.com on 24 Jul 2007 at 1:35

GoogleCodeExporter commented 9 years ago
But here I can extract the two files with Ladik's MPQ Editor(v1.8.1.178 - this
version number is from the about dialog, while the web site says it's 
v1.8.1.177, the
most recent release). Is it using storm.dll background? I didn't check the 
option
"Use storm.dll for read-only operations", and there is no storm.dll in the 
directory
of MPQEditor.exe.

Original comment by deerc...@gmail.com on 24 Jul 2007 at 1:50

GoogleCodeExporter commented 9 years ago
Fixed in svn revision 7.
Basically the second check on the encryption key was failing when the block 
offset
was greater than 0xffff.  StormLib assumed there wouldn't be any this big.

I got different behaviour in MPQ Editor when I used the internal listfile to 
when I
used your one.

It should be ok now.  It can handle block offsets up to 0x1fff.

Original comment by fool...@gmail.com on 26 Jul 2007 at 9:27

GoogleCodeExporter commented 9 years ago
Seems still not working for me, where the lt3c.w3x is the file above I've 
uploaded,
the list.txt is the listfile I've uploaded earlier in
http://code.google.com/p/mpqtool/issues/detail?id=4&can=1 :

E:\work\study\mpqtool\MpqTool\bin\Debug>mpqtool -e lt3c.w3x -llist.txt
mpqtool v0.85
Extracting to E:\work\study\mpqtool\MpqTool\bin\Debug
war3map.j .. Done.
Scripts\war3map.j .. Done.
war3map.w3a .. Done.
war3map.w3e .. Unable to determine encyption seed
Aborted.

Original comment by deerc...@gmail.com on 26 Jul 2007 at 10:42

GoogleCodeExporter commented 9 years ago
Oops I made the fix to the wrong place.  Try svn revision 8.

Original comment by fool...@gmail.com on 26 Jul 2007 at 11:16

GoogleCodeExporter commented 9 years ago
Bingo! It works great, thank you!

Original comment by deerc...@gmail.com on 26 Jul 2007 at 1:16