This commit is contained in:
Greg DiCristofaro 2025-01-15 20:31:18 -05:00
parent f875da5c12
commit ab5e8e1cfd
No known key found for this signature in database

View File

@ -324,7 +324,7 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
// Read the settings from the wizard // Read the settings from the wizard
readConfigSettings(); readConfigSettings();
this.host = host; this.host = host;
this.password = StringUtils.defaultIfEmpty(password, this.password); this.password = StringUtils.defaultString(password, this.password);
// Set up the data source before creating the ingest stream // Set up the data source before creating the ingest stream
try { try {
@ -375,8 +375,8 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
if (sha256.isEmpty()) { if (sha256.isEmpty()) {
sha256 = null; sha256 = null;
} }
password = configPanel.getPassword(); this.password = configPanel.getPassword();
if (password.isEmpty()) { if (this.password.isEmpty()) {
password = null; password = null;
} }
} }
@ -532,12 +532,12 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
@Override @Override
public void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) { public void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) {
process(deviceId, dataSourcePath, this.password, null, progressMonitor, callBack); process(deviceId, dataSourcePath, null, null, progressMonitor, callBack);
} }
@Override @Override
public void process(String deviceId, Path dataSourcePath, Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) { public void process(String deviceId, Path dataSourcePath, Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) {
process(deviceId, dataSourcePath, this.password, host, progressMonitor, callBack); process(deviceId, dataSourcePath, null, host, progressMonitor, callBack);
} }
@Override @Override
@ -547,14 +547,14 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
this.imagePath = dataSourcePath.toString(); this.imagePath = dataSourcePath.toString();
this.sectorSize = 0; this.sectorSize = 0;
this.timeZone = Calendar.getInstance().getTimeZone().getID(); this.timeZone = Calendar.getInstance().getTimeZone().getID();
this.password = password; this.password = StringUtils.defaultString(password, this.password);
this.host = host; this.host = host;
this.ignoreFatOrphanFiles = false; this.ignoreFatOrphanFiles = false;
ingestStream = new DefaultIngestStream(); ingestStream = new DefaultIngestStream();
try { try {
image = SleuthkitJNI.addImageToDatabase(Case.getCurrentCase().getSleuthkitCase(), image = SleuthkitJNI.addImageToDatabase(Case.getCurrentCase().getSleuthkitCase(),
new String[]{imagePath}, sectorSize, timeZone, "", "", "", deviceId, password, host); new String[]{imagePath}, sectorSize, timeZone, "", "", "", deviceId, this.password, host);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error adding data source with path " + imagePath + " to database", ex); logger.log(Level.SEVERE, "Error adding data source with path " + imagePath + " to database", ex);
final List<String> errors = new ArrayList<>(); final List<String> errors = new ArrayList<>();
@ -563,19 +563,19 @@ public class ImageDSProcessor implements DataSourceProcessor, AutoIngestDataSour
return; return;
} }
doAddImageProcess(deviceId, dataSourcePath.toString(), sectorSize, timeZone, ignoreFatOrphanFiles, null, null, null, password, progressMonitor, callBack); doAddImageProcess(deviceId, dataSourcePath.toString(), sectorSize, timeZone, ignoreFatOrphanFiles, null, null, null, this.password, progressMonitor, callBack);
} }
@Override @Override
public IngestStream processWithIngestStream(String deviceId, Path dataSourcePath, IngestJobSettings settings, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) { public IngestStream processWithIngestStream(String deviceId, Path dataSourcePath, IngestJobSettings settings, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) {
return processWithIngestStream(deviceId, dataSourcePath, this.password, null, settings, progressMonitor, callBack); return processWithIngestStream(deviceId, dataSourcePath, null, null, settings, progressMonitor, callBack);
} }
@Override @Override
public IngestStream processWithIngestStream(String deviceId, Path dataSourcePath, Host host, IngestJobSettings settings, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) { public IngestStream processWithIngestStream(String deviceId, Path dataSourcePath, Host host, IngestJobSettings settings, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) {
return processWithIngestStream(deviceId, dataSourcePath, this.password, host, settings, progressMonitor, callBack); return processWithIngestStream(deviceId, dataSourcePath, null, host, settings, progressMonitor, callBack);
} }
@Override @Override