From 8d00bba5f2d8bd573dda364ffa1742f81d619ad1 Mon Sep 17 00:00:00 2001 From: Lev Rusanov <30170278+JDM170@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:43:03 +0700 Subject: [PATCH] Update Program.cs Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com> --- Program.cs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Program.cs b/Program.cs index 9320916..7b4ad46 100644 --- a/Program.cs +++ b/Program.cs @@ -1,16 +1,17 @@ -using System; +using Renci.SshNet; +using System; using System.Collections.Generic; -using System.Management; -using System.Linq; -using System.Text.RegularExpressions; using System.Diagnostics; +using System.DirectoryServices; +using System.Linq; +using System.Management; +using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; -using System.Threading; -using System.Net; -using System.DirectoryServices; +using System.Reflection; using System.Security.Principal; -using Renci.SshNet; +using System.Text.RegularExpressions; +using System.Threading; namespace domain_utility { @@ -153,7 +154,7 @@ namespace domain_utility private static void ShowDomainUserInfo() { - string username = InputData("\nВведите имя пользователя (пр. 'lev.rusanov'): ", ShowDomainUserInfo); + string username = InputData("\nВведите имя пользователя (пр. 'lev.rusanov'): ", ShowDomainUserInfo, withChecks: false); username = $"user {username} /domain"; @@ -372,7 +373,7 @@ namespace domain_utility string remote = InputData("\nВведите IP адрес или имя компьютера (пр. 10.234.16.129, 'IT04', '630300IT04', 'R54-630300IT04'):", ExecuteCustomCommandViaSSH); - string commandToExecute = InputData("Введите команду для выполнения:", ExecuteCustomCommandViaSSH, withClear: true, withChecks: false); + string commandToExecute = InputData("Введите команду для выполнения:", ExecuteCustomCommandViaSSH, withClear: false, withChecks: false); string password = InputPassword(); ExecuteCommandViaSSH(remote, password, commandToExecute); @@ -444,6 +445,8 @@ namespace domain_utility static void Main() { + //Console.Title = typeof(Program).Assembly.GetName().Name; + Console.Title = Assembly.GetExecutingAssembly().GetCustomAttribute().Title; Menu(); } }