|
Autopsy
4.12.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Classes | |
| class | InterruptedThreadProcessTerminator |
| interface | ProcessTerminator |
| class | StreamToStringRedirect |
| class | StreamToWriterRedirect |
| class | TimedProcessTerminator |
Public Member Functions | |
| synchronized String | execute (final String aCommand, final String...params) throws IOException, InterruptedException |
| synchronized void | execute (final Writer stdoutWriter, final String aCommand, final String...params) throws IOException, InterruptedException |
| synchronized int | getExitValue () |
| synchronized void | stop () |
Static Public Member Functions | |
| static int | execute (ProcessBuilder processBuilder) throws SecurityException, IOException |
| static int | execute (ProcessBuilder processBuilder, ProcessTerminator terminator) throws SecurityException, IOException |
| static int | execute (ProcessBuilder processBuilder, long timeOut, TimeUnit units, ProcessTerminator terminator) throws SecurityException, IOException |
| static void | killProcess (Process process) |
| static int | waitForTermination (String command, Process process, ProcessTerminator terminator) throws SecurityException, IOException |
Static Private Member Functions | |
| static int | waitForTermination (String command, Process process, long timeOut, TimeUnit units, ProcessTerminator terminator) throws SecurityException, IOException |
Private Attributes | |
| ExecUtil.StreamToStringRedirect | errorStringRedirect = null |
| int | exitValue = -100 |
| ExecUtil.StreamToStringRedirect | outputStringRedirect = null |
| ExecUtil.StreamToWriterRedirect | outputWriterRedirect = null |
| Process | proc = null |
Static Private Attributes | |
| static final long | DEFAULT_TIMEOUT = 5 |
| static final TimeUnit | DEFAULT_TIMEOUT_UNITS = TimeUnit.SECONDS |
| static final Logger | logger = Logger.getLogger(ExecUtil.class.getName()) |
Executes a command line using an operating system process with a configurable timeout and pluggable logic to kill or continue the process on timeout.
Definition at line 37 of file ExecUtil.java.
|
static |
Runs a process without a timeout and terminator.
| processBuilder | A process builder used to configure and construct the process to be run. |
| SecurityException | if a security manager exists and vetoes any aspect of running the process. |
| IOException | if an I/O error occurs. |
Definition at line 130 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.execute().
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), org.sleuthkit.autopsy.casemodule.LocalFilesDSProcessor.extractLogicalEvidenceFileContents(), and org.sleuthkit.autopsy.modules.plaso.PlasoIngestModule.process().
|
static |
Runs a process using the default timeout and a custom terminator.
| processBuilder | A process builder used to configure and construct the process to be run. |
| terminator | The terminator. |
| SecurityException | if a security manager exists and vetoes any aspect of running the process. |
| IOException | if an I/O error occurs. |
Definition at line 152 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.DEFAULT_TIMEOUT, org.sleuthkit.autopsy.coreutils.ExecUtil.DEFAULT_TIMEOUT_UNITS, and org.sleuthkit.autopsy.coreutils.ExecUtil.execute().
|
static |
Runs a process using a custom terminator.
| processBuilder | A process builder used to configure and construct the process to be run. |
| timeOut | The duration of the timeout. |
| units | The units for the timeout. |
| terminator | The terminator. |
| SecurityException | if a security manager exists and vetoes any aspect of running the process. |
| IOException | if an I/o error occurs. |
Definition at line 171 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.Logger.getLogger(), and org.sleuthkit.autopsy.coreutils.ExecUtil.killProcess().
| synchronized String org.sleuthkit.autopsy.coreutils.ExecUtil.execute | ( | final String | aCommand, |
| final String... | params | ||
| ) | throws IOException, InterruptedException |
Execute a process. Redirect asynchronously stdout to a string and stderr to nowhere. Use only for small outputs, otherwise use the execute() variant with Writer.
| aCommand | command to be executed |
| params | parameters of the command |
Definition at line 292 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.errorStringRedirect, and org.sleuthkit.autopsy.coreutils.ExecUtil.outputStringRedirect.
| synchronized void org.sleuthkit.autopsy.coreutils.ExecUtil.execute | ( | final Writer | stdoutWriter, |
| final String | aCommand, | ||
| final String... | params | ||
| ) | throws IOException, InterruptedException |
Execute a process. Redirect asynchronously stdout to a passed in writer and stderr to nowhere.
| stdoutWriter | file writer to write stdout to |
| aCommand | command to be executed |
| params | parameters of the command |
Definition at line 339 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.errorStringRedirect, and org.sleuthkit.autopsy.coreutils.ExecUtil.outputWriterRedirect.
| synchronized int org.sleuthkit.autopsy.coreutils.ExecUtil.getExitValue | ( | ) |
Gets the exit value returned by the subprocess used to execute a command.
Definition at line 412 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.exitValue.
|
static |
Kills a process and its children
| process | The parent process to kill |
Definition at line 252 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.Win32Process.getChildren(), org.sleuthkit.autopsy.coreutils.ExecUtil.logger, and org.sleuthkit.autopsy.coreutils.Win32Process.terminate().
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.waitForTermination().
| synchronized void org.sleuthkit.autopsy.coreutils.ExecUtil.stop | ( | ) |
Interrupt the running process and stop its stream redirect threads
Definition at line 382 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.errorStringRedirect, org.sleuthkit.autopsy.coreutils.ExecUtil.outputStringRedirect, and org.sleuthkit.autopsy.coreutils.ExecUtil.outputWriterRedirect.
|
static |
Wait for the given process to finish, using the given ProcessTerminator.
| command | The command that was used to start the process. Used only for logging purposes. |
| process | The process to wait for. |
| terminator | The ProcessTerminator used to determine if the process should be killed. |
exit value of the process
| SecurityException | if a security manager exists and vetoes any aspect of running the process. |
| IOException | if an I/o error occurs. |
Definition at line 215 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.DEFAULT_TIMEOUT, org.sleuthkit.autopsy.coreutils.ExecUtil.DEFAULT_TIMEOUT_UNITS, and org.sleuthkit.autopsy.coreutils.ExecUtil.waitForTermination().
Referenced by org.sleuthkit.autopsy.modules.plaso.PlasoIngestModule.process(), and org.sleuthkit.autopsy.coreutils.ExecUtil.waitForTermination().
|
staticprivate |
Definition at line 219 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.Logger.getLogger(), and org.sleuthkit.autopsy.coreutils.ExecUtil.killProcess().
|
staticprivate |
Definition at line 39 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.waitForTermination().
|
staticprivate |
Definition at line 40 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.waitForTermination().
|
private |
Definition at line 276 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.stop().
|
private |
Definition at line 279 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.getExitValue().
|
staticprivate |
Definition at line 274 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.killProcess().
|
private |
Definition at line 277 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.stop().
|
private |
Definition at line 278 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.stop().
|
private |
Definition at line 275 of file ExecUtil.java.
Copyright © 2012-2018 Basis Technology. Generated on: Wed Sep 18 2019
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.