Skip to content

Commit 585882c

Browse files
committed
add examples about triggering binexport headlessly
1 parent 47c90e9 commit 585882c

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

docs/dev/batch.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ Note that we used the `load` method which lets you temporarily create a `bv` wit
4949
bv.file.close() #close the file handle or else leak memory
5050
```
5151

52+
### Triggering Actions
53+
54+
While you might associate actions with UI based actions in the product, many actions can be triggered headlessly. For example:
55+
56+
```python
57+
cxt = PluginCommandContext(bv)
58+
PluginCommand.get_valid_list(cxt)['BinExport (Quick)'].execute(cxt)
59+
```
60+
5261
### Multiple files
5362

5463
Looks good! But what if we just want to parse basic headers or stop any major analysis from happening and scan multiple files quickly? We can use the `update_analysis` named parameter to prevent the usual linear sweep and recursive descent analysis from event occurring:

docs/guide/binexport.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ The resulting `.BinDiff` file can either be opened in the BinDiff Java GUI, or d
3737
![BD Viewer](../img/binexport-bdviewer.png "BD Viewer"){ width="800" }
3838
_BD Viewer Plugin_
3939

40+
### Headless
41+
42+
If you want to trigger the plugin headlessly, you can use the exposed quick action which will automatically write a `.BinExport` in the same folder as the source file:
43+
44+
```python
45+
cxt = PluginCommandContext(bv)
46+
PluginCommand.get_valid_list(cxt)['BinExport (Quick)'].execute(cxt)
47+
```
48+
4049
### Disabling
4150

4251
If desired, the plugin can be disabled from loading using the `corePlugins.binexport` setting.

0 commit comments

Comments
 (0)