Autopsy
4.13.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 terminationCheckInterval, TimeUnit units, ProcessTerminator terminator) throws SecurityException, IOException |
static void | killProcess (Process process) |
static int | waitForTermination (String processName, Process process, long terminationCheckInterval, 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_CHECK_INTERVAL = 5 |
static final TimeUnit | DEFAULT_CHECK_INTERVAL_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 termination check interval or process 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 132 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 termination check interval and a process 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 155 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.DEFAULT_CHECK_INTERVAL, org.sleuthkit.autopsy.coreutils.ExecUtil.DEFAULT_CHECK_INTERVAL_UNITS, and org.sleuthkit.autopsy.coreutils.ExecUtil.execute().
|
static |
Runs a process using a custom termination check interval and a process terminator.
processBuilder | A process builder used to configure and construct the process to be run. |
terminationCheckInterval | The interval at which to query the process terminator to see if the process should be killed. |
units | The units for the termination check interval. |
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 178 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.waitForTermination().
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 |
java.io.IOException | |
java.lang.InterruptedException |
Definition at line 280 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 |
java.io.IOException | |
java.lang.InterruptedException |
Definition at line 328 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 401 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 235 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.Win32Process.getChildren(), and org.sleuthkit.autopsy.coreutils.Win32Process.terminate().
Referenced by 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 371 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 |
Waits for an existing process to finish, using a custom termination check interval and a process terminator.
processName | The name of the process, for logging purposes. |
process | The process. |
terminationCheckInterval | The interval at which to query the process terminator to see if the process should be killed. |
units | The units for the termination check interval. |
terminator | The process 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 202 of file ExecUtil.java.
References org.sleuthkit.autopsy.coreutils.ExecUtil.killProcess().
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.modules.plaso.PlasoIngestModule.process().
|
staticprivate |
Definition at line 40 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute().
|
staticprivate |
Definition at line 41 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute().
|
private |
Definition at line 261 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.stop().
|
private |
Definition at line 264 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.getExitValue().
|
staticprivate |
Definition at line 39 of file ExecUtil.java.
|
private |
Definition at line 262 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.stop().
|
private |
Definition at line 263 of file ExecUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.ExecUtil.execute(), and org.sleuthkit.autopsy.coreutils.ExecUtil.stop().
|
private |
Definition at line 260 of file ExecUtil.java.
Copyright © 2012-2019 Basis Technology. Generated on: Tue Jan 7 2020
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.