Open WorksButNotTested opened 1 year ago
#include "frida-gumjs.h" gboolean found (const GumRangeDetails * details, gpointer user_data) { static int i=0; printf("i: %4d 0x%016llx-0x%016llx %s\n", ++i, details->range->base_address, details->range->base_address + details->range->size, details->file == NULL ? "(null)" : details->file->path); return TRUE; } int main() { puts("START"); gum_init_embedded (); gum_process_enumerate_ranges (GUM_PAGE_NO_ACCESS, found, NULL); puts("END"); }
wget https://github.com/frida/frida/releases/download/16.0.5/frida-gumjs-devkit-16.0.5-macos-x86_64.tar.xz tar Jxvf frida-gumjs-devkit-16.0.5-macos-x86_64.tar.xz clang -o ok test.cpp -L . -I . -lfrida-gumjs -lresolv clang -fsanitize=address -o slow test.cpp -L . -I . -lfrida-gumjs -lresolv
./ok ./slow
$ sw_vers ProductName: macOS ProductVersion: 12.6.1 BuildVersion: 21G217 $ clang --version Apple clang version 14.0.0 (clang-1400.0.29.202) Target: x86_64-apple-darwin21.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
test.cpp
build
run
info