This directory contains complete, working examples demonstrating various SyxLib features.
Demonstrates pattern scanning techniques:
- Manual length pattern scanning
- Automatic length scanning
- Using wildcards in patterns
- Module-based scanning
Topics Covered:
FindPattern()- Manual searchFindPatternA()- Automatic search- Wildcard masks with '?' character
- Module information retrieval
Compile:
g++ pattern_scanning.cpp -lPsapi -o pattern_scanning.exeShows how to write values through nested pointer chains:
- Writing integers, floats, doubles
- Multi-level pointer dereferencing
- Error handling
- Type-safe memory operations
Topics Covered:
WritePTR()with different types- Pointer chain offsets
- Exception handling
- Validating addresses
Compile:
g++ memory_writing.cpp -lPsapi -o memory_writing.exeComprehensive function hooking examples:
- 64-bit function detouring
- 32-bit function detouring
- Calling original functions
- Real-world hooking scenarios
Topics Covered:
DetourFunc64()for x64 hooksDetourFunc32()for x86 hooks- Hook function signatures
- Instruction length considerations
Compile:
# For 64-bit
g++ function_hooking.cpp -lPsapi -m64 -o function_hooking_x64.exe
# For 32-bit
g++ function_hooking.cpp -lPsapi -m32 -o function_hooking_x86.exeUsing Visual Studio:
cl /EHsc pattern_scanning.cpp /link Psapi.lib
cl /EHsc memory_writing.cpp /link Psapi.lib
cl /EHsc function_hooking.cpp /link Psapi.libUsing g++/MinGW:
g++ pattern_scanning.cpp -lPsapi -o pattern_scanning.exe
g++ memory_writing.cpp -lPsapi -o memory_writing.exe
g++ function_hooking.cpp -lPsapi -o function_hooking.exeMost examples are demonstrations and will run showing example output:
./pattern_scanning.exe
./memory_writing.exe
./function_hooking.exe- Educational Purpose: These examples are for learning and demonstration
- Modify for Your Use: Adapt addresses, patterns, and offsets for your specific needs
- Test Safely: Always test in controlled environments
- Error Handling: Examples include proper error handling patterns
Each example includes:
- ✅ Detailed comments explaining each step
- ✅ Error handling demonstrations
- ✅ Best practices
- ✅ Real-world use cases
- ✅ Output showing what to expect
To adapt examples for your needs:
- Pattern Scanning: Replace patterns with bytes from your target
- Memory Writing: Update offsets based on your pointer chain
- Function Hooking: Find target addresses using pattern scanning
- These examples modify process memory
- Some examples require valid target addresses to work
- Always respect software licenses and terms of service
- Some operations may be detected by anti-cheat systems
- Main README: ../README.md
- Architecture Guide: ../docs/architecture.md
- Usage Guide: ../docs/usage-guide.md
- Contributing: ../CONTRIBUTING.md
- Start Simple: Begin with pattern_scanning.cpp
- Understand Pointers: Study memory_writing.cpp carefully
- Learn Disassembly: Essential for function_hooking.cpp
- Use Debuggers: Tools like x64dbg help understand memory layout
- Read Documentation: Check inline comments and docs folder
Example won't compile?
- Ensure you're linking Psapi.lib
- Check include path to Syx.h
- Verify compiler supports C++11 or later
Example crashes?
- Examples use hypothetical addresses
- Replace with valid addresses from your target process
- Ensure proper architecture (x86/x64) matching
Pattern not found?
- Verify pattern bytes are correct
- Check mask syntax ('x' for exact, '?' for wildcard)
- Ensure module name is correct
Happy Learning! 🎓
Need help? Open an issue