Merge branch 'develop' of https://github.com/sleuthkit/autopsy into 2943-ArtifactsAsContentCleanup
0
.gitattributes
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
API-CHANGES.txt
Normal file → Executable file
0
BUILDING.txt
Normal file → Executable file
0
BootstrapIvy.xml
Normal file → Executable file
0
CentralRepository/Central Repository User Guide.pdf
Normal file → Executable file
0
CentralRepository/ivy.xml
Normal file → Executable file
0
CentralRepository/ivysettings.xml
Normal file → Executable file
0
Core/autopsy-updates.xml
Normal file → Executable file
0
Core/build.xml
Normal file → Executable file
0
Core/ivy.xml
Normal file → Executable file
0
Core/ivysettings.xml
Normal file → Executable file
0
Core/manifest.mf
Normal file → Executable file
0
Core/nbproject/build-impl.xml
Normal file → Executable file
0
Core/nbproject/platform.properties
Normal file → Executable file
0
Core/nbproject/project.properties
Normal file → Executable file
0
Core/nbproject/project.xml
Normal file → Executable file
0
Core/nbproject/suite.properties
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/actions/Bundle_ja.properties
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/actions/GetTagNameAndCommentDialog.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/actions/GetTagNameAndCommentDialog.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/actions/GetTagNameDialog.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/actions/GetTagNameDialog.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/actions/IngestRunningCheck.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/actions/OpenOutputFolderAction.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/appservices/AutopsyService.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageErrorsDialog.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageErrorsDialog.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressVisual.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressVisual.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardDataSourceSettingsPanel.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardDataSourceSettingsVisual.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardDataSourceSettingsVisual.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigVisual.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigVisual.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardSelectDspPanel.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardSelectDspVisual.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardSelectDspVisual.java
Normal file → Executable file
4
Core/src/org/sleuthkit/autopsy/casemodule/AddLocalFilesTask.java
Normal file → Executable file
@ -20,12 +20,14 @@ package org.sleuthkit.autopsy.casemodule;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
|
||||||
import org.sleuthkit.datamodel.AbstractFile;
|
import org.sleuthkit.datamodel.AbstractFile;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.autopsy.casemodule.services.FileManager;
|
import org.sleuthkit.autopsy.casemodule.services.FileManager;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.datamodel.LocalFilesDataSource;
|
import org.sleuthkit.datamodel.LocalFilesDataSource;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
import org.sleuthkit.datamodel.TskDataException;
|
import org.sleuthkit.datamodel.TskDataException;
|
||||||
@ -37,6 +39,7 @@ import org.sleuthkit.datamodel.TskDataException;
|
|||||||
*/
|
*/
|
||||||
class AddLocalFilesTask implements Runnable {
|
class AddLocalFilesTask implements Runnable {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = Logger.getLogger(AddLocalFilesTask.class.getName());
|
||||||
private final String deviceId;
|
private final String deviceId;
|
||||||
private final String rootVirtualDirectoryName;
|
private final String rootVirtualDirectoryName;
|
||||||
private final List<String> localFilePaths;
|
private final List<String> localFilePaths;
|
||||||
@ -89,6 +92,7 @@ class AddLocalFilesTask implements Runnable {
|
|||||||
newDataSources.add(newDataSource.getRootDirectory());
|
newDataSources.add(newDataSource.getRootDirectory());
|
||||||
} catch (TskDataException | TskCoreException ex) {
|
} catch (TskDataException | TskCoreException ex) {
|
||||||
errors.add(ex.getMessage());
|
errors.add(ex.getMessage());
|
||||||
|
LOGGER.log(Level.SEVERE, String.format("Failed to add datasource: %s", ex.getMessage()), ex);
|
||||||
} finally {
|
} finally {
|
||||||
DataSourceProcessorCallback.DataSourceProcessorResult result;
|
DataSourceProcessorCallback.DataSourceProcessorResult result;
|
||||||
if (!errors.isEmpty()) {
|
if (!errors.isEmpty()) {
|
||||||
|
8
Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties
Normal file → Executable file
@ -138,15 +138,8 @@ IntervalErrorReport.TotalIssues=total issue(s)
|
|||||||
IntervalErrorReport.ErrorText=Database Connection Error
|
IntervalErrorReport.ErrorText=Database Connection Error
|
||||||
CasePropertiesAction.window.title=Case Properties
|
CasePropertiesAction.window.title=Case Properties
|
||||||
CueBannerPanel.title.text=Open Recent Case
|
CueBannerPanel.title.text=Open Recent Case
|
||||||
GeneralFilter.rawImageDesc.text=Raw Images (*.img, *.dd, *.001, *.aa, *.raw, *.bin)
|
|
||||||
GeneralFilter.encaseImageDesc.text=Encase Images (*.e01)
|
|
||||||
GeneralFilter.virtualMachineImageDesc.text=Virtual Machines (*.vmdk, *.vhd)
|
|
||||||
GeneralFilter.executableDesc.text=Executables (*.exe)
|
|
||||||
ImageDSProcessor.dsType.text=Disk Image or VM File
|
ImageDSProcessor.dsType.text=Disk Image or VM File
|
||||||
GeneralFilter.graphicImageDesc.text=Images (*.png, *.jpg, *.jpeg, *.gif, *.bmp)
|
|
||||||
ImageDSProcessor.allDesc.text=All Supported Types
|
ImageDSProcessor.allDesc.text=All Supported Types
|
||||||
ImageFilePanel.moduleErr=Module Error
|
|
||||||
ImageFilePanel.moduleErr.msg=A module caused an error listening to ImageFilePanel updates. See log to determine which module. Some data could be incomplete.
|
|
||||||
LocalDiskDSProcessor.dsType.text=Local Disk
|
LocalDiskDSProcessor.dsType.text=Local Disk
|
||||||
LocalDiskPanel.localDiskModel.loading.msg=Loading local disks...
|
LocalDiskPanel.localDiskModel.loading.msg=Loading local disks...
|
||||||
LocalDiskPanel.localDiskModel.nodrives.msg=No Accessible Drives
|
LocalDiskPanel.localDiskModel.nodrives.msg=No Accessible Drives
|
||||||
@ -197,7 +190,6 @@ UpdateRecentCases.menuItem.clearRecentCases.text=Clear Recent Cases
|
|||||||
UpdateRecentCases.menuItem.empty=-Empty-
|
UpdateRecentCases.menuItem.empty=-Empty-
|
||||||
AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=Cancel
|
AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=Cancel
|
||||||
ImageFilePanel.errorLabel.text=Error Label
|
ImageFilePanel.errorLabel.text=Error Label
|
||||||
DataSourceOnCDriveError.text=Warning\: Path to multi-user data source is on "C\:" drive
|
|
||||||
NewCaseVisualPanel1.CaseFolderOnCDriveError.text=Warning: Path to multi-user case folder is on \"C:\" drive
|
NewCaseVisualPanel1.CaseFolderOnCDriveError.text=Warning: Path to multi-user case folder is on \"C:\" drive
|
||||||
LocalFilesPanel.errorLabel.text=Error Label
|
LocalFilesPanel.errorLabel.text=Error Label
|
||||||
CollaborationMonitor.addingDataSourceStatus.msg={0} adding data source
|
CollaborationMonitor.addingDataSourceStatus.msg={0} adding data source
|
||||||
|
0
Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/ButtonColumn.java
Normal file → Executable file
32
Core/src/org/sleuthkit/autopsy/casemodule/Case.java
Normal file → Executable file
@ -377,7 +377,9 @@ public class Case {
|
|||||||
*
|
*
|
||||||
* @param eventNames The events the subscriber is interested in.
|
* @param eventNames The events the subscriber is interested in.
|
||||||
* @param subscriber The subscriber (PropertyChangeListener) to add.
|
* @param subscriber The subscriber (PropertyChangeListener) to add.
|
||||||
|
* @deprecated Use addEventTypeSubscriber instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static void addEventSubscriber(Set<String> eventNames, PropertyChangeListener subscriber) {
|
public static void addEventSubscriber(Set<String> eventNames, PropertyChangeListener subscriber) {
|
||||||
eventPublisher.addSubscriber(eventNames, subscriber);
|
eventPublisher.addSubscriber(eventNames, subscriber);
|
||||||
}
|
}
|
||||||
@ -385,9 +387,23 @@ public class Case {
|
|||||||
/**
|
/**
|
||||||
* Adds a subscriber to specific case events.
|
* Adds a subscriber to specific case events.
|
||||||
*
|
*
|
||||||
* @param eventName The event the subscriber is interested in.
|
* @param eventTypes The events the subscriber is interested in.
|
||||||
* @param subscriber The subscriber (PropertyChangeListener) to add.
|
* @param subscriber The subscriber (PropertyChangeListener) to add.
|
||||||
*/
|
*/
|
||||||
|
public static void addEventTypeSubscriber(Set<Events> eventTypes, PropertyChangeListener subscriber) {
|
||||||
|
eventTypes.forEach((Events event) -> {
|
||||||
|
eventPublisher.addSubscriber(event.toString(), subscriber);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a subscriber to specific case events.
|
||||||
|
*
|
||||||
|
* @param eventName The event the subscriber is interested in.
|
||||||
|
* @param subscriber The subscriber (PropertyChangeListener) to add.
|
||||||
|
* @deprecated Use addEventTypeSubscriber instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public static void addEventSubscriber(String eventName, PropertyChangeListener subscriber) {
|
public static void addEventSubscriber(String eventName, PropertyChangeListener subscriber) {
|
||||||
eventPublisher.addSubscriber(eventName, subscriber);
|
eventPublisher.addSubscriber(eventName, subscriber);
|
||||||
}
|
}
|
||||||
@ -412,6 +428,18 @@ public class Case {
|
|||||||
eventPublisher.removeSubscriber(eventNames, subscriber);
|
eventPublisher.removeSubscriber(eventNames, subscriber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a subscriber to specific case events.
|
||||||
|
*
|
||||||
|
* @param eventTypes The events the subscriber is no longer interested in.
|
||||||
|
* @param subscriber The subscriber (PropertyChangeListener) to remove.
|
||||||
|
*/
|
||||||
|
public static void removeEventTypeSubscriber(Set<Events> eventTypes, PropertyChangeListener subscriber) {
|
||||||
|
eventTypes.forEach((Events event) -> {
|
||||||
|
eventPublisher.removeSubscriber(event.toString(), subscriber);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a case display name is valid, i.e., does not include any
|
* Checks if a case display name is valid, i.e., does not include any
|
||||||
* characters that cannot be used in file names.
|
* characters that cannot be used in file names.
|
||||||
@ -1101,7 +1129,7 @@ public class Case {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the immutable case name.
|
* Gets the unique and immutable case name.
|
||||||
*
|
*
|
||||||
* @return The case name.
|
* @return The case name.
|
||||||
*/
|
*/
|
||||||
|
0
Core/src/org/sleuthkit/autopsy/casemodule/CaseActionException.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java
Normal file → Executable file
3
Core/src/org/sleuthkit/autopsy/casemodule/CaseDeleteAction.java
Normal file → Executable file
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.casemodule;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
@ -49,7 +50,7 @@ final class CaseDeleteAction extends CallableSystemAction {
|
|||||||
CaseDeleteAction() {
|
CaseDeleteAction() {
|
||||||
putValue(Action.NAME, NbBundle.getMessage(CaseDeleteAction.class, "CTL_CaseDeleteAction"));
|
putValue(Action.NAME, NbBundle.getMessage(CaseDeleteAction.class, "CTL_CaseDeleteAction"));
|
||||||
this.setEnabled(false);
|
this.setEnabled(false);
|
||||||
Case.addEventSubscriber(Case.Events.CURRENT_CASE.toString(), (PropertyChangeEvent evt) -> {
|
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> {
|
||||||
setEnabled(null != evt.getNewValue() && UserPreferences.getMode() != UserPreferences.SelectedMode.REVIEW);
|
setEnabled(null != evt.getNewValue() && UserPreferences.getMode() != UserPreferences.SelectedMode.REVIEW);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
0
Core/src/org/sleuthkit/autopsy/casemodule/CaseMetadata.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/CaseNewAction.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/CaseNewActionInterface.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java
Normal file → Executable file
3
Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java
Normal file → Executable file
@ -22,6 +22,7 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
|
import java.util.EnumSet;
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
@ -42,7 +43,7 @@ final class CasePropertiesAction extends CallableSystemAction {
|
|||||||
CasePropertiesAction() {
|
CasePropertiesAction() {
|
||||||
putValue(Action.NAME, NbBundle.getMessage(CasePropertiesAction.class, "CTL_CasePropertiesAction"));
|
putValue(Action.NAME, NbBundle.getMessage(CasePropertiesAction.class, "CTL_CasePropertiesAction"));
|
||||||
this.setEnabled(false);
|
this.setEnabled(false);
|
||||||
Case.addEventSubscriber(Case.Events.CURRENT_CASE.toString(), (PropertyChangeEvent evt) -> {
|
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> {
|
||||||
setEnabled(null != evt.getNewValue());
|
setEnabled(null != evt.getNewValue());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
0
Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java
Normal file → Executable file
10
Core/src/org/sleuthkit/autopsy/casemodule/CollaborationMonitor.java
Normal file → Executable file
@ -24,9 +24,8 @@ import java.beans.PropertyChangeListener;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.Arrays;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -57,7 +56,8 @@ final class CollaborationMonitor {
|
|||||||
|
|
||||||
private static final String EVENT_CHANNEL_NAME = "%s-Collaboration-Monitor-Events"; //NON-NLS
|
private static final String EVENT_CHANNEL_NAME = "%s-Collaboration-Monitor-Events"; //NON-NLS
|
||||||
private static final String COLLABORATION_MONITOR_EVENT = "COLLABORATION_MONITOR_EVENT"; //NON-NLS
|
private static final String COLLABORATION_MONITOR_EVENT = "COLLABORATION_MONITOR_EVENT"; //NON-NLS
|
||||||
private static final Set<String> CASE_EVENTS_OF_INTEREST = new HashSet<>(Arrays.asList(new String[]{Case.Events.ADDING_DATA_SOURCE.toString(), Case.Events.DATA_SOURCE_ADDED.toString(), Case.Events.ADDING_DATA_SOURCE_FAILED.toString()}));
|
private static final Set<Case.Events> CASE_EVENTS_OF_INTEREST = EnumSet.of(Case.Events.ADDING_DATA_SOURCE,
|
||||||
|
Case.Events.DATA_SOURCE_ADDED, Case.Events.ADDING_DATA_SOURCE_FAILED);
|
||||||
private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 2;
|
private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 2;
|
||||||
private static final String PERIODIC_TASK_THREAD_NAME = "collab-monitor-periodic-tasks-%d"; //NON-NLS
|
private static final String PERIODIC_TASK_THREAD_NAME = "collab-monitor-periodic-tasks-%d"; //NON-NLS
|
||||||
private static final long HEARTBEAT_INTERVAL_MINUTES = 1;
|
private static final long HEARTBEAT_INTERVAL_MINUTES = 1;
|
||||||
@ -113,7 +113,7 @@ final class CollaborationMonitor {
|
|||||||
*/
|
*/
|
||||||
localTasksManager = new LocalTasksManager();
|
localTasksManager = new LocalTasksManager();
|
||||||
IngestManager.getInstance().addIngestJobEventListener(localTasksManager);
|
IngestManager.getInstance().addIngestJobEventListener(localTasksManager);
|
||||||
Case.addEventSubscriber(CASE_EVENTS_OF_INTEREST, localTasksManager);
|
Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, localTasksManager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start periodic tasks that:
|
* Start periodic tasks that:
|
||||||
@ -141,7 +141,7 @@ final class CollaborationMonitor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Case.removeEventSubscriber(CASE_EVENTS_OF_INTEREST, localTasksManager);
|
Case.removeEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, localTasksManager);
|
||||||
IngestManager.getInstance().removeIngestJobEventListener(localTasksManager);
|
IngestManager.getInstance().removeIngestJobEventListener(localTasksManager);
|
||||||
|
|
||||||
if (null != eventPublisher) {
|
if (null != eventPublisher) {
|
||||||
|
0
Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java
Normal file → Executable file
48
Core/src/org/sleuthkit/autopsy/casemodule/GeneralFilter.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 Basis Technology Corp.
|
* Copyright 2011-2017 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");
|
||||||
@ -18,12 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.casemodule;
|
package org.sleuthkit.autopsy.casemodule;
|
||||||
|
|
||||||
import org.openide.util.NbBundle;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FileFilter helper class. Matches files based on extension
|
* FileFilter helper class. Matches files based on extension
|
||||||
@ -31,25 +30,28 @@ import javax.swing.filechooser.FileFilter;
|
|||||||
public class GeneralFilter extends FileFilter {
|
public class GeneralFilter extends FileFilter {
|
||||||
|
|
||||||
// Extensions & Descriptions for commonly used filters
|
// Extensions & Descriptions for commonly used filters
|
||||||
public static final List<String> RAW_IMAGE_EXTS = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw", ".bin"}); //NON-NLS
|
public static final List<String> RAW_IMAGE_EXTS = Arrays.asList(".img", ".dd", ".001", ".aa", ".raw", ".bin"); //NON-NLS
|
||||||
public static final String RAW_IMAGE_DESC = NbBundle.getMessage(GeneralFilter.class, "GeneralFilter.rawImageDesc.text");
|
@NbBundle.Messages("GeneralFilter.rawImageDesc.text=Raw Images (*.img, *.dd, *.001, *.aa, *.raw, *.bin)")
|
||||||
|
public static final String RAW_IMAGE_DESC = Bundle.GeneralFilter_rawImageDesc_text();
|
||||||
|
|
||||||
public static final List<String> ENCASE_IMAGE_EXTS = Arrays.asList(new String[]{".e01"}); //NON-NLS
|
public static final List<String> ENCASE_IMAGE_EXTS = Arrays.asList(".e01"); //NON-NLS
|
||||||
public static final String ENCASE_IMAGE_DESC = NbBundle.getMessage(GeneralFilter.class,
|
@NbBundle.Messages("GeneralFilter.encaseImageDesc.text=Encase Images (*.e01)")
|
||||||
"GeneralFilter.encaseImageDesc.text");
|
public static final String ENCASE_IMAGE_DESC = Bundle.GeneralFilter_encaseImageDesc_text();
|
||||||
|
|
||||||
public static final List<String> VIRTUAL_MACHINE_EXTS = Arrays.asList(new String[]{".vmdk", ".vhd"}); //NON-NLS
|
public static final List<String> VIRTUAL_MACHINE_EXTS = Arrays.asList(".vmdk", ".vhd"); //NON-NLS
|
||||||
public static final String VIRTUAL_MACHINE_DESC = NbBundle.getMessage(GeneralFilter.class,
|
@NbBundle.Messages("GeneralFilter.virtualMachineImageDesc.text=Virtual Machines (*.vmdk, *.vhd)")
|
||||||
"GeneralFilter.virtualMachineImageDesc.text");
|
public static final String VIRTUAL_MACHINE_DESC = Bundle.GeneralFilter_virtualMachineImageDesc_text();
|
||||||
|
|
||||||
public static final List<String> EXECUTABLE_EXTS = Arrays.asList(new String[]{".exe"}); //NON-NLS
|
public static final List<String> EXECUTABLE_EXTS = Arrays.asList(".exe"); //NON-NLS
|
||||||
public static final String EXECUTABLE_DESC = NbBundle.getMessage(GeneralFilter.class, "GeneralFilter.executableDesc.text");
|
@NbBundle.Messages("GeneralFilter.executableDesc.text=Executables (*.exe)")
|
||||||
|
public static final String EXECUTABLE_DESC = Bundle.GeneralFilter_executableDesc_text();
|
||||||
|
|
||||||
public static final List<String> GRAPHIC_IMAGE_EXTS = Arrays.asList(new String[]{".png", ".jpeg", ".jpg", ".gif", ".bmp"}); //NON-NLS
|
public static final List<String> GRAPHIC_IMAGE_EXTS = Arrays.asList(".png", ".jpeg", ".jpg", ".gif", ".bmp"); //NON-NLS
|
||||||
public static final String GRAPHIC_IMG_DECR = NbBundle.getMessage(GeneralFilter.class, "GeneralFilter.graphicImageDesc.text");
|
@NbBundle.Messages("GeneralFilter.graphicImageDesc.text=Images (*.png, *.jpg, *.jpeg, *.gif, *.bmp)")
|
||||||
|
public static final String GRAPHIC_IMG_DECR = Bundle.GeneralFilter_graphicImageDesc_text();
|
||||||
|
|
||||||
private List<String> extensions;
|
private final List<String> extensions;
|
||||||
private String desc;
|
private final String desc;
|
||||||
|
|
||||||
public GeneralFilter(List<String> ext, String desc) {
|
public GeneralFilter(List<String> ext, String desc) {
|
||||||
super();
|
super();
|
||||||
@ -69,15 +71,8 @@ public class GeneralFilter extends FileFilter {
|
|||||||
if (f.isDirectory()) {
|
if (f.isDirectory()) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Boolean result = false;
|
|
||||||
String name = f.getName().toLowerCase();
|
String name = f.getName().toLowerCase();
|
||||||
|
return extensions.stream().anyMatch(name::endsWith);
|
||||||
for (String ext : extensions) {
|
|
||||||
if (name.endsWith(ext)) {
|
|
||||||
result = result || true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,5 +85,4 @@ public class GeneralFilter extends FileFilter {
|
|||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
0
Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/ImageFilePanel.form
Normal file → Executable file
243
Core/src/org/sleuthkit/autopsy/casemodule/ImageFilePanel.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2017 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");
|
||||||
@ -23,88 +23,92 @@ import java.util.Calendar;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.SimpleTimeZone;
|
import java.util.SimpleTimeZone;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
import java.util.logging.Level;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JPanel;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import static org.sleuthkit.autopsy.casemodule.Bundle.*;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
||||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
|
||||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import org.sleuthkit.autopsy.coreutils.DriveUtils;
|
import org.sleuthkit.autopsy.coreutils.DriveUtils;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||||
import org.sleuthkit.autopsy.coreutils.PathValidator;
|
import org.sleuthkit.autopsy.coreutils.PathValidator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ImageTypePanel for adding an image file such as .img, .E0x, .00x, etc.
|
* Panel for adding an image file such as .img, .E0x, .00x, etc. Allows the user
|
||||||
|
* to select a file as well as choose the timezone and whether to ignore orphan
|
||||||
|
* files in FAT32.
|
||||||
*/
|
*/
|
||||||
public class ImageFilePanel extends JPanel implements DocumentListener {
|
public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||||
|
|
||||||
private final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH"; //NON-NLS
|
|
||||||
private static final Logger logger = Logger.getLogger(ImageFilePanel.class.getName());
|
private static final Logger logger = Logger.getLogger(ImageFilePanel.class.getName());
|
||||||
private final JFileChooser fc = new JFileChooser();
|
private static final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH"; //NON-NLS
|
||||||
|
|
||||||
// Externally supplied name is used to store settings
|
private final JFileChooser fileChooser = new JFileChooser();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Externally supplied name is used to store settings
|
||||||
|
*/
|
||||||
private final String contextName;
|
private final String contextName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form ImageFilePanel
|
* Creates new form ImageFilePanel
|
||||||
*
|
*
|
||||||
* @param context a string context name used to read/store last
|
* @param context A string context name used to read/store last
|
||||||
* used settings
|
* used settings.
|
||||||
* @param fileChooserFilters a list of filters to be used with the
|
* @param fileChooserFilters A list of filters to be used with the
|
||||||
* FileChooser
|
* FileChooser.
|
||||||
*/
|
*/
|
||||||
private ImageFilePanel(String context, List<FileFilter> fileChooserFilters) {
|
private ImageFilePanel(String context, List<FileFilter> fileChooserFilters) {
|
||||||
|
this.contextName = context;
|
||||||
initComponents();
|
initComponents();
|
||||||
fc.setDragEnabled(false);
|
|
||||||
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
// Populate the drop down list of time zones
|
||||||
fc.setMultiSelectionEnabled(false);
|
for (String id : SimpleTimeZone.getAvailableIDs()) {
|
||||||
|
timeZoneComboBox.addItem(timeZoneToString(TimeZone.getTimeZone(id)));
|
||||||
|
}
|
||||||
|
// set the selected timezone to the current timezone
|
||||||
|
timeZoneComboBox.setSelectedItem(timeZoneToString(Calendar.getInstance().getTimeZone()));
|
||||||
|
|
||||||
errorLabel.setVisible(false);
|
errorLabel.setVisible(false);
|
||||||
|
|
||||||
boolean firstFilter = true;
|
fileChooser.setDragEnabled(false);
|
||||||
for (FileFilter filter : fileChooserFilters) {
|
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||||
if (firstFilter) { // set the first on the list as the default selection
|
fileChooser.setMultiSelectionEnabled(false);
|
||||||
fc.setFileFilter(filter);
|
fileChooserFilters.forEach(fileChooser::addChoosableFileFilter);
|
||||||
firstFilter = false;
|
if (fileChooserFilters.isEmpty() == false) {
|
||||||
} else {
|
fileChooser.setFileFilter(fileChooserFilters.get(0));
|
||||||
fc.addChoosableFileFilter(filter);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.contextName = context;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and returns an instance of a ImageFilePanel.
|
* Creates and returns an instance of a ImageFilePanel.
|
||||||
|
*
|
||||||
|
* @param context A string context name used to read/store last
|
||||||
|
* used settings.
|
||||||
|
* @param fileChooserFilters A list of filters to be used with the
|
||||||
|
* FileChooser.
|
||||||
|
*
|
||||||
* @return instance of the ImageFilePanel
|
* @return instance of the ImageFilePanel
|
||||||
*/
|
*/
|
||||||
public static synchronized ImageFilePanel createInstance(String context, List<FileFilter> fileChooserFilters) {
|
public static synchronized ImageFilePanel createInstance(String context, List<FileFilter> fileChooserFilters) {
|
||||||
|
|
||||||
ImageFilePanel instance = new ImageFilePanel(context, fileChooserFilters);
|
ImageFilePanel instance = new ImageFilePanel(context, fileChooserFilters);
|
||||||
instance.postInit();
|
// post-constructor initialization of listener support without leaking references of uninitialized objects
|
||||||
instance.createTimeZoneList();
|
instance.pathTextField.getDocument().addDocumentListener(instance);
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
//post-constructor initialization to properly initialize listener support
|
|
||||||
//without leaking references of uninitialized objects
|
|
||||||
private void postInit() {
|
|
||||||
pathTextField.getDocument().addDocumentListener(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called from within the constructor to initialize the form.
|
* This method is called from within the constructor to initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is always
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
* regenerated by the Form Editor.
|
* regenerated by the Form Editor.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
@ -187,29 +191,35 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
|
@NbBundle.Messages({"ImageFilePanel.000.confirmationMessage=The selected file"
|
||||||
|
+ " has extenson .001 but there is a .000 file in the sequence of raw images."
|
||||||
|
+ "\nShould the .000 file be used as the start, instead of the selected .001 file?\n"})
|
||||||
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
|
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
|
||||||
String oldText = pathTextField.getText();
|
String oldText = getContentPaths();
|
||||||
// set the current directory of the FileChooser if the ImagePath Field is valid
|
// set the current directory of the FileChooser if the ImagePath Field is valid
|
||||||
File currentDir = new File(oldText);
|
File currentDir = new File(oldText);
|
||||||
if (currentDir.exists()) {
|
if (currentDir.exists()) {
|
||||||
fc.setCurrentDirectory(currentDir);
|
fileChooser.setCurrentDirectory(currentDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
int retval = fc.showOpenDialog(this);
|
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
|
||||||
if (retval == JFileChooser.APPROVE_OPTION) {
|
String path = fileChooser.getSelectedFile().getPath();
|
||||||
String path = fc.getSelectedFile().getPath();
|
if (path.endsWith(".001")) {
|
||||||
pathTextField.setText(path);
|
String zeroX3_path = StringUtils.removeEnd(path, ".001") + ".000";
|
||||||
|
if (new File(zeroX3_path).exists()) {
|
||||||
|
int showConfirmDialog = JOptionPane.showConfirmDialog(this,
|
||||||
|
Bundle.ImageFilePanel_000_confirmationMessage(),
|
||||||
|
"Choose .001 file?", JOptionPane.YES_NO_OPTION);
|
||||||
|
if (showConfirmDialog == JOptionPane.YES_OPTION) {
|
||||||
|
path = zeroX3_path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setContentPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
updateHelper();
|
||||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.FOCUS_NEXT.toString(), false, true);
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", e); //NON-NLS
|
|
||||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
|
|
||||||
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
|
|
||||||
MessageNotifyUtil.MessageType.ERROR);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_browseButtonActionPerformed
|
}//GEN-LAST:event_browseButtonActionPerformed
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
@ -234,6 +244,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the path of the image file.
|
* Set the path of the image file.
|
||||||
|
*
|
||||||
* @param s path of the image file
|
* @param s path of the image file
|
||||||
*/
|
*/
|
||||||
public void setContentPath(String s) {
|
public void setContentPath(String s) {
|
||||||
@ -242,7 +253,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
|
|
||||||
public String getTimeZone() {
|
public String getTimeZone() {
|
||||||
String tz = timeZoneComboBox.getSelectedItem().toString();
|
String tz = timeZoneComboBox.getSelectedItem().toString();
|
||||||
return tz.substring(tz.indexOf(")") + 2).trim();
|
return tz.substring(tz.indexOf(')') + 2).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getNoFatOrphans() {
|
public boolean getNoFatOrphans() {
|
||||||
@ -259,34 +270,23 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
*
|
*
|
||||||
* @return true if a proper image has been selected, false otherwise
|
* @return true if a proper image has been selected, false otherwise
|
||||||
*/
|
*/
|
||||||
|
@NbBundle.Messages("DataSourceOnCDriveError.text=Warning: Path to multi-user data source is on \"C:\" drive")
|
||||||
public boolean validatePanel() {
|
public boolean validatePanel() {
|
||||||
errorLabel.setVisible(false);
|
errorLabel.setVisible(false);
|
||||||
String path = getContentPaths();
|
String path = getContentPaths();
|
||||||
if (path == null || path.isEmpty()) {
|
if (StringUtils.isBlank(path)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// display warning if there is one (but don't disable "next" button)
|
// display warning if there is one (but don't disable "next" button)
|
||||||
warnIfPathIsInvalid(path);
|
if (false == PathValidator.isValid(path, Case.getCurrentCase().getCaseType())) {
|
||||||
|
|
||||||
boolean isExist = new File(path).isFile();
|
|
||||||
boolean isPhysicalDrive = DriveUtils.isPhysicalDrive(path);
|
|
||||||
boolean isPartition = DriveUtils.isPartition(path);
|
|
||||||
|
|
||||||
return (isExist || isPhysicalDrive || isPartition);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validates path to selected data source and displays warning if it is
|
|
||||||
* invalid.
|
|
||||||
*
|
|
||||||
* @param path Absolute path to the selected data source
|
|
||||||
*/
|
|
||||||
private void warnIfPathIsInvalid(String path) {
|
|
||||||
if (!PathValidator.isValid(path, Case.getCurrentCase().getCaseType())) {
|
|
||||||
errorLabel.setVisible(true);
|
errorLabel.setVisible(true);
|
||||||
errorLabel.setText(NbBundle.getMessage(this.getClass(), "DataSourceOnCDriveError.text"));
|
errorLabel.setText(Bundle.DataSourceOnCDriveError_text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new File(path).isFile()
|
||||||
|
|| DriveUtils.isPhysicalDrive(path)
|
||||||
|
|| DriveUtils.isPartition(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeSettings() {
|
public void storeSettings() {
|
||||||
@ -299,47 +299,39 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
|
|
||||||
public void readSettings() {
|
public void readSettings() {
|
||||||
String lastImagePath = ModuleSettings.getConfigSetting(contextName, PROP_LASTIMAGE_PATH);
|
String lastImagePath = ModuleSettings.getConfigSetting(contextName, PROP_LASTIMAGE_PATH);
|
||||||
if (null != lastImagePath) {
|
if (StringUtils.isNotBlank(lastImagePath)) {
|
||||||
if (!lastImagePath.isEmpty()) {
|
setContentPath(lastImagePath);
|
||||||
pathTextField.setText(lastImagePath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the drop down list for the time zones and then makes the local
|
* Get a string representation of a TimeZone for use in the drop down list.
|
||||||
* machine time zone to be selected.
|
*
|
||||||
|
* @param zone The TimeZone to make a string for
|
||||||
|
*
|
||||||
|
* @return A string representation of a TimeZone for use in the drop down
|
||||||
|
* list.
|
||||||
*/
|
*/
|
||||||
public void createTimeZoneList() {
|
static private String timeZoneToString(TimeZone zone) {
|
||||||
// load and add all timezone
|
|
||||||
String[] ids = SimpleTimeZone.getAvailableIDs();
|
|
||||||
for (String id : ids) {
|
|
||||||
TimeZone zone = TimeZone.getTimeZone(id);
|
|
||||||
int offset = zone.getRawOffset() / 1000;
|
int offset = zone.getRawOffset() / 1000;
|
||||||
int hour = offset / 3600;
|
int hour = offset / 3600;
|
||||||
int minutes = (offset % 3600) / 60;
|
int minutes = (offset % 3600) / 60;
|
||||||
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id); //NON-NLS
|
return String.format("(GMT%+d:%02d) %s", hour, minutes, zone.getID()); //NON-NLS
|
||||||
|
|
||||||
/*
|
|
||||||
* DateFormat dfm = new SimpleDateFormat("z");
|
|
||||||
* dfm.setTimeZone(zone); boolean hasDaylight =
|
|
||||||
* zone.useDaylightTime(); String first = dfm.format(new Date(2010,
|
|
||||||
* 1, 1)); String second = dfm.format(new Date(2011, 6, 6)); int mid
|
|
||||||
* = hour * -1; String result = first + Integer.toString(mid);
|
|
||||||
* if(hasDaylight){ result = result + second; }
|
|
||||||
* timeZoneComboBox.addItem(item + " (" + result + ")");
|
|
||||||
*/
|
|
||||||
timeZoneComboBox.addItem(item);
|
|
||||||
}
|
}
|
||||||
// get the current timezone
|
|
||||||
TimeZone thisTimeZone = Calendar.getInstance().getTimeZone();
|
|
||||||
int thisOffset = thisTimeZone.getRawOffset() / 1000;
|
|
||||||
int thisHour = thisOffset / 3600;
|
|
||||||
int thisMinutes = (thisOffset % 3600) / 60;
|
|
||||||
String formatted = String.format("(GMT%+d:%02d) %s", thisHour, thisMinutes, thisTimeZone.getID()); //NON-NLS
|
|
||||||
|
|
||||||
// set the selected timezone
|
@Override
|
||||||
timeZoneComboBox.setSelectedItem(formatted);
|
public void insertUpdate(DocumentEvent e) {
|
||||||
|
updateHelper();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeUpdate(DocumentEvent e) {
|
||||||
|
updateHelper();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changedUpdate(DocumentEvent e) {
|
||||||
|
updateHelper();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -347,43 +339,16 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
* it's DocumentEventListener. Each update function fires a property change
|
* it's DocumentEventListener. Each update function fires a property change
|
||||||
* to be caught by the parent panel.
|
* to be caught by the parent panel.
|
||||||
*
|
*
|
||||||
* @param e the event, which is ignored
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@NbBundle.Messages({"ImageFilePanel.moduleErr=Module Error",
|
||||||
public void insertUpdate(DocumentEvent e) {
|
"ImageFilePanel.moduleErr.msg=A module caused an error listening to ImageFilePanel updates."
|
||||||
|
+ " See log to determine which module. Some data could be incomplete.\n"})
|
||||||
|
private void updateHelper() {
|
||||||
try {
|
try {
|
||||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
||||||
} catch (Exception ee) {
|
} catch (Exception e) {
|
||||||
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee); //NON-NLS
|
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", e); //NON-NLS
|
||||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
|
MessageNotifyUtil.Notify.error(ImageFilePanel_moduleErr(), ImageFilePanel_moduleErr_msg());
|
||||||
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
|
|
||||||
MessageNotifyUtil.MessageType.ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeUpdate(DocumentEvent e) {
|
|
||||||
try {
|
|
||||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
|
||||||
} catch (Exception ee) {
|
|
||||||
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee); //NON-NLS
|
|
||||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
|
|
||||||
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
|
|
||||||
MessageNotifyUtil.MessageType.ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void changedUpdate(DocumentEvent e) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
|
||||||
} catch (Exception ee) {
|
|
||||||
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee); //NON-NLS
|
|
||||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
|
|
||||||
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
|
|
||||||
MessageNotifyUtil.MessageType.ERROR);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0
Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesDSProcessor.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesPanel.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/LocalFilesPanel.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/MissingImageDialog.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel1.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel1.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel2.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/NewCaseVisualPanel2.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardPanel1.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardPanel2.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.form
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/RecentItems.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseConverter.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowInterface.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/UpdateRecentCases.java
Normal file → Executable file
0
Core/src/org/sleuthkit/autopsy/casemodule/addImage-icon.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
0
Core/src/org/sleuthkit/autopsy/casemodule/btn_icon_add_image.png
Normal file → Executable file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
Core/src/org/sleuthkit/autopsy/casemodule/btn_icon_close_case.png
Normal file → Executable file
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
0
Core/src/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png
Normal file → Executable file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
0
Core/src/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png
Normal file → Executable file
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
0
Core/src/org/sleuthkit/autopsy/casemodule/btn_icon_open_recent.png
Normal file → Executable file
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
0
Core/src/org/sleuthkit/autopsy/casemodule/close-icon.png
Normal file → Executable file
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |