Quote:
Originally Posted by LepEatWorld
So, I currently tried to open an IOP file but for some reason I cant seem to you know... get it open. I'm able to open it as a Zip, but if I do the file contains 0bites. When I open it with Notepad++ it's kind of encrypted? Not sure at this point. But when I open it with [Only registered and activated users can see links. Click Here To Register...] it shows me the files inside and then it stops and shows me the Zip files instead... [Only registered and activated users can see links. Click Here To Register...]
This is an example of the files that should be inside the IOP.
config/accessory/bracelet/000_bracelet_buff.ini
config/accessory/bracelet/000_bracelet_buff_accessory.ini
config/accessory/bracelet/000_bracelet_buff_normal.ini
config/accessory/bracelet/000_bracelet_item.ini
config/accessory/bracelet/000_bracelet_skill.ini
config/accessory/necklace/PK config/accessory/necklace/000_necklace_attack.ini
config/accessory/necklace/000_necklace_buff.ini
config/accessory/necklace/000_necklace_buff_accessory.ini
config/accessory/necklace/000_necklace_buff_normal.ini
config/accessory/necklace/000_necklace_item.ini
config/accessory/necklace/000_necklace_skill.ini
Thanks for the help in advance to whoever can help.
|
Edit: Sorry im late, made python script instead
The file is PK, means with zlib can be unpacked, but its a modified PK format, it has the following file format
|4 bytes | 1 byte |0xD bytes| 4 bytes | 4 bytes | 4 bytes | variable size bytes | variable size bytes|
|PK SIGNATURE|filenamelen|unknown |compressed_size|uncompressed_size| unk2 | filename | data |
Code:
import zlib
import os
f = open("rs.iop","rb")
#zlib header
pkHeader = b"\x50\x4b\x03\x04"
print("Unpacking...")
while True:
header = f.read(4)
if header != pkHeader:
break
filenamelen = int.from_bytes(f.read(1),byteorder="little")
#skip bytes
f.read(0xD)
filesize = int.from_bytes(f.read(4),byteorder="little")
#skip bytes
f.read(8)
filename = f.read(filenamelen).decode("utf-8")
if filesize == 0:
try:
os.mkdir(filename)
except:
pass
else:
fo = open(filename,"wb")
print(filename)
data = f.read(filesize)
try:
decompressed = zlib.decompress(data,-15)
fo.write(decompressed)
except:
#can't uncompress data, write plain
fo.write(data)
fo.close()
f.close()
print("Done!")