ugo22g

Skype Spam Bot

Jan 20th, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.15 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. using SKYPE4COMLib;
  11.  
  12. namespace WindowsFormsApplication1
  13. {
  14.     public partial class Form1 : Form
  15.     {
  16.         public Form1()
  17.         {
  18.             InitializeComponent();
  19.         }
  20.  
  21.  
  22.         private void Form1_Load(object sender, EventArgs e)
  23.         {
  24.  
  25.         }
  26.         Skype skype = new Skype();
  27.        
  28.         private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) // User laden
  29.         {
  30.             System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ThreadStart(loadContacts));
  31.             thread.IsBackground = true;
  32.             thread.Priority = System.Threading.ThreadPriority.AboveNormal;
  33.             thread.Name = "Load Skype Contacts";
  34.             thread.Start();
  35.         }
  36.  
  37.         private void button1_Click(object sender, EventArgs e) // spammen
  38.         {
  39.             try
  40.             {
  41.                 for (int i = 0; i < numericUpDown1.Value; i++)
  42.                 {
  43.                     skype.SendMessage(label1.Text, textBox1.Text);
  44.                 }
  45.             }
  46.             catch (Exception exc) { MessageBox.Show("Aktion fehlgeschlagen " + exc.Message); }
  47.         }
  48.  
  49.         List<string> alleKontakte = new List<string>();
  50.         public void loadContacts() // Radiobutton2 = online | radiobutton1 = alle
  51.         {
  52.             alleKontakte.Clear();
  53.             if (radioButton1.Checked)
  54.             {
  55.                 foreach(User user in skype.Friends)
  56.                 {
  57.                     alleKontakte.Add(user.Handle);
  58.                 }
  59.             }
  60.             else if (radioButton2.Checked)
  61.             {
  62.                 foreach (User user in skype.Friends)
  63.                 {
  64.                     if (user.OnlineStatus == TOnlineStatus.olsOnline | user.OnlineStatus == TOnlineStatus.olsNotAvailable | user.OnlineStatus == TOnlineStatus.olsDoNotDisturb | user.OnlineStatus == TOnlineStatus.olsAway)
  65.                     {
  66.                         alleKontakte.Add(user.Handle);
  67.                     }
  68.                 }
  69.             }
  70.  
  71.             MethodInvoker lvUpdate = delegate
  72.             {
  73.                 listView1.Items.Clear();
  74.  
  75.                 foreach (var user in alleKontakte)
  76.                 {
  77.                     listView1.Items.Add(user);
  78.                 }
  79.                 listView1.Sorting = SortOrder.Ascending;
  80.                 if (radioButton2.Checked)
  81.                     radioButton2.Text = String.Format("nur online Kontakte ({0})", listView1.Items.Count);
  82.                 else if(radioButton1.Checked)
  83.                     radioButton1.Text = String.Format("alle Kontakte ({0})", listView1.Items.Count);
  84.             };
  85.  
  86.             Invoke(lvUpdate);
  87.         }
  88.  
  89.         private void listView1_SelectedIndexChanged(object sender, EventArgs e)
  90.         {
  91.             label1.Text = listView1.SelectedItems[0].Text;
  92.         }
  93.  
  94.         private void radioButton2_CheckedChanged(object sender, EventArgs e)
  95.         {
  96.  
  97.         }
  98.     }
  99. }
Add Comment
Please, Sign In to add comment