Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to view the source of a mac app?

Would be usefull to see how things work but not sure on the legality of it

like image 529
Jamesp1989 Avatar asked Apr 22 '12 14:04

Jamesp1989


2 Answers

Most Mac apps are written using Cocoa in Objective-C; which, while it is a compiled language, means that there is a fair bit of information left over that could be used by a decompiler.

I'm not sure if there are a lot of decompilers out there that leverages this information, at least I haven't heard of any.

However, there are also another option; F-Script.

F-Script can be used to attach to an executable and explore its interfaces, while not as good as source, it can give you a pretty clear idea of how the executable is built, and how it operates.

As for the legality issue:

IANAL, but as far as I know, reverse-engineering for the purposes of compatibility is legal in many jurisdictions, and I can't imagine that decompiling an executable to look at its code is illegal, unless the specific EULA specifically prohibits it.

Edit: WRT Steam specifically, it is probably NOT written in Cocoa, but C# with some manner of .NET compatibility layer; and it's probably not a good place to start if you want to learn how to make applications for Mac OS X.

like image 172
Williham Totland Avatar answered Sep 25 '22 06:09

Williham Totland


By far, the best Mac OS X disassembler I've used is Hopper available here: http://www.hopperapp.com/

It will also convert the assembly to C pseudo code as best it can. It will generate code flow diagrams with blue lines (true blue, love it) for true and red for false paths.

It's The Mac OS reverse engineering tool. There are even Youtube videos that will show you how to use it.

like image 24
Arius Kahn Avatar answered Sep 24 '22 06:09

Arius Kahn