SWRoute icon indicating copy to clipboard operation
SWRoute copied to clipboard

PoC of function hooking in Swift

Results 6 SWRoute issues
Sort by recently updated
recently updated
newest added

I haven't touched this since the first Swift ßeta, so let's see what we have now.

nicetohave
help wanted
question

Due to compiler optimizations, some class methods and functions are inlined/removed, so we're unable to get their addresses to route. `rd_get_func_imp()` returns some value for these ones though, but it's...

bug

So the following code generates a compiler error > **Error:** Partial application of struct method is not allowed ``` swift var err = SwiftRoute.replace(function: String().substringFromIndex, with: { ^^^^^^^^^^^^^^^^^^^^^^^^^^ (index :...

bug

AFAIK, setters and getters are shared between all instances of a class in Swift. They seem to have the following structure: ``` c const int foo_offset = 0x48; int getFoo(void...

nicetohave
help wanted
question

For now, we don't pass a third argument `original_ptr` to the `rd_route()` call: ``` swift rd_route(rd_get_func_impl(targetMethod), rd_get_func_impl(replacement), nil) ``` so we lose an original implementation — that's a big problem,...

bug

I've added iOS target to verify that at compiles and the tests pass.