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

unshc on Mac doesn´t seem to work #13

Open
toby1knby opened this issue Sep 27, 2017 · 8 comments
Open

unshc on Mac doesn´t seem to work #13

toby1knby opened this issue Sep 27, 2017 · 8 comments

Comments

@toby1knby
Copy link

I would love to see this work on the Mac and I have submitted source files for you to review...
Archive 2.zip
Awesome tool in Linux - thanks!

@toby1knby toby1knby changed the title unshc on Mac doen´t seem to work unshc on Mac doesn´t seem to work Sep 27, 2017
@yanncam
Copy link
Owner

yanncam commented Sep 28, 2017

Hello,

Indeed, your *.sh.x file in your archive is a Mach-O file:

$ file superduperdemo.sh.x
superduperdemo.sh.x: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>

The objdump command (used by UnSHc) can't work on this type of binary file:

$ objdump -D superduperdemo.sh.x > OBJFILE
objdump: superduperdemo.sh.x: Format de fichier non reconnu
$ objdump -s superduperdemo.sh.x > STRINGFILE
objdump: superduperdemo.sh.x: Format de fichier non reconnu

I'm not a Mac-addict nor Mach-O specialist, so I can't add this kind of format in UnSHc for the moment.

But I have transmit this issue to several friends and coworkers if one of them can help.

Thanks for your issue and your package,

We keep in touch,

Sincerely,

@toby1knby
Copy link
Author

Now I just feel lazy. I could have figured out as much from reading previous issues. It seems the appropriate replacement for "objdump" is "otool". It would be a case of substituting the tool in the script, and getting the syntax right so it yields equivalents. I´will be looking into this - thanks for your time. best regards

@yanncam
Copy link
Owner

yanncam commented Sep 28, 2017

Yes, I have seen that otool seems to be a good replacement of objdump. But I don't know at this moment if the outputs of the equivalent OBJFILE or STRINGFILE via otool are nearly similar to the objdump outputs.

There is many grep and regex in UnSHc to parse the object dump produce by objdump -D, and for a Mach-O output, these grep syntax need to be updated I think.

If you make some test and research, I'm really interested by your result :) !

Sincerely,

@yanncam
Copy link
Owner

yanncam commented Oct 7, 2017

Hello @toby1knby,

I have made few test with a colleague on a MacOS Darwin architecture XNU, and I think we will be able to adapt UnSHc for Mac :) !
I have many change to do (I don't no if I made a generic unshc.sh script for Linux/Mac or two distinct version...) but I keep you in touch.

Have a nice day,

@yanncam
Copy link
Owner

yanncam commented May 25, 2018

Hello, @toby1knby,

For your information, a new version of UnSHc is in progress, with the support of x86, x64, Mach-O and ARM :) !

I keep you in touch,

Sincerely,

@cdwmhcc
Copy link

cdwmhcc commented Apr 1, 2020

Hello, @toby1knby,

For your information, a new version of UnSHc is in progress, with the support of x86, x64, Mach-O and ARM :) !

I keep you in touch,

Sincerely,

What is the progress now?

@yunxuan0530
Copy link

您好,@ toby1knby,

供您参考,在x86,x64,Mach-O和ARM的支持下,UnSHc的新版本正在开发中!

我会与您保持联系,

真挚地,

What is the progress now?

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

5 participants
@toby1knby @cdwmhcc @yanncam @yunxuan0530 and others