Page 10 of 15

Re: Little extractor program

Posted: Mon Jul 27, 2009 8:34 pm
by gamemaster
Am I doing this right? What I do is make a new folder,put GOBREAD.EXE inisde it,copy the file I want extracted and past it in the same folder, then I take the file and drag it on top of GOBREAD.EXE.Nothing happens! All that does is a blank cmdpromt window pops up for half a second than disappears.I tried it with different files just to make sure and the same thing happens.If im not doing it right how am I supposed to?

Re: Little extractor program

Posted: Mon Jul 27, 2009 9:03 pm
by Csimbi
gamemaster wrote:Am I doing this right? What I do is make a new folder,put GOBREAD.EXE inisde it,copy the file I want extracted and past it in the same folder, then I take the file and drag it on top of GOBREAD.EXE.Nothing happens! All that does is a blank cmdpromt window pops up for half a second than disappears.I tried it with different files just to make sure and the same thing happens.If im not doing it right how am I supposed to?
No, you do not drag and drop. This is a command line tool. Open up a command prompt, type the name of the program for help and go on from there.

Re: Little extractor program

Posted: Mon Jul 27, 2009 9:16 pm
by gamemaster
I got it running thanks. But what is the command I need to put in to extract a file?Can You give me an example of how id use it complete with the file path?

Re: Little extractor program

Posted: Mon Jul 27, 2009 9:30 pm
by Csimbi
gamemaster wrote:I got it running thanks. But what is the command I need to put in to extract a file?Can You give me an example of how id use it complete with the file path?
You type gobread at the command prompt, and you will see.

Re: Little extractor program

Posted: Mon Jul 27, 2009 9:40 pm
by gamemaster
Thats not what I mean. The folder where I have both the file I want to extract and GOBRREAD.EXE is K:\gbred I typed in K:\gbred\GOBREAD.EXE in cmdpromt and got the program started.The file I want to extract is data.pak.What do I type in order to extract it?

Anyone?

Re: Little extractor program

Posted: Tue Jul 28, 2009 12:12 am
by Csimbi
gamemaster wrote:Thats not what I mean. The folder where I have both the file I want to extract and GOBRREAD.EXE is K:\gbred I typed in K:\gbred\GOBREAD.EXE in cmdpromt and got the program started.The file I want to extract is data.pak.What do I type in order to extract it?

Anyone?
Well, if you got it started, then you should have received this:

Code: Select all

GOBREAD extracts all files from a containerfile into the current directory.

Syntax: GOBREAD [{/|-}switch] [containerfile] [{/|-}switch] [>output.log]
  or    GOBREAD {/|-}create{=|:}containerfile {/|-}switch  [>output.log]

Switches:
 LIST   Lists supported formats and their switches
 CHECK  Test if the format can be handled
 CREATE Create container file (not fully supported; format switch reqd.)
 VIEW[{=|:}D] List files with method, offsets, sizes and names;
        D = decimal, default: hex


Examples:
 GOBREAD DATA.PAK       = Extracts all files from DATA.PAK
                          if the format can be detected
 GOBREAD /check FILE.DAT= Shows which format would be used
 GOBREAD DARK.COB -DF   = Extracts all files from DARK.COB
                          forcing format "Dark Forces"
 GOBREAD /cbn file.cbn  = Same as above, but with other format
 GOBREAD -CREATE=REDNECK.GRP /GRP
                        = Creates the containerfile "REDNECK.GRP"
                          from all files in the current directory
                          of type "GRP-Files"
 GOBREAD -view=d data.pak Lists all files in the container with dec numbers

This program is freeware. Use it at your own risk. Only for private use.
From this you should be able to figure out everything you need.

Re: Little extractor program

Posted: Tue Jul 28, 2009 12:32 am
by gamemaster
I type in GOBREAD Data.pak and it keeps saying GOBREAD is not recognized as an internal or external command.

Re: Little extractor program

Posted: Tue Jul 28, 2009 12:56 am
by chrrox
gamemaster wrote:I type in GOBREAD Data.pak and it keeps saying GOBREAD is not recognized as an internal or external command.
that means the exe is not in the same path as the directory you are in the command prompt.
you need to do like cd c:\GOBREAD
then type GOBREAD.exe c:\data.pak
just change out the locations for where you have them.

Re: Little extractor program

Posted: Tue Jul 28, 2009 1:14 am
by gamemaster
Finally got it working just fine!It extracts and everything!Thanks for clearing that up for me.

