summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h9
-rw-r--r--binaryninjacore.h15
-rw-r--r--transformsession.cpp50
-rw-r--r--ui/containerbrowser.h2
-rw-r--r--ui/passwordedit.h8
5 files changed, 16 insertions, 68 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 9e90eeb8..d7958113 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -9190,13 +9190,6 @@ namespace BinaryNinja {
std::vector<Ref<TransformContext>> GetSelectedContexts() const;
void SetSelectedContexts(const std::vector<Ref<TransformContext>>& contexts);
-
- // UI interaction support
- bool RequiresUserInput() const;
- bool HasMultipleFileChoices() const;
- std::vector<std::string> GetAvailableFileChoices() const;
- bool SelectFiles(const std::vector<std::string>& selectedFiles);
- bool ProcessWithUserInput();
};
@@ -10071,7 +10064,7 @@ namespace BinaryNinja {
{
return !(*this == var);
}
-
+
bool operator<(const Variable& var) const
{
if (type != var.type)
diff --git a/binaryninjacore.h b/binaryninjacore.h
index f19d57d5..d5b38e11 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -37,14 +37,14 @@
// Current ABI version for linking to the core. This is incremented any time
// there are changes to the API that affect linking, including new functions,
// new types, or modifications to existing functions or types.
-#define BN_CURRENT_CORE_ABI_VERSION 138
+#define BN_CURRENT_CORE_ABI_VERSION 139
// Minimum ABI version that is supported for loading of plugins. Plugins that
// are linked to an ABI version less than this will not be able to load and
// will require rebuilding. The minimum version is increased when there are
// incompatible changes that break binary compatibility, such as changes to
// existing types or functions.
-#define BN_MINIMUM_CORE_ABI_VERSION 138
+#define BN_MINIMUM_CORE_ABI_VERSION 139
#ifdef __GNUC__
#ifdef BINARYNINJACORE_LIBRARY
@@ -370,9 +370,9 @@ extern "C"
typedef enum BNTransformSessionMode
{
- TransformSessionModeDisabled = 0, // Open the root file as-is (no unwrapping)
- TransformSessionModeFull = 1, // Discover all paths (build the full context tree)
- TransformSessionModeOnDemand = 2, // Proceed step-by-step, requesting input at each stage
+ TransformSessionModeDisabled = 0, // Open the root file as-is (no unwrapping)
+ TransformSessionModeFull = 1, // Discover all paths (build the full context tree)
+ TransformSessionModeInteractive = 2 // Interactively request selection at each level of the container hierarchy
} BNTransformSessionMode;
typedef enum BNTransformResult
@@ -4780,11 +4780,6 @@ extern "C"
BINARYNINJACOREAPI bool BNTransformSessionHasSinglePath(BNTransformSession* session);
BINARYNINJACOREAPI BNTransformContext** BNTransformSessionGetSelectedContexts(BNTransformSession* session, size_t* count);
BINARYNINJACOREAPI void BNTransformSessionSetSelectedContexts(BNTransformSession* session, BNTransformContext** contexts, size_t count);
- BINARYNINJACOREAPI bool BNTransformSessionRequiresUserInput(BNTransformSession* session);
- BINARYNINJACOREAPI bool BNTransformSessionHasMultipleFileChoices(BNTransformSession* session);
- BINARYNINJACOREAPI char** BNTransformSessionGetAvailableFileChoices(BNTransformSession* session, size_t* count);
- BINARYNINJACOREAPI bool BNTransformSessionSelectFiles(BNTransformSession* session, const char** files, size_t count);
- BINARYNINJACOREAPI bool BNTransformSessionProcessWithUserInput(BNTransformSession* session);
// Architectures
BINARYNINJACOREAPI BNArchitecture* BNGetArchitectureByName(const char* name);
diff --git a/transformsession.cpp b/transformsession.cpp
index 0f10f067..9cf5cf3b 100644
--- a/transformsession.cpp
+++ b/transformsession.cpp
@@ -104,53 +104,3 @@ void TransformSession::SetSelectedContexts(const vector<Ref<TransformContext>>&
BNTransformSessionSetSelectedContexts(m_object, cContexts, contexts.size());
delete[] cContexts;
}
-
-
-bool TransformSession::RequiresUserInput() const
-{
- return BNTransformSessionRequiresUserInput(m_object);
-}
-
-
-bool TransformSession::HasMultipleFileChoices() const
-{
- return BNTransformSessionHasMultipleFileChoices(m_object);
-}
-
-
-vector<string> TransformSession::GetAvailableFileChoices() const
-{
- size_t count;
- char** files = BNTransformSessionGetAvailableFileChoices(m_object, &count);
-
- vector<string> result;
- result.reserve(count);
-
- for (size_t i = 0; i < count; i++)
- {
- result.push_back(files[i]);
- }
-
- BNFreeStringList(files, count);
- return result;
-}
-
-
-bool TransformSession::SelectFiles(const vector<string>& selectedFiles)
-{
- const char** cFiles = new const char*[selectedFiles.size()];
- for (size_t i = 0; i < selectedFiles.size(); i++)
- {
- cFiles[i] = selectedFiles[i].c_str();
- }
-
- bool result = BNTransformSessionSelectFiles(m_object, cFiles, selectedFiles.size());
- delete[] cFiles;
- return result;
-}
-
-
-bool TransformSession::ProcessWithUserInput()
-{
- return BNTransformSessionProcessWithUserInput(m_object);
-}
diff --git a/ui/containerbrowser.h b/ui/containerbrowser.h
index 515a2836..289dc7c7 100644
--- a/ui/containerbrowser.h
+++ b/ui/containerbrowser.h
@@ -95,6 +95,8 @@ class BINARYNINJAUIAPI ContainerBrowser : public QDialog
void connectSignals();
void updatePreviewForIndex(const QModelIndex& proxyIndex);
bool requiresPassword(TransformContextRef context);
+ bool requiresExtraction(TransformContextRef context);
+ void extractItem(TransformContextRef context);
void promptForPassword(TransformContextRef context, bool tryCachedPassword = false);
void showContextMenu(const QPoint& position);
static QString toHexDump(const QByteArray& data, int bytesPerLine = 16);
diff --git a/ui/passwordedit.h b/ui/passwordedit.h
index f919803b..12db5f5c 100644
--- a/ui/passwordedit.h
+++ b/ui/passwordedit.h
@@ -3,13 +3,21 @@
#include <QtWidgets/QLineEdit>
#include "uitypes.h"
+class ClickableLabel;
+
class BINARYNINJAUIAPI PasswordEdit: public QLineEdit
{
Q_OBJECT
+ ClickableLabel* m_toggleLabel;
+ void updateToggleIcon();
+
public:
PasswordEdit(QWidget* parent = nullptr);
+protected:
+ void resizeEvent(QResizeEvent* event) override;
+
private slots:
void showContextMenu(const QPoint& pos);
};