rodionovd / rd_route Goto Github PK
View Code? Open in Web Editor NEWFunction hooking for macOS
License: MIT License
Function hooking for macOS
License: MIT License
Apple doesn't make x86_64 machines anymore, it would be nice, if we could update this code for Apple Silicon. Thx!
Hi!
Thank you so much for this project! I was previously using mach_override, but since I found rd_route, I have switched!
I noticed that at some point (OS X 10.10 DP5 or DP6), calling the reentry function crashes the application. One quick and dirty workaround I found, was to change the _remap_image() function, changing the existing x86_64 hack:
err = mach_vm_allocate(mach_task_self(), new_location, image_size*3, VM_FLAGS_ANYWHERE); mach_vm_size_t lefover = image_size * 2;
to:
err = mach_vm_allocate(mach_task_self(), new_location, image_size*4, VM_FLAGS_ANYWHERE); mach_vm_size_t lefover = image_size * 3;
That (apparently) fixed, but it looks like apps still crash after some time.
One thing that may or not be related, if I injected myself on Quicktime Player (OSX 10.10 too), app crashes immediately when calling rd_route() (at _patch_memory + 178 (rd_route.c:306)
).
Hope this helps!
Thank you,
Nuno
Currently we have it hardcoded and limited to 10 mach-o images: that may be not enough in some cases.
https://github.com/rodionovd/rd_route/blob/master/rd_route.c#L29-L31
Should be nice to have this library available through the CocoaPods dependency manager.
In obj-c properties are syntactic sugar over setFoo:
getFoo
methods, but in Swift they are closer to ivars (at least from my knowledge). Is there any way to route them as well?
I guess rd_route
is kind of software where should be no errors. So every error here implies a critical bug. That's what asserts were invented for.
Would be nice to be able to hook functions in iOS Simulator (e.g. for testing purpose).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.