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

Make getMachOExecutable more general #35

Merged
merged 1 commit into from
Jun 13, 2017
Merged

Make getMachOExecutable more general #35

merged 1 commit into from
Jun 13, 2017

Conversation

markszabo
Copy link
Contributor

I've got the following error by running the current version of the library:

Traceback (most recent call last):
  File "ipa_installer.py", line 167, in <module>
    subprocess.check_output([optool_path, "install", "-c", "load", "-p", "@executable_path/FridaGadget.dylib", "-t", executable_filepath])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['optool/bin/optool', 'install', '-c', 'load', '-p', '@executable_path/FridaGadget.dylib', '-t', '/tmp/appmon_ipa/myApp/Payload/myApp.app/PkgInfo: ASCII text, with no line terminators\n']' returned non-zero exit status 1

The cause of the error was that the function getMachOExecutable returned PkgInfo: ASCII text, with no line terminators.

The reason for that was the fact that file /tmp/appmon_ipa/myApp/Payload/myApp.app/myApp returned myApp: Mach-O executable arm_v7, so getMachOExecutable did not find it.

This PR addresses this issue.

@dpnishant dpnishant merged commit 97ea268 into dpnishant:master Jun 13, 2017
@dpnishant
Copy link
Owner

Thanks @markszabo! :)

@markszabo markszabo deleted the more-general-getMachOExecutable branch June 15, 2017 10:28
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

Successfully merging this pull request may close these issues.

2 participants