Created
August 16, 2025 00:20
-
-
Save TotallyNotAHaxxer/6a7ed022f1467c209d6be1f5e6af4ec5 to your computer and use it in GitHub Desktop.
Plugin.go file for the REC7 course @SkyPenguinLabs
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 ( | |
| "fmt" | |
| "math/rand" | |
| "strconv" | |
| "time" | |
| ) | |
| func local_GetRandomHexValue() string { | |
| rand.New(rand.NewSource(time.Now().UnixNano())) | |
| r := rand.Intn(256) | |
| g := rand.Intn(256) | |
| b := rand.Intn(256) | |
| return fmt.Sprintf("%02X%02X%02X", r, g, b) | |
| } | |
| func local_HextoAscii(rgb string) string { | |
| r, _ := strconv.ParseUint(rgb[0:2], 16, 0) | |
| g, _ := strconv.ParseUint(rgb[2:4], 16, 0) | |
| b, _ := strconv.ParseUint(rgb[4:6], 16, 0) | |
| return fmt.Sprintf("\033[38;2;%d;%d;%dm", r, g, b) | |
| } | |
| func HelloWorld() { | |
| fmt.Println(local_HextoAscii(local_GetRandomHexValue()) + "Hello World!!!!!! ") | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment