https://github.com/pedroalbanese/obfuse
Minimalist golang string obfuscator
https://github.com/pedroalbanese/obfuse
golang obfuscation security string-obfuscation
Last synced: 10 months ago
JSON representation
Minimalist golang string obfuscator
- Host: GitHub
- URL: https://github.com/pedroalbanese/obfuse
- Owner: pedroalbanese
- License: isc
- Created: 2021-06-06T19:28:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-16T09:59:30.000Z (over 4 years ago)
- Last Synced: 2025-04-01T07:02:08.309Z (11 months ago)
- Topics: golang, obfuscation, security, string-obfuscation
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# obfuse
## Minimalist golang string obfuscator
### Description:
When you want to store specific strings in your go code they are automatically
searchable in the go binary.
For example take the following code (`x.go`):
```go
package main
import (
"fmt"
)
const (
C = "hello"
)
func main() {
fmt.Println(C)
}
```
Now run `go build ./x.go` to build it and the run `strings ./x | grep hello`.
Surprise ! `hello` is visible to anyone who has access the go binary.
[obfuse](https://github.com/pedroalbanese/obfuse) tries to mitigate this
problem by obfuscating the string so it is no longer searchable with
[strings](https://linux.die.net/man/1/strings).
### Usage:
-r Print summarized code.
-s string
String to obfuscate.
-v string
Variable name. (default "str")
### Example:
obfuse -s "35495c82-c65d-11eb-a48d-f30d71e4e8ad" -v uid
#### Will return:
```go
package main
import (
"fmt"
"unsafe"
)
const (
EAX = uint8(unsafe.Sizeof(true))
)
func main() {
var uid []byte
uid = append(uid, ((EAX<