All Projects → flier → rust-macho

flier / rust-macho

Licence: other
Mach-O File Format Parser for Rust

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to rust-macho

Macho Kit
A C/Objective-C library for parsing Mach-O files.
Stars: ✭ 416 (+656.36%)
Mutual labels:  mach-o
Bingrep
like ~~grep~~ UBER, but for binaries
Stars: ✭ 1,395 (+2436.36%)
Mutual labels:  mach-o
Hellosilicon
An attempt with ARM64 assembly on Apple Silicon Macs
Stars: ✭ 220 (+300%)
Mutual labels:  mach-o
Fcd
An optimizing decompiler
Stars: ✭ 622 (+1030.91%)
Mutual labels:  mach-o
Segment dumper
Simple example of a Mach-O parser
Stars: ✭ 85 (+54.55%)
Mutual labels:  mach-o
Rd route
Function hooking for macOS
Stars: ✭ 138 (+150.91%)
Mutual labels:  mach-o
Cydia
🔥🔥🔥我的微信公众号: Cydia 🔥🔥🔥=> Cydia插件 Logos语言 开发Tweak.xm Cydia Substrate 注入dylib iOS逆向工程开发 越狱Jailbreak deb插件 - fishhook / Frida / iOSOpenDev / Cycript / MachOView / IDA / Hopper Disassembler / MonkeyDev / Class-dump / Theos / Reveal / Dumpdecryptd / FLEX / 汇编Assembly / CaptainHook / lldb/LLVM/XNU/Darwin/iOS Reverse
Stars: ✭ 407 (+640%)
Mutual labels:  mach-o
SnakeKit
A C++ library for parsing ObjC Metadata of Mach-O files.
Stars: ✭ 26 (-52.73%)
Mutual labels:  mach-o
Macholibre
Mach-O & Universal Binary Parser
Stars: ✭ 102 (+85.45%)
Mutual labels:  mach-o
Cave miner
Search for code cave in all binaries
Stars: ✭ 218 (+296.36%)
Mutual labels:  mach-o
Machdump
A very basic C Mach-O Header Dump tool written for practicing purposes. Works With x86 and x86_64 binaries
Stars: ✭ 25 (-54.55%)
Mutual labels:  mach-o
Tbd
A command-line tool to create Text-Based Application Programming Interface (TAPI) files from existing binaries
Stars: ✭ 82 (+49.09%)
Mutual labels:  mach-o
Bitcode retriever
Retrieves Bitcode from Mach-O binaries
Stars: ✭ 164 (+198.18%)
Mutual labels:  mach-o
Hookcase
Tool for reverse engineering macOS/OS X
Stars: ✭ 452 (+721.82%)
Mutual labels:  mach-o
Wbblades
基于mach-o解析技术的包大小占比分析、无用类检测、无符号表时的日志符号化 (Based on mach-o technology, a simple and efficient code size detection, useless class detection and unsigned crash log detection )
Stars: ✭ 243 (+341.82%)
Mutual labels:  mach-o
Macho Explorer
A graphical Mach-O viewer for macOS. Powered by Mach-O Kit.
Stars: ✭ 406 (+638.18%)
Mutual labels:  mach-o
Filebytes
Library to read and edit files in the following formats: Executable and Linking Format (ELF), Portable Executable (PE), MachO and OAT (Android Runtime)
Stars: ✭ 105 (+90.91%)
Mutual labels:  mach-o
machomachomangler
Tools for mangling Mach-O and PE binaries
Stars: ✭ 39 (-29.09%)
Mutual labels:  mach-o
Unity.Blog.Override App Delegate
A maintainable way to extend / override app delegate in Unity iOS / OSX standalone player. (Much) more at http://eppz.eu/blog/override-app-delegate-unity-ios-osx-1/
Stars: ✭ 28 (-49.09%)
Mutual labels:  mach-o
Ios Monitor Platform
📚 iOS 性能监控 SDK —— Wedjat(华狄特)开发过程的调研和整理
Stars: ✭ 2,316 (+4110.91%)
Mutual labels:  mach-o

rust-macho travis crate docs

Mach-O File Format Parser for Rust

Usage

To use, add the following line to Cargo.toml under [dependencies]:

mach_object = "0.1"

or alternatively,

mach_object = { git = "https://github.com/flier/rust-macho.git" }

Examples

Use OFile::parse to read the mach-o file from a &[u8] slice.

use std::io::{Read, Cursor};
use std::fs::File;
use mach_object::{OFile, CPU_TYPE_X86_64, MachCommand, LoadCommand};

let mut f = File::open("test/helloworld").unwrap();
let mut buf = Vec::new();
let size = f.read_to_end(&mut buf).unwrap();
let mut cur = Cursor::new(&buf[..size]);
if let OFile::MachFile { ref header, ref commands } = OFile::parse(&mut cur).unwrap() {
    assert_eq!(header.cputype, CPU_TYPE_X86_64);
    assert_eq!(header.ncmds as usize, commands.len());
    for &MachCommand(ref cmd, cmdsize) in commands {
        if let &LoadCommand::Segment64 { ref segname, ref sections, .. } = cmd {
            println!("segment: {}", segname);

            for ref sect in sections {
                println!("  section: {}", sect.sectname);
            }
        }
    }
}

For more detail, please check the unit tests and the otool example.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].