modules.packages.reboot

Package modules :: Package packages :: Module reboot |
[hide private]
[frames] | no frames]

# Source Code for Module modules.packages.reboot

     1  # Copyright (C) 2016 Cuckoo Foundation.
     2  # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
     3  # See the file 'docs/LICENSE' for copying permission.
     4
     5  import logging
     6
     7  from lib.common.abstracts import Package
     8
     9  log = logging.getLogger(__name__)
    10
    11 -class Reboot(Package):
    12      """Reboot analysis package."""
    13
    14 -    def _handle_create_process(self, filepath, command_line, source):
    15          self.pids.append(self.execute(filepath, command_line))
    16
    17 -    def start(self, path):
    18          for category, args in self.analyzer.reboot:
    19              if not hasattr(self, "_handle_%s" % category):
    20                  log.warning("Unhandled reboot command: %s", category)
    21                  continue
    22
    23              getattr(self, "_handle_%s" % category)(*args)
    24