How to use the pytsk3.Img_Info.__init__ function in pytsk3

To help you get started, we’ve selected a few pytsk3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / rekall / rekall-core / rekall / plugins / filesystems / tsk.py View on Github external
def __init__(self, address_space):
        self._as = address_space
        pytsk3.Img_Info.__init__(self, "")
github mit-ll / LO-PHI / python-lophi-semanticgap / lophi_semanticgap / disk / filesystems / __init__.py View on Github external
def __init__(self, url, sector_size):
        self.URL = url
        self.SECTOR_SIZE = sector_size
        
        ## Open the image
        self.fd = open(url, 'rb')
        if not self.fd:
            raise IOError("Unable to open %s" % url)

        ## data cache in sectors
        self.CACHE = {}

        ## Call the base class with an empty URL
        pytsk3.Img_Info.__init__(self, '')
github mit-ll / LO-PHI / python-lophi-semanticgap / lophi_semanticgap / disk / filesystem_reconstructor.py View on Github external
def __init__(self, url, sector_size):
        self.URL = url
        self.SECTOR_SIZE = sector_size
        
        ## Open the image
        self.fd = open(url, 'r+b')
        if not self.fd:
            raise IOError("Unable to open %s" % url)

        ## Call the base class with an empty URL
        pytsk3.Img_Info.__init__(self, '')
github py4n6 / aff4 / applications / hash_imager / imager.py View on Github external
def __init__(self, url):
        self.fd = oracle.open(url)
        if not self.fd:
            raise IOError("Unable to open %s" % url)

        pytsk3.Img_Info.__init__(self, '')
github google / grr / grr / client / grr_response_client / vfs_handlers / sleuthkit.py View on Github external
def __init__(self, fd=None, progress_callback=None):
    pytsk3.Img_Info.__init__(self)
    self.progress_callback = progress_callback
    self.fd = fd
github log2timeline / dfvfs / dfvfs / lib / tsk_image.py View on Github external
Raises:
      ValueError: if the file-like object is invalid.
    """
    if not file_object:
      raise ValueError('Missing file-like object.')

    # pytsk3.Img_Info does not let you set attributes after initialization.
    self._file_object = file_object
    # Using the old parent class invocation style otherwise some versions
    # of pylint complain also setting type to RAW or EXTERNAL to make sure
    # Img_Info does not do detection.
    tsk_img_type = getattr(
        pytsk3, 'TSK_IMG_TYPE_EXTERNAL', pytsk3.TSK_IMG_TYPE_RAW)
    # Note that we want url to be a binary string in Python 2 and a Unicode
    # string in Python 3. Hence the string is not prefixed.
    pytsk3.Img_Info.__init__(self, url='', type=tsk_img_type)
github py4n6 / aff4 / python2.6 / tsk / fls.py View on Github external
def __init__(self, url):
            self.fd = oracle.open(
                pyaff4.RDFURN(url), 'r')
            if not self.fd:
                raise IOError("Unable to open %s" % url)
            pytsk3.Img_Info.__init__(self, '')