Code Monkey home page Code Monkey logo

maboii.js's Introduction

maboii.js

amiibo™ encryption/decryption library. This library is a port of the encryption/decryption code from socram8888/amiitool.

How to use

Install the package

npm install maboii

Load the keys

const maboii = require('maboii');
const fs = require('fs');

// Read keys from file
let fileBuffer = fs.readFileSync('./keys.bin');
const keys = maboii.loadMasterKeys([...fileBuffer]);

Decrypt dump

// Read dump from file
let dumpFileBuffer = fs.readFileSync('./dumpFile.bin')
let unpackResult = maboii.unpack(keys, [...dumpFileBuffer]);

// If decrypt is successful
if (unpackResult.result) {
    // The plain data is available through unpackResult.unpacked
}

Encrypt plain data

// Read plain dump from file
let plainDumpFileBuffer = fs.readFileSync('./dumpFile.dec.bin')
let packedResult = maboii.pack(keys, [...plainDumpFileBuffer]);

Read information from plain data

const maboii = require('maboii');
const fs = require('fs')

// Read plain dump from file
let plain = [...fs.readFileSync('./dumpFile.dec.bin')]; // Let's read an Inkling dump

maboii.plainDataUtils.getAmiiboId(plain); // Returns '0800010003820002'
maboii.plainDataUtils.getCharacterId(plain); // Returns '0800'
maboii.plainDataUtils.getGameSeriesId(plain); // Returns '080'
maboii.plainDataUtils.getMiiName(plain); // Returns the Mii name as string, in my case 'Holo' from my dump
maboii.plainDataUtils.getNickName(plain); // Returns the amiibo™ name as string, in my case 'Sushy' from my dump

Credits

  • socram8888 - Author of amiitool
  • AcK77 - Author of AmiiBomb which helped me a lot to test

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.