Classes | |
struct | BinaryNinja::FormInputField |
class | BinaryNinja::InteractionHandler |
Functions | |
void | BinaryNinja::ShowPlainTextReport (const std::string &title, const std::string &contents) |
Displays contents to the user in the UI or on the command-line. | |
void | BinaryNinja::ShowMarkdownReport (const std::string &title, const std::string &contents, const std::string &plainText="") |
Displays markdown contents to the user in the UI or on the command-line. | |
void | BinaryNinja::ShowHTMLReport (const std::string &title, const std::string &contents, const std::string &plainText="") |
Displays HTML contents to the user in the UI or on the command-line. | |
void | BinaryNinja::ShowGraphReport (const std::string &title, FlowGraph *graph) |
Displays a flow graph in UI applications and nothing in command-line applications. | |
void | BinaryNinja::ShowReportCollection (const std::string &title, ReportCollection *reports) |
Show a collection of reports. | |
bool | BinaryNinja::GetTextLineInput (std::string &result, const std::string &prompt, const std::string &title) |
Prompts the user to input a string with the given prompt and title. | |
bool | BinaryNinja::GetIntegerInput (int64_t &result, const std::string &prompt, const std::string &title) |
Prompts the user to input an integer with the given prompt and title. | |
bool | BinaryNinja::GetAddressInput (uint64_t &result, const std::string &prompt, const std::string &title) |
Prompts the user to input an unsigned integer with the given prompt and title. | |
bool | BinaryNinja::GetChoiceInput (size_t &idx, const std::string &prompt, const std::string &title, const std::vector< std::string > &choices) |
Prompts the user to select the one of the provided choices. | |
bool | BinaryNinja::GetLargeChoiceInput (size_t &idx, const std::string &title, const std::string &prompt, const std::vector< std::string > &choices) |
Prompts the user to select the one of the provided choices out of a large list, with the option to filter choices. | |
bool | BinaryNinja::GetOpenFileNameInput (std::string &result, const std::string &prompt, const std::string &ext="") |
Prompts the user for a file name to open. | |
bool | BinaryNinja::GetSaveFileNameInput (std::string &result, const std::string &prompt, const std::string &ext="", const std::string &defaultName="") |
Prompts the user for a file name to save as, optionally providing a file extension and defaultName. | |
bool | BinaryNinja::GetDirectoryNameInput (std::string &result, const std::string &prompt, const std::string &defaultName="") |
Prompts the user for a directory name to save as, optionally providing a default_name. | |
bool | BinaryNinja::GetFormInput (std::vector< FormInputField > &fields, const std::string &title) |
Prompts the user for a set of inputs specified in `fields` with given title. | |
BNMessageBoxButtonResult | BinaryNinja::ShowMessageBox (const std::string &title, const std::string &text, BNMessageBoxButtonSet buttons=OKButtonSet, BNMessageBoxIcon icon=InformationIcon) |
Displays a configurable message box in the UI, or prompts on the console as appropriate. | |
bool | BinaryNinja::OpenUrl (const std::string &url) |
Opens a given url in the user's web browser, if available. | |
struct BinaryNinja::FormInputField |
Static Public Member Functions | |
static FormInputField | Label (const std::string &text) |
static FormInputField | Separator () |
static FormInputField | TextLine (const std::string &prompt) |
static FormInputField | MultilineText (const std::string &prompt) |
static FormInputField | Integer (const std::string &prompt) |
static FormInputField | Address (const std::string &prompt, BinaryView *view=nullptr, uint64_t currentAddress=0) |
static FormInputField | Choice (const std::string &prompt, const std::vector< std::string > &choices) |
static FormInputField | OpenFileName (const std::string &prompt, const std::string &ext) |
static FormInputField | SaveFileName (const std::string &prompt, const std::string &ext, const std::string &defaultName="") |
static FormInputField | DirectoryName (const std::string &prompt, const std::string &defaultName="") |
Public Attributes | |
BNFormInputFieldType | type |
std::string | prompt |
Ref< BinaryView > | view |
uint64_t | currentAddress |
std::vector< std::string > | choices |
std::string | ext |
std::string | defaultName |
int64_t | intResult |
uint64_t | addressResult |
std::string | stringResult |
size_t | indexResult |
bool | hasDefault |
int64_t | intDefault |
uint64_t | addressDefault |
std::string | stringDefault |
size_t | indexDefault |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
BNFormInputFieldType BinaryNinja::FormInputField::type |
std::string BinaryNinja::FormInputField::prompt |
Ref<BinaryView> BinaryNinja::FormInputField::view |
uint64_t BinaryNinja::FormInputField::currentAddress |
std::vector<std::string> BinaryNinja::FormInputField::choices |
std::string BinaryNinja::FormInputField::ext |
std::string BinaryNinja::FormInputField::defaultName |
int64_t BinaryNinja::FormInputField::intResult |
uint64_t BinaryNinja::FormInputField::addressResult |
std::string BinaryNinja::FormInputField::stringResult |
size_t BinaryNinja::FormInputField::indexResult |
bool BinaryNinja::FormInputField::hasDefault |
int64_t BinaryNinja::FormInputField::intDefault |
uint64_t BinaryNinja::FormInputField::addressDefault |
std::string BinaryNinja::FormInputField::stringDefault |
size_t BinaryNinja::FormInputField::indexDefault |
class BinaryNinja::InteractionHandler |
Public Member Functions | |
virtual void | ShowPlainTextReport (Ref< BinaryView > view, const std::string &title, const std::string &contents)=0 |
virtual void | ShowMarkdownReport (Ref< BinaryView > view, const std::string &title, const std::string &contents, const std::string &plainText) |
virtual void | ShowHTMLReport (Ref< BinaryView > view, const std::string &title, const std::string &contents, const std::string &plainText) |
virtual void | ShowGraphReport (Ref< BinaryView > view, const std::string &title, Ref< FlowGraph > graph) |
virtual void | ShowReportCollection (const std::string &title, Ref< ReportCollection > reports) |
virtual bool | GetTextLineInput (std::string &result, const std::string &prompt, const std::string &title)=0 |
virtual bool | GetIntegerInput (int64_t &result, const std::string &prompt, const std::string &title) |
virtual bool | GetAddressInput (uint64_t &result, const std::string &prompt, const std::string &title, Ref< BinaryView > view, uint64_t currentAddr) |
virtual bool | GetChoiceInput (size_t &idx, const std::string &prompt, const std::string &title, const std::vector< std::string > &choices)=0 |
virtual bool | GetLargeChoiceInput (size_t &idx, const std::string &prompt, const std::string &title, const std::vector< std::string > &choices)=0 |
virtual bool | GetOpenFileNameInput (std::string &result, const std::string &prompt, const std::string &ext="") |
virtual bool | GetSaveFileNameInput (std::string &result, const std::string &prompt, const std::string &ext="", const std::string &defaultName="") |
virtual bool | GetDirectoryNameInput (std::string &result, const std::string &prompt, const std::string &defaultName="") |
virtual bool | GetFormInput (std::vector< FormInputField > &fields, const std::string &title)=0 |
virtual BNMessageBoxButtonResult | ShowMessageBox (const std::string &title, const std::string &text, BNMessageBoxButtonSet buttons=OKButtonSet, BNMessageBoxIcon icon=InformationIcon)=0 |
virtual bool | OpenUrl (const std::string &url)=0 |
virtual bool | RunProgressDialog (const std::string &title, bool canCancel, std::function< void(std::function< bool(size_t, size_t)> progress)> task)=0 |
|
pure virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
pure virtual |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
void BinaryNinja::ShowPlainTextReport | ( | const std::string & | title, |
const std::string & | contents ) |
Displays contents to the user in the UI or on the command-line.
title | Title for the report |
contents | Contents of the report |
void BinaryNinja::ShowMarkdownReport | ( | const std::string & | title, |
const std::string & | contents, | ||
const std::string & | plainText = "" ) |
Displays markdown contents to the user in the UI or on the command-line.
title | Title for the report |
contents | Markdown contents of the report |
plainText | Plaintext contents of the report (used on the command line) |
void BinaryNinja::ShowHTMLReport | ( | const std::string & | title, |
const std::string & | contents, | ||
const std::string & | plainText = "" ) |
Displays HTML contents to the user in the UI or on the command-line.
title | Title for the report |
contents | HTML contents of the report |
plainText | Plaintext contents of the report (used on the command line) |
void BinaryNinja::ShowGraphReport | ( | const std::string & | title, |
FlowGraph * | graph ) |
Displays a flow graph in UI applications and nothing in command-line applications.
title | Title for the report |
graph | FlowGraph object to be rendered. |
void BinaryNinja::ShowReportCollection | ( | const std::string & | title, |
ReportCollection * | reports ) |
Show a collection of reports.
title | Title for the collection of reports |
reports | Collection of reports to show |
bool BinaryNinja::GetTextLineInput | ( | std::string & | result, |
const std::string & | prompt, | ||
const std::string & | title ) |
Prompts the user to input a string with the given prompt and title.
[out] | result | Reference to the string the result will be copied to |
[in] | prompt | Prompt for the input |
[in] | title | Title for the input popup when used in UI |
bool BinaryNinja::GetIntegerInput | ( | int64_t & | result, |
const std::string & | prompt, | ||
const std::string & | title ) |
Prompts the user to input an integer with the given prompt and title.
[out] | result | Reference to the int64_t the result will be copied to |
[in] | prompt | Prompt for the input |
[in] | title | Title for the input popup when used in UI |
bool BinaryNinja::GetAddressInput | ( | uint64_t & | result, |
const std::string & | prompt, | ||
const std::string & | title ) |
Prompts the user to input an unsigned integer with the given prompt and title.
[out] | result | Reference to the uint64_t the result will be copied to |
[in] | prompt | Prompt for the input |
[in] | title | Title for the input popup when used in UI |
bool BinaryNinja::GetChoiceInput | ( | size_t & | idx, |
const std::string & | prompt, | ||
const std::string & | title, | ||
const std::vector< std::string > & | choices ) |
Prompts the user to select the one of the provided choices.
[out] | idx | Reference to the size_t the resulting index selected will be copied to |
[in] | prompt | Prompt for the input |
[in] | title | Title for the input popup when used in UI |
[in] | choices | List of string choices for the user to select from |
bool BinaryNinja::GetLargeChoiceInput | ( | size_t & | idx, |
const std::string & | title, | ||
const std::string & | prompt, | ||
const std::vector< std::string > & | choices ) |
Prompts the user to select the one of the provided choices out of a large list, with the option to filter choices.
[out] | idx | Reference to the size_t the resulting index selected will be copied to |
[in] | title | Title for the input popup / prompt for headless |
[in] | prompt | Prompt for the input (shown on the 'Select' button in UI) |
[in] | choices | List of string choices for the user to select from |
bool BinaryNinja::GetOpenFileNameInput | ( | std::string & | result, |
const std::string & | prompt, | ||
const std::string & | ext = "" ) |
Prompts the user for a file name to open.
Multiple file selection groups can be included if separated by two semicolons. Multiple file wildcards may be specified by using a space within the parenthesis.
Also, a simple selector of "\*.extension" by itself may also be used instead of specifying the description.
[out] | result | Reference to the string the result will be copied to |
[in] | prompt | Prompt for the dialog |
[in] | ext | Optional, file extension |
bool BinaryNinja::GetSaveFileNameInput | ( | std::string & | result, |
const std::string & | prompt, | ||
const std::string & | ext = "", | ||
const std::string & | defaultName = "" ) |
Prompts the user for a file name to save as, optionally providing a file extension and defaultName.
[out] | result | Reference to the string the result will be copied to |
[in] | prompt | Prompt for the dialog |
[in] | ext | Optional, file extension |
[in] | defaultName | Optional, default filename |
bool BinaryNinja::GetDirectoryNameInput | ( | std::string & | result, |
const std::string & | prompt, | ||
const std::string & | defaultName = "" ) |
Prompts the user for a directory name to save as, optionally providing a default_name.
[out] | result | Reference to the string the result will be copied to |
[in] | prompt | Prompt for the dialog |
[in] | defaultName | Optional, default directory name |
bool BinaryNinja::GetFormInput | ( | std::vector< FormInputField > & | fields, |
const std::string & | title ) |
Prompts the user for a set of inputs specified in `fields` with given title.
The fields parameter is a list containing FieldInputFields
[in,out] | fields | reference to a list containing FieldInputFields |
[in] | title | Title of the Form |
BNMessageBoxButtonResult BinaryNinja::ShowMessageBox | ( | const std::string & | title, |
const std::string & | text, | ||
BNMessageBoxButtonSet | buttons = OKButtonSet, | ||
BNMessageBoxIcon | icon = InformationIcon ) |
Displays a configurable message box in the UI, or prompts on the console as appropriate.
title | Title for the message box |
text | Contents of the message box |
buttons | Button Set type to display to the user OKButtonSet - Displays only an OK button YesNoButtonSet - Displays a Yes and a No button YesNoCancelButtonSet - Displays a Yes, No, and Cancel button |
icon | Icons to display to the user |
NoButton | No was clicked, or the box was closed and had type YesNoButtonSet |
YesButton | Yes was clicked |
OKButton | Ok Button was clicked, or the box was closed and had type OKButtonSet |
CancelButton | Cancel button was clicked or the dialog box was closed and had type YesNoCancelButtonSet |
bool BinaryNinja::OpenUrl | ( | const std::string & | url | ) |
Opens a given url in the user's web browser, if available.
url | URL to open |