Created
September 6, 2019 02:24
-
-
Save psifertex/58bb67cf5ab471e391b60fd2b133a4ea to your computer and use it in GitHub Desktop.
Automatic Settings Documentation in Binary Ninja
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from PySide2.QtGui import QGuiApplication | |
settings = json.loads(binaryninja.Settings().serialize_schema()) | |
table = """|Category|Setting|Default|Type|Description| | |
|---|---|---|---|---| | |
""" | |
for category in settings: | |
for setting in settings[category]['settings']: | |
title = settings[category]['settings'][setting]['title'] | |
type = settings[category]['settings'][setting]['type'] | |
default = settings[category]['settings'][setting]['default'] | |
description = settings[category]['settings'][setting]['description'] | |
table += f"|{category}|{title}|{default}|{type}|{description}|\n" | |
show_markdown_report("Settings Documentation", "Below table added to the clipboard:\n\n"+table) | |
log_info("Saving result to the clipboard.") | |
clip = QGuiApplication.clipboard() | |
clip.setText(table) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment