Skip to content

tealbathingsuit/HookMacros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HookMacros

Swift 5.9 function hooking macros

#hookf(target: socket, closure: { (x0: Int32, x1: Int32, x2: Int32, socketOrig: (@convention(c) (Int32, Int32, Int32) -> Int32)) -> Int32 in
    let orig_ = socketOrig(x0, x1, x2)
    print("orig:", orig_)
    return 0
})

#hook(cls: "NSObject", sel: "isProxy", imp: { (cls: NSObject, _cmd: Selector, orig: (@convention(c) (NSObject, Selector) -> Bool)) -> Bool in
    print("orig:", orig(cls, _cmd))
    return true
})

Check out HookMacrosClient for examples.

About

Swift 5.9 function hooking macros

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages