コード例 #1
0
def main():
    args_parser = argparse.ArgumentParser(description="Tests get_version.")

    options = args_parser.parse_args()

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

    return True
コード例 #2
0
def main():
  args_parser = argparse.ArgumentParser(
      description="Tests get_version.")

  options = args_parser.parse_args()

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

  return True
コード例 #3
0
ファイル: pprof.py プロジェクト: iwm911/plaso
def PrintHeader(options):
  """Print header information, including library versions."""
  print frontend_utils.FormatHeader('File Parsed')
  print u'{:>20s}'.format(options.file_to_parse)

  print frontend_utils.FormatHeader('Versions')
  print frontend_utils.FormatOutputString('plaso engine', plaso.GetVersion())
  print frontend_utils.FormatOutputString('pyevt', pyevt.get_version())
  print frontend_utils.FormatOutputString('pyevtx', pyevtx.get_version())
  print frontend_utils.FormatOutputString('pylnk', pylnk.get_version())
  print frontend_utils.FormatOutputString('pymsiecf', pymsiecf.get_version())
  print frontend_utils.FormatOutputString('pyregf', pyregf.get_version())

  if options.filter:
    print frontend_utils.FormatHeader('Filter Used')
    print frontend_utils.FormatOutputString('Filter String', options.filter)

  if options.parsers:
    print frontend_utils.FormatHeader('Parser Filter Used')
    print frontend_utils.FormatOutputString('Parser String', options.parsers)
コード例 #4
0
def PrintHeader(options):
    """Print header information, including library versions."""
    print frontend_utils.FormatHeader('File Parsed')
    print u'{:>20s}'.format(options.file_to_parse)

    print frontend_utils.FormatHeader('Versions')
    print frontend_utils.FormatOutputString('plaso engine', plaso.GetVersion())
    print frontend_utils.FormatOutputString('pyevt', pyevt.get_version())
    print frontend_utils.FormatOutputString('pyevtx', pyevtx.get_version())
    print frontend_utils.FormatOutputString('pylnk', pylnk.get_version())
    print frontend_utils.FormatOutputString('pymsiecf', pymsiecf.get_version())
    print frontend_utils.FormatOutputString('pyregf', pyregf.get_version())

    if options.filter:
        print frontend_utils.FormatHeader('Filter Used')
        print frontend_utils.FormatOutputString('Filter String',
                                                options.filter)

    if options.parsers:
        print frontend_utils.FormatHeader('Parser Filter Used')
        print frontend_utils.FormatOutputString('Parser String',
                                                options.parsers)
コード例 #5
0
 def test_get_version(self):
     """Tests the get_version function."""
     version = pymsiecf.get_version()
コード例 #6
0
 def test_get_version(self):
     """Tests the get_version function."""
     version = pymsiecf.get_version()
     self.assertIsNotNone(version)
コード例 #7
0
# See the License for the specific language governing permissions and
# limitations under the License.
"""Parser for Microsoft Internet Explorer (MSIE) Cache Files (CF)."""

import logging

import pymsiecf

from plaso.events import time_events
from plaso.lib import errors
from plaso.lib import eventdata
from plaso.lib import timelib
from plaso.parsers import interface
from plaso.parsers import manager

if pymsiecf.get_version() < '20130317':
    raise ImportWarning(u'MsiecfParser requires at least pymsiecf 20130317.')


class MsiecfUrlEvent(time_events.TimestampEvent):
    """Convenience class for an MSIECF URL event."""

    DATA_TYPE = 'msiecf:url'

    def __init__(self,
                 timestamp,
                 timestamp_description,
                 msiecf_item,
                 recovered=False):
        """Initializes the event.
コード例 #8
0
ファイル: msiecf.py プロジェクト: cnbird1999/plaso
# -*- coding: utf-8 -*-
"""Parser for Microsoft Internet Explorer (MSIE) Cache Files (CF)."""

import pymsiecf

from plaso.events import time_events
from plaso.lib import eventdata
from plaso.lib import timelib
from plaso.lib import specification
from plaso.parsers import interface
from plaso.parsers import manager


if pymsiecf.get_version() < '20150314':
  raise ImportWarning(u'MsiecfParser requires at least pymsiecf 20150314.')


class MsiecfLeakEvent(time_events.TimestampEvent):
  """Convenience class for an MSIECF leak event."""

  DATA_TYPE = 'msiecf:leak'

  def __init__(
      self, timestamp, timestamp_description, cache_directories, msiecf_item,
      recovered=False):
    """Initializes the event.

    Args:
      timestamp: The timestamp value.
      timestamp_description: The usage string describing the timestamp.
      cache_directories: A list of cache directory names.
コード例 #9
0
# -*- coding: utf-8 -*-
"""Parser for Microsoft Internet Explorer (MSIE) Cache Files (CF)."""

import pymsiecf

from plaso.events import time_events
from plaso.lib import eventdata
from plaso.lib import timelib
from plaso.lib import specification
from plaso.parsers import interface
from plaso.parsers import manager

if pymsiecf.get_version() < '20150314':
    raise ImportWarning(u'MsiecfParser requires at least pymsiecf 20150314.')


class MsiecfLeakEvent(time_events.TimestampEvent):
    """Convenience class for an MSIECF leak event."""

    DATA_TYPE = 'msiecf:leak'

    def __init__(self,
                 timestamp,
                 timestamp_description,
                 cache_directories,
                 msiecf_item,
                 recovered=False):
        """Initializes the event.

    Args:
      timestamp: The timestamp value.
コード例 #10
0
ファイル: msiecf.py プロジェクト: cvandeplas/plaso
# limitations under the License.
"""Parser for Microsoft Internet Explorer (MSIE) Cache Files (CF)."""

import logging

import pymsiecf

from plaso.events import time_events
from plaso.lib import errors
from plaso.lib import eventdata
from plaso.lib import timelib
from plaso.parsers import interface
from plaso.parsers import manager


if pymsiecf.get_version() < '20130317':
  raise ImportWarning(u'MsiecfParser requires at least pymsiecf 20130317.')


class MsiecfUrlEvent(time_events.TimestampEvent):
  """Convenience class for an MSIECF URL event."""

  DATA_TYPE = 'msiecf:url'

  def __init__(
      self, timestamp, timestamp_description, msiecf_item, recovered=False):
    """Initializes the event.

    Args:
      timestamp: The timestamp value.
      timestamp_desc: The usage string describing the timestamp.