initial commit
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.App
|
||||
// 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 System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Threading;
|
||||
using WpfApp1.Windows;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class App : System.Windows.Application
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
Port port = new Port();
|
||||
DispatcherFrame frame = new DispatcherFrame();
|
||||
port.Closed += (EventHandler) ((s, ev) => frame.Continue = false);
|
||||
port.Show();
|
||||
Dispatcher.PushFrame(frame);
|
||||
if (!port.LoginSuccess)
|
||||
{
|
||||
this.Shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
WpfApp1.MainWindow mainWindow = new WpfApp1.MainWindow();
|
||||
mainWindow.LoginPassword = port.EnteredPassword;
|
||||
mainWindow.LoginPort = port.EnteredPort;
|
||||
this.MainWindow = (Window) mainWindow;
|
||||
Program.form2 = mainWindow;
|
||||
mainWindow.Show();
|
||||
mainWindow.userName.Text = mainWindow.user;
|
||||
mainWindow.StartListening(port.EnteredPort, "@" + mainWindow.user);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnExit(ExitEventArgs e) => base.OnExit(e);
|
||||
|
||||
private static ContextMenuStrip BuildTrayMenu()
|
||||
{
|
||||
ContextMenuStrip contextMenuStrip = new ContextMenuStrip();
|
||||
contextMenuStrip.Renderer = (ToolStripRenderer) new DarkMenuRenderer();
|
||||
contextMenuStrip.Padding = new Padding(0, 4, 0, 4);
|
||||
ToolStripMenuItem toolStripMenuItem1 = new ToolStripMenuItem("Open website");
|
||||
toolStripMenuItem1.Font = new Font("Segoe UI", 9f);
|
||||
toolStripMenuItem1.Image = (Image) App.MakeGlyph("\uE909", Color.FromArgb(180, 180, 180));
|
||||
ToolStripMenuItem toolStripMenuItem2 = toolStripMenuItem1;
|
||||
toolStripMenuItem2.Click += (EventHandler) ((s, e) => App.OpenWeb());
|
||||
contextMenuStrip.Items.Add((ToolStripItem) toolStripMenuItem2);
|
||||
ToolStripMenuItem toolStripMenuItem3 = new ToolStripMenuItem("Your information");
|
||||
toolStripMenuItem3.Font = new Font("Segoe UI", 9f);
|
||||
toolStripMenuItem3.Image = (Image) App.MakeGlyph("\uE8B7", Color.FromArgb(180, 180, 180));
|
||||
ToolStripMenuItem toolStripMenuItem4 = toolStripMenuItem3;
|
||||
toolStripMenuItem4.Click += (EventHandler) ((s, e) => App.OpenInformation());
|
||||
contextMenuStrip.Items.Add((ToolStripItem) toolStripMenuItem4);
|
||||
contextMenuStrip.Items.Add((ToolStripItem) new ToolStripSeparator());
|
||||
ToolStripMenuItem toolStripMenuItem5 = new ToolStripMenuItem("Exit");
|
||||
toolStripMenuItem5.Font = new Font("Segoe UI", 9f);
|
||||
toolStripMenuItem5.Image = (Image) App.MakeGlyph("\uE7E8", Color.FromArgb(239, 83, 80 /*0x50*/));
|
||||
ToolStripMenuItem toolStripMenuItem6 = toolStripMenuItem5;
|
||||
toolStripMenuItem6.Click += (EventHandler) ((s, e) => App.ExitApp());
|
||||
contextMenuStrip.Items.Add((ToolStripItem) toolStripMenuItem6);
|
||||
return contextMenuStrip;
|
||||
}
|
||||
|
||||
private static void OpenWeb() => Process.Start("https://raton.onimai.org");
|
||||
|
||||
private static void OpenInformation()
|
||||
{
|
||||
if (!Directory.Exists(Program.appData))
|
||||
Directory.CreateDirectory(Program.appData);
|
||||
Process.Start("explorer.exe", Program.appData);
|
||||
}
|
||||
|
||||
private static void ExitApp() => System.Windows.Application.Current.Shutdown();
|
||||
|
||||
private static Bitmap MakeGlyph(string glyph, Color color, int size = 16 /*0x10*/)
|
||||
{
|
||||
Bitmap bitmap = new Bitmap(size, size, PixelFormat.Format32bppArgb);
|
||||
using (Graphics graphics = Graphics.FromImage((Image) bitmap))
|
||||
{
|
||||
graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
graphics.Clear(Color.Transparent);
|
||||
using (Font font = new Font("Segoe MDL2 Assets", (float) size * 0.72f, System.Drawing.FontStyle.Regular, GraphicsUnit.Pixel))
|
||||
{
|
||||
using (SolidBrush solidBrush = new SolidBrush(color))
|
||||
{
|
||||
SizeF sizeF = graphics.MeasureString(glyph, font);
|
||||
graphics.DrawString(glyph, font, (Brush) solidBrush, (float) (((double) size - (double) sizeF.Width) / 2.0), (float) (((double) size - (double) sizeF.Height) / 2.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
[DebuggerNonUserCode]
|
||||
[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
|
||||
public static void Main() => new App().Run();
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.ClientRow
|
||||
// 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 System.ComponentModel;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class ClientRow : INotifyPropertyChanged
|
||||
{
|
||||
private BitmapImage _flag;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void OnProp(string n)
|
||||
{
|
||||
PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
|
||||
if (propertyChanged == null)
|
||||
return;
|
||||
propertyChanged((object) this, new PropertyChangedEventArgs(n));
|
||||
}
|
||||
|
||||
public string Client { get; set; }
|
||||
|
||||
public string Tag { get; set; }
|
||||
|
||||
public string User { get; set; }
|
||||
|
||||
public string ID { get; set; }
|
||||
|
||||
public string OS { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
|
||||
public string Running { get; set; }
|
||||
|
||||
public string AV { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public string Date { get; set; }
|
||||
|
||||
public string Payload { get; set; }
|
||||
|
||||
public string Country { get; set; }
|
||||
|
||||
public BitmapImage Flag
|
||||
{
|
||||
get => this._flag;
|
||||
set
|
||||
{
|
||||
this._flag = value;
|
||||
this.OnProp(nameof (Flag));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.DarkColorTable
|
||||
// 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 System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
internal class DarkColorTable : ProfessionalColorTable
|
||||
{
|
||||
private static readonly Color Bg = Color.FromArgb(36, 36, 36);
|
||||
private static readonly Color Hov = Color.FromArgb(55, 55, 55);
|
||||
|
||||
public override Color MenuBorder => Color.FromArgb(65, 65, 65);
|
||||
|
||||
public override Color MenuItemBorder => Color.Transparent;
|
||||
|
||||
public override Color MenuItemSelected => DarkColorTable.Hov;
|
||||
|
||||
public override Color MenuItemSelectedGradientBegin => DarkColorTable.Hov;
|
||||
|
||||
public override Color MenuItemSelectedGradientEnd => DarkColorTable.Hov;
|
||||
|
||||
public override Color MenuItemPressedGradientBegin => Color.FromArgb(45, 45, 45);
|
||||
|
||||
public override Color MenuItemPressedGradientEnd => Color.FromArgb(45, 45, 45);
|
||||
|
||||
public override Color ToolStripDropDownBackground => DarkColorTable.Bg;
|
||||
|
||||
public override Color ImageMarginGradientBegin => DarkColorTable.Bg;
|
||||
|
||||
public override Color ImageMarginGradientMiddle => DarkColorTable.Bg;
|
||||
|
||||
public override Color ImageMarginGradientEnd => DarkColorTable.Bg;
|
||||
|
||||
public override Color SeparatorDark => Color.FromArgb(62, 62, 62);
|
||||
|
||||
public override Color SeparatorLight => Color.FromArgb(62, 62, 62);
|
||||
|
||||
public override Color CheckBackground => Color.FromArgb(55, 55, 55);
|
||||
|
||||
public override Color CheckSelectedBackground => Color.FromArgb(70, 70, 70);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.DarkMenuRenderer
|
||||
// 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 System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
internal class DarkMenuRenderer : ToolStripProfessionalRenderer
|
||||
{
|
||||
private static readonly Color BgColor = Color.FromArgb(36, 36, 36);
|
||||
private static readonly Color HoverColor = Color.FromArgb(55, 55, 55);
|
||||
private static readonly Color SeparatorColor = Color.FromArgb(62, 62, 62);
|
||||
private static readonly Color TextColor = Color.FromArgb(221, 221, 221);
|
||||
private static readonly Color DisabledColor = Color.FromArgb(100, 100, 100);
|
||||
private static readonly Color BorderColor = Color.FromArgb(65, 65, 65);
|
||||
|
||||
public DarkMenuRenderer()
|
||||
: base((ProfessionalColorTable) new DarkColorTable())
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
|
||||
{
|
||||
using (SolidBrush solidBrush = new SolidBrush(DarkMenuRenderer.BgColor))
|
||||
e.Graphics.FillRectangle((Brush) solidBrush, e.AffectedBounds);
|
||||
}
|
||||
|
||||
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
|
||||
{
|
||||
Rectangle affectedBounds = e.AffectedBounds;
|
||||
--affectedBounds.Width;
|
||||
--affectedBounds.Height;
|
||||
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
using (Pen pen = new Pen(DarkMenuRenderer.BorderColor, 1f))
|
||||
{
|
||||
using (GraphicsPath path = DarkMenuRenderer.RoundRect(affectedBounds, 6))
|
||||
e.Graphics.DrawPath(pen, path);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
|
||||
{
|
||||
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
ToolStripItem toolStripItem = e.Item;
|
||||
Rectangle rect = new Rectangle(4, 1, toolStripItem.Width - 8, toolStripItem.Height - 2);
|
||||
if (toolStripItem.Selected && toolStripItem.Enabled)
|
||||
{
|
||||
using (SolidBrush solidBrush = new SolidBrush(DarkMenuRenderer.HoverColor))
|
||||
{
|
||||
using (GraphicsPath path = DarkMenuRenderer.RoundRect(rect, 4))
|
||||
e.Graphics.FillPath((Brush) solidBrush, path);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (SolidBrush solidBrush = new SolidBrush(DarkMenuRenderer.BgColor))
|
||||
e.Graphics.FillRectangle((Brush) solidBrush, toolStripItem.ContentRectangle);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnRenderImageMargin(ToolStripRenderEventArgs e)
|
||||
{
|
||||
using (SolidBrush solidBrush = new SolidBrush(DarkMenuRenderer.BgColor))
|
||||
e.Graphics.FillRectangle((Brush) solidBrush, e.AffectedBounds);
|
||||
}
|
||||
|
||||
protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e)
|
||||
{
|
||||
int num = e.Item.Height / 2;
|
||||
using (Pen pen = new Pen(DarkMenuRenderer.SeparatorColor, 1f))
|
||||
e.Graphics.DrawLine(pen, 8, num, e.Item.Width - 8, num);
|
||||
}
|
||||
|
||||
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
|
||||
{
|
||||
e.TextColor = e.Item.Enabled ? DarkMenuRenderer.TextColor : DarkMenuRenderer.DisabledColor;
|
||||
base.OnRenderItemText(e);
|
||||
}
|
||||
|
||||
protected override void OnRenderItemImage(ToolStripItemImageRenderEventArgs e)
|
||||
{
|
||||
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
base.OnRenderItemImage(e);
|
||||
}
|
||||
|
||||
private static GraphicsPath RoundRect(Rectangle rect, int radius)
|
||||
{
|
||||
int num = radius * 2;
|
||||
GraphicsPath graphicsPath = new GraphicsPath();
|
||||
graphicsPath.AddArc(rect.X, rect.Y, num, num, 180f, 90f);
|
||||
graphicsPath.AddArc(rect.Right - num, rect.Y, num, num, 270f, 90f);
|
||||
graphicsPath.AddArc(rect.Right - num, rect.Bottom - num, num, num, 0.0f, 90f);
|
||||
graphicsPath.AddArc(rect.X, rect.Bottom - num, num, num, 90f, 90f);
|
||||
graphicsPath.CloseFigure();
|
||||
return graphicsPath;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.FavoritePicker
|
||||
// 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 Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class FavoritePicker : Window
|
||||
{
|
||||
private const int DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
||||
|
||||
[DllImport("dwmapi.dll")]
|
||||
private static extern int DwmSetWindowAttribute(
|
||||
IntPtr hwnd,
|
||||
int attr,
|
||||
ref int attrValue,
|
||||
int attrSize);
|
||||
|
||||
public string SelectedHeader { get; private set; }
|
||||
|
||||
public FavoritePicker(List<string> items, string action)
|
||||
{
|
||||
this.Title = action;
|
||||
this.Width = 340.0;
|
||||
this.Height = 460.0;
|
||||
this.Background = (Brush) new SolidColorBrush(System.Windows.Media.Color.FromRgb((byte) 36, (byte) 36, (byte) 36));
|
||||
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
this.ResizeMode = ResizeMode.NoResize;
|
||||
Grid grid = new Grid();
|
||||
grid.RowDefinitions.Add(new RowDefinition());
|
||||
grid.RowDefinitions.Add(new RowDefinition()
|
||||
{
|
||||
Height = GridLength.Auto
|
||||
});
|
||||
ListBox listBox = new ListBox();
|
||||
listBox.Background = (Brush) Brushes.Transparent;
|
||||
listBox.Foreground = (Brush) Brushes.White;
|
||||
listBox.BorderThickness = new Thickness(0.0);
|
||||
listBox.Margin = new Thickness(10.0);
|
||||
listBox.FontSize = 13.0;
|
||||
ListBox lb = listBox;
|
||||
lb.ItemContainerStyle = this.BuildListItemStyle();
|
||||
items.ForEach((Action<string>) (i => lb.Items.Add((object) i)));
|
||||
Grid.SetRow((UIElement) lb, 0);
|
||||
Button button = new Button();
|
||||
button.Content = (object) action;
|
||||
button.Margin = new Thickness(10.0, 4.0, 10.0, 10.0);
|
||||
button.Padding = new Thickness(0.0, 8.0, 0.0, 8.0);
|
||||
button.Background = (Brush) new SolidColorBrush(System.Windows.Media.Color.FromRgb((byte) 51, (byte) 51, (byte) 51));
|
||||
button.Foreground = (Brush) Brushes.White;
|
||||
button.BorderThickness = new Thickness(0.0);
|
||||
button.FontSize = 13.0;
|
||||
button.Cursor = Cursors.Hand;
|
||||
Button element = button;
|
||||
Grid.SetRow((UIElement) element, 1);
|
||||
element.Click += (RoutedEventHandler) ((s, e) =>
|
||||
{
|
||||
if (!(lb.SelectedItem is string selectedItem2))
|
||||
return;
|
||||
this.SelectedHeader = selectedItem2;
|
||||
this.DialogResult = new bool?(true);
|
||||
});
|
||||
lb.MouseDoubleClick += (MouseButtonEventHandler) ((s, e) =>
|
||||
{
|
||||
if (!(lb.SelectedItem is string selectedItem4))
|
||||
return;
|
||||
this.SelectedHeader = selectedItem4;
|
||||
this.DialogResult = new bool?(true);
|
||||
});
|
||||
grid.Children.Add((UIElement) lb);
|
||||
grid.Children.Add((UIElement) element);
|
||||
this.Content = (object) grid;
|
||||
this.Loaded += (RoutedEventHandler) ((s, e) => this.ApplyDarkMode());
|
||||
}
|
||||
|
||||
private void ApplyDarkMode()
|
||||
{
|
||||
bool flag = this.IsWindowsDarkMode();
|
||||
IntPtr handle = new WindowInteropHelper((Window) this).Handle;
|
||||
int attrValue = flag ? 1 : 0;
|
||||
FavoritePicker.DwmSetWindowAttribute(handle, 20, ref attrValue, Marshal.SizeOf(typeof (int)));
|
||||
}
|
||||
|
||||
private bool IsWindowsDarkMode()
|
||||
{
|
||||
using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"))
|
||||
{
|
||||
if (registryKey != null)
|
||||
{
|
||||
if (registryKey.GetValue("AppsUseLightTheme") is int num)
|
||||
return num == 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Style BuildListItemStyle()
|
||||
{
|
||||
Style style = new Style(typeof (ListBoxItem));
|
||||
style.Setters.Add((SetterBase) new Setter(Control.BackgroundProperty, (object) Brushes.Transparent));
|
||||
style.Setters.Add((SetterBase) new Setter(Control.ForegroundProperty, (object) Brushes.White));
|
||||
style.Setters.Add((SetterBase) new Setter(Control.PaddingProperty, (object) new Thickness(8.0, 6.0, 8.0, 6.0)));
|
||||
style.Setters.Add((SetterBase) new Setter(Control.BorderThicknessProperty, (object) new Thickness(0.0)));
|
||||
Trigger trigger1 = new Trigger()
|
||||
{
|
||||
Property = UIElement.IsMouseOverProperty,
|
||||
Value = (object) true
|
||||
};
|
||||
trigger1.Setters.Add((SetterBase) new Setter(Control.BackgroundProperty, (object) new SolidColorBrush(System.Windows.Media.Color.FromRgb((byte) 51, (byte) 51, (byte) 51))));
|
||||
Trigger trigger2 = new Trigger()
|
||||
{
|
||||
Property = ListBoxItem.IsSelectedProperty,
|
||||
Value = (object) true
|
||||
};
|
||||
trigger2.Setters.Add((SetterBase) new Setter(Control.BackgroundProperty, (object) new SolidColorBrush(System.Windows.Media.Color.FromRgb((byte) 58, (byte) 58, (byte) 58))));
|
||||
style.Triggers.Add((TriggerBase) trigger1);
|
||||
style.Triggers.Add((TriggerBase) trigger2);
|
||||
return style;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.FriendItem
|
||||
// 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
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class FriendItem
|
||||
{
|
||||
public string Username { get; set; }
|
||||
|
||||
public string DisplayName { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.FriendsWindow
|
||||
// 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 DarkModeForms;
|
||||
using Raton.Classes;
|
||||
using RatonBack;
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Collections;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Markup;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public partial class FriendsWindow : Window
|
||||
{
|
||||
private readonly ObservableCollection<FriendItem> _friends = new ObservableCollection<FriendItem>();
|
||||
private const int DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
||||
|
||||
public string User { get; set; }
|
||||
|
||||
public string DeviceId { get; set; }
|
||||
|
||||
[DllImport("dwmapi.dll", CharSet = CharSet.Auto)]
|
||||
private static extern int DwmSetWindowAttribute(
|
||||
IntPtr hwnd,
|
||||
int attr,
|
||||
ref int attrValue,
|
||||
int attrSize);
|
||||
|
||||
public FriendsWindow()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.FriendsList.ItemsSource = (IEnumerable) this._friends;
|
||||
this.Loaded += new RoutedEventHandler(this.FriendsWindow_Loaded);
|
||||
}
|
||||
|
||||
private async void FriendsWindow_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FriendsWindow friendsWindow = this;
|
||||
friendsWindow.ApplyDarkTitle();
|
||||
string id = await BackendClient.GetID(friendsWindow.DeviceId);
|
||||
if (!friendsWindow.IsLoaded)
|
||||
return;
|
||||
friendsWindow.TbAccountHeader.Text = $"Your friends (Account ID: {id})";
|
||||
await friendsWindow.LoadFriends();
|
||||
}
|
||||
|
||||
private async Task LoadFriends()
|
||||
{
|
||||
(int, string[], string) friends = await BackendClient.GetFriends(this.DeviceId, this.User);
|
||||
this._friends.Clear();
|
||||
if (friends.Item2 == null)
|
||||
return;
|
||||
foreach (string a in friends.Item2)
|
||||
{
|
||||
string str = $"{a} (@{a})";
|
||||
if (string.Equals(a, "osaka", StringComparison.OrdinalIgnoreCase))
|
||||
str = "osaka (@Silly)";
|
||||
this._friends.Add(new FriendItem()
|
||||
{
|
||||
Username = a,
|
||||
DisplayName = str
|
||||
});
|
||||
}
|
||||
if (Application.Current.MainWindow is MainWindow mainWindow)
|
||||
mainWindow.statFriends.Text = friends.Item1.ToString();
|
||||
try
|
||||
{
|
||||
int num = await BackendClient.ValidateSessionFlags(DeviceManager.GetHWID(), DeviceManager.GetOrCreateId()) ? 1 : 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
int num = (int) MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Hand);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void TbFriendId_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
this.TbPlaceholder.Visibility = string.IsNullOrEmpty(this.TbFriendId.Text) ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private async void BtnAdd_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string friendDeviceId = this.TbFriendId.Text.Trim();
|
||||
if (string.IsNullOrWhiteSpace(friendDeviceId))
|
||||
{
|
||||
int num1 = (int) Messenger.MessageBox("Please enter a friend ID.", "Missing ID", icon: MessageBoxImage.Exclamation);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
this.BtnAdd.IsEnabled = false;
|
||||
if (await BackendClient.AddFriend(this.DeviceId, friendDeviceId))
|
||||
{
|
||||
this.TbFriendId.Clear();
|
||||
await this.LoadFriends();
|
||||
int num2 = (int) Messenger.MessageBox("Friend added successfully.", "Success", icon: MessageBoxImage.Asterisk);
|
||||
}
|
||||
else
|
||||
{
|
||||
int num3 = (int) Messenger.MessageBox("Failed to add friend.", "Error", icon: MessageBoxImage.Hand);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
int num4 = (int) Messenger.MessageBox(ex.Message, "Backend error", icon: MessageBoxImage.Hand);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.BtnAdd.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void BtnRemove_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(this.FriendsList.SelectedItem is FriendItem selectedItem))
|
||||
{
|
||||
int num1 = (int) Messenger.MessageBox("Select a friend first.", "Nothing selected", icon: MessageBoxImage.Exclamation);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
this.BtnRemove.IsEnabled = false;
|
||||
bool flag = await BackendClient.RemoveFriend(this.DeviceId, this.User, selectedItem.Username);
|
||||
int num2 = (int) Messenger.MessageBox(flag ? "Friend removed." : "Failed to remove friend.", flag ? "Success" : "Warning", icon: MessageBoxImage.Asterisk);
|
||||
await this.LoadFriends();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
int num3 = (int) Messenger.MessageBox(ex.Message, "Backend error", icon: MessageBoxImage.Hand);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.BtnRemove.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void BtnShareLink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FriendsWindow friendsWindow = this;
|
||||
ShareLinkDialog shareLinkDialog1 = new ShareLinkDialog();
|
||||
shareLinkDialog1.Owner = (Window) friendsWindow;
|
||||
ShareLinkDialog shareLinkDialog2 = shareLinkDialog1;
|
||||
bool? nullable = shareLinkDialog2.ShowDialog();
|
||||
bool flag1 = true;
|
||||
if (!(nullable.GetValueOrDefault() == flag1 & nullable.HasValue))
|
||||
return;
|
||||
string str = shareLinkDialog2.LinkText.Trim();
|
||||
Uri result;
|
||||
if (!Uri.TryCreate(str, UriKind.Absolute, out result) || !(result.Scheme == Uri.UriSchemeHttp) && !(result.Scheme == Uri.UriSchemeHttps) || !str.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
int num1 = (int) Messenger.MessageBox("Only direct .exe links allowed.", "Invalid link", icon: MessageBoxImage.Exclamation);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
friendsWindow.BtnShareLink.IsEnabled = false;
|
||||
bool flag2 = await BackendClient.SetFriendLink(friendsWindow.DeviceId, friendsWindow.User, str);
|
||||
int num2 = (int) Messenger.MessageBox(flag2 ? "Share link updated successfully." : "Failed to update link.", flag2 ? "Success" : "Error", icon: flag2 ? MessageBoxImage.Asterisk : MessageBoxImage.Hand);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
int num3 = (int) Messenger.MessageBox(ex.Message, "Backend error", icon: MessageBoxImage.Hand);
|
||||
}
|
||||
finally
|
||||
{
|
||||
friendsWindow.BtnShareLink.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyDarkTitle()
|
||||
{
|
||||
IntPtr handle = new WindowInteropHelper((Window) this).Handle;
|
||||
int attrValue = 1;
|
||||
FriendsWindow.DwmSetWindowAttribute(handle, 20, ref attrValue, Marshal.SizeOf(typeof (int)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.LogEntry
|
||||
// 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
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class LogEntry
|
||||
{
|
||||
public string Time { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
|
||||
public LogType Type { get; set; }
|
||||
|
||||
public string IconGlyph
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (this.Type)
|
||||
{
|
||||
case LogType.Success:
|
||||
return "\uE73E";
|
||||
case LogType.Error:
|
||||
return "\uEA39";
|
||||
default:
|
||||
return "\uE946";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string IconColor
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (this.Type)
|
||||
{
|
||||
case LogType.Success:
|
||||
return "#4CAF50";
|
||||
case LogType.Error:
|
||||
return "#EF5350";
|
||||
default:
|
||||
return "#4A94BC";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string TextColor
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (this.Type)
|
||||
{
|
||||
case LogType.Success:
|
||||
return "#4CAF50";
|
||||
case LogType.Error:
|
||||
return "#EF5350";
|
||||
default:
|
||||
return "#4A94BC";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.LogType
|
||||
// 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
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public enum LogType
|
||||
{
|
||||
Info,
|
||||
Success,
|
||||
Error,
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.ScreenTile
|
||||
// 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
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class ScreenTile
|
||||
{
|
||||
public string Uid { get; set; }
|
||||
|
||||
public byte[] ImageBytes { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.SearchDialog
|
||||
// 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 System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class SearchDialog : Window
|
||||
{
|
||||
private readonly TextBox _tb;
|
||||
|
||||
public string SearchText { get; private set; }
|
||||
|
||||
public SearchDialog()
|
||||
{
|
||||
this.Title = "Search logs";
|
||||
this.Width = 400.0;
|
||||
this.Height = 148.0;
|
||||
this.ResizeMode = ResizeMode.NoResize;
|
||||
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
this.Background = (Brush) new SolidColorBrush(Color.FromRgb((byte) 36, (byte) 36, (byte) 36));
|
||||
Grid grid1 = new Grid();
|
||||
grid1.Margin = new Thickness(16.0);
|
||||
Grid grid2 = grid1;
|
||||
grid2.RowDefinitions.Add(new RowDefinition()
|
||||
{
|
||||
Height = GridLength.Auto
|
||||
});
|
||||
grid2.RowDefinitions.Add(new RowDefinition()
|
||||
{
|
||||
Height = GridLength.Auto
|
||||
});
|
||||
grid2.RowDefinitions.Add(new RowDefinition()
|
||||
{
|
||||
Height = GridLength.Auto
|
||||
});
|
||||
TextBlock textBlock = new TextBlock();
|
||||
textBlock.Text = "Search in logs:";
|
||||
textBlock.Foreground = (Brush) Brushes.Gray;
|
||||
textBlock.FontSize = 12.0;
|
||||
textBlock.Margin = new Thickness(0.0, 0.0, 0.0, 6.0);
|
||||
TextBlock element1 = textBlock;
|
||||
Grid.SetRow((UIElement) element1, 0);
|
||||
TextBox textBox = new TextBox();
|
||||
textBox.Background = (Brush) new SolidColorBrush(Color.FromRgb((byte) 28, (byte) 28, (byte) 28));
|
||||
textBox.Foreground = (Brush) Brushes.White;
|
||||
textBox.CaretBrush = (Brush) Brushes.White;
|
||||
textBox.BorderBrush = (Brush) new SolidColorBrush(Color.FromRgb((byte) 58, (byte) 58, (byte) 58));
|
||||
textBox.BorderThickness = new Thickness(1.0);
|
||||
textBox.Padding = new Thickness(6.0, 4.0, 6.0, 4.0);
|
||||
textBox.FontSize = 13.0;
|
||||
textBox.Margin = new Thickness(0.0, 0.0, 0.0, 10.0);
|
||||
this._tb = textBox;
|
||||
this._tb.KeyDown += (KeyEventHandler) ((s, e) =>
|
||||
{
|
||||
if (e.Key == Key.Return)
|
||||
this.Confirm();
|
||||
if (e.Key != Key.Escape)
|
||||
return;
|
||||
this.DialogResult = new bool?(false);
|
||||
});
|
||||
Grid.SetRow((UIElement) this._tb, 1);
|
||||
StackPanel stackPanel = new StackPanel();
|
||||
stackPanel.Orientation = Orientation.Horizontal;
|
||||
stackPanel.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
StackPanel element2 = stackPanel;
|
||||
Grid.SetRow((UIElement) element2, 2);
|
||||
element2.Children.Add((UIElement) SearchDialog.MakeButton("Cancel", (Action) (() => this.DialogResult = new bool?(false)), "#383838"));
|
||||
element2.Children.Add((UIElement) SearchDialog.MakeButton("Search", new Action(this.Confirm), "#4C4C8A"));
|
||||
grid2.Children.Add((UIElement) element1);
|
||||
grid2.Children.Add((UIElement) this._tb);
|
||||
grid2.Children.Add((UIElement) element2);
|
||||
this.Content = (object) grid2;
|
||||
this.Loaded += (RoutedEventHandler) ((s, e) => this._tb.Focus());
|
||||
}
|
||||
|
||||
private void Confirm()
|
||||
{
|
||||
this.SearchText = this._tb.Text;
|
||||
this.DialogResult = new bool?(true);
|
||||
}
|
||||
|
||||
private static Button MakeButton(string text, Action onClick, string hexBg)
|
||||
{
|
||||
Button button1 = new Button();
|
||||
button1.Content = (object) text;
|
||||
button1.Padding = new Thickness(16.0, 6.0, 16.0, 6.0);
|
||||
button1.Margin = new Thickness(6.0, 0.0, 0.0, 0.0);
|
||||
button1.Background = (Brush) new SolidColorBrush((Color) ColorConverter.ConvertFromString(hexBg));
|
||||
button1.Foreground = (Brush) Brushes.White;
|
||||
button1.BorderThickness = new Thickness(0.0);
|
||||
button1.Cursor = Cursors.Hand;
|
||||
Button button2 = button1;
|
||||
button2.Click += (RoutedEventHandler) ((s, e) => onClick());
|
||||
return button2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.ShareLinkDialog
|
||||
// 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 System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public class ShareLinkDialog : Window
|
||||
{
|
||||
private readonly TextBox _tb;
|
||||
|
||||
public string LinkText { get; private set; }
|
||||
|
||||
public ShareLinkDialog()
|
||||
{
|
||||
this.Title = "Set share link";
|
||||
this.Width = 440.0;
|
||||
this.Height = 160.0;
|
||||
this.ResizeMode = ResizeMode.NoResize;
|
||||
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
this.Background = (Brush) new SolidColorBrush(Color.FromRgb((byte) 36, (byte) 36, (byte) 36));
|
||||
Grid grid1 = new Grid();
|
||||
grid1.Margin = new Thickness(16.0);
|
||||
Grid grid2 = grid1;
|
||||
grid2.RowDefinitions.Add(new RowDefinition()
|
||||
{
|
||||
Height = GridLength.Auto
|
||||
});
|
||||
grid2.RowDefinitions.Add(new RowDefinition()
|
||||
{
|
||||
Height = GridLength.Auto
|
||||
});
|
||||
grid2.RowDefinitions.Add(new RowDefinition()
|
||||
{
|
||||
Height = GridLength.Auto
|
||||
});
|
||||
TextBlock textBlock = new TextBlock();
|
||||
textBlock.Text = "Set your share link — must be a direct .exe URL (e.g. raw.github.com/…/file.exe)";
|
||||
textBlock.Foreground = (Brush) Brushes.Gray;
|
||||
textBlock.FontSize = 11.0;
|
||||
textBlock.TextWrapping = TextWrapping.Wrap;
|
||||
textBlock.Margin = new Thickness(0.0, 0.0, 0.0, 8.0);
|
||||
TextBlock element1 = textBlock;
|
||||
Grid.SetRow((UIElement) element1, 0);
|
||||
TextBox textBox = new TextBox();
|
||||
textBox.Background = (Brush) new SolidColorBrush(Color.FromRgb((byte) 28, (byte) 28, (byte) 28));
|
||||
textBox.Foreground = (Brush) Brushes.White;
|
||||
textBox.CaretBrush = (Brush) Brushes.White;
|
||||
textBox.BorderBrush = (Brush) new SolidColorBrush(Color.FromRgb((byte) 58, (byte) 58, (byte) 58));
|
||||
textBox.BorderThickness = new Thickness(1.0);
|
||||
textBox.Padding = new Thickness(8.0, 4.0, 8.0, 4.0);
|
||||
textBox.FontSize = 12.0;
|
||||
textBox.Margin = new Thickness(0.0, 0.0, 0.0, 10.0);
|
||||
this._tb = textBox;
|
||||
this._tb.KeyDown += (KeyEventHandler) ((s, ev) =>
|
||||
{
|
||||
if (ev.Key == Key.Return)
|
||||
this.Confirm();
|
||||
if (ev.Key != Key.Escape)
|
||||
return;
|
||||
this.DialogResult = new bool?(false);
|
||||
});
|
||||
Grid.SetRow((UIElement) this._tb, 1);
|
||||
StackPanel stackPanel = new StackPanel();
|
||||
stackPanel.Orientation = Orientation.Horizontal;
|
||||
stackPanel.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
StackPanel element2 = stackPanel;
|
||||
Grid.SetRow((UIElement) element2, 2);
|
||||
element2.Children.Add((UIElement) ShareLinkDialog.MakeBtn("Cancel", (Action) (() => this.DialogResult = new bool?(false)), "#383838"));
|
||||
element2.Children.Add((UIElement) ShareLinkDialog.MakeBtn("Save", new Action(this.Confirm), "#7B5EA7"));
|
||||
grid2.Children.Add((UIElement) element1);
|
||||
grid2.Children.Add((UIElement) this._tb);
|
||||
grid2.Children.Add((UIElement) element2);
|
||||
this.Content = (object) grid2;
|
||||
this.Loaded += (RoutedEventHandler) ((s, ev) => this._tb.Focus());
|
||||
}
|
||||
|
||||
private void Confirm()
|
||||
{
|
||||
this.LinkText = this._tb.Text;
|
||||
this.DialogResult = new bool?(true);
|
||||
}
|
||||
|
||||
private static Button MakeBtn(string text, Action onClick, string bg)
|
||||
{
|
||||
Button button1 = new Button();
|
||||
button1.Content = (object) text;
|
||||
button1.Padding = new Thickness(16.0, 6.0, 16.0, 6.0);
|
||||
button1.Margin = new Thickness(6.0, 0.0, 0.0, 0.0);
|
||||
button1.Background = (Brush) new SolidColorBrush((Color) ColorConverter.ConvertFromString(bg));
|
||||
button1.Foreground = (Brush) Brushes.White;
|
||||
button1.BorderThickness = new Thickness(0.0);
|
||||
button1.Cursor = Cursors.Hand;
|
||||
Button button2 = button1;
|
||||
button2.Click += (RoutedEventHandler) ((s, e) => onClick());
|
||||
return button2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.StatsUpdater
|
||||
// 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 System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1;
|
||||
|
||||
public static class StatsUpdater
|
||||
{
|
||||
public static async Task Update()
|
||||
{
|
||||
await Task.Delay(500);
|
||||
if (MainWindow.form2 == null)
|
||||
return;
|
||||
Task task = await MainWindow.form2.Dispatcher.InvokeAsync<Task>((Func<Task>) (async () =>
|
||||
{
|
||||
ObservableCollection<ClientRow> clients = MainWindow.form2.Clients;
|
||||
int current = clients.Count<ClientRow>((Func<ClientRow, bool>) (c => c.Status.Equals("Connected", StringComparison.OrdinalIgnoreCase)));
|
||||
int num = clients.Count<ClientRow>((Func<ClientRow, bool>) (c => c.Status.Equals("Disconnected", StringComparison.OrdinalIgnoreCase)));
|
||||
MainWindow.form2.StatOnline.Text = current.ToString();
|
||||
MainWindow.form2.StatOffline.Text = num.ToString();
|
||||
RateCalculator rateCalculator = new RateCalculator((double) current, (double) (current + num));
|
||||
TextBlock textBlock = MainWindow.form2.StatRate;
|
||||
textBlock.Text = await rateCalculator.GetFormattedPercentage(1);
|
||||
textBlock = (TextBlock) null;
|
||||
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Clients");
|
||||
MainWindow.form2.StatFolders.Text = !Directory.Exists(path) ? "0" : Directory.GetDirectories(path).Length.ToString();
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: WpfApp1.Windows.Port
|
||||
// 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 Microsoft.CSharp.RuntimeBinder;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Raton.Classes;
|
||||
using RatonBack;
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
#nullable disable
|
||||
namespace WpfApp1.Windows;
|
||||
|
||||
public partial class Port : Window
|
||||
{
|
||||
private const int DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
||||
private static readonly string InfoPath = System.IO.Path.Combine(MainWindow.appData, "DONOTSHARE.json");
|
||||
private static readonly string PortsPath = System.IO.Path.Combine(MainWindow.appData, "ports.json");
|
||||
private string _user;
|
||||
private string _savedPassword;
|
||||
private int _attempts;
|
||||
private bool _busy;
|
||||
private bool _closing;
|
||||
private static string[] Subtitles;
|
||||
|
||||
public static Listen ListenerInstance { get; private set; }
|
||||
|
||||
[DllImport("dwmapi.dll", CharSet = CharSet.Auto)]
|
||||
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int val, int size);
|
||||
|
||||
public string EnteredPassword { get; private set; }
|
||||
|
||||
public int EnteredPort { get; private set; }
|
||||
|
||||
public bool LoginSuccess { get; private set; }
|
||||
|
||||
public Port()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(Port.InfoPath))
|
||||
{
|
||||
JObject json = JObject.Parse(File.ReadAllText(Port.InfoPath));
|
||||
this._user = json["Username"]?.ToString();
|
||||
this._savedPassword = json["Password"]?.ToString();
|
||||
}
|
||||
|
||||
Port.Subtitles = new string[47]
|
||||
{
|
||||
$"We are happy to see you, {this._user}!",
|
||||
"Who are you going to rat?",
|
||||
"Remember to drink water",
|
||||
"Time to set some ports",
|
||||
"Nice profile picture :O",
|
||||
"I'll wait for you, don't worry",
|
||||
"Does anyone read this? :(",
|
||||
"Still alive? What a miracle",
|
||||
"Better than pulsar",
|
||||
"Dark mode >>> Light mode",
|
||||
"Happy ratting :)",
|
||||
"From real rats to the world",
|
||||
"Silly pls fix HVNC!!!",
|
||||
"Portmap sucks",
|
||||
"The speed doesn't depends on Raton",
|
||||
"Adam you should kys now!!!!!!!!",
|
||||
"Raton exit scam",
|
||||
"Get vexal crypter 8)",
|
||||
"Stability fixed rn",
|
||||
"I think this is a new update...",
|
||||
"Raton CLI is more classic",
|
||||
"Yummy botnets",
|
||||
"Consider checking the draw command",
|
||||
"The best rat ever (Maybe)",
|
||||
"100+ functions!",
|
||||
"Can i buy deluxe",
|
||||
":sob:",
|
||||
"Yeepers1 can't rat anyone :sob:",
|
||||
"67h4 extorts people",
|
||||
"Made ts just for fun :3",
|
||||
"Fuck xworm!",
|
||||
"Silly is one sexy man",
|
||||
$"{this._user} or {Environment.UserName}",
|
||||
"Exit scam when!!!!",
|
||||
"Leave a review on our Telegram",
|
||||
"Suggestions? Bugs? Join the Telegram",
|
||||
"Take your time, those clients can wait",
|
||||
"Thanks for choosing Raton!",
|
||||
"I like cats and rats",
|
||||
"McChicken",
|
||||
"@SillyCs: OrcusRAT my goat",
|
||||
"Best (maybe) free and safest rat :D",
|
||||
"We do daily bug fixes on telegram",
|
||||
"Raton means rat in spanish",
|
||||
"I would like to order a happy meal",
|
||||
$"\"{this._user}\" what a name...",
|
||||
"(Insert random message here)"
|
||||
};
|
||||
}
|
||||
catch
|
||||
{
|
||||
this._user = Environment.UserName;
|
||||
this._savedPassword = string.Empty;
|
||||
}
|
||||
this.InitializeComponent();
|
||||
this.TbPort.KeyDown += (KeyEventHandler) ((s, e) =>
|
||||
{
|
||||
if (e.Key != Key.Return)
|
||||
return;
|
||||
this.TryLoginAsync();
|
||||
});
|
||||
this.PbPassword.KeyDown += (KeyEventHandler) ((s, e) =>
|
||||
{
|
||||
if (e.Key != Key.Return)
|
||||
return;
|
||||
this.TryLoginAsync();
|
||||
});
|
||||
this.Loaded += new RoutedEventHandler(this.Port_Loaded);
|
||||
}
|
||||
|
||||
private async void Port_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.ApplyDarkTitleBar();
|
||||
this.SetGreeting();
|
||||
this.LoadPort();
|
||||
this.LoadAvatar();
|
||||
if (!string.IsNullOrWhiteSpace(this._savedPassword))
|
||||
{
|
||||
this.PbPassword.Password = this._savedPassword;
|
||||
if (await BackendClient.Login(DeviceManager.GetHWID(), DeviceManager.GetOrCreateId(), this._savedPassword, this._user) && BackendClient.IsLoggedIn())
|
||||
{
|
||||
this.PbPassword.IsEnabled = false;
|
||||
this.SetStatus("Session token active", "#4CAF50");
|
||||
}
|
||||
}
|
||||
this.PbPassword.Focus();
|
||||
try
|
||||
{
|
||||
int num = await BackendClient.ValidateSessionFlags(DeviceManager.GetHWID(), DeviceManager.GetOrCreateId()) ? 1 : 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
int num = (int) MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Hand);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetGreeting()
|
||||
{
|
||||
int hour = DateTime.Now.Hour;
|
||||
this.TbGreeting.Text = $"{(hour < 5 || hour >= 12 ? (hour < 12 || hour >= 18 ? (hour < 18 || hour >= 22 ? "Good night" : "Good evening") : "Good afternoon") : "Good morning")}, {this._user}";
|
||||
this.TbSubtitle.Text = Port.Subtitles[new Random().Next(Port.Subtitles.Length)];
|
||||
}
|
||||
|
||||
private void LoadPort()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!File.Exists(Port.PortsPath))
|
||||
return;
|
||||
List<string> stringList = JsonConvert.DeserializeObject<List<string>>(File.ReadAllText(Port.PortsPath));
|
||||
if (stringList == null || stringList.Count <= 0)
|
||||
return;
|
||||
this.TbPort.Text = stringList[stringList.Count - 1];
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void SavePort()
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(MainWindow.appData);
|
||||
List<string> stringList = new List<string>()
|
||||
{
|
||||
this.TbPort.Text.Trim()
|
||||
};
|
||||
File.WriteAllText(Port.PortsPath, JsonConvert.SerializeObject((object) stringList, Formatting.Indented));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void SetStatus(string text, string hexColor)
|
||||
{
|
||||
this.TbStatus.Text = text;
|
||||
this.TbStatus.Foreground = (Brush) new SolidColorBrush((Color) ColorConverter.ConvertFromString(hexColor));
|
||||
this.TbStatus.Visibility = string.IsNullOrEmpty(text) ? Visibility.Hidden : Visibility.Visible;
|
||||
}
|
||||
|
||||
private void BtnLogin_Click(object sender, RoutedEventArgs e) => this.TryLoginAsync();
|
||||
|
||||
private async Task TryLoginAsync()
|
||||
{
|
||||
if (this._busy || this._closing)
|
||||
return;
|
||||
this._busy = true;
|
||||
this.BtnLogin.IsEnabled = false;
|
||||
bool succeeded = false;
|
||||
try
|
||||
{
|
||||
int port;
|
||||
if (!int.TryParse(this.TbPort.Text.Trim(), out port) || port < 1 || port > (int) ushort.MaxValue)
|
||||
{
|
||||
Port.ShakeControl((UIElement) this.TbPort);
|
||||
this.SetStatus("Invalid port number", "#EF5350");
|
||||
return;
|
||||
}
|
||||
this.SetStatus("Checking connection...", "#888899");
|
||||
if (!await Port.IsInternetAvailable())
|
||||
{
|
||||
this.SetStatus("No internet connection", "#EF5350");
|
||||
return;
|
||||
}
|
||||
this.SetStatus("Authenticating...", "#888899");
|
||||
string password = this.PbPassword.Password;
|
||||
if (string.IsNullOrWhiteSpace(password))
|
||||
{
|
||||
this.SetStatus("Please enter your password", "#EF5350");
|
||||
Port.ShakeControl((UIElement) this.PbPassword);
|
||||
return;
|
||||
}
|
||||
if (!await BackendClient.Login(DeviceManager.GetHWID(), DeviceManager.GetOrCreateId(), password, this._user))
|
||||
{
|
||||
this.SetStatus("Incorrect password", "#EF5350");
|
||||
Port.ShakeControl((UIElement) this.PbPassword);
|
||||
return;
|
||||
}
|
||||
this.EnteredPassword = password;
|
||||
this.EnteredPort = port;
|
||||
this.LoginSuccess = true;
|
||||
succeeded = true;
|
||||
this.SetStatus("Welcome to Raton", "#4CAF50");
|
||||
this.SavePort();
|
||||
password = (string) null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.SetStatus("Error: " + ex.Message, "#EF5350");
|
||||
}
|
||||
finally
|
||||
{
|
||||
this._busy = false;
|
||||
if (!succeeded)
|
||||
this.BtnLogin.IsEnabled = true;
|
||||
}
|
||||
if (!succeeded)
|
||||
return;
|
||||
this._closing = true;
|
||||
await Task.Delay(600);
|
||||
this.FadeOutAndClose();
|
||||
}
|
||||
|
||||
private void FadeOutAndClose()
|
||||
{
|
||||
DoubleAnimation doubleAnimation = new DoubleAnimation(1.0, 0.0, new Duration(TimeSpan.FromMilliseconds(300.0)));
|
||||
CubicEase cubicEase = new CubicEase();
|
||||
cubicEase.EasingMode = EasingMode.EaseIn;
|
||||
doubleAnimation.EasingFunction = (IEasingFunction) cubicEase;
|
||||
DoubleAnimation animation = doubleAnimation;
|
||||
animation.Completed += (EventHandler) ((s, e) =>
|
||||
{
|
||||
MainWindow mainWindow = new MainWindow();
|
||||
Application.Current.MainWindow = (Window) mainWindow;
|
||||
mainWindow.WindowState = WindowState.Normal;
|
||||
mainWindow.Activate();
|
||||
this.Close();
|
||||
});
|
||||
this.BeginAnimation(UIElement.OpacityProperty, (AnimationTimeline) animation);
|
||||
}
|
||||
|
||||
private static async Task<bool> IsInternetAvailable()
|
||||
{
|
||||
try
|
||||
{
|
||||
return (await new HttpClient()
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(5.0)
|
||||
}.GetAsync("https://www.google.com")).IsSuccessStatusCode;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static void LaunchUpdater()
|
||||
{
|
||||
try
|
||||
{
|
||||
string str1 = System.IO.Path.Combine(MainWindow.appData, "Updater");
|
||||
Directory.CreateDirectory(str1);
|
||||
string str2 = System.IO.Path.Combine(str1, "RatonUpdater.exe");
|
||||
byte[] ratonUpdater = Raton.Properties.Resources.RatonUpdater;
|
||||
if (!File.Exists(str2) || new FileInfo(str2).Length != (long) ratonUpdater.Length)
|
||||
File.WriteAllBytes(str2, ratonUpdater);
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = str2,
|
||||
UseShellExecute = true,
|
||||
WorkingDirectory = str1
|
||||
});
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadAvatar()
|
||||
{
|
||||
string[] strArray = new string[6]
|
||||
{
|
||||
".png",
|
||||
".jpg",
|
||||
".jpeg",
|
||||
".gif",
|
||||
".bmp",
|
||||
".webp"
|
||||
};
|
||||
string uriString = (string) null;
|
||||
foreach (string str in strArray)
|
||||
{
|
||||
string path = System.IO.Path.Combine(MainWindow.appData, "pfp" + str);
|
||||
if (File.Exists(path))
|
||||
{
|
||||
uriString = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (uriString == null)
|
||||
return;
|
||||
BitmapImage image = new BitmapImage();
|
||||
image.BeginInit();
|
||||
image.CacheOption = BitmapCacheOption.OnLoad;
|
||||
image.UriSource = new Uri(uriString, UriKind.Absolute);
|
||||
image.EndInit();
|
||||
image.Freeze();
|
||||
Ellipse pfpEclipse = this.PfpEclipse;
|
||||
ImageBrush imageBrush = new ImageBrush((ImageSource) image);
|
||||
imageBrush.Stretch = Stretch.UniformToFill;
|
||||
pfpEclipse.Fill = (Brush) imageBrush;
|
||||
}
|
||||
|
||||
private static void ShakeControl(UIElement el)
|
||||
{
|
||||
TranslateTransform translateTransform = new TranslateTransform();
|
||||
el.RenderTransform = (Transform) translateTransform;
|
||||
DoubleAnimationUsingKeyFrames animation = new DoubleAnimationUsingKeyFrames();
|
||||
int[] numArray = new int[7]{ -6, 6, -5, 5, -3, 3, 0 };
|
||||
int num1 = 0;
|
||||
foreach (int num2 in numArray)
|
||||
animation.KeyFrames.Add((DoubleKeyFrame) new LinearDoubleKeyFrame((double) num2, KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds((double) (num1++ * 40)))));
|
||||
translateTransform.BeginAnimation(TranslateTransform.XProperty, (AnimationTimeline) animation);
|
||||
}
|
||||
|
||||
private void ApplyDarkTitleBar()
|
||||
{
|
||||
IntPtr handle = new WindowInteropHelper((Window) this).Handle;
|
||||
int val = 1;
|
||||
Port.DwmSetWindowAttribute(handle, 20, ref val, Marshal.SizeOf(typeof (int)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user