# fatmacho

> fat-mach-o format parser

Latest version **0.1.2** (published 2019-08-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install fatmacho
pnpm add fatmacho
yarn add fatmacho
bun add fatmacho
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-08-29 |
| First published | 2016-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Sergi Alvarez i Capilla |
| Maintainers | pancake |
| Keywords | fat-mach-o, mach-o, mac, executable, format |

## Links

- npm: https://www.npmjs.com/package/fatmacho
- Repository: https://github.com/nowsecure/node-fatmacho
- Issues: https://github.com/nowsecure/node-fatmacho/issues
- npm.io page: https://npm.io/package/fatmacho

## Dependencies (1)

- [macho](https://npm.io/package/macho.md) ^1.4.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2019-08-29
- 0.1.1 — 2016-02-16
- 0.1.0 — 2016-02-16

## README

fatmacho
========

fat mach-o file-format parsers

Legal
-----
This node module has been written by Sergi Àlvarez at Nowsecure and it is distributed under the MIT license.

Usage
-----

The `parse` method accepts a Buffer as argument and returns an array of sub-binaries stored in there.

```js
> var fat = require('fatmacho');
> fat.parse(fs.readFileSync('test.fatbin'));
[
  {
    arch: "arm",
    offset: 4096,
    size: 120656,
    align: 14,
    data: <Buffer ce fa ed fe 0c 00 00 00 09 00 00 00 02 00 00 00 ... > }
  },
  {
    ...
  }
]
```

This is a more elaborated example:

```js
'use strict';

const fs = require('fs');
const macho = require('macho');
const fat = require('fatmacho');
const data = fs.readFileSync(file);
const bins = fat.parse(process.argv[2]);

for (const b of bins) {
  console.log(b.arch, b.offset, '+', b.size);
  console.log(macho.parse (b.data));
}
```

---
_Source: https://npm.io/package/fatmacho · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
