summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h1
-rw-r--r--binaryninjacore.h1
-rw-r--r--pluginmanager.cpp6
-rw-r--r--python/pluginmanager.py5
-rw-r--r--rust/src/repository/plugin.rs5
5 files changed, 18 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index af9992fd..ac528db8 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -19219,6 +19219,7 @@ namespace BinaryNinja {
VersionInfo GetMaximumVersionInfo() const;
std::string GetCreationDate();
bool IsViewOnly() const;
+ bool IsPaid() const;
bool IsBeingDeleted() const;
bool IsBeingUpdated() const;
bool IsInstalled() const;
diff --git a/binaryninjacore.h b/binaryninjacore.h
index cec95ec9..c5dcc7d4 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -7987,6 +7987,7 @@ extern "C"
BINARYNINJACOREAPI void BNPluginFreeVersion(BNPluginVersion v);
BINARYNINJACOREAPI const char* BNPluginGetCommit(BNPlugin* p);
BINARYNINJACOREAPI const bool BNPluginGetViewOnly(BNPlugin* p);
+ BINARYNINJACOREAPI const bool BNPluginGetIsPaid(BNPlugin* p);
BINARYNINJACOREAPI void BNFreePluginTypes(BNPluginType* r);
BINARYNINJACOREAPI BNPlugin* BNNewPluginReference(BNPlugin* r);
BINARYNINJACOREAPI void BNFreePlugin(BNPlugin* plugin);
diff --git a/pluginmanager.cpp b/pluginmanager.cpp
index bfa0dfb9..1ce77606 100644
--- a/pluginmanager.cpp
+++ b/pluginmanager.cpp
@@ -224,6 +224,12 @@ bool Extension::IsViewOnly() const
}
+bool Extension::IsPaid() const
+{
+ return BNPluginGetIsPaid(m_object);
+}
+
+
string Extension::GetRepository() const
{
RETURN_STRING(BNPluginGetRepository(m_object));
diff --git a/python/pluginmanager.py b/python/pluginmanager.py
index 32d410ea..64d58e69 100644
--- a/python/pluginmanager.py
+++ b/python/pluginmanager.py
@@ -222,6 +222,11 @@ class Extension:
return core.BNPluginGetPackageUrl(self.handle)
@property
+ def is_paid(self) -> bool:
+ """Boolean True if this plugin requires payment, False otherwise"""
+ return core.BNPluginGetIsPaid(self.handle)
+
+ @property
def author_url(self) -> Optional[str]:
"""String URL of the plugin author's url"""
return core.BNPluginGetAuthorUrl(self.handle)
diff --git a/rust/src/repository/plugin.rs b/rust/src/repository/plugin.rs
index 1abee1e8..9a8dba91 100644
--- a/rust/src/repository/plugin.rs
+++ b/rust/src/repository/plugin.rs
@@ -157,6 +157,11 @@ impl Extension {
unsafe { BnString::into_string(result as *mut c_char) }
}
+ /// Boolean True if this plugin requires payment, False otherwise
+ pub fn is_paid(&self) -> bool {
+ unsafe { BNPluginGetIsPaid(self.handle.as_ptr()) }
+ }
+
/// String URL of the plugin author's url
pub fn author_url(&self) -> String {
let result = unsafe { BNPluginGetAuthorUrl(self.handle.as_ptr()) };