UnSHc icon indicating copy to clipboard operation
UnSHc copied to clipboard

unshc on Mac doesn´t seem to work

Open toby1knby opened this issue 7 years ago • 8 comments

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 avatar Sep 27 '17 19:09 toby1knby

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,

yanncam avatar Sep 28 '17 08:09 yanncam

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

toby1knby avatar Sep 28 '17 08:09 toby1knby

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 avatar Sep 28 '17 08:09 yanncam

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 avatar Oct 07 '17 06:10 yanncam

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,

yanncam avatar May 25 '18 07:05 yanncam

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?

cdwmhcc avatar Apr 01 '20 22:04 cdwmhcc

您好,@ toby1knby,

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

我会与您保持联系,

真挚地,

What is the progress now?

yunxuan0530 avatar Mar 29 '21 15:03 yunxuan0530

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?

hsbugs avatar Mar 29 '21 18:03 hsbugs