修复findnet中文主机名乱码

This commit is contained in:
影舞者 2023-11-13 10:02:12 +08:00 committed by GitHub
parent 2d10162749
commit 9f12983f34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,8 +113,8 @@ func read(text []byte, host string) error {
if name != "" {
result += "\n [->]" + name
}
for i := 1; i < len(hostname); i++ {
hostname = hostname[1:]
for i := 0; i < len(hostname); i++ {
hostname[i] = strings.Replace(hostname[i], "00", "", -1)
host, err := hex.DecodeString(hostname[i])
if err != nil {