modules.packages.python

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

# Source Code for Module modules.packages.python

     1  # Copyright (C) 2010-2013 Claudio Guarnieri.
     2  # Copyright (C) 2014-2016 Cuckoo Foundation.
     3  # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
     4  # See the file 'docs/LICENSE' for copying permission.
     5
     6  import shlex
     7
     8  from lib.common.abstracts import Package
     9
    10 -class Python(Package):
    11      """Python analysis package."""
    12
    13      PATHS = [
    14          ("HomeDrive", "Python24", "python.exe"),
    15          ("HomeDrive", "Python25", "python.exe"),
    16          ("HomeDrive", "Python26", "python.exe"),
    17          ("HomeDrive", "Python27", "python.exe"),
    18          ("HomeDrive", "Python32", "python.exe"),
    19          ("HomeDrive", "Python33", "python.exe"),
    20          ("HomeDrive", "Python34", "python.exe"),
    21      ]
    22
    23 -    def start(self, path):
    24          python = self.get_path("Python")
    25          arguments = self.options.get("arguments", "")
    26
    27          args = [path] + shlex.split(arguments)
    28          return self.execute(python, args=args, trigger="file:%s" % path)
    29