Exemplo n.º 1
0
def main():
    args_parser = argparse.ArgumentParser(description="Tests get_version.")

    options = args_parser.parse_args()

    try:
        pybde.get_version()
    except Exception:
        return False

    return True
Exemplo n.º 2
0
def main():
  args_parser = argparse.ArgumentParser(
      description="Tests get_version.")

  options = args_parser.parse_args()

  try:
    pybde.get_version()
  except Exception:
    return False

  return True
Exemplo n.º 3
0
 def test_get_version(self):
   """Tests the get_version function."""
   version = pybde.get_version()
Exemplo n.º 4
0
# -*- coding: utf-8 -*-
"""The BitLocker Drive Encryption (BDE) file-like object."""

import pybde

from dfvfs.file_io import file_object_io
from dfvfs.lib import bde
from dfvfs.lib import errors
from dfvfs.resolver import resolver


if pybde.get_version() < '20140531':
  raise ImportWarning('BdeFile requires at least pybde 20140531.')


class BdeFile(file_object_io.FileObjectIO):
  """Class that implements a file-like object using pybde."""

  def _OpenFileObject(self, path_spec):
    """Opens the file-like object defined by path specification.

    Args:
      path_spec: the path specification (instance of path.PathSpec).

    Returns:
      A file-like object.

    Raises:
      PathSpecError: if the path specification is incorrect.
    """
    if not path_spec.HasParent():
Exemplo n.º 5
0
 def test_get_version(self):
     """Tests the get_version function."""
     version = pybde.get_version()
     self.assertIsNotNone(version)