base64functionhook

0.0.3 • Public • Published

Install

$ npm install --save-dev js-base64functionhook

Call Function Usage

const { FunctionEncypt } = require("base64functionhook");

async function Main() {
    /* Original Function
    function test(a, b) {
        console.log(a + b)
    }
    */ 

    //Encoded: CiAgICBmdW5jdGlvbiB0ZXN0KGEsIGIpIHsKICAgICAgICBjb25zb2xlLmxvZyhhICsgYikKICAgIH0KICAgIA==

    const Base64Caller =  await new FunctionEncypt().callBase64Function("CiAgICBmdW5jdGlvbiB0ZXN0KGEsIGIpIHsKICAgICAgICBjb25zb2xlLmxvZyhhICsgYikKICAgIH0KICAgIA==", [1, 50]);
}

Main();

Code To Base64 Usege

const { FunctionEncypt } = require("base64functionhook");


async function Main() {

    const Code = `
    function random(min, max) {
        return Math.floor(Math.random() * (max - min + 1)) + min;
    }
    `

    const functionEncypt = new FunctionEncypt();

    const base64Code = functionEncypt.codeToBase64(Code);

    console.log(base64Code); //CiAgICBmdW5jdGlvbiByYW5kb20obWluLCBtYXgpIHsKICAgICAgICByZXR1cm4gTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogKG1heCAtIG1pbiArIDEpKSArIG1pbjsKICAgIH0KICAgIA==
}

Main()

Call Base64 Code

const { FunctionEncypt } = require("base64functionhook")
const fs = require("fs");

async function Main() {
    const code = await fs.readFile('./code.txt', 'utf8');

    const functionEncypt = new FunctionEncypt();
    functionEncypt.callBase64Code(code);
}

Main()

Readme

Keywords

Package Sidebar

Install

npm i base64functionhook

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

5.5 kB

Total Files

6

Last publish

Collaborators

  • westy_dev