reduce scanner client fingerprints

This commit is contained in:
ZacharyZcR
2026-05-23 07:20:24 +08:00
parent 0046817c2e
commit 1a714f6a0c
6 changed files with 44 additions and 38 deletions
-3
View File
@@ -10,7 +10,6 @@ import (
"fmt"
"io"
"math/big"
"os"
"github.com/shadow1ng/fscan/mylib/grdp/glog"
@@ -255,9 +254,7 @@ type ClientCoreData struct {
}
func NewClientCoreData() *ClientCoreData {
name, _ := os.Hostname()
var ClientName [32]byte
copy(ClientName[:], core.UnicodeEncode(name)[:])
return &ClientCoreData{
RDP_VERSION_5_PLUS, 1280, 800, RNS_UD_COLOR_8BPP,
RNS_UD_SAS_DEL, US, 3790, ClientName, KT_IBM_101_102_KEYS,
+13
View File
@@ -0,0 +1,13 @@
package gcc
import (
"bytes"
"testing"
)
func TestClientCoreDataDoesNotExposeClientName(t *testing.T) {
data := NewClientCoreData()
if !bytes.Equal(data.ClientName[:], make([]byte, len(data.ClientName))) {
t.Fatalf("client name is not empty: %x", data.ClientName)
}
}