GithubHelp home page GithubHelp logo

grdp's Introduction

Golang Remote Desktop Protocol

grdp is a pure Golang implementation of the Microsoft RDP (Remote Desktop Protocol) protocol (client side authorization only).

Forked from icodeface/grdp

Status

The project is under development and not finished yet.

  • Standard RDP Authentication
  • SSL Authentication
  • NTLMv2 Authentication
  • Windows Clipboard
  • RDP Client(ugly)
  • VNC Client(unfinished)

Example

  1. build in example dir on linux or windows
  2. start example on port 8088
  3. http://localhost:8088

Take ideas from

grdp's People

Contributors

icodeface avatar l1ghtman2k avatar tomatome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grdp's Issues

Can we have more permissive license on this?

As this looks to be only pure Go library which implements RDP protocol, I wonder that if it would be possible to license it under MIT, Apache 2 or BSD which allow static linking by other applications?

ping @icodeface as you wrote the original code and @tomatome as you have significantly improved that.

PS. I originally proposed LGPL but looks that it is problematic on Go applications which are build to single binary.

Problem of SECU certificate X509.

Hello,
I test your program and I find core/socket.go.

The function SSL ignore certificate X509 :

func (s *SocketLayer) StartTLS() error {
config := &tls.Config{
InsecureSkipVerify: true,
MinVersion: tls.VersionTLS10,
MaxVersion: tls.VersionTLS13,
PreferServerCipherSuites: true,
}
s.tlsConn = tls.Client(s.conn, config)
return s.tlsConn.Handshake()
}

Can you Insert tls.Config global variable for using my PKI windows ?

`Padding` is a slice with no length or sizeof field

I'm getting the following output when trying an RDP connection to a Windows 2019 terminal server.

[INFO]2022/12/05 11:19:59 x224.go:228: TYPE_RDP_NEG_RSP
[INFO]2022/12/05 11:19:59 x224.go:257: *** NLA Security selected ***
[INFO]2022/12/05 11:19:59 ntlm.go:398: serverName=DEMO
[INFO]2022/12/05 11:19:59 ntlm.go:413: user: demo, passwd:demo
[INFO]2022/12/05 11:19:59 sec.go:727: sec LICENSE_REQUEST
[ERROR]2022/12/05 11:19:59 gcc.go:486: Unpack: struc: field `Padding` is a slice with no length or sizeof field
[ERROR]2022/12/05 11:19:59 sec.go:761: struc: field `Padding` is a slice with no length or sizeof field

No connect after connect in web

Hi, I run your project but get a problem,
after run main.go in example folder and brower 127.0.0.1:8088, I got
OnConnect 1 resume OnConnect 2 OnConnect 3 resume OnConnect 4
in terminal, how do i do to run it? thanks

Use example by web

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

