Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FindHao/eddd5bf354e44d0eb7df0c838535ba4a to your computer and use it in GitHub Desktop.
Save FindHao/eddd5bf354e44d0eb7df0c838535ba4a to your computer and use it in GitHub Desktop.
Cloudflare Email Protection Decoder in Go
package main
import (
"bytes"
"strconv"
)
func cf(a string) (s string) {
var e bytes.Buffer
r, _ := strconv.ParseInt(a[0:2], 16, 0)
for n := 4; n < len(a)+2; n += 2 {
i, _ := strconv.ParseInt(a[n-2:n], 16, 0)
e.WriteString(string(i ^ r))
}
return e.String()
}
func main() {
email := cf("f091809582839f9eb080999e97848582849c95de939f9d")
print(email)
print("\n")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment