load different profile.json

fix bugs relating to profile loading
This commit is contained in:
AnD
2026-04-15 18:05:45 -06:00
parent f07fe51193
commit 7d35ac2b37
16 changed files with 684 additions and 460 deletions

View File

@@ -1,4 +1,4 @@
namespace SSH_Test
namespace FHT
{
partial class FormConfiguration
{
@@ -41,14 +41,17 @@
this.label5 = new System.Windows.Forms.Label();
this.textBoxTftpIP = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.buttonProfilePath = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.buttonTasklistDec = new System.Windows.Forms.Button();
this.buttonTasklistEnc = new System.Windows.Forms.Button();
this.buttonEncryptTaskList = new System.Windows.Forms.Button();
this.openFileDialogTasklist = new System.Windows.Forms.OpenFileDialog();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
@@ -154,6 +157,7 @@
//
// groupBox3
//
this.groupBox3.Controls.Add(this.groupBox5);
this.groupBox3.Controls.Add(this.groupBox4);
this.groupBox3.Controls.Add(this.buttonEncryptTaskList);
this.groupBox3.Location = new System.Drawing.Point(307, 12);
@@ -161,7 +165,27 @@
this.groupBox3.Size = new System.Drawing.Size(240, 177);
this.groupBox3.TabIndex = 6;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Encryption";
this.groupBox3.Text = "Profile && Encryption";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.buttonProfilePath);
this.groupBox5.Location = new System.Drawing.Point(8, 87);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(200, 54);
this.groupBox5.TabIndex = 10;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Profile Path";
//
// buttonProfilePath
//
this.buttonProfilePath.Location = new System.Drawing.Point(15, 18);
this.buttonProfilePath.Name = "buttonProfilePath";
this.buttonProfilePath.Size = new System.Drawing.Size(163, 29);
this.buttonProfilePath.TabIndex = 9;
this.buttonProfilePath.Text = "profile.json";
this.buttonProfilePath.UseVisualStyleBackColor = true;
this.buttonProfilePath.Click += new System.EventHandler(this.buttonProfilePath_Click);
//
// groupBox4
//
@@ -203,12 +227,12 @@
this.buttonEncryptTaskList.Text = "Encrypt";
this.buttonEncryptTaskList.UseVisualStyleBackColor = true;
//
// openFileDialogTasklist
// openFileDialog
//
this.openFileDialogTasklist.DefaultExt = "json";
this.openFileDialogTasklist.FileName = "tasklisk.json";
this.openFileDialogTasklist.Filter = "json file|*.json|Powershell scrips|*.ps1";
this.openFileDialogTasklist.Title = "Task list file";
this.openFileDialog.DefaultExt = "json";
this.openFileDialog.FileName = "*.json";
this.openFileDialog.Filter = "json file|*.json|Powershell scrips|*.ps1";
this.openFileDialog.Title = "File Path";
//
// FormConfiguration
//
@@ -228,6 +252,7 @@
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.ResumeLayout(false);
@@ -251,6 +276,8 @@
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Button buttonTasklistDec;
private System.Windows.Forms.Button buttonTasklistEnc;
private System.Windows.Forms.OpenFileDialog openFileDialogTasklist;
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.Button buttonProfilePath;
private System.Windows.Forms.GroupBox groupBox5;
}
}

View File

@@ -12,7 +12,7 @@ using System.Windows.Forms;
using System.IO;
using System.Security.Cryptography;
namespace SSH_Test
namespace FHT
{
public partial class FormConfiguration : Form
{
@@ -29,15 +29,17 @@ namespace SSH_Test
public static ILog log;
public FormConfiguration(string tftp_IP, string sftpIP, string sftp_Username, string sftp_Password, bool bencryption
, Aes aaes, ILog Log)
, Aes aaes, string sprofilepath, ILog Log)
{
InitializeComponent();
this.textBoxTftpIP.Text = Tftp_IP = tftp_IP;
this.textBoxSftpIP.Text = Sftp_IP = sftpIP;
this.textBoxSftpUsername.Text = Sftp_Username = sftp_Username;
this.textBoxSftpPassword.Text = Sftp_Password = sftp_Password;
buttonProfilePath.Text = sProfilePath = sprofilepath;
aes = aaes;
log = Log;
this.Update();
}
@@ -66,10 +68,10 @@ namespace SSH_Test
private void buttonTasklistEnc_Click(object sender, EventArgs e)
{
Utilities utilities = new Utilities(log);
if (openFileDialogTasklist.ShowDialog() == DialogResult.OK)
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string Jsonfilename = openFileDialogTasklist.FileName;
string buttonTasklistPath = openFileDialogTasklist.SafeFileName;
string Jsonfilename = openFileDialog.FileName;
string buttonTasklistPath = openFileDialog.SafeFileName;
if (File.Exists(Jsonfilename))
{
try
@@ -99,10 +101,10 @@ namespace SSH_Test
private void buttonTasklistDec_Click(object sender, EventArgs e)
{
Utilities utilities = new Utilities(log);
if (openFileDialogTasklist.ShowDialog() == DialogResult.OK)
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string JsonFileName = openFileDialogTasklist.FileName;
string buttonTasklistPath = openFileDialogTasklist.SafeFileName;
string JsonFileName = openFileDialog.FileName;
string buttonTasklistPath = openFileDialog.SafeFileName;
if (File.Exists(JsonFileName))
{
try
@@ -126,5 +128,14 @@ namespace SSH_Test
}
}
}
private void buttonProfilePath_Click(object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
sProfilePath = openFileDialog.FileName;
buttonProfilePath.Text = openFileDialog.SafeFileName;
}
}
}
}

