diff options
author | Joe <rbo@gmx.us> | 2023-12-19 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-19 20:20:20 +0100 |
commit | aae80bd3b591bbcc5de83947e79c71c7f8b5912d (patch) | |
tree | 4362f8ec9533ebbc738daee08f42e857e679e97b | |
parent | reload (diff) | |
download | hardflip-aae80bd3b591bbcc5de83947e79c71c7f8b5912d.tar.gz hardflip-aae80bd3b591bbcc5de83947e79c71c7f8b5912d.tar.bz2 hardflip-aae80bd3b591bbcc5de83947e79c71c7f8b5912d.tar.xz hardflip-aae80bd3b591bbcc5de83947e79c71c7f8b5912d.tar.zst hardflip-aae80bd3b591bbcc5de83947e79c71c7f8b5912d.zip |
fire
Diffstat (limited to '')
-rw-r--r-- | c_lhosts.go | 4 | ||||
-rw-r--r-- | c_parse.go | 6 | ||||
-rw-r--r-- | 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"` @@ -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 } @@ -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, "***") @@ -317,11 +320,28 @@ func i_info_panel(s tcell.Screen, t [2]int, 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: ") i_draw_text(s, (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 { |