Homebrew/ruby-macho

Name: ruby-macho

Owner: Homebrew

Description: :nut_and_bolt: A pure-Ruby library for parsing Mach-O files.

Created: 2015-07-15 21:40:05.0

Updated: 2018-05-23 09:03:19.0

Pushed: 2018-05-14 16:26:29.0

Homepage: https://rubygems.org/gems/ruby-macho

Size: 734

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ruby-macho

Gem Version Build Status Coverage Status

A Ruby library for examining and modifying Mach-O files.

What is a Mach-O file?

The Mach-O file format is used by OS X and iOS (among others) as a general purpose binary format for object files, executables, dynamic libraries, and so forth.

Documentation

Full documentation is available on RubyDoc.

A quick example of what ruby-macho can do:

ire 'macho'

 = MachO::MachOFile.new("/path/to/my/binary")

t the file's type (object, dynamic lib, executable, etc)
.filetype # => :execute

t all load commands in the file and print their offsets:
.load_commands.each do |lc|
ts "#{lc.type}: offset #{lc.offset}, size: #{lc.cmdsize}"


cess a specific load command
ers = file[:LC_VERSION_MIN_MACOSX].first
 lc_vers.version_string # => "10.10.0"
What works?
What needs to be done?

Attribution:

License

ruby-macho is licensed under the MIT License.

For the exact terms, see the license file.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.