ant

antiFishhook

Anti-Fishhook (make fishhook doesn't work)

Showing:

Popularity

Downloads/wk

0

GitHub Stars

120

Maintenance

Last Commit

5mos ago

Contributors

4

Package

Dependencies

0

License

MIT

Categories

Readme

AntiFishhook

AntiFishhook is an AntiHook library for fishhook at runtime (make fishhook doesn't work) .
include fishhook and anti-fishhook

How it's work

Note

Run or test in your phone(arm64) instend of simulator
Swift Function name mangling

Usage

antiFishhook

import antiFishhook

FishHookChecker.denyFishHook("$s10Foundation5NSLogyySS_s7CVarArg_pdtF")  // Swift's Foudation.NSLog  
NSLog("Hello AntiFishHook")

FishHookChecker.denyFishHook("printf")                                  // printf
printf("Hello AntiFishHook")

fishhook

typealias MyNSLog = @convention(thin) (_ format: String, _ args: CVarArg...) -> Void

func myNSLog(_ format: String, _ args: CVarArg...) {
    print("Hello fishHook")
}

let selfNSLog: MyNSLog  = myNSLog
let selfNSLogPointer = unsafeBitCast(selfNSLog, to: UnsafeMutableRawPointer.self)
var origNSLogPointer: UnsafeMutableRawPointer?

FishHook.replaceSymbol("$s10Foundation5NSLogyySS_s7CVarArg_pdtF", newMethod: selfNSLogPointer, oldMethod: &origNSLogPointer)

NSLog("Hello World")
// will print Hello fishHook

Suggestion

Use by adding source file to your project instend of pod

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100