Skip to content

Commit

Permalink
feat: add MSCloseImage/LHCloseImage shims
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinakg committed May 24, 2024
1 parent e10703a commit 97e65b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ellekit/API/Libhooker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ public func LHOpenImage(_ path: UnsafePointer<CChar>) -> UnsafePointer<mach_head
try? ellekit.openImage(image: String(cString: path))
}

@_cdecl("LHCloseImage")
public func LHCloseImage(_ image: UnsafePointer<mach_header>) {
// no-op
}

@_cdecl("LHFindSymbols")
public func LHFindSymbols(
_ image: UnsafePointer<mach_header_64>,
Expand Down
5 changes: 5 additions & 0 deletions ellekit/API/MobileSubstrate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public func MSGetImageByName(_ name: UnsafeRawPointer) -> UnsafeRawPointer? {
return nil
}

@_cdecl("MSCloseImage")
public func MSCloseImage(_ image: UnsafeRawPointer) {
// no-op
}

@_cdecl("MSFindSymbol")
public func MSFindSymbol(_ image: UnsafeRawPointer?, _ name: UnsafeRawPointer?) -> UnsafeRawPointer? {
guard let name else { return nil }
Expand Down

0 comments on commit 97e65b3

Please sign in to comment.