{"id":13608001,"url":"https://github.com/Squalr/Squalr","last_synced_at":"2025-04-12T14:31:47.152Z","repository":{"id":34568858,"uuid":"38514896","full_name":"Squalr/Squalr","owner":"Squalr","description":"Squalr Memory Editor - Game Hacking Tool Written in C#","archived":false,"fork":false,"pushed_at":"2022-12-16T18:34:09.000Z","size":107104,"stargazers_count":1550,"open_issues_count":14,"forks_count":225,"subscribers_count":62,"default_branch":"develop","last_synced_at":"2025-04-02T04:35:52.077Z","etag":null,"topics":["cheat-engine","csharp","game-hacking","memory-editor","memory-hacking","windows","x86","x86-64"],"latest_commit_sha":null,"homepage":"https://www.squalr.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Squalr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-03T23:55:53.000Z","updated_at":"2025-03-31T14:45:32.000Z","dependencies_parsed_at":"2023-01-15T07:49:21.254Z","dependency_job_id":null,"html_url":"https://github.com/Squalr/Squalr","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squalr%2FSqualr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squalr%2FSqualr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squalr%2FSqualr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squalr%2FSqualr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Squalr","download_url":"https://codeload.github.com/Squalr/Squalr/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248581220,"owners_count":21128123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheat-engine","csharp","game-hacking","memory-editor","memory-hacking","windows","x86","x86-64"],"created_at":"2024-08-01T19:01:23.464Z","updated_at":"2025-04-12T14:31:44.744Z","avatar_url":"https://github.com/Squalr.png","language":"C#","readme":"# Squalr\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)\n\n[Squalr Official Website](https://www.squalr.com)\n\nJoin us on our [Discord Channel](https://discord.gg/Pq2msTx)\n\n**Squalr** is performant Memory Editing software that allows users to create and share cheats in their windows desktop games. This includes memory scanning, pointers, x86/x64 assembly injection, and so on.\n\nSqualr achieves fast scans through multi-threading combined with SIMD instructions. See this article: [SIMD in .NET](https://instil.co/2016/03/21/parallelism-on-a-single-core-simd-with-c/). To take advantage of these gains, your CPU needs to have support for SSE, AVX, or AVX-512.\n\n![SqualrGUI](Documentation/Squalr.png)\n\n## Documentation\n\nYou can find detailed documentation on the [Wiki](https://squalr.github.io/SqualrDocs/). There are three ways to use Squalr:\n- Front end GUI\n- Scripting API\n- Back end NuGet packages\n\nBelow is some brief documentation on the NuGet package APIs\n\n### Receiving Engine Output:\nIf using the NuGet packages, it is important to hook into the engine's output to receive logs of events. These are invaluable for diagnosing issues.\n\n```csharp\nusing Squalr.Engine.Logging;\n\n...\n\n// Receive logs from the engine\nLogger.Subscribe(new EngineLogEvents());\n\n...\n\nclass EngineLogEvents : ILoggerObserver\n{\n\tpublic void OnLogEvent(LogLevel logLevel, string message, string innerMessage)\n\t{\n\t\tConsole.WriteLine(message);\n\t\tConsole.WriteLine(innerMessage);\n\t}\n}\n```\n\n### Attaching The Engine\n```csharp\nusing Squalr.Engine.OS;\n...\n\nIEnumerable\u003cProcess\u003e processes = Processes.Default.GetProcesses();\n\n// Pick a process. For this example, we are just grabbing the first one.\nProcess process = processes.FirstOrDefault();\n\nProcesses.Default.OpenedProcess = process;\n\n```\n\n\n### Manipulating Memory:\n\n```csharp\nusing Squalr.Engine.Memory;\n\n...\n\nReader.Default.Read\u003cInt32\u003e(address);\nWriter.Default.Write\u003cInt32\u003e(address);\nAllocator.Alloc(address, 256);\nIEnumerable\u003cNormalizedRegion\u003e regions = Query.GetVirtualPages(requiredProtection, excludedProtection, allowedTypes, startAddress, endAddress);\nIEnumerable\u003cNormalizedModule\u003e modules = Query.GetModules();\n```\n\n### Assembling/Disassembling:\nSqualr can assemble and disassemble x86/x64 instructions, leveraging NASM.\n\n```csharp\nusing Squalr.Engine.Architecture;\nusing Squalr.Engine.Architecture.Assemblers;\n\n...\n\n// Perform assembly\nAssemblerResult result = Assembler.Default.Assemble(assembly: \"mov eax, 5\", isProcess32Bit: true, baseAddress: 0x10000);\n\nConsole.WriteLine(BitConverter.ToString(result.Bytes).Replace(\"-\", \" \"));\n\n// Disassemble the result (we will get the same instructions back)\nInstruction[] instructions = Disassembler.Default.Disassemble(bytes: result.Bytes, isProcess32Bit: true, baseAddress: 0x10000);\n\nConsole.WriteLine(instructions[0].Mnemonic);\n```\n\n### Scanning:\nSqualr has an API for performing high performance memory scanning:\n\n```csharp\nusing Squalr.Engine.Scanning;\nusing Squalr.Engine.Scanning.Scanners;\nusing Squalr.Engine.Scanning.Scanners.Constraints;\nusing Squalr.Engine.Scanning.Snapshots;\n\n...\n\nDataType dataType = DataType.Int32;\n\n// Collect values\nTrackableTask\u003cSnapshot\u003e valueCollectorTask = ValueCollector.CollectValues(\n\tSnapshotManager.GetSnapshot(Snapshot.SnapshotRetrievalMode.FromActiveSnapshotOrPrefilter, dataType));\n\n// Perform manual scan on value collection complete\nvalueCollectorTask.CompletedCallback += ((completedValueCollection) =\u003e\n{\n\tSnapshot snapshot = completedValueCollection.Result;\n\t\n\t// Constraints\n\tScanConstraintCollection scanConstraints = new ScanConstraintCollection();\n\tscanConstraints.AddConstraint(new ScanConstraint(ScanConstraint.ConstraintType.Equal, 25));\n\n\tTrackableTask\u003cSnapshot\u003e scanTask = ManualScanner.Scan(\n\t\tsnapshot,\n\t\tallScanConstraints);\n\n\tSnapshotManager.SaveSnapshot(scanTask.Result);\n});\n\t\n\t\nfor (UInt64 index = 0; index \u003c snapshot.ElementCount; index++)\n{\n\tSnapshotElementIndexer element = snapshot[index];\n\n\tObject currentValue = element.HasCurrentValue() ? element.LoadCurrentValue() : null;\n\tObject previousValue = element.HasPreviousValue() ? element.LoadPreviousValue() : null;\n}\n```\n\n### Debugging:\n\n```csharp\n// Example: Tracing write events on a float\nBreakpointSize size = Debugger.Default.SizeToBreakpointSize(sizeof(float));\nCancellationTokenSource cancellationTokenSource = Debugger.Default.FindWhatWrites(0x10000, size, this.CodeTraceEvent);\n\n...\n\n// When finished, cancel the instruction collection\ncancellationTokenSource.cancel();\n\n...\n\nprivate void CodeTraceEvent(CodeTraceInfo codeTraceInfo)\n{\n\tConsole.WriteLine(codeTraceInfo.Instruction.Address.ToString(\"X\"));\n\tConsole.WriteLine(codeTraceInfo.Instruction.Mnemonic);\n}\n```\n\t\n## Recommended Visual Studio Extensions\nReference | Description \n--- | ---\n[XAML Formatter](https://marketplace.visualstudio.com/items?itemName=TeamXavalon.XAMLStyler) | XAML should be run through this formatter\n[StyleCop](https://marketplace.visualstudio.com/items?itemName=ChrisDahlberg.StyleCop) | StyleCop to enforce code conventions. Note that we deviate on some standard conventions. We use the full type name for variables (ex Int32 rather than int). The reasoning is that this is a memory editor, so we prefer to use the type name that is most explicit to avoid coding mistakes.\n\n## Build\n\nIn order to compile Squalr, you should only need **Visual Studio 2017**. This should be up to date, we frequently update Squalr to use the latest version of the .NET framework. Here are the important 3rd party libraries that this project uses:\n\nLibrary | Description \n--- | ---\n[EasyHook](https://github.com/EasyHook/EasyHook) | Managed/Unmanaged API Hooking\n[SharpDisasm](https://github.com/spazzarama/SharpDisasm) | Udis86 Assembler Ported to C#\n[CsScript](https://github.com/oleg-shilo/cs-script) | C# Scripting Library\n[AvalonEdit](https://github.com/icsharpcode/AvalonEdit) | Code Editing Library\n[SharpDX](https://github.com/sharpdx/SharpDX) | DirectX Wrapper\n[CLRMD](https://github.com/Microsoft/clrmd) | .NET Application Inspection Library\n[AvalonDock](https://avalondock.codeplex.com/) | Docking Library\n[LiveCharts](https://github.com/beto-rodriguez/Live-Charts) | WPF Charts\n\n## Planned Features\n\nLibrary | Description | Purpose\n--- | --- | ---\n[AsmJit](https://github.com/hypeartist/AsmJit) | x86/x64 Assembler | Replace FASM, improve scripting drastically\n[AsmJit](https://github.com/asmjit/asmjit) | x86/x64 Assembler | Original C++ project. May port/interop this if the above version does not work (Neither may fully work, and something custom may be needed)\n[WpfHexEditorControl](https://github.com/abbaye/WpfHexEditorControl) | Hex Editor | Hex editor / Memory Hex Editor\n[OpenTK](https://github.com/opentk/opentk) | OpenGL Wrapper | Graphics Injection\n[SharpDX](https://github.com/sharpdx/SharpDX) | DirectX Wrapper | Graphics Injection (Currently using SharpDX just for input)\n[SharpPCap](https://github.com/chmorgan/sharppcap) | Packet Capture | Packet Editor\n[Packet.Net](https://github.com/antmicro/Packet.Net) | Packet Capture | Packet Editor\n","funding_links":[],"categories":["C# #"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSqualr%2FSqualr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSqualr%2FSqualr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSqualr%2FSqualr/lists"}