QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors
Have you had any luck with the other tools?
viewtopic.php?f=17&t=12
The unity.bms script is quite complex and that part that handles the "resS" archives has not been written by me, but from what I can see the problem is the SIZE2 variable read at line 265 of the script.
In my opinion the script is correct and that SIZE2 value "may" be obfuscated (so non-standard), maybe just a XOR 0x42800000 or simply a field which is totally unrelated to the format and should not be parsed.
Anyway even after skipping the files that give the problem there are still other error, so no solution, the script can't be updated.
viewtopic.php?f=17&t=12
The unity.bms script is quite complex and that part that handles the "resS" archives has not been written by me, but from what I can see the problem is the SIZE2 variable read at line 265 of the script.
In my opinion the script is correct and that SIZE2 value "may" be obfuscated (so non-standard), maybe just a XOR 0x42800000 or simply a field which is totally unrelated to the format and should not be parsed.
Anyway even after skipping the files that give the problem there are still other error, so no solution, the script can't be updated.
-
- Posts: 6
- Joined: Mon Nov 16, 2015 11:48 pm
Re: QuickBMS errors
Thank you for the other programs, I only knew about Disunity. Unity Studio worked! Thanks!
-
- Posts: 19
- Joined: Sat Jun 06, 2015 6:50 pm
Re: QuickBMS errors
Minor bug:
Code: Select all
print %somevar|hex% # doesnt work with -Q option
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors
-Q is a way to completely *mute* quickbms, Print command included
-
- Posts: 19
- Joined: Sat Jun 06, 2015 6:50 pm
Re: QuickBMS errors
quickbms.txt says:
-Q very quiet, no output except the Print command
Print command works with -Q option, only hex output is muted.
-Q very quiet, no output except the Print command
Print command works with -Q option, only hex output is muted.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors
Good catch, the error was in the usage of fprintf that pointed to the function without output.
Regarding the Print topic, I would like to know if people prefer to remove the "SCRIPT's MESSAGE" tag when the Print message is used.
Personally I think that it can be removed and writing the string directly without any tag.
Regarding the Print topic, I would like to know if people prefer to remove the "SCRIPT's MESSAGE" tag when the Print message is used.
Personally I think that it can be removed and writing the string directly without any tag.
-
- Posts: 2
- Joined: Mon Nov 28, 2016 3:03 am
Re: QuickBMS errors
hi i need help for this error message
any solutions?
cpk archive
https://mega.nz/#!NosD0IZI!gU2Wr6V2Yh5i ... OAE1IMftIY
any solutions?
cpk archive
https://mega.nz/#!NosD0IZI!gU2Wr6V2Yh5i ... OAE1IMftIY
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors
@systembest
Don't post in this topic, this is for other errors.
Open a topic in Game Archive specifying the name of the game.
The archive is encrypted.
Don't post in this topic, this is for other errors.
Open a topic in Game Archive specifying the name of the game.
The archive is encrypted.
-
- Posts: 706
- Joined: Fri Aug 08, 2014 1:06 am
Re: QuickBMS errors
aluigi wrote:Regarding the Print topic, I would like to know if people prefer to remove the "SCRIPT's MESSAGE" tag when the Print message is used.
Personally I think that it can be removed and writing the string directly without any tag.
Yes please
-
- Posts: 19
- Joined: Sat Jun 06, 2015 6:50 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
strlen calculates wrong length on unicode strings
Code: Select all
set str binary "\x74\x00\x65\x00\x73\x00\x74\x00\x00\x00"
set str unicode str
strlen slen str
print %slen% // SCRIPT's MESSAGE: 4 // OK
set str binary "\x74\x00\x35\x04\x73\x00\x42\x04\x00\x00"
set str unicode str
strlen slen str
print %slen% // SCRIPT's MESSAGE: 6
set str binary "\x63\x01\x17\x01\x61\x01\x65\x01\x00\x00"
set str unicode str
strlen slen str
print %slen% // SCRIPT's MESSAGE: 8
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
It's correct, if you replace %slen% with "%slen% %str%" in the print command you can see that the lenght matches.
I guess you want to specify a different codepage with the CodePage command first.
I guess you want to specify a different codepage with the CodePage command first.
-
- Posts: 19
- Joined: Sat Jun 06, 2015 6:50 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Thanks aluigi, "codepage 1200" solves the problem
Last edited by NullRd on Wed Dec 07, 2016 4:05 pm, edited 2 times in total.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
-
- Posts: 19
- Joined: Sat Jun 06, 2015 6:50 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
But now main script hangs on line "put strs unicode memory_file"
If I reset codepage ("codepage 1251") before this command, script is works fine, but I don't understand this logic. When I should set and reset the codepage to get a proper result?
If I reset codepage ("codepage 1251") before this command, script is works fine, but I don't understand this logic. When I should set and reset the codepage to get a proper result?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
The hanging of put unicode with the default codepage is for sure a bug... I released quickbms 0.7.7 just few days ago so who knows when I will check this thing.
Using codepage 1251 before the put command worked.
You have also to use "set str unicode str" after "get str unicode".
Anyway are you sure you really want to use quickbms for string related stuff like this?
Using codepage 1251 before the put command worked.
You have also to use "set str unicode str" after "get str unicode".
Anyway are you sure you really want to use quickbms for string related stuff like this?
-
- Posts: 19
- Joined: Sat Jun 06, 2015 6:50 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
aluigi wrote:You have also to use "set str unicode str" after "get str unicode".
Are you sure about this? In that case, the result looks completely unreadable.
aluigi wrote:Anyway are you sure you really want to use quickbms for string related stuff like this?
Why not?
I can use some other languages, but for me, quickbms is the easiest way to extract data from a file.
It can do a lot of useful things, without boring stuff like keeping handles, checking pointers etc.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
You are right quickbms already performs the unicode->utf8 conversion when you use the Get unicode command, so forget what I said
The reason why I suggested other solutions it's because quickbms is perfect for operations like "extract file X from offset Y of size Z" but it's a bit of a pain with string-related operations.
In your case probably you may find interesting the SLog command that automatically dumps the string correctly to find with line-feed and it's even working in reimport mode.
The reason why I suggested other solutions it's because quickbms is perfect for operations like "extract file X from offset Y of size Z" but it's a bit of a pain with string-related operations.
In your case probably you may find interesting the SLog command that automatically dumps the string correctly to find with line-feed and it's even working in reimport mode.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
This is what I mean with the Slog command:
Code: Select all
get xz1 long
get strCount long
get xz3 long
get xz4 long
get xz5 long
get xz6 long
get xz7 longlong
goto 0x120
savepos pos
xmath x "pos + 0x3E"
goto x
get x short
xmath pos "pos + (x * 0x98) + 0x40"
goto pos
codepage 1251
for i = 0 < strCount
slog "output2.txt" -1 -1 unicode
next i += 1
-
- Posts: 19
- Joined: Sat Jun 06, 2015 6:50 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Thanks, aluigi!
SLog seems to be a most effective solution.
SLog seems to be a most effective solution.
-
- Posts: 233
- Joined: Sun Aug 24, 2014 5:26 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
When [output_folder] in quickbms is inside the quotes and ends with slash or backslash it gives an error. It's not very convenient when you use bath files like
because "%%~dpi" gives path that ends with slash.
https://puu.sh/sOhMd/a1fbf1c1b4.png
Code: Select all
for /r %%i in (*.dat) do quickbms -Y "d:\script.txt" "%%i" "%%~dpi"
because "%%~dpi" gives path that ends with slash.
https://puu.sh/sOhMd/a1fbf1c1b4.png