What version of Garble and Go are you using?
$ garble version
mvdan.cc/garble v0.9.3
Build settings:
-buildmode exe
-compiler gc
CGO_ENABLED 1
GOARCH arm64
GOOS darwin
$ go version
go version go1.20.1 darwin/arm64
What environment are you running Garble on?
go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/nghianguyen/Library/Caches/go-build"
GOENV="/Users/nghianguyen/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/nghianguyen/go/pkg/mod"
GONOPROXY="github.com/tsocial/*"
GONOSUMDB="github.com/tsocial/*"
GOOS="darwin"
GOPATH="/Users/nghianguyen/go"
GOPRIVATE="github.com/tsocial/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/nghianguyen/Desktop/playground/garble/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/26/qs1y2gzs5xl1sslkyxvbzv_80000gr/T/go-build2983500078=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
- Build an executable file by:
garble build -seed=random main.go, the main.go has some panic inside and prints stack trace.
- Run
main executable file and copy output to stack.txt.
garble reverse main.go stack.txt.
garble -seed=random reverse main.go stack.txt.
What did you expect to see?
Step 3 and 4 print the un-obfuscated stack trace.
What did you see instead?
Step 3. nor 4. prints the un-obfuscated stack trace.
Question
garble -seed=X reverse main.go stack.txt would prints the un-obfuscated stack trace if X is the value of the random seed used by step 1, right? So can we print the random seed upon garble -seed=random build for later reverse usage?
What version of Garble and Go are you using?
$ garble version mvdan.cc/garble v0.9.3 Build settings: -buildmode exe -compiler gc CGO_ENABLED 1 GOARCH arm64 GOOS darwin $ go version go version go1.20.1 darwin/arm64What environment are you running Garble on?
go envOutputWhat did you do?
garble build -seed=random main.go, themain.gohas some panic inside and prints stack trace.mainexecutable file and copy output tostack.txt.garble reverse main.go stack.txt.garble -seed=random reverse main.go stack.txt.What did you expect to see?
Step 3 and 4 print the un-obfuscated stack trace.
What did you see instead?
Step 3. nor 4. prints the un-obfuscated stack trace.
Question
garble -seed=X reverse main.go stack.txtwould prints the un-obfuscated stack trace if X is the value of the random seed used by step 1, right? So can we print the random seed upongarble -seed=random buildfor later reverse usage?