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.

QuickBMS to dump hex values, or hashes

Featured Replies

  • Author
  • Localization

cyberspeed, posted Sat Nov 21, 2020 4:41 pm (60515)


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
  • Author
  • Localization

aluigi, posted Thu Nov 26, 2020 8:13 am (60610)


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)
  • Author
  • Localization

cyberspeed, posted Thu Nov 26, 2020 2:37 pm (60627)


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?
  • Author
  • Localization

aluigi, posted Thu Nov 26, 2020 2:51 pm (60628)


So you can just use this simple script:
Code:
goto 0x20
set HASH string ""
for x = 0 < 16
    get TMP byte
    string TMP p "X" TMP
    string HASH TMP
next x
print "%HASH%"

quickbms.exe script.bms folder > list.txt
  • Author
  • Localization

cyberspeed, posted Fri Nov 27, 2020 2:53 pm (60665)


Thank you so much, it works great.
And if I need in a file to save between 3 up to 7 hashes, is this correct, or theres a better way?
Code:
goto 0x110
set HASH string ""
for x = 0 < 16
    get TMP byte
    string TMP p "X" TMP
    string HASH TMP
next x
print "%HASH%"

goto 0x1C0
set HASH string ""
for x = 0 < 16
    get TMP byte
    string TMP p "X" TMP
    string HASH TMP
next x
print "%HASH%"

goto 0x270
set HASH string ""
for x = 0 < 16
    get TMP byte
    string TMP p "X" TMP
    string HASH TMP
next x
print "%HASH%"
  • Author
  • Localization

aluigi, posted Fri Nov 27, 2020 4:05 pm (60670)


Code:
callfunction DUMP 1 0x110
callfunction DUMP 1 0x1C0
callfunction DUMP 1 0x270

startfunction DUMP
    goto DUMP_ARG1
    set HASH string ""
    for x = 0         get TMP byte
        string TMP p "X" TMP
        string HASH TMP
    next x
    print "%HASH%"
endfunction
The arguments of the functions is a very nice feature that probably nobody uses... even me! :D
  • Author
  • Localization

cyberspeed, posted Sat Nov 28, 2020 3:50 pm (60717)


Thank you, definitely a cleaner way of doing it.
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.