pub struct TypeLibrary { /* private fields */ }Source§
Source
Creates an empty type library object with a random GUID and the provided name.
Source
Decompresses a type library file to a file on disk.
Source
Loads a finalized type library instance from file
Source
Saves a finalized type library instance to file
Source
Looks up the first type library found with a matching name. Keep in mind that names are not necessarily unique.
NOTE: If the type library architecture’s associated platform has not been initialized, this will
return None. To make sure that the platform has been initialized, one should instead get the type
libraries through Platform::get_type_libraries_by_name.
Source
Attempts to grab a type library associated with the provided Architecture and GUID pair.
NOTE: If the associated platform for the architecture has not been initialized,
this will return None. Avoid calling this outside of a view context.
Source
The Architecture this type library is associated with
Source
The primary name associated with this type library
Source
Sets the name of a type library instance that has not been finalized
Source
The dependency_name of a library is the name used to record dependencies across
type libraries. This allows, for example, a library with the name “musl_libc” to have
dependencies on it recorded as “libc_generic”, allowing a type library to be used across
multiple platforms where each has a specific libc that also provides the name “libc_generic”
as an alternate_name.
Source
Sets the dependency name of a type library instance that has not been finalized
Source
Returns the GUID associated with the type library
Source
Sets the GUID of a type library instance that has not been finalized
Source
Adds an extra name to this type library used during library lookups and dependency resolution
Source
Returns a list of all platform names that this type library will register with during platform type registration.
This returns strings, not Platform objects, as type libraries can be distributed with support for Platforms that may not be present.
Source
Associate a platform with a type library instance that has not been finalized.
This will cause the library to be searchable by Platform::get_type_libraries_by_name when loaded.
This does not have side affects until finalization of the type library.
Source
Clears the list of platforms associated with a type library instance that has not been finalized
Source
Flags a newly created type library instance as finalized and makes it available for Platform and Architecture type library searches
Source
Retrieves a metadata associated with the given key stored in the type library
Source
Stores an object for the given key in the current type library. Objects stored using
store_metadata can be retrieved from any reference to the library. Objects stored are not arbitrary python
objects! The values stored must be able to be held in a Metadata object. See Metadata
for more information. Python objects could obviously be serialized using pickle but this intentionally
a task left to the user since there is the potential security issues.
This is primarily intended as a way to store Platform specific information relevant to BinaryView implementations; for example the PE BinaryViewType uses type library metadata to retrieve ordinal information, when available.
key- key value to associate the Metadata object withmd- object to store.
Source
Removes the metadata associated with key from the current type library.
Source
Retrieves the metadata associated with the current type library.
Source
Directly inserts a named object into the type library’s object store. This is not done recursively, so care should be taken that types referring to other types through NamedTypeReferences are already appropriately prepared.
To add types and objects from an existing BinaryView, it is recommended to use
export_object_to_library <binaryview.BinaryView.export_object_to_library>, which will automatically pull in
all referenced types and record additional dependencies as needed.
Source
Directly inserts a named object into the type library’s object store. This is not done recursively, so care should be taken that types referring to other types through NamedTypeReferences are already appropriately prepared.
To add types and objects from an existing BinaryView, it is recommended to use
export_type_to_library <binaryview.BinaryView.export_type_to_library>, which will automatically pull in
all referenced types and record additional dependencies as needed.
Source
Manually flag NamedTypeReferences to the given QualifiedName as originating from another source TypeLibrary with the given dependency name.
Use this api with extreme caution.
Source
Direct extracts a reference to a contained object – when
attempting to extract types from a library into a BinaryView, consider using
import_library_object <binaryview.BinaryView.import_library_object> instead.
Source
Direct extracts a reference to a contained type – when
attempting to extract types from a library into a BinaryView, consider using
import_library_type <binaryview.BinaryView.import_library_type> instead.
Source
A dict containing all named objects (functions, exported variables) provided by a type library
Source
A dict containing all named types provided by a type library