Add reverse sessionid address lookup

This commit is contained in:
lash
2024-10-30 00:59:59 +00:00
parent 727f54ee57
commit cb997159f7
4 changed files with 40 additions and 4 deletions

18
common/hex.go Normal file
View File

@@ -0,0 +1,18 @@
package common
import (
"encoding/hex"
)
func NormalizeHex(s string) (string, error) {
if len(s) >= 2 {
if s[:2] == "0x" {
s = s[2:]
}
}
r, err := hex.DecodeString(s)
if err != nil {
return "", err
}
return hex.EncodeToString(r), nil
}