mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Merge branch 'develop' of https://github.com/sleuthkit/autopsy into vm_detection
This commit is contained in:
commit
96aa402c50
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013-2014 Basis Technology Corp.
|
* Copyright 2013-2016 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -71,6 +71,8 @@ class AddImageTask implements Runnable {
|
|||||||
String timeZone;
|
String timeZone;
|
||||||
boolean noFatOrphans;
|
boolean noFatOrphans;
|
||||||
|
|
||||||
|
private final String dataSourceId;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A thread that updates the progressMonitor with the name of the directory
|
* A thread that updates the progressMonitor with the name of the directory
|
||||||
* currently being processed by the AddImageTask
|
* currently being processed by the AddImageTask
|
||||||
@ -100,27 +102,41 @@ class AddImageTask implements Runnable {
|
|||||||
currDir));
|
currDir));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// this sleep here prevents the UI from locking up
|
// this sleep here prevents the UI from locking up
|
||||||
// due to too frequent updates to the progressMonitor above
|
// due to too frequent updates to the progressMonitor above
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
// nothing to do, thread was interrupted externally
|
// nothing to do, thread was interrupted externally
|
||||||
// signaling the end of AddImageProcess
|
// signaling the end of AddImageProcess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AddImageTask(String imgPath, String tz, boolean noOrphans, DataSourceProcessorProgressMonitor aProgressMonitor, DataSourceProcessorCallback cbObj) {
|
/**
|
||||||
|
* Constructs a runnable task that adds an image to the case database.
|
||||||
|
*
|
||||||
|
* @param dataSourceId An ASCII-printable identifier for the data
|
||||||
|
* source that is intended to be unique across
|
||||||
|
* multiple cases (e.g., a UUID).
|
||||||
|
* @param imagePath Path to the image file.
|
||||||
|
* @param timeZone The time zone to use when processing dates
|
||||||
|
* and times for the image, obtained from
|
||||||
|
* java.util.TimeZone.getID.
|
||||||
|
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
||||||
|
* FAT filesystem.
|
||||||
|
* @param monitor Progress monitor to report progress during
|
||||||
|
* processing.
|
||||||
|
* @param cbObj Callback to call when processing is done.
|
||||||
|
*/
|
||||||
|
AddImageTask(String dataSourceId, String imagePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor monitor, DataSourceProcessorCallback cbObj) {
|
||||||
currentCase = Case.getCurrentCase();
|
currentCase = Case.getCurrentCase();
|
||||||
|
this.dataSourceId = dataSourceId;
|
||||||
this.imagePath = imgPath;
|
this.imagePath = imagePath;
|
||||||
this.timeZone = tz;
|
this.timeZone = timeZone;
|
||||||
this.noFatOrphans = noOrphans;
|
this.noFatOrphans = ignoreFatOrphanFiles;
|
||||||
|
|
||||||
this.callbackObj = cbObj;
|
this.callbackObj = cbObj;
|
||||||
this.progressMonitor = aProgressMonitor;
|
this.progressMonitor = monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -141,7 +157,7 @@ class AddImageTask implements Runnable {
|
|||||||
progressMonitor.setIndeterminate(true);
|
progressMonitor.setIndeterminate(true);
|
||||||
progressMonitor.setProgress(0);
|
progressMonitor.setProgress(0);
|
||||||
dirFetcher.start();
|
dirFetcher.start();
|
||||||
addImageProcess.run(new String[]{this.imagePath});
|
addImageProcess.run(dataSourceId, new String[]{imagePath});
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
logger.log(Level.SEVERE, "Core errors occurred while running add image on " + imagePath, ex); //NON-NLS
|
logger.log(Level.SEVERE, "Core errors occurred while running add image on " + imagePath, ex); //NON-NLS
|
||||||
hasCritError = true;
|
hasCritError = true;
|
||||||
|
@ -142,7 +142,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
||||||
configured = true;
|
configured = true;
|
||||||
}
|
}
|
||||||
addImageTask = new AddImageTask(imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
|
addImageTask = new AddImageTask(dataSourceId, imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
|
||||||
new Thread(addImageTask).start();
|
new Thread(addImageTask).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,8 +150,9 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
* Runs the data source processor in a separate thread without requiring use
|
* Runs the data source processor in a separate thread without requiring use
|
||||||
* the configuration panel.
|
* the configuration panel.
|
||||||
*
|
*
|
||||||
* @param dataSourceId A identifier for the data source that is
|
* @param dataSourceId An ASCII-printable identifier for the data
|
||||||
* unique across multiple cases (e.g., a UUID).
|
* source that is intended to be unique across
|
||||||
|
* multiple cases (e.g., a UUID).
|
||||||
* @param imagePath Path to the image file.
|
* @param imagePath Path to the image file.
|
||||||
* @param timeZone The time zone to use when processing dates
|
* @param timeZone The time zone to use when processing dates
|
||||||
* and times for the image, obtained from
|
* and times for the image, obtained from
|
||||||
@ -200,13 +201,16 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
* when when processing dates and times for the image.
|
* when when processing dates and times for the image.
|
||||||
*
|
*
|
||||||
* @param imagePath Path to the image file.
|
* @param imagePath Path to the image file.
|
||||||
|
* @param timeZone The time zone to use when processing dates
|
||||||
|
* and times for the image, obtained from
|
||||||
|
* java.util.TimeZone.getID.
|
||||||
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
||||||
* FAT filesystem.
|
* FAT filesystem.
|
||||||
*
|
*
|
||||||
* @deprecated Use the run method instead.
|
* @deprecated Use the run method instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setDataSourceOptions(String imagePath, boolean ignoreFatOrphanFiles) {
|
public void setDataSourceOptions(String imagePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
||||||
this.dataSourceId = UUID.randomUUID().toString();
|
this.dataSourceId = UUID.randomUUID().toString();
|
||||||
this.imagePath = imagePath;
|
this.imagePath = imagePath;
|
||||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||||
|
@ -122,7 +122,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
||||||
configured = true;
|
configured = true;
|
||||||
}
|
}
|
||||||
addDiskTask = new AddImageTask(drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
|
addDiskTask = new AddImageTask(dataSourceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
|
||||||
new Thread(addDiskTask).start();
|
new Thread(addDiskTask).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,8 +130,9 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
* Runs the data source processor in a separate thread without requiring use
|
* Runs the data source processor in a separate thread without requiring use
|
||||||
* the configuration panel.
|
* the configuration panel.
|
||||||
*
|
*
|
||||||
* @param dataSourceId A identifier for the data source that is
|
* @param dataSourceId An ASCII-printable identifier for the data
|
||||||
* unique across multiple cases (e.g., a UUID).
|
* source that is intended to be unique across
|
||||||
|
* multiple cases (e.g., a UUID).
|
||||||
* @param drivePath Path to the local drive.
|
* @param drivePath Path to the local drive.
|
||||||
* @param timeZone The time zone to use when processing dates
|
* @param timeZone The time zone to use when processing dates
|
||||||
* and times for the image, obtained from
|
* and times for the image, obtained from
|
||||||
@ -180,13 +181,16 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
* when when processing dates and times for the image.
|
* when when processing dates and times for the image.
|
||||||
*
|
*
|
||||||
* @param drivePath Path to the local drive.
|
* @param drivePath Path to the local drive.
|
||||||
|
* @param timeZone The time zone to use when processing dates
|
||||||
|
* and times for the image, obtained from
|
||||||
|
* java.util.TimeZone.getID.
|
||||||
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
||||||
* FAT filesystem.
|
* FAT filesystem.
|
||||||
*
|
*
|
||||||
* @deprecated Use the run method instead.
|
* @deprecated Use the run method instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setDataSourceOptions(String drivePath, boolean ignoreFatOrphanFiles) {
|
public void setDataSourceOptions(String drivePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
||||||
this.dataSourceId = UUID.randomUUID().toString();
|
this.dataSourceId = UUID.randomUUID().toString();
|
||||||
this.drivePath = drivePath;
|
this.drivePath = drivePath;
|
||||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user