Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Possible next features of QuickBMS

Featured Replies

  • Replies 679
  • Views 46
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

Shokoniraya, posted Thu Oct 15, 2020 1:14 am (59456)


QuickBMS re-set variables that contain asize? but i don't think so (those variables that have a real block like byte short long can resize always, problem is those variables that created by hand with math and xmath, like math OFFSET = 208 or xmath SIZE "NEXT_OFFSET - OFFSET")

and about asize problem, maybe you can add a function to log that resize all of savepos variables that are >= than log offset variable
  • Author
  • Localization

aluigi, posted Thu Oct 15, 2020 11:17 pm (59478)


In the tests I did when I implemented the reverse math operations in reimporting, they worked.
asize is something that I don't want to touch because when I touched it few weeks ago it introduced a bug.
So it's better for me to keep everything as-is ;)
  • Author
  • Localization

aluigi, posted Fri Oct 16, 2020 5:46 pm (59505)


New beta, I mainly fixed some bugs introduced in the previous beta.
  • Author
  • Localization

Shokoniraya, posted Sat Oct 17, 2020 1:47 am (59517)


asize works fine
you right sir aluigi, savepos will be a real mess if touched, must be adjust in script with more coding


but xmath SIZE "NEXT_OFFSET - OFFSET" and math still has problem
and let's say it's not a problem at all! becuase it can be fixed
xmath and math working good
thank you
Code:
xmath SIZE "NEXT_OFFSET - OFFSET"

get BEFORE_REIMPORT_ASIZE asize
log NAME OFFSET SIZE
get AFTER_REIMPORT_ASIZE asize #input file size will be changed in reimporting

xmath ASIZE_CHANGING "AFTER_REIMPORT_ASIZE  - BEFORE_REIMPORT_ASIZE"
math SIZE ASIZE_CHANGING #ASIZE_CHANGING can be negative or positive


we can do same job for savepos OFFSET too
  • Author
  • Localization

aluigi, posted Thu Oct 22, 2020 4:58 pm (59678)


Honestly I don't think I can do much on that, it seems a mess and as far as I know reimporting of math/xtmath works perfectly with normal archives, I suppose the problem there is just with sequential files.

I just uploaded a new beta.
The main feature is the -e option that when used in reimport2 allows to disable the compression of the imported file.

For example if you want to reimport the Neptunia Rebirth files, you can't because there is no algorithm for recompressing the originally compressed data.
While now it works if the reimport2 mode is used with the -e option (also available in quickbmsver in the script).
(Neptunia is only an example because there are rebuilders as far as I know)
  • Author
  • Localization

shekofte, posted Sat Oct 24, 2020 6:30 pm (59726)


2020 keep me away from programming .
Also All pcs turned into 64 bits that are so expensive in fully equipped configuration !
Just looking for good Omen in new year ...
69 days countdown to year 2021

Also Best Wishes for You Luigi Auriemma !
  • Author
  • Localization

aluigi, posted Tue Nov 17, 2020 8:44 pm (60381)


Not really a feature but I'm finally making an example for the operators of the String command:
Code:
    append
      MyStringExampleString!STRING
      MyStringExampleString!3
      MyStringExampleString!-3
-   remove, truncate
      MyExample!
      MyStringExampleStri
      MyS
