diff options
author | Joe <rbo@gmx.us> | 2023-12-18 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-18 20:20:20 +0100 |
commit | be8ef9217ff95dd3dfb756be1e1876ee5afc0423 (patch) | |
tree | 1fd66e3e9cf65855249dd1b8688b332bb81343c8 /c_exec.go | |
parent | gojump (diff) | |
download | hardflip-be8ef9217ff95dd3dfb756be1e1876ee5afc0423.tar.gz hardflip-be8ef9217ff95dd3dfb756be1e1876ee5afc0423.tar.bz2 hardflip-be8ef9217ff95dd3dfb756be1e1876ee5afc0423.tar.xz hardflip-be8ef9217ff95dd3dfb756be1e1876ee5afc0423.tar.zst hardflip-be8ef9217ff95dd3dfb756be1e1876ee5afc0423.zip |
cool ui
Diffstat (limited to '')
-rw-r--r-- | c_exec.go | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_exec.go - * Mon, 18 Dec 2023 13:20:08 +0100 + * Mon, 18 Dec 2023 15:07:52 +0100 * Joe * * exec the command at some point @@ -54,7 +54,7 @@ import ( "strconv" ) -func exec_cmd(cmd_fmt []string) { +func c_exec_cmd(cmd_fmt []string) { cmd := exec.Command(cmd_fmt[0], cmd_fmt[1:]...) fmt.Println(cmd_fmt) @@ -64,7 +64,7 @@ func exec_cmd(cmd_fmt []string) { cmd.Run() } -func format_ssh_jump(host *HostNode) string { +func c_format_ssh_jump(host *HostNode) string { jump_fmt := "-oProxyCommand=ssh" if len(host.JumpPriv) > 0 { jump_fmt += " -i " + host.JumpPriv @@ -81,7 +81,7 @@ func format_ssh_jump(host *HostNode) string { return jump_fmt } -func format_ssh(host *HostNode) []string { +func c_format_ssh(host *HostNode) []string { cmd_fmt := []string{"ssh"} user := host.User @@ -89,7 +89,7 @@ func format_ssh(host *HostNode) []string { cmd_fmt = append(cmd_fmt, "-i", host.Priv) } if len(host.Jump) > 0 { - cmd_fmt = append(cmd_fmt, format_ssh_jump(host)) + cmd_fmt = append(cmd_fmt, c_format_ssh_jump(host)) } if host.Port != 0 { cmd_fmt = append(cmd_fmt, "-p", strconv.Itoa(int(host.Port))) @@ -101,24 +101,24 @@ func format_ssh(host *HostNode) []string { return cmd_fmt } -func format_rdp() { +func c_format_rdp() { } -func format_cmd(id uint64, lhost *HostList) { +func c_format_cmd(id uint64, lhost *HostList) { host := lhost.head - var cmd_fmt []string + // var cmd_fmt []string host = lhost.sel(id) if host == nil { c_die("host id not found", nil) } if host.Type == 0 { - cmd_fmt = format_ssh(host) + // cmd_fmt = format_ssh(host) } - exec_cmd(cmd_fmt) + // exec_cmd(cmd_fmt) } -func display_servers(lhost *HostList) { +func c_display_servers(lhost *HostList) { host := lhost.head if lhost.head == nil { @@ -130,5 +130,5 @@ func display_servers(lhost *HostList) { host = host.next } fmt.Println() - format_cmd(2, lhost) + c_format_cmd(4, lhost) } |