go-shc

command module
v0.0.20240212081621 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

README

Go-SHC

GoVersion Go Reference Beta

Obfuscate Shell scripts or package them into binary programs. Note that obfuscation and packaging only provide a certain level of code concealment.

English | 中文

Installation

go install github.com/tianluanchen/go-shc@latest

You can also download the pre-compiled program from the Github Releases directly.

Please note that to package shell scripts into binary programs, your system should have the Go development environment properly configured.

Usage

Obfuscation

# Print obfuscated result to standard output
go-shc --script 'echo hello;read a;echo $a'

# Obfuscate a.sh and b.sh, write the result to obfuscated.sh
go-shc -o obfuscated.sh a.sh b.sh

Packaging

# Scripts are encapsulated into the binary program 'app'
go-shc pack --script 'echo hello;read a;echo $a' -o app
# a.sh and b.sh are encapsulated into the binary program 'app'
go-shc pack -o app a.sh b.sh

Obfuscation and Packaging

# Obfuscate
go-shc -o obfuscated.sh a.sh b.sh
# Package
go-shc pack -o app obfuscated.sh

Enable the built-in web service

go-shc serve -a "127.0.0.1:8080"

Importing and Using as a Library

Download

go get -u github.com/tianluanchen/go-shc@latest

Custom code generator for packaging Shell scripts in Go

shc.PackShellScript(script, shc.PackOption{
    CustomGenerator func(script string) string {
        // ....
    }
})

License

GPL-3.0 © Ayouth

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
shc

Jump to

Keyboard shortcuts

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