ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Nov 27, 2020 2:47 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Nov 21, 2020 4:41 pm 

Joined: Wed Mar 23, 2016 5:11 am
Posts: 75
Is it possible to use quickbms to have a script that can scan multiple files and dump 16bytes long hashes/hex values and save them to a txt file?
Lets say I have multiple samples as example below where starting offset is 20, from where I want the hash to begin and end in 16bytes long to be saved each hash string in one line.
Image


Top
   
PostPosted: Thu Nov 26, 2020 8:13 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
It's a bit more complicated that what it looks like and it depends by how do you want to store the hash in the output file, I mean the format (probably just a sequence of 00112233...ff)


Top
   
PostPosted: Thu Nov 26, 2020 2:37 pm 

Joined: Wed Mar 23, 2016 5:11 am
Posts: 75
Oh I didn't know it could be complicated, all I wanted was what you see highlighted to be saved as it is.
The search function would reach offset 0x20 in this sample above, obviously I would have to change offsets depending on input or the byte length I want to be saved.
And starting that offset to save 16 bytes as are seen, no special formatting, spaces or other fancy output:
Code:
32F61FB3097C71DA784036D129061CC7
next file hash
next file hash
etc

Then it would scan next file and save the hash in another line, so on and so forth.
But based on your sequence example its same thing, right?


Top
   
PostPosted: Thu Nov 26, 2020 2:51 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
So you can just use this simple script:
Code:
goto 0x20
set HASH string ""
for x = 0 < 16
    get TMP byte
    string TMP p "%02X" TMP
    string HASH + TMP
next x
print "%HASH%"

quickbms.exe script.bms folder > list.txt


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

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