From bb0b6a312f07680514c419b9c7c6d5b3a47a0393 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 20 Feb 2024 20:20:20 +0100 Subject: rdp_file --- src/c_exec.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/c_exec.go') diff --git a/src/c_exec.go b/src/c_exec.go index ba93ec0..722df37 100644 --- a/src/c_exec.go +++ b/src/c_exec.go @@ -120,16 +120,20 @@ func c_format_ssh(host *HostNode, pass string) ([]string, []string) { func c_format_rdp(host *HostNode, pass string) ([]string, []string) { cmd_fmt := []string{"xfreerdp"} + if len(host.RDPFile) > 0 { + cmd_fmt = append(cmd_fmt, host.RDPFile) + } else { cmd_fmt = append(cmd_fmt, "/v:" + host.Host, "/u:" + host.User) + } if len(host.Domain) > 0 { cmd_fmt = append(cmd_fmt, "/d:" + host.Domain) } if len(pass) > 0 { cmd_fmt = append(cmd_fmt, "/p:" + pass) } - if host.Port != 0 { + if host.Port != 0 && len(host.RDPFile) == 0 { cmd_fmt = append(cmd_fmt, "/port:" + strconv.Itoa(int(host.Port))) } if host.Dynamic == true { -- cgit v1.2.3