facebook / fishhook

A library that enables dynamically rebinding symbols in Mach-O binaries running on iOS.
BSD 3-Clause "New" or "Revised" License
5.17k stars 965 forks source link

If hooking in __DATA_CONST, make writable before trying to write #65

Closed swolchok closed 5 years ago

swolchok commented 5 years ago

iOS 13 seems to have thrown us off. Apparently, __DATA_CONST is set read-only after dyld runs.

Fixes #61

daybreak1024 commented 5 years ago

I try this plan, on iOS 13 XR it is work. but on iOS 12 6s ,iOS13 6s it is will crash.

crash

I want to know if I only met?

amonshiz commented 5 years ago

@daybreak1024 this should be fixed with https://github.com/facebook/fishhook/pull/66. if you could also test there that would be helpful.

daybreak1024 commented 5 years ago

@amonshiz I test new code from #66 , crash was fixed. And I found that it was not merged into the fishHook project.

yuanzhangjing commented 4 years ago

I think use vm_read_overwrite is safer.