View File

@@ -117,7 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialogTasklist.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

View File

@@ -6,8 +6,8 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{73DED4CD-B2B1-491E-87B7-BC1F11759C53}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>SSH_Test</RootNamespace>
<AssemblyName>SSH_Test</AssemblyName>
<RootNamespace>FHT</RootNamespace>
<AssemblyName>FHT</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@@ -86,8 +86,8 @@
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>packages\BouncyCastle.Cryptography.2.6.2\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=3.2.0.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>packages\log4net.3.2.0\lib\net462\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.3.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>packages\log4net.3.3.1\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.10.0.2\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
@@ -135,6 +135,7 @@
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />

View File

@@ -27,14 +27,14 @@ using System.Windows.Forms;
using System.Xml;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace SSH_Test
namespace FHT
{
public partial class TastList : Form
{
// set to false to enable Encrypt , Decrypt Buttons
public const bool IsAdminDisabled = true;
public const bool IsAdminDisabled = false;
public List<cTask> Tasks = new List<cTask>();
@@ -133,27 +133,41 @@ namespace SSH_Test
dataGridViewTask.AllowDrop = true;
dataGridViewTask.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
dataGridViewTask.RowTemplate.ContextMenuStrip = contextMenuStripRow;
//Load Profile list from "profile.json"
Profiles = utilities.LoadProfile("profile.json", aes);
// Configure Profile list to dropdown menu
// AES button will update the dropdown menu when AES key is inputed.
//try
//{
// foreach (Profile p in Profiles)
// {
// log.Info(string.Format("Profile: {0}", p.ProfileName));
// }
//ask for AES key
buttonAESString_Click(null, null);
// var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
// comboBoxColumn.DataSource = Profiles; // Set the data source of the ComboBox column
// comboBoxColumn.DisplayMember = "profileName"; // Displayed property name
// comboBoxColumn.ValueMember = "profileName"; //The property name of the value
//}
//catch (Exception ex)
//{
// log.Error(ex.Message);
//}
//Load Profile list from "Profilefilename"
Profiles = utilities.LoadProfile(Profilefilename, aes);
if (!Profiles.Any())
{
//load "do nothing" to Profiles
Profile temp = new Profile();
temp.ProfileType = "";
temp.ProfileName = "Do nothing";
temp.ProfileCommands = new string[] { "echo Do nothing" };
temp.ProfileParameters = new string[] { "" };
Profiles.Add(temp);
}
try
{
foreach (Profile p in Profiles)
{
log.Info(string.Format("Profile: {0}", p.ProfileName));
}
var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
comboBoxColumn.DataSource = Profiles; // Set the data source of the ComboBox column
comboBoxColumn.DisplayMember = "profileName"; // Displayed property name
comboBoxColumn.ValueMember = "profileName"; //The property name of the value
}
catch (Exception ex)
{
log.Error(ex.Message);
}
dataGridViewTask.Refresh();
@@ -316,10 +330,12 @@ namespace SSH_Test
row.Cells[1].Value = task.sTaskDescription;
row.Cells[2].Value = task.sTaskDevice;
row.Cells[4].Value = task.bTaskSelect;
var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
// var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
// test if task.sprofile name mach any in Profiles, if true, assign that name
if (Profiles.Any(pr => pr.ProfileName == task.sProfile))
row.Cells[7].Value = task.sProfile;
else
row.Cells[7].Value = null;
dataGridViewTask.Rows.Add(row);
}
catch (Exception ex)
@@ -335,18 +351,63 @@ namespace SSH_Test
{
FormConfiguration formConfiguration = new FormConfiguration(conInfo.sTftpIP, conInfo.sSftpIP,
conInfo.sSftpUsername, conInfo.sSftpPassword,
bEncryption, aes, log);
bEncryption, aes, Profilefilename,log);
// Disable Encrypt, Decrypt buttons
if(IsAdminDisabled)
{
formConfiguration.AdminDisable();
}
formConfiguration.ShowDialog();
//reload profile and task list
Profilefilename = formConfiguration.sProfilePath;
//try reloading Profilefilename
Profiles.Clear();
Profiles = utilities.LoadProfile(Profilefilename, aes);
// Configure Profile list to dropdown menu, first to check if profiles is empty
if (!Profiles.Any())
{
//load "do nothing" to Profiles
Profile temp = new Profile();
temp.ProfileType = "";
temp.ProfileName = "Do nothing";
temp.ProfileCommands = new string[] { "echo Do nothing" };
temp.ProfileParameters = new string[] { "" };
Profiles.Add(temp);
}
try
{
foreach (Profile p in Profiles)
{
log.Info(string.Format("Profile: {0}", p.ProfileName));
}
var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
comboBoxColumn.DataSource = Profiles; // Set the data source of the ComboBox column
comboBoxColumn.DisplayMember = "profileName"; // Displayed property name
comboBoxColumn.ValueMember = "profileName"; //The property name of the value
}
catch (Exception ex)
{
log.Error(ex.Message);
}
//reload tasklist
buttonLoad_Click(null, null);
conInfo.sTftpIP = formConfiguration.Tftp_IP;
conInfo.sSftpIP = formConfiguration.Sftp_IP;
conInfo.sSftpUsername = formConfiguration.Sftp_Username;
conInfo.sSftpPassword = formConfiguration.Sftp_Password;
dataGridViewTask.Refresh();
}
private void dataGridViewTask_CellClick(object sender, DataGridViewCellEventArgs e)
@@ -451,50 +512,43 @@ namespace SSH_Test
{
profile = Profiles.Find(x => x.ProfileName == currentTask.sProfile.ToString());
// print out task
log.Info(string.Format("Current task profile {0}:", currentTask.sTaskDevice.ToString()));
foreach (string c in profile.ProfileCommands)
log.Info(c);
//hostInfo.Commands = profile.ProfileCommands;
//check if task has parameters and get parameters list
//foreach (string c in profile.ProfileParameters)
//{
// if (currentTask.dParameters[c] == "")
// currentTask.dParameters.Add(c, "");
//}
if (profile.ProfileParameters.Length > 0)
if (profile !=null && profile.ProfileName != "Do nothing")
{
//Get Values for Parameters
FormParameters formParameter = new FormParameters(currentTask.dParameters, richTextBoxOutput.Text,
string.Format("{0}: {1}", currentTask.sTaskDescription, currentTask.sProfile));
if (formParameter.ShowDialog() == DialogResult.Cancel)
// print out task
log.Info(string.Format("Current task profile {0}:", currentTask.sTaskDevice.ToString()));
foreach (string c in profile.ProfileCommands)
log.Info(c);
if (profile.ProfileParameters.Length > 0)
{
log.Info("formParameter returns with Cancel");
break;
//Get Values for Parameters
FormParameters formParameter = new FormParameters(currentTask.dParameters, richTextBoxOutput.Text,
string.Format("{0}: {1}", currentTask.sTaskDescription, currentTask.sProfile));
if (formParameter.ShowDialog() == DialogResult.Cancel)
{
log.Info("formParameter returns with Cancel");
break;
}
//foreach (var c in currentTask.dParameters)
// log.Info(string.Format("Parameter {0}: {1}", c.Key, c.Value));
}
//foreach (var c in currentTask.dParameters)
// log.Info(string.Format("Parameter {0}: {1}", c.Key, c.Value));
//clear richtextboxoutput
richTextBoxOutput.Clear();
// Run a Task and display result on the textbox
richTextBoxOutput.AppendText(Utilities.RunaTask(currentTask, profile, conInfo, aes));
richTextBoxOutput.SelectionStart = richTextBoxOutput.Text.Length;
richTextBoxOutput.ScrollToCaret();
//update Status LastRun
string ttt = DateTime.Now.ToString(("HH:mm:ss"));
dataGridViewTask.Rows[e.RowIndex].Cells[6].Value = ttt;
}
else
log.Info("Profile = Null");
//clear richtextboxoutput
richTextBoxOutput.Clear();
// Run a Task and display result on the textbox
richTextBoxOutput.AppendText(Utilities.RunaTask(currentTask, profile, conInfo,aes));
richTextBoxOutput.SelectionStart = richTextBoxOutput.Text.Length;
richTextBoxOutput.ScrollToCaret();
//update Status LastRun
string ttt = DateTime.Now.ToString(("HH:mm:ss"));
dataGridViewTask.Rows[e.RowIndex].Cells[6].Value = ttt;
}
catch
{
@@ -547,7 +601,12 @@ namespace SSH_Test
break;
case 1:
if (dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value == null)
{
dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = "";
}
Tasks[e.RowIndex].sTaskDescription = (string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
break;
case 2:
Tasks[e.RowIndex].sTaskDevice = (string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
@@ -556,7 +615,8 @@ namespace SSH_Test
break;
case 4:
Tasks[e.RowIndex].bTaskSelect = (bool)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
if ((string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null)
Tasks[e.RowIndex].bTaskSelect = (bool)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
break;
case 5:
@@ -567,19 +627,22 @@ namespace SSH_Test
Tasks[e.RowIndex].sProfile = (string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
else
Tasks[e.RowIndex].sProfile = "Do nothing";
profile = Profiles.Find(x => x.ProfileName == Tasks[e.RowIndex].sProfile.ToString());
if ( (profile != null) && (profile.ProfileParameters.Length > 0))
if (!Profiles.Any())
{
//clear task profile parameters first
Tasks[e.RowIndex].dParameters.Clear();
//add new parameters
foreach (string c in profile.ProfileParameters)
profile = Profiles.Find(x => x.ProfileName == Tasks[e.RowIndex].sProfile.ToString());
if ((profile != null) && (profile.ProfileParameters.Length > 0))
{
Tasks[e.RowIndex].dParameters.Add(c, "");
//clear task profile parameters first
Tasks[e.RowIndex].dParameters.Clear();
//add new parameters
foreach (string c in profile.ProfileParameters)
{
Tasks[e.RowIndex].dParameters.Add(c, "");
}
}
}
log.Info(string.Format("Task {0}, profile {1}", e.RowIndex, Tasks[e.RowIndex].sProfile));
break;
@@ -753,10 +816,22 @@ namespace SSH_Test
{
aes.Key = Convert.FromBase64String(formParameter.dParameters["AES string"]);
//try reloading profile.json
//try reloading Profilefilename
Profiles.Clear();
Profiles = utilities.LoadProfile("profile.json", aes);
// Configure Profile list to dropdown menu
Profiles = utilities.LoadProfile(Profilefilename, aes);
// Configure Profile list to dropdown menu, first to check if Profiles is empty
if (!Profiles.Any())
{
//load "do nothing" to Profiles
Profile temp = new Profile();
temp.ProfileType = "";
temp.ProfileName = "Do nothing";
temp.ProfileCommands = new string[] { "echo Do nothing" };
temp.ProfileParameters = new string[]{ "" };
Profiles.Add(temp);
}
try
{
foreach (Profile p in Profiles)
@@ -782,6 +857,9 @@ namespace SSH_Test
}
}
//reload tasklist
buttonLoad_Click(null, null);
}
}

BIN
bin/Debug/FHT.exe Normal file

Binary file not shown.

31
bin/Debug/FHT.exe.config Normal file
View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.6.0" newVersion="4.1.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

BIN
bin/Debug/FHT.pdb Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle.Cryptography" version="2.6.2" targetFramework="net48" />
<package id="log4net" version="3.2.0" targetFramework="net48" />
<package id="log4net" version="3.3.1" targetFramework="net48" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.2" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.2" targetFramework="net48" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.3" targetFramework="net48" />

View File

@@ -417,7 +417,10 @@
"ProfileCommands": [
"racadm set iDRAC.Users.{Index}.Username {Username}",
"racadm set iDRAC.Users.{Index}.Password {Password}",
"racadm get iDRAC.Users.{Index}.Username"
"racadm get iDRAC.Users.{Index}.Username",
"racadm set iDRAC.Users.{Index}.Enable 1",
"racadm set iDRAC.Users.{Index}.IpmiLanPriv 4"
],
"ProfileParameters": [ "{Index}", "{Username}", "{Password}" ]
},
@@ -433,7 +436,11 @@
"racadm set iDRAC.Users.4.Password {Password 4}",
"racadm get iDRAC.Users.2.Username",
"racadm get iDRAC.Users.3.Username",
"racadm get iDRAC.Users.4.Username"
"racadm get iDRAC.Users.4.Username",
"racadm set iDRAC.Users.3.Enable 1",
"racadm set iDRAC.Users.3.IpmiLanPriv 4",
"racadm set iDRAC.Users.4.Enable 1",
"racadm set iDRAC.Users.4.IpmiLanPriv 4"
],
"ProfileParameters": [
"{Password 2 root}",