From 054be043b9b819406a91e3c4c4447015c5d90283 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Tue, 15 Sep 2020 14:34:15 -0400 Subject: more detailed documentation for core_set_license --- python/__init__.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/__init__.py b/python/__init__.py index 2d2da238..d26f5a73 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -249,7 +249,20 @@ def core_ui_enabled(): def core_set_license(licenseData): - '''Set the Binary Ninja license data, an alternative to storing a ``license.dat`` file''' + ''' + ``core_set_license`` is used to initialize the core with a license file that doesn't necessarily reside on a file system. This is especially useful for headless environments such as docker where loading the license file via an environment variable allows for greater security of the license file itself. + + :param str licenseData: string containing the full contents of a license file + :return: user plugin path + :rtype: None + :Example: + + >>> import os + >>> core_set_license(os.environ['BNLICENSE']) #Do this before creating any BinaryViews + >>> with open_view("/bin/ls") as bv: + ... print(len(bv.functions)) + 128 + ''' core.BNSetLicense(licenseData) -- cgit v1.3.1