We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The import-to-bn.py script does not support capa's current JSON output schema. This issue proposes several updates to improve compatibility.
import-to-bn.py
Happy to implement if these updates look good.
else: path = binaryninja.interaction.get_open_filename_input("capa report:", "JSON (*.js *.json);;All Files (*)")
Convert the string returned by get_open_filename_input() to a Path object for compatibility with Path methods:
get_open_filename_input()
Path
else: path = binaryninja.interaction.get_open_filename_input("capa report:", "JSON (*.js *.json);;All Files (*)") path = Path(path)
if rule["meta"]["scope"] != "function": continue
Align with the latest capa JSON schema:
capa
if rule["meta"]["scopes"]["static"] != "function": continue
for va in rule["matches"].keys(): va = int(va) rows.append((ns, name, va))
for match in rule["matches"]: va = int(match[0]["value"]) rows.append((ns, name, va))
Tested by producing JSON output with capa v8.0.1 and running updated import-to-bn.py using Binary Ninja 4.2.6455.
The text was updated successfully, but these errors were encountered:
Great catches! Thanks for noticing and reporting the issues.
All your proposed solutions look good. We'd be happy to merge those in if you'll contribute them.
Thanks @as0ni!
Sorry, something went wrong.
No branches or pull requests
Description
The
import-to-bn.py
script does not support capa's current JSON output schema. This issue proposes several updates to improve compatibility.Happy to implement if these updates look good.
Proposed Changes
Current (1)
Update (1)
Convert the string returned by
get_open_filename_input()
to aPath
object for compatibility withPath
methods:Current (2)
Update (2)
Align with the latest
capa
JSON schema:Current (3)
Update (3)
Align with the latest
capa
JSON schema:Versions
Tested by producing JSON output with capa v8.0.1 and running updated
import-to-bn.py
using Binary Ninja 4.2.6455.The text was updated successfully, but these errors were encountered: