tomatome / grdp

pure golang rdp protocol
GNU General Public License v3.0
190 stars 70 forks source link

Use example by web #18

Closed Archie1978 closed 1 year ago

Archie1978 commented 1 year ago

Hello, the last year, I had to try your work with example web. It was great. With the now version, I don't try to display interface into chome. I have the empty page, I know that I connected into windows.

I don't found the problem. Can you help me ? The log is here. `[INFO]2023/02/14 14:48:47 rdp.go:113: Connect: 10.0.2.15:3389 with \Administrator : [INFO]2023/02/14 14:48:47 rdp.go:127: ==========Dimension of canvas============================== 996 956 [DEBUG]2023/02/14 14:48:47 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000 [DEBUG]2023/02/14 14:48:47 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000 [DEBUG]2023/02/14 14:48:47 tpkt.go:165: tpkt recvHeader 0300 [DEBUG]2023/02/14 14:48:47 tpkt.go:173: tptk recvHeader FASTPATH_ACTION_X224, wait for recvExtendedHeader [DEBUG]2023/02/14 14:48:47 tpkt.go:188: tpkt recvExtendedHeader 0013 [DEBUG]2023/02/14 14:48:47 tpkt.go:194: tpkt wait recvData: 19 [DEBUG]2023/02/14 14:48:47 tpkt.go:199: tpkt recvData 0ed00000123400021f080002000000 [DEBUG]2023/02/14 14:48:47 x224.go:209: x224 recvConnectionConfirm 0ed00000123400021f080002000000 [DEBUG]2023/02/14 14:48:47 x224.go:215: message: {Type:2 Flag:31 Length:8 Result:2} [INFO]2023/02/14 14:48:47 x224.go:228: TYPE_RDP_NEG_RSP [INFO]2023/02/14 14:48:47 x224.go:257: NLA Security selected [DEBUG]2023/02/14 14:48:47 tpkt.go:72: StartNLA Read success [DEBUG]2023/02/14 14:48:47 tpkt.go:78: recvChallenge 3082012fa003020106a182012630820122308........0000 [DEBUG]2023/02/14 14:48:47 tpkt.go:84: tsreq:&{Version:6 NegoTokens:[{Data:[78 84 .......253 15 123 64 217 1 0 0 0 0]}] AuthInfo:[] PubKeyAuth:[]} [DEBUG]2023/02/14 14:48:47 tpkt.go:87: pubkey=[48 130 1 10 2 130 1 1 0 225 84 208 192 86 66 4 172 127 45 42 13 44 16 214 191 250 6 37 78 246 45 38 42 209 5 53 90 197 149 229 103 72 210 91 123 ..... 66 101 197 151 94 25 157 153 237 73 2 3 1 0 1] [DEBUG]2023/02/14 14:48:47 ntlm.go:384: challengeMsg:&{Signature:[78 84 76 77 83 83 80 0] MessageType:2 TargetNameLen:20 TargetNameMaxLen:20 TargetNameBufferOffset:56 NegotiateFlags:1653178933 ServerChallenge:[220 242 219 67 60 101 40 12] Reserved:[0 0 0 0 0 0 0 0] TargetInfoLen:202 TargetInfoMaxLen:202 TargetInfoBufferOffset:76 Version:{ProductMajorVersion:10 ProductMinorVersion:0 ProductBuild:17763 Reserved:[0 0 0] NTLMRevisionCurrent:15} Payload:[77 0 65 0 45 0 8....... 0]} [INFO]2023/02/14 14:48:47 ntlm.go:398: serverName=MY-COMPANY [INFO]2023/02/14 14:48:47 ntlm.go:413: user: Administrator, passwd:Test1978! [DEBUG]2023/02/14 14:48:47 ntlm.go:444: ClientSigningKey:a62939004d8205eb8f9b9396d8fe0dda [DEBUG]2023/02/14 14:48:47 ntlm.go:445: ServerSigningKey:58d2a11f34d6415838fa95be19044997 [DEBUG]2023/02/14 14:48:47 ntlm.go:446: ClientSealingKey:a66951ffd18bdb04aaa48ad2d4df5599 [DEBUG]2023/02/14 14:48:47 ntlm.go:447: ServerSealingKey:575eef46bb8d1a1e77ec439e3e76ce85 [DEBUG]2023/02/14 14:48:47 tpkt.go:105: recvChallenge Read success [DEBUG]2023/02/14 14:48:47 tpkt.go:111: recvPubKeyInc 3082012ba003020106a3820..... [DEBUG]2023/02/14 14:48:47 tpkt.go:117: PubKeyAuth: [1 0 0 0 214 193 71 1.... 240 125 246 116 72 104 172 24 229 255 227 200 33 130 46 254 250 154 91 37 218 186 65 243 237 228 30 69 27 144 119 84] [DEBUG]2023/02/14 14:48:47 mcs.go:281: mcs client on connect 2 [DEBUG]2023/02/14 14:48:47 x224.go:182: x224 write: 02f0807f658201880401010401010101ff3.......000000 [DEBUG]2023/02/14 14:48:47 tpkt.go:143: tpkt Write 0300019402f0807f658201880.....0726470736e6400000000a0c0636c6970726472000000a0c002c00c000b00000000000000 [DEBUG]2023/02/14 14:48:47 mcs.go:303: mcs wait for data event [DEBUG]2023/02/14 14:48:47 tpkt.go:165: tpkt recvHeader 0300 [DEBUG]2023/02/14 14:48:47 tpkt.go:173: tptk recvHeader FASTPATH_ACTION_X224, wait for recvExtendedHeader [DEBUG]2023/02/14 14:48:47 tpkt.go:188: tpkt recvExtendedHeader 0070 [DEBUG]2023/02/14 14:48:47 tpkt.go:194: tpkt wait recvData: 112 [DEBUG]2023/02/14 14:48:47 tpkt.go:199: tpkt recvData 02f0807f66660a0100020100........c000000000000000000 [DEBUG]2023/02/14 14:48:47 x224.go:269: x224 recvData 02f0807f66660a01000201003......000000000000 emit data [INFO]2023/02/14 14:48:47 rdp.go:113: Connect: 10.0.2.15:3389 with \Administrator : Test1978! [INFO]2023/02/14 14:48:47 rdp.go:127: ======================================== 996 956 [DEBUG]2023/02/14 14:48:47 x224.go:202: x224 sendConnectionRequest 0ee000000000000100080003000000 [DEBUG]2023/02/14 14:48:47 tpkt.go:143: tpkt Write 030000130ee000000000000100080003000000 [DEBUG]2023/02/14 14:48:47 tpkt.go:165: tpkt recvHeader 0300 [DEBUG]2023/02/14 14:48:47 tpkt.go:173: tptk recvHeader FASTPATH_ACTION_X224, wait for recvExtendedHeader [DEBUG]2023/02/14 14:48:47 tpkt.go:188: tpkt recvExtendedHeader 0013 [DEBUG]2023/02/14 14:48:47 tpkt.go:194: tpkt wait recvData: 19 [DEBUG]2023/02/14 14:48:47 tpkt.go:199: tpkt recvData 0ed00000123400021f080002000000 [DEBUG]2023/02/14 14:48:47 x224.go:209: x224 recvConnectionConfirm 0ed00000123400021f080002000000 [DEBUG]2023/02/14 14:48:47 x224.go:215: message: {Type:2 Flag:31 Length:8 Result:2} [INFO]2023/02/14 14:48:47 x224.go:228: TYPE_RDP_NEG_RSP [INFO]2023/02/14 14:48:47 x224.go:257: NLA Security selected [DEBUG]2023/02/14 14:48:47 tpkt.go:72: StartNLA Read success [DEBUG]2023/02/14 14:48:47 tpkt.go:78: recvChallenge 3082012fa003020106a1820126308201223082011ea082011a048201164e544c4d5353500002000000140014003800000035828962dcf2db433c65280c0000000000000000ca00ca004c0000000a0063450000000f4d0041002d0053004f0043004900450054004500020014004d0041002d0053004f004300490045005400450001001e00570049004e002d004300330039005200480056005100470038004e00300004001c006d0061002d0073006f00630069006500740065002e006c0061006e0003003c00570049004e002d004300330039005200480056005100470038004e0030002e006d0061002d0073006f00630069006500740065002e006c0061006e0005001c006d0061002d0073006f00630069006500740065002e006c0061006e0007000800c259fd0f7b40d90100000000 [DEBUG]2023/02/14 14:48:47 tpkt.go:84: tsreq:&{Version:6 NegoTokens:[{Data:[78 84 76 77 83 83 80 0 2 0 0 0 20 0 20 0 56 0 0 0 53 130 137 98 220 242 219 67 60 101 40 12 0 0 0 0 0 0 0 0 202 0 202 0 76 0 0 0 10 0 99 69 0 0 0 15 77 0 65 0 45 0 83 0 79 0 67 0 73 0 69 0 84 0 69 0 2 0 20 0 77 0 65 0 45 0 83 0 79 0 67 0 73 0 69 0 84 0 69 0 1 0 30 0 87 0 73 0 78 0 45 0 67 0 51 0 57 0 82 0 72 0 86 0 81 0 71 0 56 0 78 0 48 0 4 0 28 0 109 0 97 0 45 0 115 0 111 0 99 0 105 0 101 0 116 0 101 0 46 0 108 0 97 0 110 0 3 0 60 0 87 0 73 0 78 0 45 0 67 0 51 0 57 0 82 0 72 0 86 0 81 0 71 0 56 0 78 0 48 0 46 0 109 0 97 0 45 0 115 0 111 0 99 0 105 0 101 0 116 0 101 0 46 0 108 0 97 0 110 0 5 0 28 0 109 0 97 0 45 0 115 0 111 0 99 0 105 0 101 0 116 0 101 0 46 0 108 0 97 0 110 0 7 0 8 0 194 89 253 15 123 64 217 1 0 0 0 0]}] AuthInfo:[] PubKeyAuth:[]} [DEBUG]2023/02/14 14:48:47 tpkt.go:87: pubkey=[48 130 1 10 2 130 1 1 0 225 84 208 192 86 66 4 172 127 45 42 13 44 16 214 191 250 6 37 78 246 45 38 42 209 5 53 90 197 149 229 103 72 210 91 123 119 192 70 244 174 170 34 206 161 62 53 145 3 12 98 93 10 132 235 208 193 172 87 186 255 111 101 205 19 38 162 192 243 92 87 169 76 146 155 222 71 219 159 45 129 68 150 144 164 234 35 86 114 101 179 131 244 148 125 229 238 68 7 65 58 231 7 143 97 101 93 119 106 99 83 0 120 235 114 199 83 33 252 233 166 137 253 240 40 21 144 192 217 76 99 48 3 51 123 108 117 74 155 160 255 46 23 164 159 185 181 143 223 98 155 32 131 131 148 201 133 156 25 145 251 154 246 222 48 155 40 236 64 61 0 237 104 106 253 103 251 109 71 89 100 51 142 222 44 244 39 93 21 62 147 215 176 125 196 176 248 17 165 3 172 35 217 96 176 74 143 8 101 104 25 174 135 183 79 78 110 90 91 165 19 162 16 245 17 8 223 80 146 196 26 156 13 215 37 240 211 226 48 247 34 226 252 138 184 91 66 101 197 151 94 25 157 153 237 73 2 3 1 0 1] [DEBUG]2023/02/14 14:48:47 ntlm.go:384: challengeMsg:&{Signature:[78 84 76 77 83 83 80 0] MessageType:2 TargetNameLen:20 TargetNameMaxLen:20 TargetNameBufferOffset:56 NegotiateFlags:1653178933 ServerChallenge:[220 242 219 67 60 101 40 12] Reserved:[0 0 0 0 0 0 0 0] TargetInfoLen:202 TargetInfoMaxLen:202 TargetInfoBufferOffset:76 Version:{ProductMajorVersion:10 ProductMinorVersion:0 ProductBuild:17763 Reserved:[0 0 0] NTLMRevisionCurrent:15} Payload:[77 0 65 0 45 0 83 0 79 0 67 0 73 0 69 0 84 0 69 0 2 0 20 0 77 0 65 0 45 0 83 0 79 0 67 0 73 0 69 0 84 0 69 0 1 0 30 0 87 0 73 0 78 0 45 0 67 0 51 0 57 0 82 0 72 0 86 0 81 0 71 0 56 0 78 0 48 0 4 0 28 0 109 0 97 0 45 0 115 0 111 0 99 0 105 0 101 0 116 0 101 0 46 0 108 0 97 0 110 0 3 0 60 0 87 0 73 0 78 0 45 0 67 0 51 0 57 0 82 0 72 0 86 0 81 0 71 0 56 0 78 0 48 0 46 0 109 0 97 0 45 0 115 0 111 0 99 0 105 0 101 0 116 0 101 0 46 0 108 0 97 0 110 0 5 0 28 0 109 0 97 0 45 0 115 0 111 0 99 0 105 0 101 0 116 0 101 0 46 0 108 0 97 0 110 0 7 0 8 0 194 89 253 15 123 64 217 1 0 0 0 0]} [INFO]2023/02/14 14:48:47 ntlm.go:398: serverName=MA-SOCIETE [INFO]2023/02/14 14:48:47 ntlm.go:413: user: Administrator, passwd:Test1978! [DEBUG]2023/02/14 14:48:47 ntlm.go:444: ClientSigningKey:a62939004d8205eb8f9b9396d8fe0dda [DEBUG]2023/02/14 14:48:47 ntlm.go:445: ServerSigningKey:58d2a11f34d6415838fa95be19044997 [DEBUG]2023/02/14 14:48:47 ntlm.go:446: ClientSealingKey:a66951ffd18bdb04aaa48ad2d4df5599 [DEBUG]2023/02/14 14:48:47 ntlm.go:447: ServerSealingKey:575eef46bb8d1a1e77ec439e3e76ce85 [DEBUG]2023/02/14 14:48:47 tpkt.go:105: recvChallenge Read success [DEBUG]2023/02/14 14:48:47 tpkt.go:111: recvPubKeyInc 3082012ba003020106a38201220482011e01000000d6c147b9309330cb000000000344e7c01892b52cd63c3818394a7f15ae741d1dd0293e4ac27c6ca807768e3f3d490d0fc42cf2bd1909054b74c54e7fb55daf369cb4433114fccc14e9715e2078a7d60bcbfb44235d29bcfc3efa696218102ecf2c00db31cf68558f461e374709b85ac6e6b104ebcef54fbde6f8715febbdc5258ffdd8bb1ccc00b2e9f02bd4545049ae48ae3dbc31838cfe33dd692a0737490da68befe73986c86c16edcfb21ac9db579fa236cd29b1a322c7133373136289e0957d4e093fbeb89b8f3a8a7b3f553aeb31ebe19f9c4d298e32a9b5838ceb777e4a347b2fd58f7e654414545e0673800953aada2da675b34ed276f07df6744868ac18e5ffe3c821822efefa9a5b25daba41f3ede41e451b907754 [DEBUG]2023/02/14 14:48:47 tpkt.go:117: PubKeyAuth: [1 0 0 0 214 193 71 185 48 147 48 203 0 0 0 0 3 68 231 192 24 146 181 44 214 60 56 24 57 74 127 21 174 116 29 29 208 41 62 74 194 124 108 168 7 118 ....... 84] [DEBUG]2023/02/14 14:48:47 mcs.go:281: mcs client on connect 2 [DEBUG]2023/02/14 14:48:47 x224.go:182: x224 write: 02f0807f658201880401010401010101f.......00 [DEBUG]2023/02/14 14:48:47 tpkt.go:143: tpkt Write 0300019402f0807f6582.........000000a0c0636c6970726472000000a0c002c00c000b00000000000000 [DEBUG]2023/02/14 14:48:47 mcs.go:303: mcs wait for data event [DEBUG]2023/02/14 14:48:47 tpkt.go:165: tpkt recvHeader 0300 [DEBUG]2023/02/14 14:48:47 tpkt.go:173: tptk recvHeader FASTPATH_ACTION_X224, wait for recvExtendedHeader [DEBUG]2023/02/14 14:48:47 tpkt.go:188: tpkt recvExtendedHeader 0070 [DEBUG]2023/02/14 14:48:47 tpkt.go:194: tpkt wait recvData: 112 [DEBUG]2023/02/14 14:48:47 tpkt.go:199: tpkt recvData 02f0807f66660a0......c000000000000000000 [DEBUG]2023/02/14 14:48:47 x224.go:269: x224 recvData 02f0807f6666.....e030000020c0c000000000000000000 emit data

