Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 19:48

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 21 posts ] 
Author Message
 Post subject: QuickBMS
PostPosted: 12 May 2009 15:28 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
in the last weeks I have worked hard on a new project which I started almost casually as an experiment and is now a very good project that I use everyday.

QuickBMS belongs to the "archives extraction" field, so the same field of tools like Dragon Unpacker, Game Extractor, MultiEx and so on but with the difference that it's not intended to have an internal database but for being quickly reprogrammed on the fly through small basic scripts which can be written by me or anyone else.

indeed it reads just these textual "scripts" written in an enhanced BMS language and with which is possible to handle the majority of game and non-game file formats.

so, for example, is possible to write on the fly scripts for reading the archives of games like Still Life 2, or for extracting the ZIP archives or even for decrypting files encrypted with Blowfish.

practically for all the recent files extractors I'm writing (check on Xentax where I'm active lately) I'm just using these scripts without writing a line of C and saving tons of time to me and to anyone who doesn't need to download a new tool all the times.

homepage of the project:

http://aluigi.org/papers.htm#quickbms

oh, it works from both command-line and minimalistic GUI so it's also easy to use.
hope it helps


Top
 Profile  
 
 
 Post subject: Re: QuickBMS
PostPosted: 25 May 2009 17:13 

Joined: 19 May 2009 21:37
Posts: 36
thank you very much that helped me very much , only thing it whould be much beter if it also compress the files back :)


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 12 Jun 2009 18:30 

Joined: 12 Jun 2009 18:18
Posts: 11
I have done!


Last edited by Gocha on 13 Jun 2009 06:24, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 12 Jun 2009 18:38 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
rot13 (also known as Caesar cipher) is the simple adding or substraction of a number to another.
for example if your byte is 0x41 and ROT13 is set to 2 the byte will become 0x43.
instead if it's -8 the byte will become 0x39


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 12 Jun 2009 19:24 

Joined: 12 Jun 2009 18:18
Posts: 11
I have Done


Last edited by Gocha on 13 Jun 2009 06:24, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 12 Jun 2009 19:40 

Joined: 12 Jun 2009 18:18
Posts: 11
Thanks a lot


Last edited by Gocha on 13 Jun 2009 06:25, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 12 Jun 2009 20:33 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I have commented each line:
Code:
get BYTE byte               # here we get the byte 0x01 at offset 0x10, so now BYTE is 0x01
if BYTE == 0                # skip this one because it's not 0
    set ROT13 long 0x100
    get BYTE byte
    math ROT13 -= BYTE      # practically: ROT13 = 0x100 - BYTE
else
    get ROT13 byte          # here we get the byte 0x8b which becomes the ROT13 value
endif
math ROT13 *= -1            # here we change the sign of ROT13 because we must decode the file, so our 0x8b becomes -0x8b
filerot13 ROT13             # here we tell quickbms to substract 0x8b to any byte of the file


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 13 Jun 2009 13:37 

Joined: 12 Jun 2009 18:18
Posts: 11
One thing - Can I run that script on Mr.Mouse' MEC?

I have tried, what i'm missing?


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 13 Jun 2009 18:16 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
MEX doesn't have the new commands that I implemented in quickbms like filerot13 and it requires the full syntax mode where you specify the file number in each file-operation and the need of the ';' char at the end of each line


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 13 Jun 2009 21:02 

Joined: 12 Jun 2009 18:18
Posts: 11
Ok, but what I have to change into above script to make MEX read it?


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 13 Jun 2009 22:05 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
filerot13 is not implemented in mex so it can NOT read it.
but why you want to use mex?


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 14 Jun 2009 16:06 

Joined: 12 Jun 2009 18:18
Posts: 11
coz I manually importing edited files into archive, which is hard work, and as I know MEX can do it automatically as bms extracts it.

I made out file so it doesn't use filerot13 to decode the file, so now script is

Code:
get FILES long;
goto 32;
for i = 0 < FILES;
    getdstring NAME 30;
    get DUMMY short;
    get SIZE long;
    get OFFSET long;
    get DUMMY long;
log NAME OFFSET SIZE;
next i;


Now can I use it? I've tried in MEX 4.3.0 and in GE, but no senses


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 14 Jun 2009 16:32 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
naaa the import method used by mex is not really what you mean, as far as I know and I have seen it's only a work-around which overwrites some parts of the original archive (so if the file you want to add is bigger than the original you can do nothing).

anyway add a 0 at the end of each "get" and "log" operation, example:
get FILES long 0;
log NAME OFFSET SIZE 0;

and use "for i = 1 To FILES;"

but for enabling the import work-around you must add two other variable in Log: http://wiki.xentax.com/index.php/BMS#Log
so contact mr.mouse for major info about how to adapt that bms code and moreover about what the import mode can really do for you in this case, he is the only one who can help you about this mex-related function.


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 14 Jun 2009 17:09 

Joined: 12 Jun 2009 18:18
Posts: 11
Okey, thanks to you for the much more help


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 04 Jul 2009 15:47 

Joined: 12 Jun 2009 18:18
Posts: 11
Hello pal

How to do like so:

in file containing files so... 1 jpg 2jpg 3 jpg, all after one finished comes other, not sizes nothing is given, so how to tell bms script to get all files?


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 04 Jul 2009 16:03 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
you need to use a generic ripper in that case because quickbms, although able to do it, has been created for specific formats


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 04 Jul 2009 16:21 

Joined: 12 Jun 2009 18:18
Posts: 11
here is a file whi contains jpg file, in the begining is somthing but i couldn't make it out, may be u can detect where is adrss and size in this file.
I cut only from the begining and where begins first jpg file


Last edited by Gocha on 04 Jul 2009 16:42, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 04 Jul 2009 16:31 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the jpg starts at offset 0x106, have you tried to use a ripper for it? (example: http://wiki.xentax.com/index.php/Jaeder_Naub)


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 04 Jul 2009 17:03 

Joined: 12 Jun 2009 18:18
Posts: 11
so i found size and start

1. 256 byte before file starts
2. 1byte after it is file size
3. 3bytes after it doesn't need
4. begins file

so how would be script?


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 04 Jul 2009 17:24 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
uhmmm in my opinion there is something missing because a filesize of 1 byte (8bit) is never used in archives.
then looks like that Images1.p you posted is incomplete because the jpg file is long only 0x4a bytes.
and then seems that there are some fields missing, maybe try to make an image of the hex editor and underline the fields to which you refer with different colors


Top
 Profile  
 
 Post subject: Re: QuickBMS
PostPosted: 04 Jul 2009 18:04 

Joined: 12 Jun 2009 18:18
Posts: 11
i was wrong, sorry
1. 256 byte before file starts
2. 4 byte after it is file size

so i did what i wanted, manually - edited 1-2 files, thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 21 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron