Skip to content

Instantly share code, notes, and snippets.

@AbeEstrada
Last active May 21, 2022 12:53
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AbeEstrada/11e4511f9915b00f9714 to your computer and use it in GitHub Desktop.
Save AbeEstrada/11e4511f9915b00f9714 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")
}
@usamaejaz
Copy link

Anyone looking for cloudflare decoder in any other language can see here (I tried covering many languages): https://usamaejaz.com/cloudflare-email-decoding/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment