GRT-Develop

module
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2025 License: MIT

README

GRT-Develop

A package for deep customization of Gleam-RT.

option and argument

package main

import (
    "fmt"
    "os"

    "github.com/RSSU-Shellcode/GRT-Develop/argument"
    "github.com/RSSU-Shellcode/GRT-Develop/option"
)

func main() {
    tpl, err := os.ReadFile("Gleam-RT.bin")
    checkError(err)

    opts := option.Options{
        NotEraseInstruction: false,
        NotAdjustProtect:    false,
        TrackCurrentThread:  false,
    }
    tpl, err = option.Set(tpl, &opts)
    checkError(err)

    arg1 := &argument.Arg{
        ID:   0,
        Data: []byte("arg1"),
    }
    arg2 := &argument.Arg{
        ID:   1,
        Data: []byte("arg2"),
    }
    stub, err := argument.Encode(arg1, arg2)
    checkError(err)

    output := append(tpl, stub...)
    err = os.WriteFile("output.bin", output, 0600)
    checkError(err)
}

func checkError(err error) {
    if err != nil {
        fmt.Println(err)
        os.Exit(1)
    }
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL