Possible next features of QuickBMS
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: Possible next features of QuickBMS
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
and about asize problem, maybe you can add a function to log that resize all of savepos variables that are >= than log offset variable
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
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
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
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
New beta, I mainly fixed some bugs introduced in the previous beta.
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: Possible next features of QuickBMS
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
we can do same job for savepos OFFSET too
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: Select all
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
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
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)
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)
-
- Posts: 42
- Joined: Sun Aug 10, 2014 9:22 am
Re: Possible next features of QuickBMS
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 !
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 !
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
Not really a feature but I'm finally making an example for the operators of the String command:
The examples are based on the following variables:
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.
Code: Select all
+ 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: Select all
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.
-
- Posts: 40
- Joined: Sat Mar 14, 2020 7:17 pm
Re: Possible next features of QuickBMS
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
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
Last edited by saeid0034 on Sat Jun 19, 2021 12:32 pm, edited 1 time in total.
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: Possible next features of QuickBMS
you can make it like this
Code: Select all
print "\n\n\nERROR!!\nerror: %error_code%\n\n\n"
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
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:
So it's easy for me to build all the combos but it may not be easy for people, [rgb] [ri] and so on.
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: Select all
'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)
-
- Posts: 40
- Joined: Sat Mar 14, 2020 7:17 pm
Re: Possible next features of QuickBMS
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:So it's easy for me to build all the combos but it may not be easy for people, [rgb] [ri] and so on.Code: Select all
'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)
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
cecho source
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
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:
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
https://aluigi.altervista.org/beta/quickbms_exe.zip
Example:
Code: Select all
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
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
Another beta is out.
I even addded (experimental) regex support for findloc.
I even addded (experimental) regex support for findloc.
-
- Posts: 40
- Joined: Sat Mar 14, 2020 7:17 pm
Re: Possible next features of QuickBMS
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: Select all
"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]
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
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.
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.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
quickbms_exe.zip updated with the new colors
-
- Posts: 40
- Joined: Sat Mar 14, 2020 7:17 pm
Re: Possible next features of QuickBMS
aluigi wrote:quickbms_exe.zip updated with the new colors
thanks, it's way better and easier to use
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
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:
The message is visible when you run quickbms:
Code: Select all
QuickBMS generic files extractor and reimporter 0.11.0
by Luigi Auriemma
e-mail: me@aluigi.org
web: aluigi.org
(Nov 29 2020 - 20:42:27)
-
- Posts: 40
- Joined: Sat Mar 14, 2020 7:17 pm
Re: Possible next features of QuickBMS
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: Select all
QuickBMS generic files extractor and reimporter 0.11.0
by Luigi Auriemma
e-mail: me@aluigi.org
web: aluigi.org
(Nov 29 2020 - 20:42:27)
yes I had this version, Thanks for letting me know, I downloaded new version.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Possible next features of QuickBMS
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:
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).
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: Select all
# 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).