read-std-string-apple

by
4 views 4d34918c...

Description

Read std::string for Apple OSes, including iOS, macOS, etc.

How to Use

Download the script and run it with Frida CLI:

Download Script

Then run with Frida:

frida -U -f YOUR_PACKAGE_NAME -l read-std-string-apple.js

Replace YOUR_PACKAGE_NAME with the target app's package name.

Source Code

JavaScript
function readStdStringForApple(str) {
    const isLong = (str.add(3 * Process.pointerSize - 1).readU8() & 0b10000000) === 0b10000000;
    if (isLong) {
        return str.readPointer().readUtf8String();
    }

    return str.readUtf8String();
}
Share this script:
Twitter LinkedIn

Comments

Login or Sign up to leave a comment.
Loading comments...