aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_exec.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-02-20 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-02-20 20:20:20 +0100
commitbb0b6a312f07680514c419b9c7c6d5b3a47a0393 (patch)
tree76add444eb2bfa17fe0781e05599f322882ded82 /src/c_exec.go
parenttest (diff)
downloadhardflip-bb0b6a312f07680514c419b9c7c6d5b3a47a0393.tar.gz
hardflip-bb0b6a312f07680514c419b9c7c6d5b3a47a0393.tar.bz2
hardflip-bb0b6a312f07680514c419b9c7c6d5b3a47a0393.tar.xz
hardflip-bb0b6a312f07680514c419b9c7c6d5b3a47a0393.tar.zst
hardflip-bb0b6a312f07680514c419b9c7c6d5b3a47a0393.zip
rdp_file
Diffstat (limited to '')
-rw-r--r--src/c_exec.go6
1 files changed, 5 insertions, 1 deletions
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 {