An open API service indexing awesome lists of open source software.

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

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<