lmao doxxed

This commit is contained in:
echo 2022-11-20 13:10:31 +03:30
parent 209c3b271d
commit 292207455d
4 changed files with 30 additions and 8 deletions

7
asciiarts/archcraft.txt Normal file
View file

@ -0,0 +1,7 @@
{BLUE} /\
/ \
/\ \
/ > ω <\
/ __ \
/ __| |__-\
/_-'' ''-_\

View file

@ -2,6 +2,7 @@ package data
import (
"fmt"
"net"
"os"
"os/exec"
"strconv"
@ -20,7 +21,21 @@ func GetGPU() string {
}
return bruh
}
func GetLocalIP() string {
addrs, err := net.InterfaceAddrs()
if err != nil {
return ""
}
for _, address := range addrs {
// check the address type and if it is not a loopback the display it
if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
if ipnet.IP.To4() != nil {
return ipnet.IP.String()
}
}
}
return ""
}
func GetUsername() string {
cmd := exec.Command("whoami")
shell, _ := cmd.Output()
@ -126,8 +141,6 @@ func GetCPU() {
mem_info := make([]byte, 1024)
mem.Read(mem_info)
mem.Close()
// mem_list := strings.Split(string(mem_info), "\n")
// mem_map := make(map[string]string)
print(mem_info)
}
func GetTerminal() string {

View file

@ -84,6 +84,8 @@ func handlePrint(action, format string, rest string) {
utils.CutePrint(data.GetMemory(true), format)
case "wm":
utils.CutePrint(data.GetWM(), format)
case "ip":
utils.CutePrint(data.GetLocalIP(), format)
default:
print("{UNKNOWN KEYWORD: " + rest + "}")
}