`

build fail

go build

github.com/google/gxui/drivers/gl

..\vendor\github.com\google\gxui\drivers\gl\driver.go:191:14: assignment mismatch: 2 variables but c.window.GetClipboardString returns 1 value

Incomplete code,lost

# github.com/tomatome/grdp/client [github.com/tomatome/grdp/client.test]
.\rfb.go:28:14: c.vnc.Connect undefined (type *rfb.RFB has no field or method Connect)

and
grdp.go.80

	c.SetSender(g.sec)
	g.sec.On(c.GetType(), func(s []byte) {
		c.Handle(s)
	})

but this code donot has the codes of SetSender and Handle func

高性能且连接错误的情况下出现死锁

POC:

package main

import (
        "errors"
        "fmt"
        "log"
        "net"
        "os"
        "sync"
        "time"

        "github.com/tomatome/grdp/core"
        "github.com/tomatome/grdp/glog"
        "github.com/tomatome/grdp/protocol/nla"
        "github.com/tomatome/grdp/protocol/pdu"
        "github.com/tomatome/grdp/protocol/rfb"
        "github.com/tomatome/grdp/protocol/sec"
        "github.com/tomatome/grdp/protocol/t125"
        "github.com/tomatome/grdp/protocol/tpkt"
        "github.com/tomatome/grdp/protocol/x224"
)

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 NewClient(host string, logLevel glog.LEVEL) *Client {
        glog.SetLevel(logLevel)
        logger := log.New(os.Stdout, "", 0)
        glog.SetLogger(logger)
        return &Client{
                Host: host,
        }
}

func (g *Client) Login(domain, user, pwd string) error {
        conn, err := net.DialTimeout("tcp", g.Host, 3*time.Second)
        if err != nil {
                return fmt.Errorf("[dial err] %v", err)
        }
        defer conn.Close()
        glog.Info(conn.LocalAddr().String())
        //domain := strings.Split(g.Host, ":")[0]

        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.sec.SetClientAutoReconnect()

        g.tpkt.SetFastPathListener(g.sec)
        g.sec.SetFastPathListener(g.pdu)
        g.pdu.SetFastPathSender(g.tpkt)

        //g.x224.SetRequestedProtocol(x224.PROTOCOL_SSL)
        //g.x224.SetRequestedProtocol(x224.PROTOCOL_RDP)

        err = g.x224.Connect()
        if err != nil {
                return fmt.Errorf("[x224 connect err] %v", err)
        }
        glog.Info("wait connect ok")
        wg := &sync.WaitGroup{}
        wg.Add(1)

        g.pdu.On("error", func(e error) {
                err = e
                glog.Error("error", e)
                wg.Done()
        }).On("close", func() {
                err = errors.New("close")
                glog.Info("on close")
                //wg.Done()
        }).On("success", func() {
                err = nil
                glog.Info("on success")
                //wg.Done()
        }).On("ready", func() {
                glog.Info("on ready")
        }).On("update", func(rectangles []pdu.BitmapData) {
                glog.Info("on update:", rectangles)
        })

        wg.Wait()
        return err
}

func (g *Client) LoginVNC() error {
        conn, err := net.DialTimeout("tcp", g.Host, 3*time.Second)
        if err != nil {
                return fmt.Errorf("[dial err] %v", err)
        }
        defer conn.Close()
        glog.Info(conn.LocalAddr().String())
        //domain := strings.Split(g.Host, ":")[0]

        g.vnc = rfb.NewRFB(rfb.NewRFBConn(conn))
        wg := &sync.WaitGroup{}
        wg.Add(1)

        g.vnc.On("error", func(e error) {
                glog.Info("on error")
                err = e
                glog.Error(e)
                wg.Done()
        }).On("close", func() {
                err = errors.New("close")
                glog.Info("on close")
                //wg.Done()
        }).On("success", func() {
                err = nil
                glog.Info("on success")
                //wg.Done()
        }).On("ready", func() {
                glog.Info("on ready")
        }).On("update", func(b *rfb.BitRect) {
                glog.Info("on update:", b)
        })
        glog.Info("on Wait")
        wg.Wait()
        return err
}

func main() {
        for {
                g := NewClient("127.0.0.1:3389", glog.DEBUG)
                err := g.Login("", "wren", "wren")
                //g := NewClient("192.168.18.100:5902", glog.DEBUG)
                //err := g.LoginVNC()
                if err != nil {
                        fmt.Println("Login:", err)
                }
        }

}

localhost server:

ncat -vnklp 3389 --ssl

Tested on linux

last message:

main.go:73: wait connect ok

Its hang at:

wg.Wait()

Log should never include password

nla/ntlm.go line 413 (currently) outputs password. This should never happen, regardless of log level. If you must output something, output a hash of the password that can be checked, not the actual password.

Does not work against Windows 2019

I believe the library is completely broken, does not work on any recent Windows version.

[INFO]2023/09/29 17:20:40 sec.go:721: sec ERROR_ALERT and ErrorCode: 7
[ERROR]2023/09/29 17:20:40 caps.go:647: unsupported Capability type 0x001e

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.