Re: Little extractor program

Posted: Tue Jul 28, 2009 2:59 am
by asmxtx
@Csimbi/@chrrox: Thank you that you got the point.
And thank you that you are able to cope with my program.

I have created GOBREAD more than ten years ago as a 16-Bit-DOS-program when I was a youngster in PC-assembler-programming.
Nowadays I wouldn't go up to a program in a way like this.
But the skeleton of GOBREAD includes all mechanisms to handle lot of file derivatives - and even with the usage of the newest 32Bit-processors instruction set - so I am bound to its scaffold.
It would cost it a lot work to convert it to a more modern script-like interpreter.
But if you think it helps you in any kind I would be grateful.

Re: Little extractor program

Posted: Tue Jul 28, 2009 10:44 am
by Steefjan
wow awesome program! :D
could you please add support for burnout paradise .BIN files?

thanks a lot!

Re: Little extractor program

Posted: Tue Jul 28, 2009 1:10 pm
by Csimbi
asmxtx wrote: I have created GOBREAD more than ten years ago as a 16-Bit-DOS-program when I was a youngster in PC-assembler-programming.
Nowadays I wouldn't go up to a program in a way like this.
But the skeleton of GOBREAD includes all mechanisms to handle lot of file derivatives - and even with the usage of the newest 32Bit-processors instruction set - so I am bound to its scaffold.
It would cost it a lot work to convert it to a more modern script-like interpreter.
But if you think it helps you in any kind I would be grateful.
Adding scripting support would be beneficial for people who have experience with reversing file formats. On the other hand, any user can invoke a hard-coded functionality with a few parameters. I am quite happy with the tool as it is - it gets the job done without much hassle. I have the feeling that a lot of people think alike.

I would personally find scripting capability useful (especially if it would remain a command-line tool), especially when one's trying to reverse a new format. But. Since adding such capabilities is going to be a tremendous task, I will not make a statement saying: go for it.
Why not start from scratch behind the scenes and do it according to your own pace - without pressure from the community? This way, you can even drop the ball when you don't feel like doing it anymore.
Another alternative is making it an open-source project so those interested could contribute - though you might eventually end up without help, or, the other extreme: spend too much time on verifying code to be checked in.
Think it through, there is no rush.

Re: Little extractor program

Posted: Thu Aug 06, 2009 9:05 am
by neoen
Hi, I successfully extracted Chronicles of Mystery datal.vbf archive with Gobread (viewtopic.php?p=27415#p27415), but I could not repack it. Is it possible? Thank you very much...

Re: Little extractor program

Posted: Mon Aug 24, 2009 12:36 pm
by asmxtx
Added: Extraction support for Wolfenstein 2.

Warning:
- The "/VIEW"-switch doesn't work for this format.
- Many files don't get their proper file extensions (because I don't know them).
They are replaced by the magic value from the main container and enclosed in exclamation marks. Examining the PK4-files doesn't give more information than I've already got.
For example: MP3-sounds are named to "ambience.!!!SNDS!!!"
Could anybody give me a hint?


Notes:
The main container (SPK/MPK) consists of concatenated ZLIB-compressed chunks.
Each chunk is preceded by a magic value (which determines the data type) and two values for uncompressed and compressed size. A chunk extracts to another container with the final data and (rather simple) structure: Number_of_files + table_filenames_lengths + data (no offsets).

Therefore the extraction process is separated into two steps:
- Decompressing each ZLIB-chunk to a temporary file
- Extracting the data from this file

[Edit:
Please report if you encounter an "File format not recognized" (or anything else) error like Savage did:
viewtopic.php?p=31405#p31405
This allows me to update the program.
Thanks.

According to this file structure the game must be an awful memory spendthrift in my opinion because of the large buffers needed to decompress the data.

Re: Little extractor program

Posted: Mon Aug 24, 2009 1:32 pm
by aluigi
usually the chunk based archives must be handled like a compressed file system.
for example if the name table says that the file myfile.dat is located at offset 0x12345 and has a size of 80000 bytes you must extract it chunk-by-chunk finding the starting chunk through the reading of the various chunks sizes (like an array) and continuing with this type of handling.

the memory consumed for the process will be only the one of a single chunk and those for keeping the array of "chunks sizes", so it's very good.

and the cool thing is that when you implement this process transparently you will only need to call your function instead of fread... and it works perfectly :)