DeLuks2006

DeLuks2006 / patimat

Public

Simple, header-only, pattern matching and patching class + tool written in modern C++.

12
0
69% credibility
Found Jun 01, 2026 at 12 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
C++
AI Summary

Patimat is a C++ library that helps you find and replace specific byte patterns inside program files. It automatically understands different types of program formats (Windows executables, Linux programs, Mac apps, and raw binary files), so you don't have to worry about the technical details. You describe what bytes to look for using simple notation, specify what to replace them with, and the tool does the rest. It's designed for security researchers, reverse engineers, and developers who need to modify compiled programs without source code.

How It Works

1
🔍 You discover a binary that needs fixing

You have a program file that isn't working quite right, and you want to change how it behaves without recompiling it.

2
📝 You write down the pattern to find

Using simple notation, you describe the sequence of bytes you want to locate in the program file.

3
The tool scans the entire file automatically

Patimat reads your program file, understands its format, and searches through it to find every match.

4
You choose how to patch
🎯
Replace with new bytes

Swap out the old pattern with your custom replacement bytes

⏭️
Keep original bytes

Use placeholders to keep some bytes unchanged while modifying others

5
💾 Your changes are saved

The modified file is written out with your patches applied, ready to use.

Your program works your way

You successfully modified the binary exactly where you wanted, without touching anything else.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 12 to 12 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is patimat?

Patimat is a header-only C++ library that does two things: find byte patterns in binary data, and replace them. Think of it as a binary search-and-replace tool with a readable DSL. The pattern syntax handles wildcards, nibble-level matching, and numeric ranges like "f0 ?? 4? (10-20) ?a". Beyond the library, there's a CLI tool that patches executables directly from the command line, with automatic support for PE, ELF, Mach-O, and flat binary formats. You can pass a JSON config file or just pipe hex patterns straight from the shell.

Why is it gaining traction?

This solves a real pain point for anyone working with binaries: finding and modifying code without rebuilding from source. The pattern language is expressive enough for real reverse engineering work but simple enough to use in a one-liner. Since it's header-only, you drop it into any C++ project without fighting build systems. The binary format handling removes the tedium of parsing executable headers yourself, which is why it appeals to security researchers and developers who need surgical binary edits.

Who should use this?

Security researchers reverse-engineering malware. CTF players hunting for function signatures. Game modders patching memory or binaries. Developers debugging binary protocols who need quick-and-dirty transformations without IDA scripts or Python wrappers. If you're already comfortable with hex editors and want programmatic control, this fits.

Verdict

The credibility score is 0.6999%, the star count is low, and there's no visible test suite or documentation beyond a README with two examples. It's a useful concept executed by someone working alone, but it lacks the polish that signals long-term maintenance. Use it for a specific task, understand it will need debugging, and keep an eye on whether the author responds to issues. For production tooling, wait for more community signal. For experimentation and learning, it works fine as-is.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.