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.Windows.Forms;
- using System.Diagnostics;
- namespace ddos
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (textBox1.Text == "")
- {
- MessageBox.Show("Bạn chưa điền victim vào", "Error");
- }
- else
- {
- //enter code here
- string victim;
- victim = "ping " + textBox1.Text + " -t";
- ProcessStartInfo processStartInfo = new ProcessStartInfo("cmd.exe");
- processStartInfo.RedirectStandardInput = true;
- processStartInfo.RedirectStandardOutput = true;
- processStartInfo.UseShellExecute = false;
- Process process = Process.Start(processStartInfo);
- process.StandardInput.WriteLine(victim);
- process.StandardInput.Close();
- string kq = process.StandardOutput.ReadToEnd();
- MessageBox.Show(kq);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment