-
-
Save hvnsweeting/b8d518fdd67b85e9bf9f6a16af6221af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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