Sonicomi(*.npk)
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Sonicomi(*.npk)
Encrypted with AES/256/CBC + Vector (IV) from archive. File datas chunked, encrypted and compressed (deflate)
Code: Select all
static unsigned char m_Key[32] = {
0x65, 0xAB, 0xB4, 0xA8, 0xCD, 0xE0, 0xC8, 0x10, 0xBB, 0x4A, 0x26, 0x72, 0x37, 0x54, 0xC3, 0xA7,
0xE4, 0x3D, 0xE9, 0xEA, 0x7F, 0x5B, 0xB8, 0x43, 0x50, 0x1D, 0x05, 0xAB, 0xCF, 0x08, 0xD9, 0xC1};
Code: Select all
struct NPKHeader
{
uint32_t dwID; //Always NPK2
uint32_t dwFlag; //1 = Encrypted ?
uint8_t m_Vector[16]; //AES Vector (IV)
uint32_t dwTotalFiles;
uint32_t dwTableSize;
};
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Sonicomi(*.npk)
A couple of things to fix (read header of the script):
http://aluigi.org/bms/sonicomi.bms
http://aluigi.org/bms/sonicomi.bms
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Sonicomi(*.npk)
Maybe this 32 bytes is key for decrypt file data?
Code: Select all
getdstring IV 16 MEMORY_FILE2 # ???
getdstring HASH 16 MEMORY_FILE2 # ???
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Sonicomi(*.npk)
Eh no, the key is right or the whole file is garbage.
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Sonicomi(*.npk)
Well key and vector from header are correct for decrypt file data.
Last edited by Ekey on Mon Jul 11, 2016 3:31 pm, edited 1 time in total.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Sonicomi(*.npk)
Everything is correct except the first 16 bytes of the extracted files.
-
- Posts: 4
- Joined: Mon Jul 11, 2016 2:17 pm
Re: Sonicomi(*.npk)
I keep getting an error every time:
Btw, arc_unpacker just added Sonicomi support, and I can confirm it works:
https://github.com/vn-tools/arc_unpacker
You may want to look at the source code to see if it helps you correct the problems with sonicomi.bms, especially this part:
https://github.com/vn-tools/arc_unpacker/tree/master/src/dec/nitroplus
I'd do it myself, but I'm not very savvy on QuickBMS scripts or compression and encryption algorithms
But I would find it a huge help if the problems with the script were solved, as arc_unpacker can't be used to pack files, and the game doesn't support loading unpacked files.
Btw, arc_unpacker just added Sonicomi support, and I can confirm it works:
https://github.com/vn-tools/arc_unpacker
You may want to look at the source code to see if it helps you correct the problems with sonicomi.bms, especially this part:
https://github.com/vn-tools/arc_unpacker/tree/master/src/dec/nitroplus
I'd do it myself, but I'm not very savvy on QuickBMS scripts or compression and encryption algorithms
But I would find it a huge help if the problems with the script were solved, as arc_unpacker can't be used to pack files, and the game doesn't support loading unpacked files.
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Sonicomi(*.npk)
I guess that script not valid for reimport files back.
-
- Posts: 4
- Joined: Mon Jul 11, 2016 2:17 pm
Re: Sonicomi(*.npk)
I actually get an error both when unpacking and reimporting. Does the former work for you? If so, I must be doing something wrong. Do you have to use the command line in this case? Because I've been using the GUI.
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Sonicomi(*.npk)
BlueBird wrote:I actually get an error both when unpacking and reimporting.
Currently, this script does not work
BlueBird wrote:If so, I must be doing something wrong. Do you have to use the command line in this case? Because I've been using the GUI.
aluigi wrote:A couple of things to fix (read header of the script)
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Sonicomi(*.npk)
The problem with the bytes of the extracted files was my fault.
Script 0.2 works perfectly but needs quickbms 0.7.5 which is not available yet.
Script 0.2 works perfectly but needs quickbms 0.7.5 which is not available yet.
-
- Posts: 4
- Joined: Mon Jul 11, 2016 2:17 pm
Re: Sonicomi(*.npk)
I see, so it's just a matter of waiting now.
Thank you for your efforts, and same goes for Ekey
Thank you for your efforts, and same goes for Ekey
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Sonicomi(*.npk)
That arc_unpacker supports many formats, would be interesting to have quickbms scripts for every format supported there.
Anyone interested in doing this huge conversion work?
Anyone interested in doing this huge conversion work?
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Sonicomi(*.npk)
Game Extractor supported over 1000 formats. Do you want doing this huge conversion work?
Last edited by Ekey on Wed Jul 13, 2016 12:35 am, edited 1 time in total.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Sonicomi(*.npk)
I already checked it and it does NOT support 1000 formats.
It supports maybe 1000 games where most of them use just ZIP or the same format.
Additionally they are all old games for which already exist a script (xentax_cs on my website) or other solutions.
Anyway it's a good challenge
It supports maybe 1000 games where most of them use just ZIP or the same format.
Additionally they are all old games for which already exist a script (xentax_cs on my website) or other solutions.
Anyway it's a good challenge
-
- Posts: 157
- Joined: Sun Aug 24, 2014 8:54 am
Re: Sonicomi(*.npk)
Wait QuickBMS 0.75 release,thx aluigi&Ekey
-
- Posts: 7
- Joined: Fri Dec 19, 2014 5:08 pm
Re: Sonicomi(*.npk)
So after upgrading QuickBMS this works fine for sound.npk, but has the same error trying to extract font.npk and 3d.npk.
Here's what extracting 3d.npk looks like (tries only 1 file):
Sine 3d.npk is too big but font.npk has a similar issue, I give font.npk as a sample:
http://www100.zippyshare.com/v/fX0le6wc/file.html
Here's what extracting 3d.npk looks like (tries only 1 file):
Sine 3d.npk is too big but font.npk has a similar issue, I give font.npk as a sample:
http://www100.zippyshare.com/v/fX0le6wc/file.html
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Sonicomi(*.npk)
I'm checking it but in the meantime I highly suggest you to use arc_unpacker that works with that file:
https://github.com/vn-tools/arc_unpacker (I used the latest nighly build)
https://github.com/vn-tools/arc_unpacker (I used the latest nighly build)
Code: Select all
arc_unpacker.exe --dec=nitroplus/npk2 --plugin=sonicomi font.npk