Skip to content

Commit

Permalink
Registering with BN from parent dir
Browse files Browse the repository at this point in the history
This allows installation using the plugin manager.
  • Loading branch information
zznop committed Jul 22, 2020
1 parent b92011d commit 395af06
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 22 deletions.
14 changes: 14 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from binaryninja import *
from .binja import *

PluginCommand.register(
'bnida: Import analysis data',
'Import analysis data from JSON file',
import_data_in_background
)

PluginCommand.register(
'bnida: Export analysis data',
'Export analysis data to a JSON file',
export_data_in_background
)
2 changes: 2 additions & 0 deletions binja/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .binja_export import *
from .binja_import import *
6 changes: 0 additions & 6 deletions binja/binja_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,3 @@ def export_data_in_background(bv):
options = GetOptions()
background_task = ExportInBackground(bv, options)
background_task.start()

PluginCommand.register(
'bnida: Export data',
'bnida: Export data',
export_data_in_background
)
6 changes: 0 additions & 6 deletions binja/binja_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,3 @@ def import_data_in_background(bv):
options = GetOptions()
background_task = ImportInBackground(bv, options)
background_task.start()

PluginCommand.register(
"bnida: Import data",
"bnida: Import data",
import_data_in_background
)
11 changes: 1 addition & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,11 @@ Section information is also exported to the JSON file and used for adjusting off

This section describes how to install bnida scripts on a Windows operating system. The process is similar on Linux.

1. Clone the [repository](https://github.com/zznop/bnida).
1. Clone the [repository](https://github.com/zznop/bnida) to your BN plugins folder (or install using the plugin manager)

2. Copy the IDA scripts to `C:\Program Files\IDA {version}\plugins` and configure a hotkey. (or keep them where they are
if you prefer to run them as scripts with `Alt+F7`).

3. Copy the BN plugins to the Binary Ninja plugins folder at `%AppData%\Binary Ninja\plugins`

Optionally, you can keep the files where they are in the cloned repository and simply create symbolic links.

```
C:\Users\zznop\AppData\Roaming\Binary Ninja\plugins>mklink binja_export.py C:\Users\zznop\projects\bnida\binja\binja_export.py
symbolic link created for binja_export.py <<===>> C:\Users\zznop\projects\bnida\binja\binja_export.py
```

# Transferring Analysis Data

bnida can be used to transfer analysis data from BN to BN, IDA to IDA, BN to IDA, or IDA to BN. The following sections
Expand Down
16 changes: 16 additions & 0 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"pluginmetadataversion" : 2,
"name": "bnida",
"type": ["helper"],
"api": ["python3"],
"description": "Transfer analysis data between Binary Ninja and IDA",
"longdescription": "Transfer analysis data between Binary Ninja and IDA by exporting data to a common JSON file format",
"license": {
"name": "MIT",
"text": "Copyright 2020 zznop\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."
},
"platforms" : ["Darwin", "Linux", "Windows"],
"version": "1.2",
"author": "zznop",
"minimumbinaryninjaversion": 1200
}

0 comments on commit 395af06

Please sign in to comment.