Open dksslq opened 1 year ago
同问,此问题解决了吗?
localhost service must be an RDP server, such as xrdp or Windows Remote Desktop Services.
localhost service must be an RDP server, such as xrdp or Windows Remote Desktop Services.
是的,我是windows机器。
localhost service must be an RDP server, such as xrdp or Windows Remote Desktop Services.
是的,我是windows机器。
"Provide the debug information, please."
panic: runtime error: slice bounds out of range [4294967288:2]
goroutine 28106 [running]: github.com/tomatome/grdp/protocol/nla.(ChallengeMessage).getTargetName(...) github.com/tomatome/grdp@v0.1.0/protocol/nla/ntlm.go:175 github.com/tomatome/grdp/protocol/nla.(NTLMv2).GetAuthenticateMessage(0xc0026f8000, {0xc0013c81b0, 0x82, 0x82}) github.com/tomatome/grdp@v0.1.0/protocol/nla/ntlm.go:386 +0x1278 github.com/tomatome/grdp/protocol/tpkt.(TPKT).recvChallenge(0xc002255680, {0xc0023c4000, 0xbd, 0x400}) github.com/tomatome/grdp@v0.1.0/protocol/tpkt/tpkt.go:89 +0x2c5 github.com/tomatome/grdp/protocol/tpkt.(TPKT).StartNLA(0xc002255680) github.com/tomatome/grdp@v0.1.0/protocol/tpkt/tpkt.go:74 +0x30a github.com/tomatome/grdp/protocol/x224.(X224).recvConnectionConfirm(0xc000a411d0, {0xc0017aef80, 0xf, 0xf}) github.com/tomatome/grdp@v0.1.0/protocol/x224/x224.go:258 +0x3dc reflect.Value.call({0x176af80?, 0xc001b50a30?, 0xa2c936?}, {0x193d18c, 0x4}, {0xc0024267b0, 0x1, 0x1?}) reflect/value.go:586 +0xb0b reflect.Value.Call({0x176af80?, 0xc001b50a30?, 0xc00226fea0?}, {0xc0024267b0?, 0x19260a0?, 0xc0017aef80?}) reflect/value.go:370 +0xbc github.com/tomatome/grdp/emission.(Emitter).callListeners.func1({0x176af80?, 0xc001b50a30?, 0xc0017aef6a?}) github.com/tomatome/grdp@v0.1.0/emission/emitter.go:226 +0x468 created by github.com/tomatome/grdp/emission.(*Emitter).callListeners github.com/tomatome/grdp@v0.1.0/emission/emitter.go:201 +0x85
set glog.SetLevel(glog.DEBUG)
Provide complete debug log information
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[INFO]2023/09/26 19:07:20 rdp.go:80: wait connect ok
[DEBUG]2023/09/26 19:07:20 tpkt.go:165: tpkt recvHeader 0300
concurrent connections ? You can try using the latest master branch.
yes,concurrent connections
go get -u github.com/tomatome/grdp go: downloading golang.org/x/crypto v0.13.0 go: downloading github.com/icodeface/tls v0.0.0-20230910023335-34df9250cd12 go: downloading golang.org/x/sys v0.12.0 go: downloading golang.org/x/term v0.12.0 go: downloading golang.org/x/text v0.13.0 go: upgraded github.com/icodeface/tls v0.0.0-20190904083142-17aec93c60e5 => v0.0.0-20230910023335-34df9250cd12 go: upgraded golang.org/x/crypto v0.9.0 => v0.13.0 go: upgraded golang.org/x/sys v0.8.0 => v0.12.0 go: upgraded golang.org/x/text v0.9.0 => v0.13.0
go list -m -u github.com/tomatome/grdp github.com/tomatome/grdp v0.1.0
I see that different connection methods were used for the previous crash and the subsequent concurrency issues.
provide debug information for establishing a connection using NTLM or SSL.
type Client struct {
Host string // ip:port
tpkt *tpkt.TPKT
x224 *x224.X224
mcs *t125.MCSClient
sec *sec.Client
pdu *pdu.Client
vnc *rfb.RFB
}
func rdpcon(cancel context.CancelFunc, ip, user, passwd string, port, timeout int) {
defer func() {
recover() //只是捕获 panic,不做任何处理
}()
glog.SetLevel(5) //禁止日志输出
logger := log.New(os.Stdout, "", 0)
glog.SetLogger(logger)
r := Client{Host: fmt.Sprintf("%s:%d", ip, port)}
err := r.Login("", user, passwd, timeout)
if err == nil {
end(ip, user, passwd, port, "RDP")
cancel()
}
}
func (g *Client) Login(domain, user, pwd string, timeout int) error {
conn, err := net.DialTimeout("tcp", g.Host, time.Duration(timeout)*time.Second)
if err != nil {
return fmt.Errorf("[dial err] %v", err)
}
g.tpkt = tpkt.New(core.NewSocketLayer(conn), nla.NewNTLMv2(domain, user, pwd))
g.x224 = x224.New(g.tpkt)
g.mcs = t125.NewMCSClient(g.x224)
g.sec = sec.NewClient(g.mcs)
g.pdu = pdu.NewClient(g.sec)
g.sec.SetUser(user)
g.sec.SetPwd(pwd)
g.sec.SetDomain(domain)
g.tpkt.SetFastPathListener(g.sec)
g.sec.SetFastPathListener(g.pdu)
g.pdu.SetFastPathSender(g.tpkt)
err = g.x224.Connect()
if err != nil {
return fmt.Errorf("[x224 connect err] %v", err)
}
glog.Info("wait connect ok")
wg := &sync.WaitGroup{}
breakFlag := false
wg.Add(1)
g.pdu.On("error", func(e error) {
err = e
glog.Error("error", e)
g.pdu.Emit("done")
})
g.pdu.On("close", func() {
err = errors.New("close")
glog.Info("on close")
g.pdu.Emit("done")
})
g.pdu.On("success", func() {
err = nil
glog.Info("on success")
g.pdu.Emit("done")
})
g.pdu.On("ready", func() {
glog.Info("on ready")
g.pdu.Emit("done")
})
g.pdu.On("update", func(rectangles []pdu.BitmapData) {
glog.Info("on update:", rectangles)
})
g.pdu.On("done", func() {
if breakFlag == false {
breakFlag = true
wg.Done()
}
})
wg.Wait()
return err
}
POC:
localhost server:
Tested on linux
last message:
Its hang at: