Update Program.cs

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2024-11-07 16:43:03 +07:00
parent 870898ca10
commit 8d00bba5f2

View File

@@ -1,16 +1,17 @@
using System; using Renci.SshNet;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Management;
using System.Linq;
using System.Text.RegularExpressions;
using System.Diagnostics; using System.Diagnostics;
using System.DirectoryServices;
using System.Linq;
using System.Management;
using System.Net;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using System.Net.Sockets; using System.Net.Sockets;
using System.Threading; using System.Reflection;
using System.Net;
using System.DirectoryServices;
using System.Security.Principal; using System.Security.Principal;
using Renci.SshNet; using System.Text.RegularExpressions;
using System.Threading;
namespace domain_utility namespace domain_utility
{ {
@@ -153,7 +154,7 @@ namespace domain_utility
private static void ShowDomainUserInfo() private static void ShowDomainUserInfo()
{ {
string username = InputData("\nВведите имя пользователя (пр. 'lev.rusanov'): ", ShowDomainUserInfo); string username = InputData("\nВведите имя пользователя (пр. 'lev.rusanov'): ", ShowDomainUserInfo, withChecks: false);
username = $"user {username} /domain"; username = $"user {username} /domain";
@@ -372,7 +373,7 @@ namespace domain_utility
string remote = InputData("\nВведите IP адрес или имя компьютера (пр. 10.234.16.129, 'IT04', '630300IT04', 'R54-630300IT04'):", string remote = InputData("\nВведите IP адрес или имя компьютера (пр. 10.234.16.129, 'IT04', '630300IT04', 'R54-630300IT04'):",
ExecuteCustomCommandViaSSH); ExecuteCustomCommandViaSSH);
string commandToExecute = InputData("Введите команду для выполнения:", ExecuteCustomCommandViaSSH, withClear: true, withChecks: false); string commandToExecute = InputData("Введите команду для выполнения:", ExecuteCustomCommandViaSSH, withClear: false, withChecks: false);
string password = InputPassword(); string password = InputPassword();
ExecuteCommandViaSSH(remote, password, commandToExecute); ExecuteCommandViaSSH(remote, password, commandToExecute);
@@ -444,6 +445,8 @@ namespace domain_utility
static void Main() static void Main()
{ {
//Console.Title = typeof(Program).Assembly.GetName().Name;
Console.Title = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyTitleAttribute>().Title;
Menu(); Menu();
} }
} }