Frida 15.1.28 Released ∞release
A couple of exciting new things in this release.
For example, to read each line of a text-file as a string:
(Note that this assumes that the text-file is UTF-8-encoded. Other encodings are not currently supported.)
You can also read a certain number of bytes at some offset:
The argument may also be omitted to read the rest of the file. But if you’re just looking to read a text file in one go, there’s an easier way:
Reading a binary file is just as easy:
(Where bytes is an ArrayBuffer.)
Sometimes you may also want to dump a string into a text file:
Or perhaps dump an ArrayBuffer:
Going back to the example earlier, seek() also supports relative offsets:
Retrieving the current file offset is just as easy:
Putting it all together, this means we can read a file and compute its SHA-256:
Or, for more control:
(You can learn more about this API from our TypeScript bindings.)
There are also a few other goodies in this release, so definitely check out the changelog below.
- gumjs: Extend the File API.
- gumjs: Add Checksum API.
- gumjs: Fix handling of relative ESM imports from root.
- glib: (win32) Add Input/OutputStream support for plain files.
- build: Make XP SDK optional on Windows.
- node: Target Electron 19.0.0 instead of 19.0.0-alpha.1.
- node: Define openssl_fips to work around node-gyp issue.