Beispiel #1
0
 private void txtAlertMessage_LinkClicked(object sender, LinkClickedEventArgs e)
 {
     try
     {
         System.Diagnostics.Process.Start(e.LinkText);
     }
     catch (Exception ex)
     {
         var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
         alertBox.ShowDialog();
     }
 }
Beispiel #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         Close();
     }
     catch (Exception ex)
     {
         var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
         alertBox.ShowDialog();
     }
 }
Beispiel #3
0
        private void spamTimer_Tick(object sender, EventArgs e)
        {
            try
            {
                var    senderAddress  = new MailAddress(senderEmailAddress);
                var    targetAddress  = new MailAddress(targetEmailAddress, targetName);
                string senderPassword = senderEmailPassword;
                string body           = "This Spamer was provided by Doobie Developments";

                var smtp = new SmtpClient
                {
                    Host                  = "smtp.gmail.com",
                    Port                  = 587,
                    EnableSsl             = true,
                    DeliveryMethod        = SmtpDeliveryMethod.Network,
                    UseDefaultCredentials = false,
                    Credentials           = new NetworkCredential(senderAddress.Address, senderPassword)
                };

                string subject = CreateSubject();

                if (subject != "error" || subject != string.Empty)
                {
                    using (var message = new MailMessage(senderAddress, targetAddress)
                    {
                        Subject = subject,
                        Body = body
                    })
                    {
                        smtp.Send(message);
                        mailCount++;

                        sendingForm.SetSentCounter(mailCount);
                    }
                }
                else
                {
                    var alertBox = new AlertBox("Could not create Subject for Spam Mail!\n\nPlease try again...", "Subject could not be created", IconMode.Error);
                    alertBox.ShowDialog();
                }
            }
            catch (SmtpException smtpEx)
            {
                var alertBox = new AlertBox("Could not send Mail\n\n" + smtpEx.Message, "An Smtp Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
        }
Beispiel #4
0
        public AlertBox(string alertMessage, string alertTitle, IconMode alertIcon)
        {
            try
            {
                InitializeComponent();

                Text = alertTitle;
                txtAlertMessage.Text = alertMessage;

                if (alertMessage.Contains("\n"))
                {
                    txtAlertMessage.Location = new Point(78, 20);
                    txtAlertMessage.Size     = new Size(294, 104);
                }

                switch (alertIcon)
                {
                case IconMode.Success:
                    pcbAlertIcon.Image = Properties.Resources.success;
                    break;

                case IconMode.Error:
                    pcbAlertIcon.Image = Properties.Resources.error;
                    break;

                case IconMode.Information:
                    pcbAlertIcon.Image = Properties.Resources.information;
                    break;

                case IconMode.Question:
                    pcbAlertIcon.Image = Properties.Resources.question;
                    btnOK.Visible      = false;
                    btnYes.Visible     = true;
                    btnNo.Visible      = true;
                    break;

                case IconMode.Dude:
                    pcbAlertIcon.Image = Properties.Resources.dude;
                    break;
                }

                this.Focus();
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
        }
Beispiel #5
0
        private void btnSpam_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtTargetMessage.Text != "z.B. du bist")
                {
                    if (spaming)
                    {
                        spaming           = false;
                        btnSpam.Text      = "Start Spam";
                        btnSpam.BackColor = Color.LightGreen;

                        spamTimer.Enabled = false;

                        sendingForm.Close();

                        var alertBox = new AlertBox("Spamer was stopped!\n\n" + mailCount + " Mails has been sent...", "Spamer stopped", IconMode.Success);
                        alertBox.ShowDialog();

                        mailCount = 0;
                    }
                    else
                    {
                        spaming           = true;
                        btnSpam.Text      = "Stop Spam";
                        btnSpam.BackColor = Color.LightCoral;

                        if (CheckTargetInputs())
                        {
                            spamTimer.Interval = spamSpeed;
                            spamTimer.Enabled  = true;

                            sendingForm = new Sending(targetEmailAddress);
                            sendingForm.Show();
                        }
                    }
                }
                else
                {
                    var alertBox = new AlertBox("The Message for the Target has to be filled with a Sentance\n\nPlease enter a Sentance like 'du siehst aus wie', 'richt wie' or 'du bist'...", "Message for Target is empty", IconMode.Information);
                    alertBox.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
        }
Beispiel #6
0
        private bool CheckLoginInputs()
        {
            try
            {
                if (!string.IsNullOrEmpty(txtSenderEmailAddress.Text))
                {
                    if (txtSenderEmailAddress.Text.Contains("@gmail.com"))
                    {
                        var address = new System.Net.Mail.MailAddress(txtSenderEmailAddress.Text);
                        if (address.Address == txtSenderEmailAddress.Text)
                        {
                            SenderEmailAddress = txtSenderEmailAddress.Text;
                            SenderPassword     = txtSenderPassword.Text;

                            return(true);
                        }
                        else
                        {
                            var alertBox = new AlertBox("Your entered a invalid Gmail Email Address!\n\nPlease check your spelling...", "Invalid Gmail Email Address entered", IconMode.Information);
                            alertBox.ShowDialog();

                            return(false);
                        }
                    }
                    else
                    {
                        var alertBox = new AlertBox("You have to use a Gmail Email Address for this Spamer", "No Gmail Email Address entered", IconMode.Information);
                        alertBox.ShowDialog();

                        return(false);
                    }
                }
                else
                {
                    var alertBox = new AlertBox("Please enter your Gmail Email Address", "No Sender Email Address entered", IconMode.Information);
                    alertBox.ShowDialog();

                    return(false);
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();

                return(false);
            }
        }
Beispiel #7
0
 private void txtTargetMessage_Enter(object sender, EventArgs e)
 {
     try
     {
         if (txtTargetMessage.Text == "z.B. du bist")
         {
             txtTargetMessage.ForeColor = SystemColors.WindowText;
             txtTargetMessage.Text      = string.Empty;
         }
     }
     catch (Exception ex)
     {
         var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
         alertBox.ShowDialog();
     }
 }
Beispiel #8
0
 private void txtTargetMessage_Leave(object sender, EventArgs e)
 {
     try
     {
         if (txtTargetMessage.Text == string.Empty)
         {
             txtTargetMessage.ForeColor = Color.Gray;
             txtTargetMessage.Text      = "z.B. du bist";
         }
     }
     catch (Exception ex)
     {
         var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
         alertBox.ShowDialog();
     }
 }
Beispiel #9
0
        public Main()
        {
            try
            {
                InitializeComponent();

                Show();

                var alertBox = new AlertBox("Please note that this is the 3.1 Alpha Version of Email Spamer!\nThe current Build only supports German\n\nMultilangual Support will soon be ready if tha Doobie (this f****r on the left) gets his shit done...\n\nEnjoy", "This is a Alpha Build", IconMode.Dude);
                alertBox.ShowDialog();
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
        }
Beispiel #10
0
        private void Login_HelpButtonClicked(object sender, CancelEventArgs e)
        {
            try
            {
                var alertBox = new AlertBox("To be able to send Spam Mails over your Gmail Email Address you have to enable login access for less secure apps!\n\nIf your loged in to your Gmail account please click this link:\n\n" + @"https://myaccount.google.com/lesssecureapps" + "\n\nCould you enable the Option?", "Enable less secure Gmail Logins", IconMode.Question);
                alertBox.ShowDialog();

                if (!alertBox.Return)
                {
                    var alertBoxInfo = new AlertBox("OK, please follow this Google article which shows you how to this:\n\n" + @"https://support.google.com/accounts/answer/6010255?hl=en", "How to enable less secure Login for Gmail", IconMode.Information);
                    alertBoxInfo.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
        }
Beispiel #11
0
 private void txtAlertMessage_Enter(object sender, EventArgs e)
 {
     try
     {
         if (btnOK.Visible)
         {
             btnOK.Focus();
         }
         else
         {
             btnYes.Focus();
         }
     }
     catch (Exception ex)
     {
         var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
         alertBox.ShowDialog();
     }
 }
Beispiel #12
0
 private void Main_HelpButtonClicked(object sender, CancelEventArgs e)
 {
     try
     {
         if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Documentation\Email Spamer v3 - Documentation.pdf"))
         {
             System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"\Documentation\Email Spamer v3 - Documentation.pdf");
         }
         else
         {
             var alertBox = new AlertBox("Could not find the Email Spamer v3 Documentation!\n\nIt probably got deleted.\nPlease reinstall the Solution to get the Documentation", "Documentation not found", IconMode.Information);
             alertBox.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
         alertBox.ShowDialog();
     }
 }
Beispiel #13
0
        private void Login_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                if (Cancelled)
                {
                    var alertBox = new AlertBox("Do you really want to cancel loging in?", "Cancel Login", IconMode.Question);
                    alertBox.ShowDialog();

                    if (!alertBox.Return)
                    {
                        e.Cancel = true;
                    }
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
        }
Beispiel #14
0
        private void btnUploadNouns_Click(object sender, EventArgs e)
        {
            try
            {
                var fileDialog = new OpenFileDialog();
                fileDialog.InitialDirectory = @"C:\User\" + Environment.UserName + @"\Desktop";
                fileDialog.Multiselect      = false;
                fileDialog.Title            = "Select the .txt FIle with all your Nouns";
                fileDialog.Filter           = "Textfile | *.txt";

                if (fileDialog.ShowDialog() == DialogResult.OK)
                {
                    nouns = new List <KeyValuePair <string, string> >();

                    var lines = File.ReadLines(fileDialog.FileName, Encoding.GetEncoding("iso-8859-1"));
                    foreach (var line in lines)
                    {
                        nouns.Add(new KeyValuePair <string, string>(line.Split(' ')[0], line.Split(' ')[1][0].ToString().ToUpper() + line.Split(' ')[1].Substring(1)));
                    }

                    if (CheckNounTextfile(fileDialog.FileName))
                    {
                        nunSet = true;
                        btnUploadNouns.BackColor = Color.LightGreen;

                        if (CheckIfInputsAreReady())
                        {
                            grpTargetInformations.Enabled = true;
                            btnSpam.Enabled = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();
            }
        }
Beispiel #15
0
        private bool CheckIfInputsAreReady()
        {
            try
            {
                if (adjSet && nunSet && emlSet)
                {
                    txtTargetMessage.ForeColor = Color.Gray;
                    txtTargetMessage.Text      = "z.B. du bist";

                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();

                return(false);
            }
        }
Beispiel #16
0
        private bool CheckIfTextboxIsEmpty(TextBox textbox, Label label)
        {
            try
            {
                if (!string.IsNullOrEmpty(textbox.Text))
                {
                    return(true);
                }
                else
                {
                    var alertBox = new AlertBox("The Textbox \"" + label.Text + "\" is empty!\n\nPlease fill it out...", label.Text + " is empty", IconMode.Information);
                    alertBox.ShowDialog();

                    return(false);
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();

                return(false);
            }
        }
Beispiel #17
0
        private bool CheckTargetInputs()
        {
            try
            {
                double spamSpeedDouble;

                if (CheckIfTextboxIsEmpty(txtTargetMessage, lblTargetMessage) && CheckIfTextboxIsEmpty(txtTargetSurname, lblTargetSurname) && CheckIfTextboxIsEmpty(txtTargetEmailAddress, lblTargetEmailAddress) && CheckIfTextboxIsEmpty(txtSpamSpeed, lblSpamSpeed))
                {
                    if (txtSpamSpeed.Text.Contains(',') || txtSpamSpeed.Text.Contains('.'))
                    {
                        if (!double.TryParse(txtSpamSpeed.Text, out spamSpeedDouble))
                        {
                            var alertBox = new AlertBox("Could not read \"Spam Speed\" because it is not a Number", "Could not convert Spam Speed", IconMode.Information);
                            alertBox.ShowDialog();

                            return(false);
                        }
                        else
                        {
                            spamSpeed = (int)spamSpeedDouble * 1000;
                        }
                    }
                    else
                    {
                        if (!int.TryParse(txtSpamSpeed.Text, out spamSpeed))
                        {
                            var alertBox = new AlertBox("Could not read \"Spam Speed\" because it is not a Number", "Could not convert Spam Speed", IconMode.Information);
                            alertBox.ShowDialog();

                            return(false);
                        }
                        else
                        {
                            spamSpeed *= 1000;
                        }
                    }

                    var address = new MailAddress(txtTargetEmailAddress.Text);
                    if (address.Address == txtTargetEmailAddress.Text)
                    {
                        targetName         = txtTargetSurname.Text;
                        targetMessage      = txtTargetMessage.Text;
                        targetEmailAddress = txtTargetEmailAddress.Text;

                        return(true);
                    }
                    else
                    {
                        var alertbox = new AlertBox("Target Email Address is invalid!\n\nPlease check your spelling...", "Invalid Target Email Address", IconMode.Information);
                        alertbox.ShowDialog();

                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                var alertBox = new AlertBox(ex.Message, "An Error occured", IconMode.Error);
                alertBox.ShowDialog();

                return(false);
            }
        }