dissect.target.plugins.os.unix.locate.gnulocate
¶
Module Contents¶
Classes¶
locate file parser |
|
GNU locate plugin. |
Attributes¶
- dissect.target.plugins.os.unix.locate.gnulocate.gnulocate_def = Multiline-String¶
Show Value
""" #define MAGIC 0x004c4f43415445303200 /* b'/x00LOCATE02/x00' */ struct entry { int8 offset; char path[]; } """
- dissect.target.plugins.os.unix.locate.gnulocate.GNULocateRecord¶
- dissect.target.plugins.os.unix.locate.gnulocate.c_gnulocate¶
- class dissect.target.plugins.os.unix.locate.gnulocate.GNULocateFile(fh: BinaryIO)¶
locate file parser
Multiple formats exist for the locatedb file. This class only supports the most recent version
LOCATE02
.The file is encoded with front compression (incremental encoding). This is a form of compression which takes a number of characters of the previous encoded entries. Entries are separated with a null byte.
- fh¶
- count = 0¶
- previous_path = ''¶
- __iter__() Iterable[GNULocateFile] ¶
- class dissect.target.plugins.os.unix.locate.gnulocate.GNULocatePlugin(target: dissect.target.Target)¶
Bases:
dissect.target.plugins.os.unix.locate.locate.BaseLocatePlugin
GNU locate plugin.
- __namespace__ = 'gnulocate'¶
Defines the plugin namespace.
- path = '/var/cache/locate/locatedb'¶
- check_compatible() None ¶
Perform a compatibility check with the target.
This function should return
None
if the plugin is compatible with the current target (self.target
). For example, check if a certain file exists. Otherwise it should raise anUnsupportedPluginError
.- Raises:
UnsupportedPluginError – If the plugin could not be loaded.
- locate() Iterator[GNULocateRecord] ¶
Yield file and directory names from GNU findutils’ locatedb file.