Skip to content

Instantly share code, notes, and snippets.

@hvnsweeting
Created October 5, 2021 19:45
Show Gist options
  • Save hvnsweeting/b8d518fdd67b85e9bf9f6a16af6221af to your computer and use it in GitHub Desktop.
Save hvnsweeting/b8d518fdd67b85e9bf9f6a16af6221af to your computer and use it in GitHub Desktop.
package main
import (
"encoding/base64"
"fmt"
"log"
"strings"
"github.com/xxtea/xxtea-go/xxtea"
)
func main() {
encodedString := "SDZcVdXvZHhKkxopTPYbTvmxTHwFZyyvnutAwsjijXwDqeOg"
originalStringBytes, err := base64.StdEncoding.DecodeString(encodedString)
if err != nil {
log.Fatalf("Some error occured during base64 decode. Error %s", err.Error())
}
//fmt.Println(string(originalStringBytes))
key := "1234567890"
for _, a := range key {
for _, b := range key {
for _, c := range key {
for _, d := range key {
keyNow := string(a) + string(b) + string(c) + string(d)
//fmt.Printf("%s\n", keyNow)
//encrypt_data := xxtea.Encrypt([]byte(str), []byte(key))
decrypt_data := string(xxtea.Decrypt(originalStringBytes, []byte(keyNow)))
if strings.Contains(decrypt_data, "SNYK") {
fmt.Printf("%s\n", decrypt_data)
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment