unixpickle / gobfuscate

Obfuscate Go binaries and packages
BSD 2-Clause "Simplified" License
1.45k stars 157 forks source link

we need option to execlude some packages #39

Open sijms opened 3 years ago

sijms commented 3 years ago

I have medium project which import small packages i made and also import: golang.org/x/text I need to cancel golang.org/x/text from obfuscation to accelerate the operation. after searching in the code i found that when you transfer package to $GOROOT it will not include in the obfuscation but I receive error from function func interfaceMethods(gopath string) (map[string]bool, error){} cannot import golang.org/x/tools/go/ssa/ssautil

I temporary solve the problem by write continue when the program cannot import a package because actually this package I am not using and I didn't need to obfuscate it

pkg, err := ctx.Import(pkgName, gopath, 0) if err != nil { continue //return nil, fmt.Errorf("import %s: %s", pkgName, err) }