mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Add *_users.txt to report
This commit is contained in:
parent
7408e461d1
commit
ce9bd67bfc
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.logicalimager.dsp;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.file.Files;
|
||||
@ -53,14 +54,14 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* A runnable that - copy the logical image folder to a destination folder - add
|
||||
* SearchResults.txt and users.txt files to report - add an image data source to the
|
||||
* SearchResults.txt and *_users.txt files to report - add an image data source to the
|
||||
* case database.
|
||||
*/
|
||||
final class AddLogicalImageTask implements Runnable {
|
||||
|
||||
private final static Logger LOGGER = Logger.getLogger(AddLogicalImageTask.class.getName());
|
||||
private final static String SEARCH_RESULTS_TXT = "SearchResults.txt"; //NON-NLS
|
||||
private final static String USERS_TXT = "users.txt"; //NON-NLS
|
||||
private final static String USERS_TXT = "_users.txt"; //NON-NLS
|
||||
private final static String MODULE_NAME = "Logical Imager"; //NON-NLS
|
||||
private final static String ROOT_STR = "root"; // NON-NLS
|
||||
private final static String VHD_EXTENSION = ".vhd"; // NON-NLS
|
||||
@ -102,7 +103,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add SearchResults.txt and users.txt to the case
|
||||
* Add SearchResults.txt and *_users.txt to the case
|
||||
* report Adds the image to the case database.
|
||||
*/
|
||||
@Messages({
|
||||
@ -148,7 +149,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the SearchResults.txt and users.txt to the case report
|
||||
// Add the SearchResults.txt and *_users.txt to the case report
|
||||
String resultsFilename;
|
||||
if (Paths.get(dest.toString(), SEARCH_RESULTS_TXT).toFile().exists()) {
|
||||
resultsFilename = SEARCH_RESULTS_TXT;
|
||||
@ -167,14 +168,24 @@ final class AddLogicalImageTask implements Runnable {
|
||||
}
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_doneAddingToReport(resultsFilename));
|
||||
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingToReport(USERS_TXT));
|
||||
status = addReport(Paths.get(dest.toString(), USERS_TXT), USERS_TXT + " " + src.getName());
|
||||
// All all *_users.txt files to report
|
||||
File[] userFiles = dest.listFiles(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.endsWith(USERS_TXT);
|
||||
}
|
||||
});
|
||||
|
||||
for (File userFile : userFiles) {
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingToReport(userFile.getName()));
|
||||
status = addReport(userFile.toPath(), userFile.getName() + " " + src.getName());
|
||||
if (status != null) {
|
||||
errorList.add(status);
|
||||
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS, errorList, emptyDataSources);
|
||||
return;
|
||||
}
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_doneAddingToReport(USERS_TXT));
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_doneAddingToReport(userFile.getName()));
|
||||
}
|
||||
|
||||
// Get all VHD files in the dest directory
|
||||
List<String> imagePaths = new ArrayList<>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user