Created
April 20, 2025 15:41
-
-
Save rudSarkar/a907e2b1e2877cd3aee8d1dd2787c86b to your computer and use it in GitHub Desktop.
Add missing one number/word at the end of the md5, it's for HTB Skills Assessment - Using Web Proxies
This file contains hidden or 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" | |
"encoding/hex" | |
"fmt" | |
"strings" | |
) | |
func main() { | |
const ( | |
base = "3dac93b8cd250aa8c1a36fffc79a17a" | |
alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
) | |
encodedResults := make([]string, 0, len(alphabet)) | |
for _, char := range alphabet { | |
var builder strings.Builder | |
builder.WriteString(base) | |
builder.WriteByte(byte(char)) | |
combined := builder.String() | |
base64Encoded := base64.StdEncoding.EncodeToString([]byte(combined)) | |
hexEncoded := hex.EncodeToString([]byte(base64Encoded)) | |
encodedResults = append(encodedResults, hexEncoded) | |
} | |
for _, result := range encodedResults { | |
fmt.Println(result) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment