Skip to content

License

license

Classes:

  • License –

    Provides access to and control over the active IDA license.

License

License()

Provides access to and control over the active IDA license.

A license may be not automatically selected until a database is loaded.

Requires IDA 9.5 or later.

IDA 9.5+

Methods:

  • add_on_end_date –

    Get the end of the activation period of an add-on of the active license.

  • borrow –

    Borrow the current license from the license server for offline use.

  • checkin –

    Check the current seat back in to the license server.

  • checkout –

    Activate the given license of the current license source.

  • has_add_on –

    Check if the active license is usable, contains the given add-on,

  • has_feature –

    Check if the active license is usable and includes the given feature.

  • return_borrowed –

    Return the borrowed license to the license server and check out a seat of it instead.

  • set_file –

    Use a license file as the license source and activate its license.

  • set_server –

    Use a license server as the license source and check out a license from it.

Attributes:

  • add_ons (List[str]) –

    The product codes of all currently usable add-ons of the active license,

  • description (Optional[str]) –

    The description of the active license, or None if there is no license

  • edition (Optional[str]) –

    The edition of the active license, e.g. "ida-pro", "ida-home-arm",

  • end_date (Optional[datetime]) –

    The end of the activation period (UTC), or None if there is no license

  • features (List[str]) –

    The features of the active license. Empty if there is no usable license.

  • id (Optional[str]) –

    The ID of the active license, in the "XX-XXXX-XXXX-XX" form,

  • is_decompiler_available (bool) –

    Whether a decompiler is available for the current database.

  • is_floating (bool) –

    Whether the active license is a floating license, served by a license

  • is_valid (bool) –

    Whether there is a usable active license.

  • issued_on (Optional[datetime]) –

    The time the active license was issued (UTC), or None if there is no license.

  • product (Optional[str]) –

    The product of the active license, e.g. "IDAPRO", "IDAHOME",

  • product_version (Optional[Version]) –

    The product version the active license is bound to, e.g. Version("9.4"),

  • source_ids (List[str]) –

    The IDs of all licenses provided by the active license source.

  • start_date (Optional[datetime]) –

    The start of the activation period (UTC), or None if there is no license.

add_ons property

add_ons: List[str]

The product codes of all currently usable add-ons of the active license, e.g. ["HEXX64", "LUMINA"]. Empty if there is no usable license.

description property

description: Optional[str]

The description of the active license, or None if there is no license or the license has no description.

edition property

edition: Optional[str]

The edition of the active license, e.g. "ida-pro", "ida-home-arm", or None if there is no license.

The value is informational, for display purposes; use has_add_on() and has_feature() to check what the license covers.

end_date property

end_date: Optional[datetime]

The end of the activation period (UTC), or None if there is no license or the license never expires.

The license remains usable during a grace period after this time. A borrowed floating license may stop being usable earlier, at the end of the borrow period.

features property

features: List[str]

The features of the active license. Empty if there is no usable license.

id property

id: Optional[str]

The ID of the active license, in the "XX-XXXX-XXXX-XX" form, or None if there is no license selected.

is_decompiler_available property

is_decompiler_available: bool

Whether a decompiler is available for the current database.

False if no database is open, there is no decompiler for it, the decompiler add-on is not part of the license, or its activation period has not started or has expired.

is_floating property

is_floating: bool

Whether the active license is a floating license, served by a license server, rather than a named license. False if there is no license.

is_valid property

is_valid: bool

Whether there is a usable active license.

False if there is no license or its activation period is not in effect. A floating license is usable only while this IDA instance holds it (a checked out seat or an unexpired borrow).

issued_on property

issued_on: Optional[datetime]

The time the active license was issued (UTC), or None if there is no license.

product property

product: Optional[str]

The product of the active license, e.g. "IDAPRO", "IDAHOME", or None if there is no license.

product_version property

product_version: Optional[Version]

The product version the active license is bound to, e.g. Version("9.4"), or None if there is no license or the license is not bound to a version.

source_ids property

source_ids: List[str]

The IDs of all licenses provided by the active license source.

A license file may contain several licenses; for a license server, the licenses listed when the seat was acquired are reported. The list is not filtered by validity. Empty if there is no license source.

start_date property

start_date: Optional[datetime]

The start of the activation period (UTC), or None if there is no license.

add_on_end_date

add_on_end_date(name: str) -> Optional[datetime]

Get the end of the activation period of an add-on of the active license.

The add-on remains usable during a grace period after this time.

Parameters:

  • name (str) –

    Add-on product code, e.g. "HEXX64", "LUMINA" (case sensitive).

Returns:

  • Optional[datetime] –

    The end of the activation period (UTC), or None if there is no license,

  • Optional[datetime] –

    the add-on is not part of it, or the add-on never expires.

borrow

borrow(until: datetime) -> bool

Borrow the current license from the license server for offline use.

Parameters:

  • until (datetime) –

    End of the borrow period. A datetime without a timezone is taken as local time.

Returns:

  • bool –

    True if the license was borrowed, False otherwise

  • bool –

    (e.g. the license source is a file, no license is checked out,

  • bool –

    or the server refused the borrow).

Raises:

  • InvalidParameterError –

    If until is not in the future.

checkin

checkin() -> bool

Check the current seat back in to the license server.

IDA keeps running without a license until one is activated again.

Returns:

  • bool –

    True if the seat was checked in, False otherwise

  • bool –

    (e.g. the license source is a file, no seat is held,

  • bool –

    or the current license is borrowed).

checkout

checkout(license_id: str) -> bool

Activate the given license of the current license source.

With a license server, the current seat is checked in first.

Parameters:

  • license_id (str) –

    License ID in the "XX-XXXX-XXXX-XX" form.

Returns:

  • bool –

    True if the license was activated, False otherwise

  • bool –

    (e.g. the current license source does not hold the license,

  • bool –

    or it could not be checked out).

Raises:

  • InvalidParameterError –

    If license_id is not in the "XX-XXXX-XXXX-XX" form.

has_add_on

has_add_on(name: str) -> bool

Check if the active license is usable, contains the given add-on, and the add-on activation period is in effect.

Parameters:

  • name (str) –

    Add-on product code, e.g. "HEXX64", "LUMINA" (case sensitive).

Returns:

  • bool –

    False if there is no usable license, the add-on is not part of the

  • bool –

    license, or its activation period has not started or has expired.

has_feature

has_feature(name: str) -> bool

Check if the active license is usable and includes the given feature.

Parameters:

  • name (str) –

    Feature name (case sensitive).

Returns:

  • bool –

    False if there is no usable license or the feature is not part of the license.

return_borrowed

return_borrowed() -> bool

Return the borrowed license to the license server and check out a seat of it instead.

Returns:

  • bool –

    True if the license was returned, False otherwise

  • bool –

    (e.g. the current license is not borrowed, or the server cannot be reached).

set_file

set_file(path: str) -> bool

Use a license file as the license source and activate its license.

The choice is not saved as the preferred license.

Parameters:

  • path (str) –

    Path of the license file.

Returns:

  • bool –

    True if a license from the file was activated, False otherwise

  • bool –

    (e.g. the file does not exist, is not a valid license file,

  • bool –

    or holds no usable license for this IDA product).

set_server

set_server(
    host: str, port: int = 0, use_tls: bool = True
) -> bool

Use a license server as the license source and check out a license from it.

The choice is not saved as the preferred license.

Parameters:

  • host (str) –

    Server host name or address.

  • port (int, default: 0 ) –

    Server port; 0 selects the default port (65434).

  • use_tls (bool, default: True ) –

    Whether to connect over TLS.

Returns:

  • bool –

    True if a license from the server was activated, False otherwise

  • bool –

    (e.g. the server cannot be reached, or no license could be checked out from it).

Raises:

  • InvalidParameterError –

    If port is outside the valid range.