mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-02-19 16:03:17 +03:00
修正可能出现的一些干扰信息
This commit is contained in:
parent
4b89568ddd
commit
3cdba7f7bc
@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ProxySU"
|
||||
mc:Ignorable="d"
|
||||
Title="ProxySU - v2.4.21 Beta2" Height="675" Width="650">
|
||||
Title="ProxySU - v2.4.21 Beta3" Height="675" Width="650">
|
||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||
<Window.Resources>
|
||||
|
@ -1104,7 +1104,8 @@ namespace ProxySU
|
||||
//******"主机登录成功"******
|
||||
SetUpProgressBarProcessing(3);
|
||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_LoginSuccessful").ToString();
|
||||
MainWindowsShowInfo(currentStatus); //Thread.Sleep(1000);
|
||||
MainWindowsShowInfo(currentStatus);
|
||||
//Thread.Sleep(3000);
|
||||
}
|
||||
|
||||
//检测root权限 5--7
|
||||
@ -5488,6 +5489,7 @@ namespace ProxySU
|
||||
getYum = false;
|
||||
|
||||
//******"正在登录远程主机......"******
|
||||
SetUpProgressBarProcessing(1);
|
||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_Login").ToString();
|
||||
MainWindowsShowInfo(currentStatus);
|
||||
|
||||
@ -5527,6 +5529,7 @@ namespace ProxySU
|
||||
if (client.IsConnected == true)
|
||||
{
|
||||
//******"主机登录成功"******
|
||||
SetUpProgressBarProcessing(5);
|
||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_LoginSuccessful").ToString();
|
||||
MainWindowsShowInfo(currentStatus);
|
||||
}
|
||||
@ -5706,8 +5709,10 @@ namespace ProxySU
|
||||
SetUpProgressBarProcessing(5);
|
||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_LoginSuccessful").ToString();
|
||||
MainWindowsShowInfo(currentStatus);
|
||||
//Thread.Sleep(3000);
|
||||
}
|
||||
|
||||
|
||||
//检测root权限 5--7
|
||||
functionResult = RootAuthorityDetect(client);
|
||||
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
|
||||
@ -7646,6 +7651,15 @@ namespace ProxySU
|
||||
//if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
|
||||
private bool RootAuthorityDetect(SshClient client)
|
||||
{
|
||||
sshShellCommand = @"uname -a";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
//禁止一些可能产生的干扰信息
|
||||
sshShellCommand = @"sed -i 's/echo/#echo/g' ~/.bashrc";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
sshShellCommand = @"sed -i 's/echo/#echo/g' ~/.profile";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
//******"检测是否运行在root权限下..."******01
|
||||
SetUpProgressBarProcessing(5);
|
||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_DetectionRootPermission").ToString();
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user