@Aririno idea but the script is awesome
package main
import (
"crypto/md5"
"encoding/hex"
"fmt"
"io/ioutil"
"strings"
)
func main() {
// Load the target file
data, err := ioutil.ReadFile("target.txt")
if err != nil {
panic(err)
}
// Define the hashing algorithm
hasher := md5.New()
// Iterate through all possible combinations of characters
for i := '0'; i <= '9'; i++ {
for j := '0'; j <= '9'; j++ {
for k := '0'; k <= '9'; k++ {
for l := '0'; l <= '9'; l++ {
for m := '0'; m <= '9'; m++ {
for n := '0'; n <= '9'; n++ {
for o := '0'; o <= '9'; o++ {
for p := '0'; p <= '9'; p++ {
for q := '0'; q <= '9'; q++ {
for r := '0'; r <= '9'; r++ {
for s := '0'; s <= '9'; s++ {
for t := '0'; t <= '9'; t++ {
for u := '0'; u <= '9'; u++ {
for v := '0'; v <= '9'; v++ {
for w := '0'; w <= '9'; w++ {
for x := '0'; x <= '9'; x++ {
for y := '0'; y <= '9'; y++ {
for z := '0'; z <= '9'; z++ {
// Create a test string
test := string(i) + string(j) + string(k) + string(l) + string(m) + string(n) + string(o) + string(p) + string(q) + string(r) + string(s) + string(t) + string(u) + string(v) + string(w) + string(x) + string(y) + string(z)
// Update the target file with the test string
target := strings.ReplaceAll(string(data), "TARGET_KEY", test)
// Hash the target string
hasher.Write([]byte(target))
md5Hash := hex.EncodeToString(hasher.Sum(nil))
// Compare the hash of the target string with the hash of the original file
if md5Hash == "ORIGINAL_HASH" {
fmt.Printf("Cracked license key: %s\n", test)
}