Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log is always empty despite running enableCompleteLogging() #23

Open
falhenaki opened this issue May 31, 2020 · 6 comments
Open

Log is always empty despite running enableCompleteLogging() #23

falhenaki opened this issue May 31, 2020 · 6 comments

Comments

@falhenaki
Copy link

falhenaki commented May 31, 2020

I have a tweak that runs the following code

#include "InspCWrapper.m"

%ctor {
    setMaximumRelativeLoggingDepth(4);

    NSLog(@"Flag1");
    enableLogging();
    enableCompleteLogging();

    NSLog(@"Flag2");
}

I can confirm that this runs because both Flag1 and Flag2 run successfully. However, despite running enableCompleteLogging(). The log file located in
/var/mobile/Containers/Data/Application/<App-Hex>/Documents/InspectiveC
I always empty. I am happy to sure any additional information if you can confirm that this is not a mistake on my part/what information you need. I installed the deb from Cydia so I did not use fishook when compiling (is this the reason?).
Also, i attempted using the same function using cycript and got this

cy#  enableCompleteLogging(); 
throw new Error("insufficient number of arguments to ffi function")
@DavidGoldman
Copy link
Owner

re: the cycript issue I've run into that and haven't found a workaround.

Are you using Fishhook or Substrate here? I'd imagine that's probably the issue - the hook fails or doesn't get called. Since coolstar released odysseyra1n with libhooker, this should now be possible if you use that. let me push out an update

@falhenaki
Copy link
Author

I'm using theos. The hook does get called because the flag logs execute. @DavidGoldman

@falhenaki
Copy link
Author

I see your comment on Fishook in the readme. Can you please clarify more? is this needed? is fishook a tool that needs to be installed? I am unfamiliar.

@DavidGoldman
Copy link
Owner

The fishhhook hooking method has limitations - IIRC I think it can only show calls from the same image (e.g. your tweak, which isn't helpful). libhooker should work though, once I have time to try out odysseyra1n I'll push out an update.

@eclair4151
Copy link

eclair4151 commented Jun 16, 2020

I guess to add to this i am having the same issue. I use Substrate with CheckRa1n on an iPhone 7 Plus, iOS 13.5. I installed the Deb via Cydia. Didnt install anything fishhook specific.

i am a bit similarly a bit confused by the fishhook section. but i have the same result using USE_FISHHOOK=1 or not,

Files getting created but are all empty

@gr3atest
Copy link

gr3atest commented Jan 11, 2021

Addressing the CYCRIPT issue:

The reason this happens is because of the way the FFI function was defined. Try using this:

enableCompleteLogging=(typedef void())(dlsym(handle,"InspectiveC_enableCompleteLogging"))

Instead of voidFunc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants