Skip to content

FuncationHook != %hookf ??? #44

Description

@be-huge

I’m very sorry, I can’t see where the problem is. After bridging, Swift can indeed call the CTCellularDataPlanSetIsEnabled method directly, but when hooking it, the system immediately enters Safe Mode.

logos,perfect:

void CTCellularDataPlanSetIsEnabled(Boolean en);
%hookf(void, CTCellularDataPlanSetIsEnabled, Boolean enabled) {
   %orig(enabled);
}

Orion,safemode:

class CTCellularDataPlanSetIsEnabledHook: FunctionHook {
  static let target = Function.symbol("CTCellularDataPlanSetIsEnabled", image: nil);

  func function(_ ioHIDClient: Bool) {
    orig.function(ioHIDClient);
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions