|
3 | 3 | [license: gpl v3]: https://img.shields.io/badge/License-GPLv3-blue.svg |
4 | 4 | [latest version]: https://img.shields.io/crates/v/bmatcher.svg |
5 | 5 | [crates.io]: https://crates.io/crates/bmatcher |
6 | | -[github build status]: https://github.com/WolverinDEV/bmatcher/workflows/Rust/badge.svg?branch=master |
7 | | -[actions]: https://github.com/WolverinDEV/bmatcher/actions?query=workflow%3ARust |
| 6 | +[github build status]: https://github.com/WolverinDEV/bmatcher/actions/workflows/rust.yml/badge.svg?branch=master |
| 7 | +[actions]: https://github.com/WolverinDEV/bmatcher/actions/workflows/rust.yml |
8 | 8 |
|
9 | 9 | `bmatcher` is a flexible and efficient binary pattern matching library designed to help you search and match binary data. |
10 | 10 |
|
11 | 11 | ## Motivation |
12 | 12 |
|
13 | | -Reverse engineering is challenging. When you identify an interesting address, such as a function or global variable, you don't want to lose all that effort when the program is updated. |
| 13 | +Reverse engineering is challenging. |
| 14 | +When you identify an interesting address, such as a function or global variable, you don't want to lose all that effort when the program is updated. |
14 | 15 |
|
15 | | -The good news is that, during updates, programs usually don't change drastically. While some functions and data may be altered, much of the program remains unchanged. However, this means that the unchanged parts might be moved to different addresses. |
| 16 | +The good news is that, during updates, programs usually don't change drastically. While some functions and data may be altered, much of the program remains unchanged. |
| 17 | +However, this means that the unchanged parts might be moved to different addresses. |
16 | 18 |
|
17 | 19 | This is where patterns come in. |
18 | | -Patterns allow you to track these interesting parts of a program, even as it evolves and updates. By using patterns, you can identify specific functions, data references, or other critical locations, regardless of where they end up after a program update. |
| 20 | +Patterns allow you to track these interesting parts of a program, even as it evolves and updates. |
| 21 | +By using patterns, you can identify specific functions, data references, or other critical locations, regardless of where they end up after a program update. |
19 | 22 |
|
20 | 23 | ## Getting Started |
21 | 24 |
|
22 | 25 | To use `bmatcher`, add it as a dependency in your `Cargo.toml`: |
23 | 26 |
|
24 | 27 | ```toml |
25 | 28 | [dependencies] |
26 | | -bmatcher = "0.1" |
| 29 | +bmatcher = "0.3" |
27 | 30 | ``` |
28 | 31 |
|
29 | 32 | ## Creating a pattern |
@@ -51,7 +54,7 @@ let pattern = pattern!(" |
51 | 54 | E9 [4] |
52 | 55 | "); |
53 | 56 |
|
54 | | -let mut matcher = BinaryMatcher::new(&pattern, &data); |
| 57 | +let mut matcher = bmatcher::execute(&data, &pattern); |
55 | 58 | let Some(match_stack) = matcher.next_match() else { |
56 | 59 | panic!("failed to find pattern"); |
57 | 60 | }; |
|
0 commit comments