Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@perion/perion

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perion/perion

A library that contains all the utilities for creating a MapleStory server emulator

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-94.44%
Maintainers
1
Weekly downloads
 
Created
Source

@perion/perion Travis CI Build Status

perion is a library of Node.js modules that help bring MapleStory private server development to the npm ecosystem.

npm i --save @perion/perion
  • Note this project is in early development, use with caution

Overview

Core Packages

  • calc

A calculator library that implements standard MapleStory specific calculations such as damage, stat modifiers, experience, and levels.

const calc = require('@perion/calc');

/** Example player stats object */
const playerStats = {base: {str: 4, ...}, hyper: {str: 1, ...}};

/** crypto.calc example */
const modifiedStats = calc.HyperStats(playerStats).applyAll().get();

/** Returns {str: 34, ...} */
  • crypto

A cryptography library that exposes everything you need to encrypt/decrypt data for MapleStory.

const crypto = require('@perion/crypto');

/** Example data */
const payload = Buffer.from([0x1]);
const sendIv = Buffer.from([0x0, 0x2, 0x3, 0x4]);
const recvIv = Buffer.from([0x4, 0x2, 0x1, 0x0]);

/** crypto.Shanda example */
const encrypted = crypto.Shanda.encrypt(payload);
const decrypted = crypto.Shanda.decrypt(payload);

/** Returns the input buffer with the payload encrypted/decrypted using Maple Custom Shanda */

/** crypto.AES example */
/**
  * You must initialize the AES class with:
  * - an IV (Initialization Vector)
  * - a MapleStory version number
  *
  * The IV must have a length of 4
  * As the server, you must send the IV for both send and recv to the client
  */
const sendAES = new crypto.AES(sendIv, 83);
const recvAES = new crypto.AES(recvIv, 83);

const encryptedOut = sendAES.transform(payload);
const decryptedIn = recvAES.transform(payload);

/** Returns the input buffer with the payload encrypted/decryped using Maple AES */
  • net

A packet parser using method-chaining syntax for compact and efficient parsing/writing of packet structures.

const net = require('@perion/net');

/** Example buffer */
const data = Buffer.from([1, 2]);

/** crypto.Packet example */
const packet = new net.Packet.Parser(data);
const fields = ['id', 'name', 'hp'];
const unpacked = packet.int().mapleascii().int().collect(fields);

/** Returns {id: <number>, name: <string>, hp: <number>} */

/** crypto.Writer example */

/** Initialize with length */
let packet = new net.Packet.Writer(5);
packet = packet.byte(0x0).int(9).buffer();

/** Returns the buffer with data */

  • wz

A WZ library that can read and write to the WZ file format.

Neat Features

  • Uses Google's recommended JS style guidelines, fully documented code including full JSDoc comments
  • Everything is tested and modular, so only use the modules that you want!

Project Goals

In Progress

  • Networking protocol
  • Damage calculations
  • Event timers
  • NPC script manager
  • Event script manager
  • WZ and NX file format
  • Generic MapleStory abstractions
  • Multiple MapleStory versions

Project Overview

Linter

npm run lint

Test

npm run test

Contributing

For now, there are no contribution guidelines. I only ask that you follow the eslint rules when contributing a pull request. Thanks!

ForTheBadge built-with-love

Keywords

FAQs

Package last updated on 22 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc