From aae80bd3b591bbcc5de83947e79c71c7f8b5912d Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 19 Dec 2023 20:20:20 +0100 Subject: fire --- c_lhosts.go | 4 ++-- c_parse.go | 6 ++++++ i_ui.go | 30 +++++++++++++++++++++++++----- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/c_lhosts.go b/c_lhosts.go index a1220d2..8cfeb37 100644 --- a/c_lhosts.go +++ b/c_lhosts.go @@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_lhosts.go - * Tue, 19 Dec 2023 11:32:56 +0100 + * Tue Dec 19 18:51:12 2023 * Joe * * the hosts linked list @@ -63,7 +63,7 @@ type HostNode struct { JumpUser string `yaml:"jump_user"` JumpPass string `yaml:"jump_pass"` JumpPriv string `yaml:"jump_priv"` - Quality uint8 `yaml:"quality"` + Quality uint8 `yaml:"quality"` Domain string `yaml:"domain"` Width uint16 `yaml:"width"` Height uint16 `yaml:"height"` diff --git a/c_parse.go b/c_parse.go index 35a179f..83e10d4 100644 --- a/c_parse.go +++ b/c_parse.go @@ -87,6 +87,12 @@ func c_read_yaml_file(file string) *HostNode { if host.Port == 0 { host.Port = 3389 } + if host.Width == 0 { + host.Width = 800 + } + if host.Height == 0 { + host.Height = 600 + } } else if host.Type > 1 { return nil } diff --git a/i_ui.go b/i_ui.go index a4474cc..8eadb55 100644 --- a/i_ui.go +++ b/i_ui.go @@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_hardflip.go - * Tue Dec 19 18:49:04 2023 + * Tue Dec 19 18:51:35 2023 * Joe * * interfacing with the user @@ -169,7 +169,9 @@ func i_host_panel(s tcell.Screen, t [2]int, } i_draw_text(s, 1, t[H] - 2, (t[W] / 3) - 1, t[H] - 1, - def_style, " " + strconv.Itoa(int(sel + 1)) + "/" + strconv.Itoa(int(sel_max)) + " hosts ") + def_style, + " " + strconv.Itoa(int(sel + 1)) + "/" + + strconv.Itoa(int(sel_max)) + " hosts ") } func i_info_panel(s tcell.Screen, t [2]int, @@ -225,7 +227,7 @@ func i_info_panel(s tcell.Screen, t [2]int, i_draw_text(s, (t[W] / 3) + 10, curr_line, t[W] - 2, curr_line, def_style, strconv.Itoa(int(host.Port))) - curr_line += 2 + curr_line += 1 // RDP shit if host.Type == 1 { if len(host.Domain) > 0 { @@ -233,11 +235,12 @@ func i_info_panel(s tcell.Screen, t [2]int, (t[W] / 3) + 4, curr_line, t[W] - 2, curr_line, title_style, "Domain: ") i_draw_text(s, - (t[W] / 3) + 13, curr_line, t[W] - 2, curr_line, + (t[W] / 3) + 12, curr_line, t[W] - 2, curr_line, def_style, host.Domain) curr_line += 1 } } + curr_line += 1 // user infos i_draw_text(s, (t[W] / 3) + 4, curr_line, t[W] - 2, curr_line, @@ -295,7 +298,7 @@ func i_info_panel(s tcell.Screen, t [2]int, if len(host.JumpPass) > 0 { i_draw_text(s, (t[W] / 3) + 5, curr_line, t[W] - 2, curr_line, - title_style, "User: ") + title_style, "Pass: ") i_draw_text(s, (t[W] / 3) + 11, curr_line, t[W] - 2, curr_line, def_style, "***") @@ -315,6 +318,22 @@ func i_info_panel(s tcell.Screen, t [2]int, // RDP shit if host.Type == 1 { qual := [3]string{"Low", "Medium", "High"} + i_draw_text(s, + (t[W] / 3) + 4, curr_line, t[W] - 2, curr_line, + title_style, "Screen size: ") + i_draw_text(s, + (t[W] / 3) + 17, curr_line, t[W] - 2, curr_line, + def_style, + strconv.Itoa(int(host.Width)) + "x" + + strconv.Itoa(int(host.Height))) + curr_line += 1 + i_draw_text(s, + (t[W] / 3) + 4, curr_line, t[W] - 2, curr_line, + title_style, "Dynamic window: ") + i_draw_text(s, + (t[W] / 3) + 20, curr_line, t[W] - 2, curr_line, + def_style, strconv.FormatBool(host.Dynamic)) + curr_line += 1 i_draw_text(s, (t[W] / 3) + 4, curr_line, t[W] - 2, curr_line, title_style, "Quality: ") @@ -322,6 +341,7 @@ func i_info_panel(s tcell.Screen, t [2]int, (t[W] / 3) + 13, curr_line, t[W] - 2, curr_line, def_style, qual[host.Quality]) curr_line += 1 + curr_line += 1 } // note if len(host.Note) > 0 { -- cgit v1.2.3