Skip to content

Commit

Permalink
Updated the snippet manager documentation
Browse files Browse the repository at this point in the history
I blame ChatGPT Code interpreter ;)
  • Loading branch information
0xeb committed Jul 31, 2023
1 parent 7190d96 commit 9dd01fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 60 deletions.
54 changes: 0 additions & 54 deletions snippet_manager/.temp/gpt4-prompt-readme.txt

This file was deleted.

10 changes: 4 additions & 6 deletions snippet_manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ This plugin for IDA provides a set of functionality for importing, exporting or

Type the following functions from IDA's CLI or just call them directly from Python:

- `idaapi.ext.save_snippets(output_folder='')`: Save snippets to a specified output folder.
- `idaapi.ext.load_snippets(input_folder='')`: Load snippets from a specified input folder.
- `idaapi.ext.delete_snippets()`: Delete all existing snippets.
- `idaapi.ext.man`: Direct access to the snippet manager object.
- `idaapi.ext.snippets.save(output_folder='')`: Save snippets to a specified output folder.
- `idaapi.ext.snippets.load(input_folder='')`: Load snippets from a specified input folder.
- `idaapi.ext.snippets.delete()`: Delete all existing snippets.
- `idaapi.ext.snippets.man`: Direct access to the snippet manager object.

By default, if no input or output folders are specified, then the plugin will default to the `os.path.join(os.path.dirname(idc.get_idb_path()), '.snippets')` folder.

Expand All @@ -23,8 +23,6 @@ Alternatively, for example on Windows, just make a symbolic link directly:
C:\Projects\ida-qscripts\snippet_manager>mklink c:\ida\plugins\snippetmanager.py %cd%\snippetmanager.py
```

_(Just for fun, I provided the [ChatGPT-4/Code Interpreter prompt](.temp/gpt4-prompt-readme.txt) used to bootstrap this readme file)_

## Very important

Due to the IDA UI's caching of snippets in memory, changes will not be immediately visible. Therefore, upon executing any of the functions, it is obligatory to close, save, and then reopen the database manually in order to observe the modifications.
1 change: 1 addition & 0 deletions snippet_manager/snippetmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def run(self, _):
- save snippets: idaapi.ext.snippets.save()
- load snippets: idaapi.ext.snippets.load()
- delete snippets: idaapi.ext.snippets.delete()
- access the snippet manager object: idaapi.ext.snippets.man
""")
return 0

Expand Down

0 comments on commit 9dd01fb

Please sign in to comment.