Code Monkey home page Code Monkey logo

node-fatmacho's Introduction

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.

> 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:

'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));
}

node-fatmacho's People

Contributors

trufae avatar dependabot[bot] avatar dweinstein avatar

Stargazers

Mauro Risonho de Paula Assumpção avatar smartdone avatar Joshua Briefman avatar Alex Mor avatar David Manouchehri avatar Jevin Sweval avatar  avatar Julian Gruber avatar  avatar

Watchers

Jevin Sweval avatar James Cloos avatar Andrew Hoog avatar  avatar Chris Wiley avatar  avatar

Forkers

trufae

node-fatmacho's Issues

open source

  • MIT license
  • update package json
  • move organization
  • publish in npm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.