Skip to content

Commit a1b3a4e

Browse files
committed
docs: Update README text and screenshots with new &str type
1 parent 24054c6 commit a1b3a4e

4 files changed

Lines changed: 6 additions & 11 deletions

File tree

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A Binary Ninja plugin to help find the addresses and lengths of strings in Rust binaries.
44

5-
![A screenshot of Binary Ninja with several structs of type "RustStringSlice" defined, each of which contains the address and length of a string.](images/sliced-string-screenshot-border.png)
5+
![A screenshot of Binary Ninja with several structs of type "&str" defined, each of which contains the address and length of a string.](images/sliced-string-screenshot-border.png)
66

77
## Usage
88

@@ -15,18 +15,13 @@ This plugin provides two new commands:
1515

1616
You can view the list of recovered strings and their addresses in the Log window.
1717

18-
![The Binary Ninja log window, showing the following text logged under the "rust_string_slicer.binja_plugin.actions" category: Candidate string slice b'\xc3\xcc\xcc\xcc\xcc\xcc\xcc\xcc' does not decode to a valid UTF-8 string; excluding from final results: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
19-
Recovered string at addr 0x18003d174, len 0x28: "library\core\src\unicode\unicode_data.rs"
20-
Defined new RustStringSlice at 0x18003d2c8
21-
Recovered string at addr 0x18003d174, len 0x28: "library\core\src\unicode\unicode_data.rs"
22-
Defined new RustStringSlice at 0x18003d2e0
23-
Recovered string at addr 0x180037ff4, len 0x2c: "Ll0W8FiHZKeuZFO65DVloBXrq3wo05J9TDdw10yl78k="
24-
Defined new RustStringSlice at 0x180045010
25-
Recovered string at addr 0x180038020, len 0x2c: "GONj/LrybW0VQXVpyZRIvZLFPOqUKx5aBVCmW0o4AoY="](images/recovered-strings-log-border.png)
18+
![The Binary Ninja log window, showing log messages under the "rust_string_slicer.binja_plugin.actions" log category. The messages include both new definitions of the string slice type at certain locations ('Defined new `&str` at 0x1401c6b38" )and the addresses and lengths of the recovered strings themselves ('Recovered string at addr 0x1401c6a09, len 0xb: 'src\main.rs')](images/recovered-strings-log-border.png)
2619

27-
The plugin will also create a new `RustStringSlice` type, for any strings defined in read-only data sections that are made up of a pointer to string data + the length of that string data. You can view all created strings of this type by examining cross-references to the `RustStringSlice` type.
20+
The plugin will also create a new `&str` type, for any strings defined in read-only data sections that are made up of a pointer to string data + the length of that string data. `&str` is a Rust primitive type called a "string slice", and is the type used in Rust for string literals ([docs](https://doc.rust-lang.org/std/primitive.str.html)).
2821

29-
![The Binary Ninja Types and Cross References window, showing references to the RustStringSlice type, which has fields char* address and int64_t length. Cross references include variables with names like "str_"src\lib.rs"", "str_"C:\Users\Administrator\.cargo\registry"", and "str_"Impossible: must only have 0 to 8 input bytes in last chunk, with no invalid lengths"](images/cross-references-rust-string-slice-type-border.png)
22+
You can view all created strings of this type by examining cross-references to the `&str` type.
23+
24+
![The Binary Ninja Types and Cross References window, showing references to the &str type, which has fields char* _address and int64_t _length. Cross references include variables with names like str_"C:\Users\User\.cargo\registry\src" and str_"Impossible: must only have 0 to 8 input bytes in last chunk, with no invalid lengths"](images/cross-references-rust-string-slice-type-border.png)
3025

3126
## How does this work?
3227

216 KB
Loading
293 KB
Loading
77 KB
Loading

0 commit comments

Comments
 (0)