summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2019-04-22 20:27:18 -0400
committerPeter LaFosse <peter@vector35.com>2019-04-25 20:38:18 -0400
commit893e730742452a041f26501b30e95e46d4363ec1 (patch)
treea59a2651c4a7ae0f53cb340505f053819126c9ad /python
parent89f9cb476aa02276a196e9a79ac675f7d15f9d3d (diff)
Add SetLicense API
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/python/__init__.py b/python/__init__.py
index 03154991..711a178a 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -225,11 +225,12 @@ _plugin_init = False
def _init_plugins():
global _plugin_init
if not _plugin_init:
- _plugin_init = True
core.BNInitCorePlugins()
core.BNInitUserPlugins()
core.BNInitRepoPlugins()
- if not core.BNIsLicenseValidated():
+ if core.BNIsLicenseValidated():
+ _plugin_init = True
+ else:
raise RuntimeError("License is not valid. Please supply a valid license.")
@@ -299,3 +300,8 @@ def core_license_count():
def core_ui_enabled():
'''Indicates that a UI exists and the UI has invoked BNInitUI'''
return core.BNIsUIEnabled()
+
+
+def core_set_license(licenseData):
+ '''Set the Binary Ninja license data, an alternative to storing a ``license.dat`` file'''
+ core.BNSetLicense(licenseData) \ No newline at end of file