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

Source Code for Module modules.packages.ps1

 1  # Copyright (C) 2010-2015 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  from lib.common.abstracts import Package 
 6   
 7  # Originally proposed by David Maciejak. 
 8   
9 -class PS1(Package):
10 """PowerShell analysis package.""" 11 PATHS = [ 12 ("SystemRoot", "system32", "WindowsPowerShell", "v1.0", "powershell.exe"), 13 ("SystemRoot", "system32", "WindowsPowerShell", "v2.0", "powershell.exe"), 14 ("SystemRoot", "system32", "WindowsPowerShell", "v3.0", "powershell.exe"), 15 ] 16
17 - def start(self, path):
18 powershell = self.get_path("PowerShell") 19 args = "-NoProfile -ExecutionPolicy unrestricted -File \"{0}\"".format(path) 20 return self.execute(powershell, args)
21