Skip to content

Commit a60530f

Browse files
authored
Merge pull request #2 from WhatTheFuzz/feature/plugin-template
Feature/plugin template
2 parents a67a108 + a1b6a99 commit a60530f

6 files changed

Lines changed: 62 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.DS_Store
2+
*.pyc

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Sean Deaton
3+
Copyright (c) 2022 Sean Deaton (@WhatTheFuzz)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
# binaryninja-openai
2-
Itegrates OpenAI with BinaryNinja via a plugin.
1+
# BinaryNinja-OpenAI
2+
3+
Integrates OpenAI with BinaryNinja via a plugin.
4+
5+
## Installation
6+
7+
If you're installing this as a standalone plugin, you can place (or sym-link)
8+
this in BinaryNinja's plugin path. Default paths are detailed on
9+
[Vector 35's documentation][default-plugin-dir].
10+
11+
## License
12+
13+
This project is licensed under the [MIT license][license].
14+
15+
[default-plugin-dir]:https://docs.binary.ninja/guide/plugins.html
16+
[license]:./LICENSE

__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from binaryninja import PluginCommand
2+
3+
PluginCommand.register_for_address("What Does this Function Do?",
4+
"Checks OpenAI to see what this function does." \
5+
"Requires an internet connection and an API key "
6+
"saved under the environment variable "
7+
"OPENAI_API_KEY",
8+
TODO)

plugin.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"pluginmetadataversion": 1,
3+
"name": "OpenAI",
4+
"type": [
5+
"helper"
6+
],
7+
"api": [
8+
"python3"
9+
],
10+
"description": "Queries OpenAI to see what a function does in a given IL or pseudo-C.",
11+
"longdescription": "",
12+
"license": {
13+
"name": "MIT",
14+
"text": "Copyright (c) 2022 Sean Deaton (@WhatTheFuzz)\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."
15+
},
16+
"platforms": [
17+
"Darwin",
18+
"Linux",
19+
"Windows"
20+
],
21+
"installinstructions": {
22+
"Darwin": "pip3 install --user openai\nUnder your OpenAI account, create an API key and set it to the environment variable OPENAI_API_KEY; ie export OPENAI_API_KEY=<KEY_HERE>",
23+
"Linux": "pip3 install --user openai\nUnder your OpenAI account, create an API key and set it to the environment variable OPENAI_API_KEY; ie export OPENAI_API_KEY=<KEY_HERE>",
24+
"Windows": "You're on your own."
25+
},
26+
"dependencies": {
27+
"pip": [
28+
"openai"
29+
],
30+
},
31+
"version": "1.0.0",
32+
"author": "Sean Deaton (@WhatTheFuzz)",
33+
"minimumbinaryninjaversion": 3164
34+
}

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
openai

0 commit comments

Comments
 (0)