Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

JamesMcMahon/macho

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is up to date with skillz/macho:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MachO

MachO is a small Ruby library for parsing interesting data from Mach-O binaries. It understands "normal" Mach-O binaries as well as multiarchitecure fat binarys.

It also includes an encryption simulation routine that is helpful in guessing the final size of an encrypted binary.

Parsing

require 'macho'
exec = MachO::Executable.new("MyBinary")
puts "Binary contains %d architectures" % exec.archs.length

Simulating Encryption

The encryption simulation routine modifies the provided binary file by filling its encryption segments with random bytes. You should generally run this step on a copy of your binary.

require 'macho'
MachO::simulate_encrypt("MyBinary")

Compressing the modified binary (using gzip) should give a representative size estimate of how Apple's encryption pass will affect the binary's size.

Contributing

Fork the macho repository on GitHub and send a Pull Request.

Copying

Copyright © 2011, Booyah, Inc. Additional contributions Copyright © 2013, Skillz, Inc. See the COPYING file for license rights and limitations (MIT).

About

A small Ruby library for parsing Mach-O binaries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published