Squalr
3.0.2
Squalr官方网站
加入我们的不和谐频道
Squalr是性能的内存编辑软件,允许用户在其Windows桌面游戏中创建和共享作弊。这包括内存扫描,指针,X86/X64组装注入等。
Squalr通过多线程与SIMD说明相结合,可以快速扫描。请参阅本文:.net中的simd。为了利用这些收益,您的CPU需要支持SSE,AVX或AVX-512。

您可以在Wiki上找到详细的文档。使用Squalr有三种方法:
以下是Nuget软件包API的一些简短文档
如果使用Nuget软件包,则重要的是要挂在发动机的输出中以接收事件日志。这些对于诊断问题是无价的。
using Squalr . Engine . Logging ;
.. .
// Receive logs from the engine
Logger . Subscribe ( new EngineLogEvents ( ) ) ;
.. .
class EngineLogEvents : ILoggerObserver
{
public void OnLogEvent ( LogLevel logLevel , string message , string innerMessage )
{
Console . WriteLine ( message ) ;
Console . WriteLine ( innerMessage ) ;
}
} using Squalr . Engine . OS ;
.. .
IEnumerable < Process > processes = Processes . Default . GetProcesses ( ) ;
// Pick a process. For this example, we are just grabbing the first one.
Process process = processes . FirstOrDefault ( ) ;
Processes . Default . OpenedProcess = process ; using Squalr . Engine . Memory ;
.. .
Reader . Default . Read < Int32 > ( address ) ;
Writer . Default . Write < Int32 > ( address ) ;
Allocator . Alloc ( address , 256 ) ;
IEnumerable < NormalizedRegion > regions = Query . GetVirtualPages ( requiredProtection , excludedProtection , allowedTypes , startAddress , endAddress ) ;
IEnumerable < NormalizedModule > modules = Query . GetModules ( ) ;Squalr可以组装并拆卸X86/X64指令,利用NASM。
using Squalr . Engine . Architecture ;
using Squalr . Engine . Architecture . Assemblers ;
.. .
// Perform assembly
AssemblerResult result = Assembler . Default . Assemble ( assembly : "mov eax, 5" , isProcess32Bit : true , baseAddress : 0x10000 ) ;
Console . WriteLine ( BitConverter . ToString ( result . Bytes ) . Replace ( "-" , " " ) ) ;
// Disassemble the result (we will get the same instructions back)
Instruction [ ] instructions = Disassembler . Default . Disassemble ( bytes : result . Bytes , isProcess32Bit : true , baseAddress : 0x10000 ) ;
Console . WriteLine ( instructions [ 0 ] . Mnemonic ) ;Squalr具有用于执行高性能记忆扫描的API:
using Squalr . Engine . Scanning ;
using Squalr . Engine . Scanning . Scanners ;
using Squalr . Engine . Scanning . Scanners . Constraints ;
using Squalr . Engine . Scanning . Snapshots ;
.. .
DataType dataType = DataType . Int32 ;
// Collect values
TrackableTask < Snapshot > valueCollectorTask = ValueCollector . CollectValues (
SnapshotManager . GetSnapshot ( Snapshot . SnapshotRetrievalMode . FromActiveSnapshotOrPrefilter , dataType ) ) ;
// Perform manual scan on value collection complete
valueCollectorTask . CompletedCallback += ( ( completedValueCollection ) =>
{
Snapshot snapshot = completedValueCollection . Result ;
// Constraints
ScanConstraintCollection scanConstraints = new ScanConstraintCollection ( ) ;
scanConstraints . AddConstraint ( new ScanConstraint ( ScanConstraint . ConstraintType . Equal , 25 ) ) ;
TrackableTask < Snapshot > scanTask = ManualScanner . Scan (
snapshot ,
allScanConstraints ) ;
SnapshotManager . SaveSnapshot ( scanTask . Result ) ;
} ) ;
for ( UInt64 index = 0 ; index < snapshot . ElementCount ; index ++ )
{
SnapshotElementIndexer element = snapshot [ index ] ;
Object currentValue = element . HasCurrentValue ( ) ? element . LoadCurrentValue ( ) : null ;
Object previousValue = element . HasPreviousValue ( ) ? element . LoadPreviousValue ( ) : null ;
} // Example: Tracing write events on a float
BreakpointSize size = Debugger . Default . SizeToBreakpointSize ( sizeof ( float ) ) ;
CancellationTokenSource cancellationTokenSource = Debugger . Default . FindWhatWrites ( 0x10000 , size , this . CodeTraceEvent ) ;
.. .
// When finished, cancel the instruction collection
cancellationTokenSource . cancel ( ) ;
.. .
private void CodeTraceEvent ( CodeTraceInfo codeTraceInfo )
{
Console . WriteLine ( codeTraceInfo . Instruction . Address . ToString ( "X" ) ) ;
Console . WriteLine ( codeTraceInfo . Instruction . Mnemonic ) ;
} | 参考 | 描述 |
|---|---|
| XAML格式化 | XAML应该通过此格式 |
| Stylecop | 执行代码约定的Stylecop。请注意,我们在某些标准惯例上偏离。我们使用变量的完整类型名称(EX INT32而不是INT)。原因是这是一个内存编辑器,因此我们更喜欢使用最明确的类型名称来避免编码错误。 |
为了编译Squalr,您只需要Visual Studio 2017 。这应该是最新的,我们经常更新Squalr以使用最新版本的.NET框架。这是该项目使用的重要第三方库:
| 图书馆 | 描述 |
|---|---|
| Easyhook | 托管/不受管理的API钩 |
| 尖锐的 | UDIS86汇编器移植到C# |
| CSScript | C#脚本库 |
| Avalonedit | 代码编辑库 |
| SharpDx | DirectX包装器 |
| clrmd | .NET应用程序检查库 |
| Avalondock | 对接库 |
| Livecharts | WPF图表 |
| 图书馆 | 描述 | 目的 |
|---|---|---|
| ASMJIT | x86/x64汇编器 | 替换FASM,大幅度改进脚本 |
| ASMJIT | x86/x64汇编器 | 原始C ++项目。如果上述版本不起作用,则可以端口/互动(均无法完全起作用,并且可能需要自定义的东西) |
| wpfhexeditorcontrol | 十六进制编辑 | 六角编辑 /内存六角编辑器 |
| OPENTK | OpenGL包装纸 | 图形注入 |
| SharpDx | DirectX包装器 | 图形注入(目前使用SharpDX仅用于输入) |
| sharppcap | 数据包捕获 | 数据包编辑器 |
| packet.net | 数据包捕获 | 数据包编辑器 |