Aluf

C++ spam bot

Jan 18th, 2015
656
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.04 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace Spam_Bot_v2
  11. {
  12.     public partial class Form1 : Form
  13.     {
  14.         int amount;
  15.         int counter;
  16.         int speed;
  17.         public Form1()
  18.         {
  19.             InitializeComponent();
  20.         }
  21.  
  22.         private void button1_Click(object sender, EventArgs e)
  23.         {
  24.             if (textBox1.Text == "")
  25.             {
  26.                 //error please enter some text
  27.                 MessageBox.Show("Please enter text to spam");
  28.                 return;
  29.             }
  30.  
  31.             if (textBox2.Text == "")
  32.             {
  33.                 //error please enter some limit
  34.                 MessageBox.Show("Please enter a limit");
  35.                 return;
  36.             }
  37.  
  38.             string spam_text_limit = textBox2.Text;
  39.             for (int i = 0; i < spam_text_limit.Length; i++)
  40.             {
  41.                 if (!char.IsNumber(spam_text_limit[i]))
  42.                 {
  43.                     //error not a valid number
  44.                     MessageBox.Show("Please enter a valid number");
  45.                     textBox2.Text = "";
  46.                     return;
  47.                 }
  48.             }
  49.             progressBar1.Value=0;
  50.             amount = Convert.ToInt32(textBox2.Text);
  51.             Clipboard.SetText(textBox1.Text);
  52.             speed = trackBar1.Value;
  53.             if (speed == 0)
  54.                 speed = 10;
  55.             else
  56.                 speed = 11 - speed;
  57.  
  58.             System.Threading.Thread.Sleep(2500);
  59.             progressBar1.Maximum = amount;
  60.             counter = 0;
  61.             timer1.Enabled = true;
  62.         }
  63.  
  64.         private void the360GamersToolStripMenuItem_Click(object sender, EventArgs e)
  65.         {
  66.             System.Diagnostics.Process.Start("http://www.the360gamers.com");
  67.         }
  68.  
  69.         private void exitToolStripMenuItem_Click(object sender, EventArgs e)
  70.         {
  71.             Application.Exit();
  72.         }
  73.  
  74.         private void button2_Click(object sender, EventArgs e)
  75.         {
  76.             timer1.Enabled = false;
  77.             counter = 0;
  78.         }
  79.  
  80.         private void timer1_Tick(object sender, EventArgs e)
  81.         {
  82.             for (int i = 0; i < speed; i++)
  83.             {
  84.                 SendKeys.Send("^{V}");
  85.                 SendKeys.Send("{ENTER}");
  86.                 counter++;
  87.                 progressBar1.Value++;
  88.                 if (trackBar1.Value == 10)
  89.                 {
  90.                     System.Threading.Thread.Sleep(500);
  91.                 }
  92.                 if (counter >= amount)
  93.                 {
  94.                     counter = 0;
  95.                     timer1.Enabled = false;
  96.                     break;
  97.                 }
  98.             }
  99.  
  100.         }
  101.  
  102.         private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
  103.         {
  104.             MessageBox.Show("Created by Nity\nThe soul purpose of this program is to annoy people :D");
  105.         }
  106.     }
  107. }
Advertisement
Add Comment
Please, Sign In to add comment