News for hackers. Stuff that matters.
Re:A simultaneous OS X binary, PDF file, jar file, and HTML ... by est on Friday September 27, 2013 @03:40AM (#6455792)
ELF and PE hybrid

http://stackoverflow.com/a/2083161/41948

Now someone could just add Mach-O to it...

Re:A simultaneous OS X binary, PDF file, jar file, and HTML ... by ange4771_ on Friday September 27, 2013 @04:07AM (#6455875)
it's not a PE, it's a (headerless) COM.

PE, ELF, and Mach-O all enforce a different signature at offset 0. Thus it's impossible to combine them - otherwise, I'd have done it already ;)

Re:A simultaneous OS X binary, PDF file, jar file, and HTML ... by est on Friday September 27, 2013 @04:16AM (#6455893)
Getting around the offset 0 is always the hardest part in all hybrid format hacks.

I tried .vbs+.bat hybrid and .bat+.com hybrid.

Re:A simultaneous OS X binary, PDF file, jar file, and HTML ... by yiedyie on Friday September 27, 2013 @04:14AM (#6455888)
COM doesn't have the MZ magic number.
Re:A simultaneous OS X binary, PDF file, jar file, and HTML ... by mzs on Friday September 27, 2013 @11:57AM (#6457632)
How one of the comments suggests to have the COM write-out an EXE, you could do something similar on OS X. Applescripts can be entirely in a resource fork, have that write-out a macho-o and have the data fork be your previous polyglot.