modules.packages.ps1

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

# Source Code for Module modules.packages.ps1

     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  from lib.common.abstracts import Package
     7
     8  # Originally proposed by David Maciejak.
     9
    10 -class PS1(Package):
    11      """PowerShell analysis package."""
    12      PATHS = [
    13          ("System32", "WindowsPowerShell", "v1.0", "powershell.exe"),
    14          ("System32", "WindowsPowerShell", "v2.0", "powershell.exe"),
    15          ("System32", "WindowsPowerShell", "v3.0", "powershell.exe"),
    16      ]
    17
    18 -    def start(self, path):
    19          powershell = self.get_path("PowerShell")
    20          args = [
    21              "-NoProfile", "-ExecutionPolicy", "unrestricted", "-File", path
    22          ]
    23          return self.execute(powershell, args=args, trigger="file:%s" % path)
    24