ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Apr 14, 2021 11:17 pm

All times are UTC




Post new topic  Reply to topic  [ 656 posts ]  Go to page Previous 129 30 31 32 33 Next
Author Message
PostPosted: Thu Dec 03, 2020 11:03 pm 
User avatar

Joined: Sat Mar 14, 2020 7:17 pm
Posts: 40
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


Top
   
PostPosted: Fri Dec 04, 2020 4:01 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 396
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


Top
   
PostPosted: Fri Dec 04, 2020 10:58 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
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


Top
   
PostPosted: Sat Dec 19, 2020 7:39 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
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 ???


Top
   
PostPosted: Sun Jan 31, 2021 4:30 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 396
sir alugi, i have a idea for next version of QuickBMS
can you make a repdstring command to replace a number of bytes in file? at first look, it's not useful and importing will does the job, but this command is really helpful in MEMORY_FILE file if we want to replace a few bytes in MEMORY_FILE
repdstring (replace dstring), just like reimport3, for increasing MEMORY_FILE without creating other MEMORY_FILE

for example:
Code:
repdstring MY_STRING 0 MEMORY_FILE2


Top
   
PostPosted: Sun Feb 07, 2021 10:16 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
Are you talking about "putdstring"?


Top
   
PostPosted: Fri Feb 12, 2021 6:34 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
A new beta is available, mainly focused on compatibility with non-Windows platforms and other compilers (clang) and versions of gcc.
For example now it compiles natively on Termux for Android and supports oodle on Linux x86.

I don't have other things to fix or features to add.

My plan is to find some time and desire for answering all the topics in the Game Archive section because it forces me to test quickbms on many file formats and spotting possible errors.
After that I will release the new version.


Top
   
PostPosted: Sat Feb 13, 2021 2:42 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 396
im talking a about a command that can increase/inlarge MEMORY_FILEs by replacing a binary variable (for example, a new command with name: repdstring) that can works on both MEMORY_FILE and real files

for example, MEMOEY_FILE1 is "\x0A\x0B\x0C\x0D\x0E"
and we are going to replace some bytes,
MY_BINARY is "\x0F"
Code:
goto 0 MEMOEY_FILE1
repdstring MY_BINARY 3 MEMOEY_FILE1


now, result of MEMOEY_FILE1 is "\x0F\x0D\x0E"
that means we replaced first three byte of MEMOEY_FILE1 with MY_BINARY

it's possible to do this by creating another MEMORY_FILE and append command
but it will saves alot of time and it's faster

and about putdstring, something that really needed is putdstring MY_BINARY ""
set "" instead of a number should act like default size of variable and no need to set length of variable


Top
   
PostPosted: Sun Feb 14, 2021 10:42 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
I had in mind to change the behavior of the put* commands if append is enabled.
For example just like with a hex/text editor where the current mode is "overwrite" and in append mode it will become "insert".

Example:
Code:
set MEMORY_FILE binary "0123456789"
goto 4 MEMORY_FILE
append
putdstring "hello" 3 MEMORY_FILE
append
get SIZE asize MEMORY_FILE
log "output.dat" 0 SIZE MEMORY_FILE

I will work on it soon (also because I found a bug with set MEMORY_FILE string in the beta...)


Top
   
PostPosted: Sun Feb 14, 2021 4:42 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 396
sir aluigi, is it possible to implemente single line mode in bms files?
Code:
print "message_1" ; print "message_2"


Top
   
PostPosted: Sun Feb 14, 2021 6:29 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 396
i think QuickBMS can be more optimizer and faster

i did a test for file exporting speed in my system

dump_1.bat (normal dumping) = 24 sec
dump_2.bat (with reserved memory, i mean memory file) = 28 sec

also, there was a lot of operation in dump_2.bms, but there is no any of them in dump_1.bms, i mean storing a few byte in memory and then dumping them at once is faster and better


for example, i remember some ps2 games (talking about old days), there was some games that no loading page included in them or loading was very very faster than other games, such as god of war or ben 10 the protector of earth
data files was readed 2048 by 2048 (or 4096 by 4096?)
maybe i am wrong just about theory of this (not about mechanism and result), but most of games or programs that has padded size or padded offset are fast

maybe QuickBMS can have such option as a new feature


Attachments:
dump_test.7z [381.54 KiB]
Downloaded 21 times


Last edited by Shokoniraya on Mon Feb 15, 2021 6:15 am, edited 2 times in total.
Top
   
PostPosted: Sun Feb 14, 2021 11:40 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
The new beta fully implements the Append + Put* idea.

The one-line scripts work only with the -s option.
I can't support it in the script file.

dump_test.7z is password protected.
Anyway I don't think I can improve much the performance of quickbms without rewriting most of its core (which I'm not going to do)


Top
   
PostPosted: Mon Feb 15, 2021 6:16 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 396
sorry, password removed. you can check it now


Top
   
PostPosted: Mon Feb 15, 2021 12:59 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
Interesting, the problem affects quickbms_4gb_files only because quickbms.exe takes just 5 seconds.
This is going to be a nightmare to figure out...
Good finding btw, it needs to be fixed for sure.


Top
   
PostPosted: Mon Feb 15, 2021 4:45 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
I think it was only related to disk caching because now the time is the same.
So no problem I suppose.


Top
   
PostPosted: Mon Feb 15, 2021 6:28 pm 

Joined: Thu Aug 07, 2014 10:28 pm
Posts: 363
can you expose PKCS #5 from tomcrypt_pkcs.h


Top
   
PostPosted: Mon Feb 15, 2021 11:54 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
If only I would know how to implement it in the Encryption command :D
I think there is no problem to add pkcs_5_alg* but that pkcs_1* is a mess.

I still have to check the other old topic you opened, let me know what else I can add and I will check it ;)


Top
   
PostPosted: Fri Feb 26, 2021 2:22 pm 

Joined: Thu Nov 26, 2020 2:13 pm
Posts: 18
first of all, i would like to know if there is a similar feature for the getdstring feature except for when it accepts various character encodings other than just ASCII.
i've stumbled upon a unreal pak file that uses various utf16 strings and there are "name size" values placed before them.

if there isn't, what kind of workaround do i have to implement to get around something of that sort.


Top
   
PostPosted: Sat Feb 27, 2021 10:05 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12088
I guess you refer to the codepage, if it's a japanese game it'e enough to use the "codepage 932" command at the beginning of the script (or as command-line option -P 932).


Top
   
PostPosted: Sat Feb 27, 2021 12:35 pm 

Joined: Thu Nov 26, 2020 2:13 pm
Posts: 18
OK

all i want is for quickbms to cover up all available utf16 chars, not by invoking this "get NAME unicode" command, but by something like this
Code:
codepage 1200 # utf16
get name_size long
getdstring base_path name_size
and yet, for whatever reason, i get results like this
Code:
. 0000000000000058 getdstr base_path  "." 10
    2e 00 2e 00 2f 00 2e 00 2e 00                     ..../.....
i should be getting something like this
Code:
. 0000000000000058 getdstr base_path  "../../../" 20
    2e 00 2e 00 2f 00 2e 00 2e 00 2f 00 2e 00 2e 00   ..../...../.....
    2f 00 00 00                                       /...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 656 posts ]  Go to page Previous 129 30 31 32 33 Next

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited