Module Expr Str ImportFrom alias Import alias Import alias If CompareLt SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Import alias identifier ImportFrom alias orelse Import alias identifier ImportFrom alias Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore ListLoad TupleLoad Str Str Str NameLoad TupleLoad Str Str Str NameLoad TupleLoad Str Str Str NameLoad TupleLoad Str Str Str NameLoad TupleLoad Str Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return Assign NameStore Call NameLoad NameLoad If BoolOpOr UnaryOpNot NameLoad CompareNotEq AttributeLoad NameLoad attr Num body Return Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore SubscriptLoad Call NameLoad Call NameLoad NameLoad ListLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Return If CompareIn Str NameLoad body For NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Slice Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Return Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Return Num Return Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Return Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpOr UnaryOpNot NameLoad CompareNotEq Call NameLoad NameLoad Num body Return Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num If UnaryOpNot NameLoad body Return Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Return Num Return Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore NameLoad Continue Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore NameLoad If NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore NameLoad If UnaryOpNot NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore NameLoad If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareLt NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad NameLoad Assign NameStore NameLoad orelse If BoolOpAnd NameLoad CompareNotEq NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad NameLoad orelse Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad If NameLoad body Expr Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad If BoolOpOr UnaryOpNot NameLoad UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return NameLoad If NameLoad body Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str If CompareLt NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad If UnaryOpNot Call NameLoad NameLoad Str body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareLt NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return NameLoad Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad Assign NameStore Call NameLoad NameLoad Str NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Expr Call NameLoad Str Assign NameStore NameLoad For NameStore NameLoad body If UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num body Assign NameStore NameLoad If UnaryOpNot Call NameLoad body Assign NameStore NameLoad If UnaryOpNot Call NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad If UnaryOpNot NameLoad body Assign NameStore NameLoad Expr Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareNotIn NameLoad NameLoad body Return TryExcept body Assign NameStore SubscriptLoad Call NameLoad Call NameLoad NameLoad ListLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Raise Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign NameStore Call NameLoad NameLoad Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Str If CompareLt NameLoad SubscriptLoad NameLoad Index NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return Call NameLoad NameLoad decorator_list
N/A N/A Functionality to check for the availability and version of dependencies. __future__ print_function N/A re N/A sys N/A N/A N/A N/A sys version_info N/A 0 3 N/A N/A urllib2 urllib_error urllib2 urlopen N/A N/A urllib.error urllib_error urllib.request urlopen N/A LIBYAL_DEPENDENCIES N/A pybde pyewf pyfsntfs pyfwnt pyqcow pysigscan pysmdev pysmraw pyvhdi pyvmdk pyvshadow pyvslvm 20140531 20131210 20160418 20160418 20131204 20150627 20140428 20140612 20160423 20140421 20160110 20160109 N/A PYTHON_DEPENDENCIES N/A N/A construct __version__ 2.5.2 None N/A Crypto __version__ 2.6.0 None N/A dfdatetime __version__ 20160311 None N/A google.protobuf None N/A six __version__ 1.1.0 None N/A _VERSION_SPLIT_REGEX N/A N/A re compile \.|\- _DownloadPageContent N/A N/A download_url N/A N/A N/A Downloads the page content.

  Args:
    download_url: the URL where to download the page content.

  Returns:
    The page content if successful, None otherwise.
   N/A N/A download_url N/A N/A N/A url_object N/A urlopen download_url N/A N/A N/A url_object N/A N/A url_object code 200 N/A N/A N/A N/A N/A url_object read N/A _ImportPythonModule N/A N/A module_name N/A N/A N/A Imports a Python module.

  Args:
    module_name: the name of the module.

  Returns:
    The Python module object (instance of module) or None
    if the module cannot be imported.
   N/A N/A N/A module_object N/A N/A list N/A map __import__ N/A module_name N/A 0 N/A N/A N/A ImportError N/A N/A N/A N/A . module_name N/A N/A submodule_name N/A N/A N/A module_name split . N/A 1 N/A N/A module_object N/A getattr module_object submodule_name None N/A module_object N/A _GetLibyalGithubReleasesLatestVersion N/A N/A library_name N/A N/A N/A Retrieves the latest version number of a libyal library on GitHub releases.

  Args:
    library_name: the name of the libyal library.

  Returns:
    The latest version for a given libyal library on GitHub releases
    or 0 on error.
   N/A download_url N/A N/A https://github.com/libyal/{0:s}/releases format library_name N/A page_content N/A _DownloadPageContent download_url N/A N/A page_content N/A N/A 0 N/A page_content N/A N/A page_content decode utf-8 N/A expression_string N/A N/A /libyal/{0:s}/releases/download/[^/]*/{0:s}-[a-z-]*([0-9]+)[.]tar[.]gz format library_name N/A matches N/A N/A re findall expression_string page_content N/A N/A matches N/A N/A 0 N/A N/A int N/A max matches N/A _GetLibyalGoogleDriveLatestVersion N/A N/A library_name N/A N/A N/A Retrieves the latest version number of a libyal library on Google Drive.

  Args:
    library_name: the name of the libyal library.

  Returns:
    The latest version for a given libyal library on Google Drive
    or 0 on error.
   N/A download_url N/A N/A https://code.google.com/p/{0:s}/ format library_name N/A page_content N/A _DownloadPageContent download_url N/A N/A page_content N/A N/A 0 N/A page_content N/A N/A page_content decode utf-8 N/A expression_string <a href="(https://googledrive.com/host/[^/]*/)"[^>]*>Downloads</a> N/A matches N/A N/A re findall expression_string page_content N/A N/A N/A matches N/A N/A len matches 1 N/A N/A 0 N/A page_content N/A _DownloadPageContent N/A matches N/A 0 N/A N/A page_content N/A N/A 0 N/A page_content N/A N/A page_content decode utf-8 N/A expression_string N/A N/A /host/[^/]*/{0:s}-[a-z-]*([0-9]+)[.]tar[.]gz format library_name N/A matches N/A N/A re findall expression_string page_content N/A N/A matches N/A N/A 0 N/A N/A int N/A max matches N/A _CheckLibyal N/A N/A libyal_python_modules latest_version_check N/A False N/A N/A Checks the availability of libyal libraries.

  Args:
    libyal_python_modules: a dictionary of libyal python module name as
                           the key and version as the value.
    latest_version_check: optional boolean value to indicate if the project
                          site should be checked for the latest version.

  Returns:
    True if the libyal libraries are available, False otherwise.
   N/A connection_error False N/A result True N/A N/A module_name module_version N/A sorted N/A N/A libyal_python_modules items N/A N/A module_object N/A _ImportPythonModule module_name N/A N/A module_object N/A N/A N/A print N/A N/A [FAILURE]	missing: {0:s}. format module_name N/A result False N/A N/A libyal_name N/A N/A lib{0:s} format N/A module_name N/A 2 N/A installed_version N/A int N/A N/A module_object get_version N/A latest_version None N/A latest_version_check N/A N/A N/A N/A latest_version N/A _GetLibyalGithubReleasesLatestVersion libyal_name N/A N/A N/A N/A urllib_error URLError N/A N/A latest_version None N/A N/A latest_version N/A N/A N/A N/A latest_version N/A _GetLibyalGoogleDriveLatestVersion libyal_name N/A N/A N/A N/A urllib_error URLError N/A N/A latest_version None N/A N/A latest_version N/A N/A N/A print N/A N/A Unable to determine latest version of {0:s} ({1:s}).
 format libyal_name module_name N/A latest_version None N/A connection_error True N/A N/A N/A module_version None N/A installed_version module_version N/A N/A N/A print N/A N/A [FAILURE]	{0:s} ({1:s}) version: {2:d} is too old, {3:d} or later required. format libyal_name module_name installed_version module_version N/A result False N/A N/A N/A latest_version N/A installed_version latest_version N/A N/A N/A print N/A N/A [INFO]		{0:s} ({1:s}) version: {2:d} installed, version: {3:d} available. format libyal_name module_name installed_version latest_version N/A N/A N/A print N/A N/A [OK]		{0:s} ({1:s}) version: {2:d} format libyal_name module_name installed_version N/A connection_error N/A N/A N/A print [INFO] to check for the latest versions this script needs Internet access. N/A result N/A _CheckPythonModule N/A N/A module_name version_attribute_name minimum_version maximum_version N/A None N/A N/A Checks the availability of a Python module.

  Args:
    module_name: the name of the module.
    version_attribute_name: the name of the attribute that contains the module
                            version.
    minimum_version: the minimum required version.
    maximum_version: the maximum required version. This attribute is optional
                     and should only be used if there is a recent API change
                     that prevents the tool from running if a later version
                     is used.

  Returns:
    True if the Python module is available and conforms to the minimum required
    version. False otherwise.
   N/A module_object N/A _ImportPythonModule module_name N/A N/A module_object N/A N/A N/A print N/A N/A [FAILURE]	missing: {0:s}. format module_name N/A False N/A N/A N/A version_attribute_name N/A minimum_version N/A N/A N/A print N/A N/A [OK]		{0:s} format module_name N/A True N/A module_version N/A getattr module_object version_attribute_name None N/A N/A module_version N/A N/A N/A print N/A N/A [FAILURE]	unable to determine version information for: {0:s} format module_name N/A False N/A module_version_map N/A list N/A map int N/A N/A _VERSION_SPLIT_REGEX split module_version N/A minimum_version_map N/A list N/A map int N/A N/A _VERSION_SPLIT_REGEX split minimum_version N/A N/A module_version_map minimum_version_map N/A N/A N/A print N/A N/A [FAILURE]	{0:s} version: {1:s} is too old, {2:s} or later required. format module_name module_version minimum_version N/A False N/A maximum_version N/A N/A maximum_version_map N/A list N/A map int N/A N/A _VERSION_SPLIT_REGEX split maximum_version N/A N/A module_version_map maximum_version_map N/A N/A N/A print N/A N/A [FAILURE]	{0:s} version: {1:s} is too recent, {2:s} or earlier required. format module_name module_version maximum_version N/A False N/A N/A print N/A N/A [OK]		{0:s} version: {1:s} format module_name module_version N/A True N/A _CheckPyTSK N/A N/A N/A N/A N/A Checks the availability of pytsk.

  Returns:
    True if the pytsk Python module is available, False otherwise.
   N/A module_name pytsk3 N/A minimum_version_libtsk 4.1.2 N/A minimum_version_pytsk 20140506 N/A module_object N/A _ImportPythonModule module_name N/A N/A module_object N/A N/A N/A print N/A N/A [FAILURE]	missing: {0:s}. format module_name N/A False N/A module_version N/A module_object TSK_VERSION_STR N/A module_version_map N/A list N/A map int N/A N/A module_version split . N/A minimum_version_map N/A list N/A map int N/A N/A minimum_version_libtsk split . N/A N/A module_version_map minimum_version_map N/A N/A N/A print N/A N/A [FAILURE]	SleuthKit (libtsk) version: {0:s} is too old, {1:s} or later required. format module_version minimum_version_libtsk N/A False N/A N/A print N/A N/A [OK]		SleuthKit version: {0:s} format module_version N/A N/A N/A hasattr module_object get_version N/A N/A N/A print N/A N/A [FAILURE]	{0:s} is too old, {1:s} or later required. format module_name minimum_version_pytsk N/A False N/A module_version N/A N/A module_object get_version N/A N/A module_version minimum_version_pytsk N/A N/A N/A print N/A N/A [FAILURE]	{0:s} version: {1:s} is too old, {2:s} or later required. format module_name module_version minimum_version_pytsk N/A False N/A N/A print N/A N/A [OK]		{0:s} version: {1:s} format module_name module_version N/A True N/A _CheckSQLite3 N/A N/A N/A N/A N/A Checks the availability of sqlite3.

  Returns:
    True if the sqlite3 Python module is available, False otherwise.
   N/A module_name pysqlite2.dbapi2 N/A minimum_version 3.7.8 N/A module_object N/A _ImportPythonModule module_name N/A N/A module_object N/A N/A module_name sqlite3 N/A module_object N/A _ImportPythonModule module_name N/A N/A module_object N/A N/A N/A print N/A N/A [FAILURE]	missing: {0:s}. format module_name N/A False N/A module_version N/A getattr module_object sqlite_version None N/A N/A module_version N/A N/A False N/A module_version_map N/A list N/A map int N/A N/A _VERSION_SPLIT_REGEX split module_version N/A minimum_version_map N/A list N/A map int N/A N/A _VERSION_SPLIT_REGEX split minimum_version N/A N/A module_version_map minimum_version_map N/A N/A N/A print N/A N/A [FAILURE]	{0:s} version: {1:s} is too old, {2:s} or later required. format module_name module_version minimum_version N/A False N/A True N/A CheckDependencies N/A N/A latest_version_check N/A False N/A N/A Checks the availability of the dependencies.

  Args:
    latest_version_check: Optional boolean value to indicate if the project
                          site should be checked for the latest version.

  Returns:
    True if the dependencies are available, False otherwise.
   N/A N/A print Checking availability and versions of dfvfs dependencies. N/A check_result True N/A values PYTHON_DEPENDENCIES N/A N/A N/A N/A _CheckPythonModule N/A values N/A 0 N/A values N/A 1 N/A values N/A 2 maximum_version N/A values N/A 3 N/A N/A check_result False N/A N/A N/A _CheckSQLite3 N/A N/A check_result False N/A N/A N/A _CheckPyTSK N/A N/A check_result False N/A libyal_check_result N/A _CheckLibyal LIBYAL_DEPENDENCIES latest_version_check latest_version_check N/A N/A libyal_check_result N/A N/A check_result False N/A N/A print N/A check_result N/A CheckModuleVersion N/A N/A module_name N/A N/A N/A Checks the version requirements of a module.

  Args:
    module_name: the name of the module.

  Raises:
    ImportError: if the module does not exists or does not meet
                 the version requirements.
   N/A N/A module_name LIBYAL_DEPENDENCIES N/A N/A N/A N/A N/A module_object N/A N/A list N/A map __import__ N/A module_name N/A 0 N/A N/A N/A ImportError N/A N/A N/A module_version N/A N/A module_object get_version N/A N/A N/A module_version N/A int module_version 10 N/A N/A N/A ValueError N/A N/A N/A ImportError Unable to determine version of module {0:s} N/A N/A module_version N/A LIBYAL_DEPENDENCIES N/A module_name N/A N/A N/A ImportError N/A N/A Module {0:s} is too old, minimum required version {1!s} format module_name module_version N/A GetInstallRequires N/A N/A N/A N/A N/A Returns the install_requires for setup.py N/A install_requires N/A N/A values PYTHON_DEPENDENCIES N/A N/A module_name N/A values N/A 0 N/A module_version N/A values N/A 2 N/A N/A module_name yaml N/A N/A module_name PyYAML N/A N/A N/A module_name sqlite3 N/A N/A module_name pysqlite N/A module_version None N/A N/A module_version N/A N/A N/A N/A install_requires append module_name N/A N/A N/A N/A install_requires append N/A N/A {0:s} >= {1:s} format module_name module_version N/A N/A N/A install_requires append pytsk3 >= 4.1.2 N/A N/A module_name module_version N/A sorted N/A N/A LIBYAL_DEPENDENCIES items N/A N/A N/A module_version N/A N/A N/A N/A install_requires append module_name N/A N/A N/A N/A install_requires append N/A N/A {0:s} >= {1:d} format module_name module_version N/A N/A sorted install_requires N/A