Skip to content

Commit 762993d

Browse files
authored
Merge pull request #1 from psifertex/main
initial update for plugin manager
2 parents 4a6494a + 836c418 commit 762993d

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
# binaryninja-printf
2-
Format string analysis plugin for BinaryNinja
1+
# Binary Ninja Printf Analysis
2+
3+
Plugin to update the printf family of functions:
4+
5+
- printf
6+
- wprintf
7+
- fprintf
8+
- dprintf
9+
- sprintf
10+
- asprintf
11+
- snprintf
12+
- __printf_chk
13+
- __fprintf_chk
14+
- __sprintf_chk
15+
- __snprintf_chk
16+
17+
Can parse existing printf family of functions using the `Override printf call types` command-palette or plugin menu action. Uses the `set_call_type_adjustment` API along with a basic format string parser to appropriate type each location where one of those APIs is called.
18+
19+
Additionally, supports the ability to add additional custom printf-like functions and add new format specifiers. To add new specifiers, use the `Add printf extension` menu/action and to add new functions use the `Add printf-like function` menu/action.

printf/__init__.py renamed to __init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def work_func(bv, func):
582582

583583
PluginCommand.register(
584584
"Override printf call types",
585-
"Properly types printfy calls by parsing format strings",
585+
"Properly types printf-family calls by parsing format strings",
586586
work
587587
)
588588

plugin.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"pluginmetadataversion": 2,
3+
"name": "Format String Analysis",
4+
"type": [
5+
"analysis"
6+
],
7+
"api": [
8+
"python3"
9+
],
10+
"description": "Script to automatically annotate variadic printf functions",
11+
"license": {
12+
"name": "MIT",
13+
"text": "Copyright (c) 2022 Nick Shipp\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
14+
},
15+
"platforms": [
16+
"Darwin",
17+
"Linux",
18+
"Windows"
19+
],
20+
"installinstructions": {
21+
"Darwin": "no special instructions, package manager is recommended",
22+
"Linux": "no special instructions, package manager is recommended",
23+
"Windows": "no special instructions, package manager is recommended"
24+
},
25+
"dependencies": {
26+
},
27+
"version": "1.0",
28+
"author": "Nick Shipp",
29+
"minimumbinaryninjaversion": 3814
30+
}

0 commit comments

Comments
 (0)