{"id":13439240,"url":"https://github.com/m4b/goblin","last_synced_at":"2025-05-12T13:21:51.576Z","repository":{"id":39546109,"uuid":"58722558","full_name":"m4b/goblin","owner":"m4b","description":"An impish, cross-platform binary parsing crate, written in Rust","archived":false,"fork":false,"pushed_at":"2025-04-10T06:41:29.000Z","size":3221,"stargazers_count":1281,"open_issues_count":89,"forks_count":168,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-05-05T21:13:22.631Z","etag":null,"topics":["archive","binary-analysis","cross-platform","elf","mach","pe","reverse-engineering"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m4b.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-05-13T09:18:18.000Z","updated_at":"2025-05-02T13:15:20.000Z","dependencies_parsed_at":"2024-03-10T08:29:22.302Z","dependency_job_id":"a1489fd4-7feb-4045-a23c-fd7da3dab0d5","html_url":"https://github.com/m4b/goblin","commit_stats":{"total_commits":760,"total_committers":96,"mean_commits":7.916666666666667,"dds":"0.38815789473684215","last_synced_commit":"48da3d867b47173b19072b30bd3ef21e7d0215ba"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Fgoblin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Fgoblin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Fgoblin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4b%2Fgoblin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m4b","download_url":"https://codeload.github.com/m4b/goblin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745198,"owners_count":21957319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archive","binary-analysis","cross-platform","elf","mach","pe","reverse-engineering"],"created_at":"2024-07-31T03:01:12.266Z","updated_at":"2025-05-12T13:21:51.553Z","avatar_url":"https://github.com/m4b.png","language":"Rust","readme":"# libgoblin\n\n[![Actions][actions-badge]][actions-url]\n[![crates.io version][crates-goblin-badge]][crates-goblin]\n\n\u003c!-- Badges' links --\u003e\n\n[actions-badge]: https://github.com/m4b/goblin/workflows/CI/badge.svg?branch=master\n[actions-url]: https://github.com/m4b/goblin/actions\n[crates-goblin-badge]: https://img.shields.io/crates/v/goblin.svg\n[crates-goblin]: https://crates.io/crates/goblin\n\n![say the right words](https://s-media-cache-ak0.pinimg.com/736x/1b/6a/aa/1b6aaa2bae005e2fed84b1a7c32ecb1b.jpg)\n\n### Documentation\n\nhttps://docs.rs/goblin/\n\n[changelog](CHANGELOG.md)\n\n### Usage\n\nGoblin requires `rustc` 1.65.0 (Rust 2021 edition).\n\nAdd to your `Cargo.toml`\n\n```toml\n[dependencies]\ngoblin = \"0.9\"\n```\n\n### Features\n\n* awesome crate name\n* zero-copy, cross-platform, endian-aware, ELF64/32 implementation - wow!\n* zero-copy, cross-platform, endian-aware, 32/64 bit Mach-o parser - zoiks!\n* PE 32/64-bit parser - bing!\n* a Unix _and_ BSD style archive parser (latter courtesy of [@willglynn]) - huzzah!\n* many cfg options - it will make your head spin, and make you angry when reading the source!\n* fuzzed - \"I am happy to report that goblin withstood 100 million fuzzing runs, 1 million runs\n  each for seed 1\\~100.\" - [@sanxiyn]\n* tests\n\n`libgoblin` aims to be your one-stop shop for binary parsing, loading, and analysis.\n\n### Use-cases\n\nGoblin primarily supports the following important use cases:\n\n1. Core, std-free `#[repr(C)]` structs, tiny compile time, 32/64 (or both) at your leisure.\n\n1. Type punning. Define a function once on a type, but have it work on 32 or 64-bit variants -\n   without really changing anything, and no macros! See `examples/automagic.rs` for a basic example.\n\n1. `std` mode. This throws in read and write impls via `Pread` and `Pwrite`, reading from file,\n   convenience allocations, extra methods, etc. This is for clients who can allocate and want to\n   read binaries off disk.\n\n1. `Endian_fd`. A truly terrible name :laughing: this is for binary analysis like in [panopticon]\n   or [falcon] which needs to read binaries of foreign endianness, _or_ as a basis for\n   constructing cross platform foreign architecture binutils, e.g. [cargo-sym] and [bingrep] are\n   simple examples of this, but the sky is the limit.\n\nHere are some things you could do with this crate (or help to implement so they could be done):\n\n1. Write a compiler and use it to [generate binaries][faerie] (all the raw C structs have\n   [`Pwrite`][scroll] derived).\n1. Write a binary analysis tool which loads, parses, and analyzes various binary formats, e.g.,\n   [panopticon] or [falcon].\n1. Write a [semi-functioning dynamic linker][dryad].\n1. Write a [kernel][redox-os] and load binaries using `no_std` cfg. I.e., it is essentially just\n   struct and const defs (like a C header) - no fd, no output, no std.\n1. Write a [bin2json] tool, because why shouldn't binary formats be in JSON?\n\n\u003c!-- Related projects  --\u003e\n\n[PyO3/maturin]: https://github.com/PyO3/maturin\n[occlum]: https://github.com/occlum/occlum\n[memflow]: https://github.com/memflow/memflow\n[cargo-sym]: https://github.com/m4b/cargo-sym\n[bingrep]: https://github.com/m4b/bingrep\n[faerie]: https://github.com/m4b/faerie\n[dryad]: https://github.com/m4b/dryad\n[scroll]: https://github.com/m4b/scroll\n[redox-os]: https://github.com/redox-os/redox\n[bin2json]: https://github.com/m4b/bin2json\n[panopticon]: https://github.com/das-labor/panopticon\n[falcon]: https://github.com/endeav0r/falcon\n\n### Cfgs\n\n`libgoblin` is designed to be massively configurable. The current flags are:\n\n* elf64 - 64-bit elf binaries, `repr(C)` struct defs\n* elf32 - 32-bit elf binaries, `repr(C)` struct defs\n* mach64 - 64-bit mach-o `repr(C)` struct defs\n* mach32 - 32-bit mach-o `repr(C)` struct defs\n* pe32 - 32-bit PE `repr(C)` struct defs\n* pe64 - 64-bit PE `repr(C)` struct defs\n+ te - Terse Executable (TE) `repr(C)` struct defs\n* archive - a Unix Archive parser\n* endian_fd - parses according to the endianness in the binary\n* std - to allow `no_std` environments\n\n# Contributors\n\nThank you all :heart: !\n\nIn lexicographic order:\n\n- [@2vg]\n- [@5225225]\n- [@alessandrod]\n- [@amanieu]\n- [@anfedotoff]\n- [@apalm]\n- [@baloo]\n- [@burjui]\n- [@connorkuehl]\n- [@dancrossnyc]\n- [@dureuill]\n- [@Evian-Zhang]\n- [@ExPixel]\n- [@flanfly]\n- [@glandium]\n- [@h33p]\n- [@ibabushkin]\n- [@ideeockus]\n- [@ivlzme]\n- [@jackcmay]\n- [@jan-auer]\n- [@Javagedes]\n- [@jessehui]\n- [@jdub]\n- [@Jhynjhiruu]\n- [@johannst]\n- [@JohnScience]\n- [@joschock]\n- [@jrmuizel]\n- [@jsgf]\n- [@keith]\n- [@kjempelodott]\n- [@kkent030315]\n- [@ko1n]\n- [@le-jzr]\n- [@Lichtso]\n- [@lion128]\n- [@lissyx]\n- [@llogiq]\n- [@lumag]\n- [@lzutao]\n- [@lzybkr]\n- [@m-hilgendorf]\n- [@mmaekr]\n- [@m4b]\n- [@messense]\n- [@mitsuhiko]\n- [@mkroening]\n- [@mre]\n- [@Mrmaxmeier]\n- [n01e0]\n- [nathaniel-daniel]\n- [@nick96]\n- [@nico-abram]\n- [@npmccallum]\n- [@pchickey]\n- [@philipc]\n- [@Pzixel]\n- [@quake]\n- [@raindev]\n- [@RaitoBezarius]\n- [@rocallahan]\n- [@sanxiyn]\n- [@skdltmxn]\n- [@sollyucko]\n- [@Swatinem]\n- [@SweetVishnya]\n- [@SquareMan]\n- [@tathanhdinh]\n- [@Techno-coder]\n- [@tiann]\n- [@ticki]\n- [@Timmmm]\n- [@Tiwalun]\n- [@track-5]\n- [@tux3]\n- [@wickerwacka]\n- [@willglynn]\n- [@woodruffw]\n- [@wyxloading]\n- [@xcoldhandsx]\n- [@x64k]\n\n\u003c!-- Contributors --\u003e\n\n[@2vg]: https://github.com/2vg\n[@5225225]: https://github.com/5225225\n[@alessandrod]: https://github.com/alessandrod\n[@amanieu]: https://github.com/amanieu\n[@anfedotoff]: https://github.com/anfedotoff\n[@apalm]: https://github.com/apalm\n[@baloo]: https://github.com/baloo\n[@burjui]: https://github.com/burjui\n[@connorkuehl]: https://github.com/connorkuehl\n[@crzysdrs]: https://github.com/crzysdrs\n[@dancrossnyc]: https://github.com/dancrossnyc\n[@dureuill]: https://github.com/dureuill\n[@Evian-Zhang]: https://github.com/Evian-Zhang\n[@ExPixel]: https://github.com/ExPixel\n[@flanfly]: https://github.com/flanfly\n[@glandium]: https://github.com/glandium\n[@h33p]: https://github.com/h33p\n[@ibabushkin]: https://github.com/ibabushkin\n[@ideeockus]: https://github.com/ideeockus\n[@ivlzme]: https://github.com/ivlzme\n[@jackcmay]: https://github.com/jackcmay\n[@jan-auer]: https://github.com/jan-auer\n[@Javagedes]: https://github.com/Javagedes\n[@jessehui]: https://github.com/jessehui\n[@Jhynjhiruu]: https://github.com/Jhynjhiruu\n[@JohnScience]: https://github.com/JohnScience\n[@johannst]: https://github.com/johannst\n[@joschock]: https://github.com/joschock\n[@jdub]: https://github.com/jdub\n[@jrmuizel]: https://github.com/jrmuizel\n[@jsgf]: https://github.com/jsgf\n[@keith]: https://github.com/keith\n[@kjempelodott]: https://github.com/kjempelodott\n[@kkent030315]: https://github.com/kkent030315\n[@ko1N]: https://github.com/ko1N\n[@le-jzr]: https://github.com/le-jzr\n[@Lichtso]: https://github.com/Lichtso\n[@lion128]: https://github.com/lion128\n[@lissyx]: https://github.com/lissyx\n[@llogiq]: https://github.com/llogiq\n[@lumag]: https://github.com/lumag\n[@lzutao]: https://github.com/lzutao\n[@lzybkr]: https://github.com/lzybkr\n[@m-hilgendorf]: https://github.com/m-hilgendorf\n[@mmaekr]: https://github.com/mmaekr\n[@m4b]: https://github.com/m4b\n[@messense]: https://github.com/messense\n[@mitsuhiko]: https://github.com/mitsuhiko\n[@mkroening]: https://github.com/mkroening\n[@mre]: https://github.com/mre\n[@Mrmaxmeier]: https://github.com/Mrmaxmeier\n[n01e0]: https://github.com/n01e0\n[nathaniel-daniel]: https://github.com/nathaniel-daniel\n[@nick96]: https://github.com/nick96\n[@nico-abram]: https://github.com/nico-abram\n[@npmccallum]: https://github.com/npmccallum\n[@pchickey]: https://github.com/pchickey\n[@philipc]: https://github.com/philipc\n[@Pzixel]: https://github.com/Pzixel\n[@quake]: https://github.com/quake\n[@raindev]: https://github.com/raindev\n[@RaitoBezarius]: https://github.com/RaitoBezarius\n[@rocallahan]: https://github.com/rocallahan\n[@sanxiyn]: https://github.com/sanxiyn\n[@skdltmxn]: https://github.com/skdltmxn\n[@sollyucko]: https://github.com/sollyucko\n[@suttonbradley]: https://github.com/suttonbradley\n[@Swatinem]: https://github.com/Swatinem\n[@SweetVishnya]: https://github.com/SweetVishnya\n[@SquareMan]: https://github.com/SquareMan\n[@tathanhdinh]: https://github.com/tathanhdinh\n[@Techno-coder]: https://github.com/Techno-coder\n[@tiann]: https://github.com/tiann\n[@ticki]: https://github.com/ticki\n[@Timmmm]: https://github.com/Timmmm\n[@Tiwalun]: https://github.com/Tiwalun\n[@track-5]: https://github.com/track-5\n[@tux3]: https://github.com/tux3\n[@vadimcn]: https://github.com/vadimcn\n[@wickerwacka]: https://github.com/wickerwaka\n[@willglynn]: https://github.com/willglynn\n[@woodruffw]: https://github.com/woodruffw\n[@wyxloading]: https://github.com/wyxloading\n[@xcoldhandsx]: https://github.com/xcoldhandsx\n[@x64k]: https://github.com/x64k\n\n## Contributing\n\nUnless explicitly stated otherwise, you agree that your contributions are licensed as described in the accompanying LICENSE file (MIT).\n\n1. Please prefix commits with the affected binary component; the more specific the better, e.g.,\n   if you only modify relocations in the elf module, then do \"elf.reloc: added new constants for Z80\"\n1. Commit messages must explain their change, no generic \"changed\", or \"fix\"; if you push commits\n   like this on a PR, be aware [@m4b] or someone will most likely squash them.\n1. If you are making a large change to a module, please raise an issue first and lets discuss;\n   I don't want to waste your time if its not a good technical direction, or etc.\n1. If your PR is not getting attention, please respond to all relevant comments raised on the PR,\n   and if still no response, ping [@m4b], [@philipc], or [@willglynn] in github and also feel free\n   to email [@m4b].\n1. Please add tests if you are adding a new feature. Feel free to add tests even if you are not,\n   tests are awesome and easy in rust.\n1. Once cargo format is officially released, please format your _patch_ using the default settings.\n","funding_links":[],"categories":["Libraries","Rust","Vulnerability Assessment","库 Libraries","库","Exploitation","Projects"],"sub_categories":["Encoding","Binary Analysis \u0026 Reversing","编码 Encoding","加密 Encoding","编码(Encoding)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4b%2Fgoblin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm4b%2Fgoblin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4b%2Fgoblin/lists"}