`

Archie1978 commented 1 year ago

OK, there 2 corrections can you update the code ?

First for web interface.go

` --- a/example/web.go +++ b/example/web.go

@@ -60,7 +61,7 @@ func socketIO() { fmt.Println("on success") }).On("ready", func() { fmt.Println("on ready") -- }).On("update", func(rectangles []pdu.BitmapData) { ++ }).On("bitmap", func(rectangles []pdu.BitmapData) { glog.Info(time.Now(), "on update Bitmap:", len(rectangles)) bs := make([]Bitmap, 0, len(rectangles)) for _, v := range rectangles { diff --git a/go.mod b/go.mod index 874d5a9..3510bbe 100644 `

Second ui interface

index 48cf300..075d534 100644 @@ -56,11 +56,15 @@ func appMain(driver gxui.Driver) { }) window.OnKeyDown(func(e gxui.KeyboardEvent) { key := transKey(e.Key) -- gc.KeyDown(key, "") ++ if gc!=nil { ++ gc.KeyDown(key, "") ++ } }) window.OnKeyUp(func(e gxui.KeyboardEvent) { key := transKey(e.Key) -- gc.KeyUp(key, "") ++ if gc!=nil { ++ gc.KeyUp(key, "") ++ } })

layout := theme.CreateLinearLayout()
tomatome commented 1 year ago

updated done