mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
reduce scanner client fingerprints
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user