^   xor
      -=<.=31/*#87:5::5h
      ~J`GAZ]TvKR^C_V`GAZ]T
      `J~G_ZCThKL^]_H`YAD]J
<   strrstr var2 (before)
      MyStringExampleString
      tringExampleString!
      ng!
*   replicate
      MyString
      MyStringExampleString!MyStringExampleString!MyStringExampleString!
      MyStringExampleString!MyS
%   strstr (before), truncate, mod
      My
      M
      MyStringExampleString
&   strstr
      StringExampleString!
      MyStringExampleString!
      MyStringExampleString!
|   strstr var2
      ExampleString!
      MyStringExampleString!
      MyStringExampleString!
$   strrstr
      String!
      MyStringExampleString!
      MyStringExampleString!
!   strrstr var2
      !
      MyStringExampleString!
      MyStringExampleString!
>   strrstr (before)
      MyStringExample
      MyStringExampleStri
      MyStringExampleString!

The examples are based on the following variables:
Code:
VAR1 is MyStringExampleString!
VAR1 is 22 bytes
VAR2 is STRING
NUM  is 3
NEG  is -3

The operators ^ | $ ! don't support numeric VAR2.
The 3 examples provided for each operator are just the results with a VAR2 string, positive number and negative number.

Currently the only problem is with VAR2 being a string starting with a number like "3x" because it will be handled as a number causing wrong results:
string VAR - "3" = ok because "3" is handled as a constant
set VAR2 string "3" ; string VAR - VAR2 = fail

I'm still working on it since the numeric "%" is confusing and useless (when are we going to use it?) so I was thinking about leaving it as string only.

Open to suggestions.
  • Author
  • Localization

saeid0034, posted Thu Nov 26, 2020 11:21 pm (60647)


Hi, I don't know here is right place to tell or not
I think QuickBMS can really use some color in commend line output (in error message and etc.), for example when some one try to print a text when a error happened it can simply lost among other outputs, but if we have something like
print "error %error_code%" [red/green]
its make it easier to find the error
I know its not a important thing, but its help in read the output
  • Author
  • Localization

Shokoniraya, posted Fri Nov 27, 2020 3:12 am (60651)


you can make it like this
Code:
print "\n\n\nERROR!!\nerror: %error_code%\n\n\n"
  • Author
  • Localization

aluigi, posted Fri Nov 27, 2020 9:18 am (60657)


I like the idea of using colors, the usual problems are the escapes and the format.
Let's say I use [red] and [/red] to go back, it sounds good to me.
And also [b] for higher intensity.
I can also change the background color but I don't know what may be the good tag to use.

We need a simple tag to change (and mix) them

This is the method currently used in a function of quickbms for setting the colors:
Code:
'o': color |= original
'0': color |= original

'r': color |= FOREGROUND_RED
'g': color |= FOREGROUND_GREEN
'b': color |= FOREGROUND_BLUE
'i': color |= FOREGROUND_INTENSITY

'R': color |= BACKGROUND_RED
'G': color |= BACKGROUND_GREEN
'B': color |= BACKGROUND_BLUE
'I': color |= BACKGROUND_INTENSITY

'x': original (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
So it's easy for me to build all the combos but it may not be easy for people, [rgb] [ri] and so on.
  • Author
  • Localization

saeid0034, posted Fri Nov 27, 2020 10:43 am (60662)


aluigi wrote:
I like the idea of using colors, the usual problems are the escapes and the format.
Let's say I use [red] and [/red] to go back, it sounds good to me.
And also [b] for higher intensity.
I can also change the background color but I don't know what may be the good tag to use.

We need a simple tag to change (and mix) them

This is the method currently used in a function of quickbms for setting the colors:
Code:
'o': color |= original
'0': color |= original

'r': color |= FOREGROUND_RED
'g': color |= FOREGROUND_GREEN
'b': color |= FOREGROUND_BLUE
'i': color |= FOREGROUND_INTENSITY

'R': color |= BACKGROUND_RED
'G': color |= BACKGROUND_GREEN
'B': color |= BACKGROUND_BLUE
'I': color |= BACKGROUND_INTENSITY

'x': original (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
So it's easy for me to build all the combos but it may not be easy for people, [rgb] [ri] and so on.


what about mixing both foreground and background in a hexadecimal digits like how cecho do it?
or simply use {red on blue} for make it easer

Image
cecho source
  • Author
  • Localization

aluigi, posted Fri Nov 27, 2020 10:56 am (60663)


I'm going to release the beta quickbms.exe with the new feature in about 10 minutes:
https://aluigi.altervista.org/beta/quickbms_exe.zip

Example:
Code:
print "Hello, [bi]how are you?[]\n[RGBIri]Fine![] ... [I]also this [g]closing[/g] works"


The only doubt is about [] when used for non-color purposes.
Let's say I want to write "The variable VAR[] is invalid", it will just write VAR instead of VAR[], same for VAR[i].
It's very rare but some people may use that text in their print messages.

My solution was increasing the range of escaped characters for supporting other languages, therefore [] are now supported in all the cstring notation ;)

@saeid0034
it's the first time I see that notation and it looks a bit complicated rather than just RGB
  • Author
  • Localization

aluigi, posted Fri Nov 27, 2020 3:56 pm (60668)


Another beta is out.
I even addded (experimental) regex support for findloc.
  • Author
  • Localization

saeid0034, posted Sat Nov 28, 2020 3:24 pm (60715)


aluigi wrote:
@saeid0034
it's the first time I see that notation and it looks a bit complicated rather than just RGB

thank you for update, I tested new beta and its work well, but still I think this notation maybe is a little complicated, but it's better to manage and work with
Code:
"Hello {09}how are you?{\n}{FC}Fine!{#} ... {8F}also this{02} closing{default} works"

I think its much cleaner then use RGB format
Because each color has its own code, in RGB format you need to use [RGBIri] to get red color in white, but in this format you only use [FC]
Image
  • Author
  • Localization

aluigi, posted Sun Nov 29, 2020 9:38 am (60747)


I like the { escape instead of [ since the latter is used for other ANSI escapes.
I also like the idea of one-char color code.

But I don't like the numbers assigned by cecho, I prefer those of the ANSI standard so I'm going to add support for them.
https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

In short they are just 0-7 for normal colors and 8-15 for brighter, example {11} for red text and background.
Basically I can parse any color even by name so I will try putting some code in place for the next beta.
  • Author
  • Localization

aluigi, posted Sun Nov 29, 2020 5:42 pm (60762)


quickbms_exe.zip updated with the new colors
  • Author
  • Localization

saeid0034, posted Sun Nov 29, 2020 7:59 pm (60767)


aluigi wrote:
quickbms_exe.zip updated with the new colors

thanks, it's way better and easier to use
  • Author
  • Localization

aluigi, posted Mon Nov 30, 2020 7:28 am (60774)


Ah please check if the beta you got is "Nov 29 2020 - 20:42:27" since the one I released when I made the post had a bug in the loops (described in the other "Errors" topic) and I fixed it about one hour after.

The message is visible when you run quickbms:
Code:
QuickBMS generic files extractor and reimporter 0.11.0
by Luigi Auriemma
e-mail: [email protected]
web:    aluigi.org
        (Nov 29 2020 - 20:42:27)
  • Author
  • Localization

saeid0034, posted Mon Nov 30, 2020 10:22 am (60778)


aluigi wrote:
Ah please check if the beta you got is "Nov 29 2020 - 20:42:27" since the one I released when I made the post had a bug in the loops (described in the other "Errors" topic) and I fixed it about one hour after.

The message is visible when you run quickbms:
Code:
QuickBMS generic files extractor and reimporter 0.11.0
by Luigi Auriemma
e-mail: [email protected]
web:    aluigi.org
        (Nov 29 2020 - 20:42:27)

yes I had this version, Thanks for letting me know, I downloaded new version.
  • Author
  • Localization

aluigi, posted Mon Nov 30, 2020 6:07 pm (60792)


To anyone interested in the filexor command.

There is this particular format in this topic (viewtopic.php?f=9&t=11577) where the entry is encrypted with xor, the content of the file follows the entry and the position of the key is kept the same since the last byte of the previous entry.
In short it's like if the entries are a contiguous stream of bytes during decryption (the content of the files is NOT encrypted).

It was very difficult to handle it with quickbms because the position of the key depends by the offset of the file.
After some tentatives I found the solution ("CHECK HERE" comments) and I want to share it with anyone who will have the same situation in the future:
Code:
# Resident Evil 4 Mobile H2Z

comtype deflate
idstring "H2Z\0"
get SOME_CRC long
get SIZE long

idstring "HIZ\0"
get FILES long
get SIZE long

math ENTRY_SIZE = 0
for i = 0 < FILES

    # CHECK HERE
    savepos OFFSET
    math OFFSET - ENTRY_SIZE
    filexor "bio4" OFFSET
    #

    get TYPE short
    get ZSIZE long
    get SIZE long
    get NAMESZ short
    getdstring NAME NAMESZ

    # CHECK HERE
    filexor ""
    savepos ENTRY_SIZE
    math ENTRY_SIZE - OFFSET
    savepos OFFSET
    #

    if TYPE == 0
        log NAME OFFSET SIZE
    else    # 8 for deflate
        clog NAME OFFSET ZSIZE SIZE
    endif
    goto ZSIZE 0 SEEK_CUR
next i


Ah, I also finally added support for the FILENUM argument of filexor, filerot and filecrypt.
By default everything works as before: filexor applied to all the files using the offset of file 0 as position when the command is invoked
If you use FILENUM then filexor will work only with that specific file.
It's already available in the beta I just uploaded (both exe and source code).
  • Author
  • Localization

saeid0034, posted Thu Dec 03, 2020 11:03 pm (60891)


Hi, today I'm testing something whit QuickBMS, in my test I use print many time to know how my script work and get some of variable
During these tests, something came to my mind, what if QuickBMS support something like pause?, when ever we call it, its stop running script until user press some button (just like how its work in cmd and...) i think its can be handy
  • Author
  • Localization

Shokoniraya, posted Fri Dec 04, 2020 4:01 am (60893)


use -V option, it helps alot
and read your script carefully and rewrite it if it's possible
you can also use cleanexit command to exit script (kill process)
read quickbms.txt too, it has many useful things
  • Author
  • Localization

aluigi, posted Fri Dec 04, 2020 10:58 am (60896)


Code:
quickbms.exe -0 -V script.bms file | less

This is what I use for all my works where script.bms is just a work-in-progress script with few "get"s to test what I see with the hex editor.

"less" is part of the cygwin suite that I highly suggest, it's used to keep view the output on the screen and moving backward and forward... something like a pause.

-0 is the option that does not extract any file
-V is the verbose option for debugging purposes (while -v is for scripting and not useful)

That's all :D
  • Author
  • Localization

aluigi, posted Sat Dec 19, 2020 7:39 pm (61192)


New beta available.

I added the possibility of specifying multiple arguments in getarray and putarray, example:
Code:
        putarray 0 i NAME OFFSET SIZE
        getarray NAME OFFSET SIZE 0 i

it's the same of:
Code:
        putarray 0 i NAME
        putarray 1 i OFFSET
        putarray 2 i SIZE
        getarray NAME   0 i
        getarray OFFSET 1 i
        getarray SIZE   2 i

I also added the possibility of typing the own content of a variable using: get VAR ???
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.