Extracting files from files?
-
I suppose technically this is a programming question, but I'd like to ask it from a "is it possible" viewpoint, rather than a "how do I do it" one. I've found a program called "Ripper5" which can extract all sorts of files (.bmp, .tif, .wav, .txt, etc) from other files. It can't handle compression of the master file or encryption, but for master files where lots of smaller files have just been appended to them it can extract them. For example, most games have one huge file with all the textures, models, sounds in them. I want to get files out of them. Ripper5 does this. I presume it does this by looking for known headers / footers of file types and just extracting the data between them. I just wondered, is there any way, without knowing the master file format, you could extract files, then change them, then put them back again. From a hex editing viewpoint, I know you can't add / remove bytes easily, as it messes up the file corrupting it, so I'd be interested to know if anyone thinks it would be possible to put a bigger file back in place of the smaller file in the master file. Cheers, Peter
-
I suppose technically this is a programming question, but I'd like to ask it from a "is it possible" viewpoint, rather than a "how do I do it" one. I've found a program called "Ripper5" which can extract all sorts of files (.bmp, .tif, .wav, .txt, etc) from other files. It can't handle compression of the master file or encryption, but for master files where lots of smaller files have just been appended to them it can extract them. For example, most games have one huge file with all the textures, models, sounds in them. I want to get files out of them. Ripper5 does this. I presume it does this by looking for known headers / footers of file types and just extracting the data between them. I just wondered, is there any way, without knowing the master file format, you could extract files, then change them, then put them back again. From a hex editing viewpoint, I know you can't add / remove bytes easily, as it messes up the file corrupting it, so I'd be interested to know if anyone thinks it would be possible to put a bigger file back in place of the smaller file in the master file. Cheers, Peter
I think it depends on the file format. If the embedded files are just appended one after another, with no header or separated index file, it could be possible to replace any file with a new one, regardless of its size. Well, you have to be lucky... :) Cheers, Paolo
-
I think it depends on the file format. If the embedded files are just appended one after another, with no header or separated index file, it could be possible to replace any file with a new one, regardless of its size. Well, you have to be lucky... :) Cheers, Paolo
I agree with you, but most of the time there *IS* an index file, giving the name and offset of each separate resource in the master file. Sometimes this index is embedded in the master file itself, at the beginning or at the end, sometimes it has been generated as a header file, and is included in the software itself. So, I think only changing the size of one of the embedded file should often fail, you'll have to locate the index file and modify it too. If it's in the exe... it becomes really really difficult. Best regards, Mythos Frederic My (Mythos)