├── .gitignore
├── .vscode
├── launch.json
└── tasks.json
├── LICENSE
├── README.md
└── src
├── Directory.Build.props
├── HackF5.UnitySpy.Gui.Avalonia
├── App.xaml
├── App.xaml.cs
├── Assets
│ ├── Fonts
│ │ ├── SourceCodePro-Black.ttf
│ │ ├── SourceCodePro-BlackItalic.ttf
│ │ ├── SourceCodePro-Bold.ttf
│ │ ├── SourceCodePro-BoldItalic.ttf
│ │ ├── SourceCodePro-ExtraLight.ttf
│ │ ├── SourceCodePro-ExtraLightItalic.ttf
│ │ ├── SourceCodePro-Italic.ttf
│ │ ├── SourceCodePro-Light.ttf
│ │ ├── SourceCodePro-LightItalic.ttf
│ │ ├── SourceCodePro-Medium.ttf
│ │ ├── SourceCodePro-MediumItalic.ttf
│ │ ├── SourceCodePro-Regular.ttf
│ │ ├── SourceCodePro-SemiBold.ttf
│ │ └── SourceCodePro-SemiBoldItalic.ttf
│ ├── error.png
│ ├── info.png
│ ├── question.png
│ └── warning.png
├── GuiAutofacModule.cs
├── HackF5.UnitySpy.Gui.Avalonia.csproj
├── Mvvm
│ ├── AsyncCommand.cs
│ ├── AvaloniaMainThreadInvoker.cs
│ ├── CommandCollection.cs
│ ├── ExtendedContentControl.cs
│ └── ViewLocator.cs
├── Program.cs
├── Styles
│ ├── SideBar.xaml
│ └── Styles.xaml
├── View
│ ├── AssemblyImageView.xaml
│ ├── AssemblyImageView.xaml.cs
│ ├── Helper
│ │ └── BoolToFontWeightConverter.cs
│ ├── ListContentView.xaml
│ ├── ListContentView.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── ManagedObjectInstanceContentView.xaml
│ ├── ManagedObjectInstanceContentView.xaml.cs
│ ├── MessageBox.xaml
│ ├── MessageBox.xaml.cs
│ ├── RawMemoryView.xaml
│ ├── RawMemoryView.xaml.cs
│ ├── TypeDefinitionContentView.xaml
│ ├── TypeDefinitionContentView.xaml.cs
│ ├── TypeDefinitionView.xaml
│ └── TypeDefinitionView.xaml.cs
└── ViewModel
│ ├── AssemblyImageViewModel.cs
│ ├── MainWindowViewModel.cs
│ ├── ProcessViewModel.cs
│ ├── RawMemoryViewModel.cs
│ ├── TypeDefinitionContentViewModel.cs
│ └── TypeDefinitionViewModel.cs
├── HackF5.UnitySpy.Gui.Wpf
├── App.config
├── App.xaml
├── App.xaml.cs
├── GuiAutofacModule.cs
├── HackF5.UnitySpy.Gui.Wpf.csproj
├── HackF5.UnitySpy.Gui.Wpf.csproj.DotSettings
├── Mvvm
│ ├── AsyncCommand.cs
│ ├── BindableCollection.cs
│ ├── CommandCollection.cs
│ ├── DialogService.cs
│ ├── ExtendedContentControl.cs
│ ├── ViewLocator.cs
│ └── WpfMainThreadInvoker.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── View
│ ├── AssemblyImageView.xaml
│ ├── AssemblyImageView.xaml.cs
│ ├── ListContentView.xaml
│ ├── ListContentView.xaml.cs
│ ├── MainView.xaml
│ ├── MainView.xaml.cs
│ ├── ManagedObjectInstanceContentView.xaml
│ ├── ManagedObjectInstanceContentView.xaml.cs
│ ├── TypeDefinitionContentView.xaml
│ ├── TypeDefinitionContentView.xaml.cs
│ ├── TypeDefinitionView.xaml
│ └── TypeDefinitionView.xaml.cs
├── ViewModel
│ ├── AssemblyImageViewModel.cs
│ ├── MainViewModel.cs
│ ├── ProcessViewModel.cs
│ ├── TypeDefinitionContentViewModel.cs
│ └── TypeDefinitionViewModel.cs
└── packages.config
├── HackF5.UnitySpy.Gui
├── HackF5.UnitySpy.Gui.csproj
├── Mvvm
│ ├── AutofacExtensions.cs
│ ├── IMainThreadInvoker.cs
│ ├── MainThreadInvoker.cs
│ ├── PropertyChangedBase.cs
│ ├── RegisterAttribute.cs
│ └── RegistrationType.cs
└── ViewModel
│ ├── AppendToTrailEventArgs.cs
│ ├── InstanceFieldViewModel.cs
│ ├── ListContentViewModel.cs
│ ├── ListItemViewModel.cs
│ ├── ManagedObjectInstanceContentViewModel.cs
│ └── StaticFieldViewModel.cs
├── HackF5.UnitySpy.Native
├── Makefile
├── linux.c
├── macos.c
├── server.c
└── server.h
├── HackF5.UnitySpy.Tests
├── HackF5.UnitySpy.HearthstoneLib.Tests.csproj
└── TestHearthstoneLibApi.cs
├── HackF5.UnitySpy.sln
├── HackF5.UnitySpy.sln.DotSettings
├── HackF5.UnitySpy.snk
├── HackF5.UnitySpy
├── AssemblyImageFactory.cs
├── Detail
│ ├── AssemblyImage.cs
│ ├── FieldDefinition.cs
│ ├── ManagedClassInstance.cs
│ ├── ManagedObjectInstance.cs
│ ├── ManagedStructInstance.cs
│ ├── MemoryObject.cs
│ ├── MonoClassKind.cs
│ ├── TypeCode.cs
│ ├── TypeDefinition.cs
│ └── TypeInfo.cs
├── HackF5.UnitySpy.csproj
├── IAssemblyImage.cs
├── IFieldDefinition.cs
├── IManagedObjectInstance.cs
├── IMemoryObject.cs
├── ITypeDefinition.cs
├── ITypeInfo.cs
├── Offsets
│ ├── BinaryFormat.cs
│ ├── MachOFormatOffsets.cs
│ ├── MonoLibraryOffsets.cs
│ ├── PEFormatOffsets.cs
│ └── UnityVersion.cs
├── ProcessFacade
│ ├── ModuleInfo.cs
│ ├── ProcessFacade.cs
│ ├── ProcessFacadeClient.cs
│ ├── ProcessFacadeLinux.cs
│ ├── ProcessFacadeLinuxClient.cs
│ ├── ProcessFacadeLinuxDirect.cs
│ ├── ProcessFacadeLinuxDump.cs
│ ├── ProcessFacadeLinuxPTrace.cs
│ ├── ProcessFacadeMacOS.cs
│ ├── ProcessFacadeMacOSClient.cs
│ ├── ProcessFacadeMacOSDirect.cs
│ ├── ProcessFacadeWindows.cs
│ └── UnityProcessFacade.cs
└── Util
│ ├── ByteArrayPool.cs
│ ├── ConversionUtils.cs
│ └── MemoryReadingUtils.cs
└── rules.ruleset
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/src/HackF5.UnitySpy.Gui.Avalonia/bin/Debug/netcoreapp3.1/HackF5.UnitySpy.Gui.Avalonia",
13 | "args": [],
14 | "cwd": "${workspaceFolder}/src/HackF5.UnitySpy.Gui.Avalonia/bin/Debug/",
15 | "stopAtEntry": false,
16 | "console": "internalConsole"
17 | }
18 |
19 | ]
20 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "detail": "Build UnitySpy with Avalionia GUI",
7 | "command": "dotnet",
8 | "type": "shell",
9 | "args": [
10 | "build"
11 | ],
12 | "options": {
13 | "cwd": "${workspaceFolder}/src/HackF5.UnitySpy.Gui.Avalonia"
14 | },
15 | "problemMatcher": "$msCompile"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 brian t
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unityspy
2 |
3 | See this [online article](https://medium.com/@hackf5/hacking-into-unity-games-ca99f87954c) for a walkthrough of what this lib is doing and some explanations about how it works
4 | If you're interested in contributing and making it evolve, don't hesitate to join the [Discord server](https://discord.gg/myk6Zn8rnY)
5 |
--------------------------------------------------------------------------------
/src/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | HackF5
4 | HackF5.UnitySpy
5 | dev@HackF5
6 | en-US
7 | 1.0.0.0
8 | 1.0.0.0
9 |
10 |
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace HackF5.UnitySpy.Gui.Avalonia
2 | {
3 | using Autofac;
4 | using global::Avalonia;
5 | using global::Avalonia.Controls;
6 | using global::Avalonia.Controls.ApplicationLifetimes;
7 | using global::Avalonia.Markup.Xaml;
8 | using HackF5.UnitySpy.Gui.Mvvm;
9 | using HackF5.UnitySpy.Gui.Avalonia.Mvvm;
10 | using HackF5.UnitySpy.Gui.Avalonia.ViewModel;
11 | using HackF5.UnitySpy.Gui.Avalonia.View;
12 |
13 | public class App : Application
14 | {
15 | private IContainer container;
16 |
17 | public override void Initialize()
18 | {
19 | AvaloniaXamlLoader.Load(this);
20 | }
21 |
22 | public override void OnFrameworkInitializationCompleted()
23 | {
24 | MainThreadInvoker.Current = new AvaloniaMainThreadInvoker();
25 |
26 | if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
27 | {
28 | MainWindow mainWindow = new MainWindow();
29 | mainWindow.DataContext = new MainWindowViewModel(mainWindow);
30 | desktop.MainWindow = mainWindow;
31 | desktop.ShutdownMode = ShutdownMode.OnMainWindowClose;
32 | }
33 |
34 | var builder = new ContainerBuilder();
35 | builder.RegisterAssemblyModules(this.GetType().Assembly);
36 | this.container = builder.Build();
37 |
38 | // Not sure why this is here. Is it needed?
39 | var theme = new global::Avalonia.Themes.Default.DefaultTheme();
40 | theme.TryGetResource("Button", out _);
41 |
42 | base.OnFrameworkInitializationCompleted();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Black.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-BlackItalic.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Bold.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-BoldItalic.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-ExtraLight.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-ExtraLightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-ExtraLightItalic.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Italic.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Light.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-LightItalic.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Medium.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-MediumItalic.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-Regular.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-SemiBold.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-SemiBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/Fonts/SourceCodePro-SemiBoldItalic.ttf
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/error.png
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/info.png
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/question.png
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Assets/warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackf5/unityspy/56227cbe9b6654126f48499929a560c1c9238c1f/src/HackF5.UnitySpy.Gui.Avalonia/Assets/warning.png
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/GuiAutofacModule.cs:
--------------------------------------------------------------------------------
1 | namespace HackF5.UnitySpy.Gui.Avalonia
2 | {
3 | using System.Reflection;
4 | using Autofac;
5 | using HackF5.UnitySpy.Gui.Avalonia.Mvvm;
6 | using HackF5.UnitySpy.Gui.Mvvm;
7 | using Module = Autofac.Module;
8 |
9 | public class GuiAutofacModule : Module
10 | {
11 | protected override void Load(ContainerBuilder builder)
12 | {
13 | var guiBaseAssembly = Assembly.Load("HackF5.UnitySpy.Gui");
14 | builder.AutoRegisterAssemblyTypes(this.ThisAssembly);
15 | builder.AutoRegisterAssemblyTypes(guiBaseAssembly);
16 | builder.RegisterAssemblyTypes(this.ThisAssembly).Where(t => t.Name.EndsWith("ViewModel"));
17 | builder.RegisterAssemblyTypes(guiBaseAssembly).Where(t => t.Name.EndsWith("ViewModel"));
18 | ViewLocator.RegisterAssembly(this.ThisAssembly);
19 | ViewLocator.RegisterAssembly(guiBaseAssembly);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/HackF5.UnitySpy.Gui.Avalonia.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Exe
4 | netcoreapp3.1
5 | HackF5.UnitySpy.Gui.Avalonia
6 | x64
7 | true
8 | false
9 | false
10 | true
11 |
12 |
13 |
14 |
15 | %(Filename)
16 |
17 |
18 | Designer
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/HackF5.UnitySpy.Gui.Avalonia/Mvvm/AsyncCommand.cs:
--------------------------------------------------------------------------------
1 | #pragma warning disable SA1402 // File may only contain a single type
2 |
3 | namespace HackF5.UnitySpy.Gui.Avalonia.Mvvm
4 | {
5 | using System;
6 | using System.Threading;
7 | using System.Threading.Tasks;
8 | using System.Windows.Input;
9 | using JetBrains.Annotations;
10 |
11 | [PublicAPI]
12 | public class AsyncCommand : AsyncCommand