modules.packages.jar

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

# Source Code for Module modules.packages.jar

     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 -class Jar(Package):
     9      """Java analysis package."""
    10      PATHS = [
    11          ("ProgramFiles", "Java", "jre*", "bin", "java.exe"),
    12      ]
    13
    14 -    def start(self, path):
    15          java = self.get_path_glob("Java")
    16          class_path = self.options.get("class")
    17
    18          if class_path:
    19              args = ["-cp", path, class_path]
    20          else:
    21              args = ["-jar", path]
    22
    23          return self.execute(java, args=args, trigger="file:%s" % path)
    24