Skip to content

Releases: pinohans/gobfuscator

v1.1.0

18 Jan 14:26
Compare
Choose a tag to compare

fix embed * case.
fix relative build path.
fix collision.

v1.0.0

01 Jun 06:26
Compare
Choose a tag to compare

gobfuscator

gobfuscator

Inspired by gobfuscate, but gobfuscator is different in totally.

1. how to

1.1. create config.json

Content of config.json

{
  "MainPkgDir": ".",
  "OutputPath": "dist",
  "NewGopath": "pkg",
  "Tags": "",
  "GOOS": "windows",
  "GOARCH": "amd64",
  "CGOENABLED": "0",
  "WindowsHide": "1",
  "NoStatic": "1"
}

Explanation of parameter

type Config struct {
	MainPkgDir  string // dir of main package
	OutputPath  string // path of dist
	NewGopath   string // dir of new GOPATH
	Tags        string // tags are passed to the go compiler
	GOOS        string // target os
	GOARCH      string // target arch
	CGOENABLED  string // cgo enable
	WindowsHide string // hide windows GUI
	NoStatic    string // no static link
}

1.2. compile and run

go mod tidy && go build -o gobfuscator . && ./gobfuscator -c config.json

2. dependency

test with Go 1.16.4

3. target

  • gobfuscator-frp
  • gobfuscator-fscan

4. technical

  1. Obfuscate third party package with ast.
  2. Process build tags and go:embed.
  3. Fast import graph walker.

And so on.