mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-29 22:09:52 +00:00
Merge remote-tracking branch 'upstream/develop' into timeline-event-mgr
# Conflicts: # Core/src/org/sleuthkit/autopsy/casemodule/services/Services.java # Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java # Core/src/org/sleuthkit/autopsy/timeline/ui/ViewFrame.java # KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
OpenIDE-Module: org.sleuthkit.autopsy.core/10
|
||||
OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/core/Bundle.properties
|
||||
OpenIDE-Module-Layer: org/sleuthkit/autopsy/core/layer.xml
|
||||
OpenIDE-Module-Implementation-Version: 25
|
||||
OpenIDE-Module-Implementation-Version: 26
|
||||
OpenIDE-Module-Requires: org.openide.windows.WindowManager
|
||||
AutoUpdate-Show-In-Client: true
|
||||
AutoUpdate-Essential-Module: true
|
||||
|
||||
@@ -63,7 +63,7 @@ file.reference.cxf-rt-transports-http-3.0.16.jar=release/modules/ext/cxf-rt-tran
|
||||
file.reference.fontbox-2.0.8.jar=release/modules/ext/fontbox-2.0.8.jar
|
||||
file.reference.pdfbox-2.0.8.jar=release/modules/ext/pdfbox-2.0.8.jar
|
||||
file.reference.pdfbox-tools-2.0.8.jar=release/modules/ext/pdfbox-tools-2.0.8.jar
|
||||
file.reference.sleuthkit-postgresql-4.6.4.jar=release/modules/ext/sleuthkit-postgresql-4.6.4.jar
|
||||
file.reference.sleuthkit-postgresql-4.6.5.jar=release/modules/ext/sleuthkit-postgresql-4.6.5.jar
|
||||
file.reference.tagsoup-1.2.1.jar=release/modules/ext/tagsoup-1.2.1.jar
|
||||
file.reference.tika-core-1.17.jar=release/modules/ext/tika-core-1.17.jar
|
||||
file.reference.tika-parsers-1.17.jar=release/modules/ext/tika-parsers-1.17.jar
|
||||
@@ -84,5 +84,5 @@ nbm.homepage=http://www.sleuthkit.org/
|
||||
nbm.module.author=Brian Carrier
|
||||
nbm.needs.restart=true
|
||||
source.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8.0-sources.jar
|
||||
spec.version.base=10.13
|
||||
spec.version.base=10.14
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
<package>org.sleuthkit.autopsy.progress</package>
|
||||
<package>org.sleuthkit.autopsy.report</package>
|
||||
<package>org.sleuthkit.autopsy.textextractors</package>
|
||||
<package>org.sleuthkit.autopsy.textextractors.extractionconfigs</package>
|
||||
<package>org.sleuthkit.autopsy.textextractors.configs</package>
|
||||
<package>org.sleuthkit.autopsy.texttranslation</package>
|
||||
<package>org.sleuthkit.datamodel</package>
|
||||
</public-packages>
|
||||
@@ -500,8 +500,8 @@
|
||||
<binary-origin>release/modules/ext/isoparser-1.1.18.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sleuthkit-postgresql-4.6.4.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sleuthkit-postgresql-4.6.4.jar</binary-origin>
|
||||
<runtime-relative-path>ext/sleuthkit-postgresql-4.6.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sleuthkit-postgresql-4.6.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/vorbis-java-core-0.8.jar</runtime-relative-path>
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.othercasessearch;
|
||||
package org.sleuthkit.autopsy.allcasessearch;
|
||||
|
||||
import org.openide.nodes.Children;
|
||||
import org.openide.nodes.FilterNode;
|
||||
@@ -27,7 +27,7 @@ import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
|
||||
* A <code>Children</code> implementation for a
|
||||
* <code>CorrelationPropertyFilterNode</code>.
|
||||
*/
|
||||
final class OtherCasesFilterChildren extends FilterNode.Children {
|
||||
final class AllCasesFilterChildren extends FilterNode.Children {
|
||||
|
||||
/**
|
||||
* Create a new Children instance.
|
||||
@@ -41,7 +41,7 @@ final class OtherCasesFilterChildren extends FilterNode.Children {
|
||||
static Children createInstance(Node wrappedNode, boolean createChildren) {
|
||||
|
||||
if (createChildren) {
|
||||
return new OtherCasesFilterChildren(wrappedNode);
|
||||
return new AllCasesFilterChildren(wrappedNode);
|
||||
} else {
|
||||
return Children.LEAF;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ final class OtherCasesFilterChildren extends FilterNode.Children {
|
||||
*
|
||||
* @param wrappedNode The node wrapped by CorrelationPropertyFilterNode.
|
||||
*/
|
||||
OtherCasesFilterChildren(Node wrappedNode) {
|
||||
AllCasesFilterChildren(Node wrappedNode) {
|
||||
super(wrappedNode);
|
||||
}
|
||||
|
||||
+8
-9
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.othercasessearch;
|
||||
package org.sleuthkit.autopsy.allcasessearch;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import org.openide.awt.ActionID;
|
||||
@@ -27,16 +27,15 @@ import org.openide.util.NbBundle;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.othercasessearch.Bundle;
|
||||
|
||||
/**
|
||||
* Action for accessing the Search Other Cases dialog.
|
||||
*/
|
||||
@ActionID(category = "Tools", id = "org.sleuthkit.autopsy.othercasessearch.OtherCasesSearchAction")
|
||||
@ActionRegistration(displayName = "#CTL_OtherCasesSearchAction=Search Other Cases", lazy = false)
|
||||
@ActionID(category = "Tools", id = "org.sleuthkit.autopsy.allcasessearch.AllCasesSearchAction")
|
||||
@ActionRegistration(displayName = "#CTL_OtherCasesSearchAction=Search All Cases", lazy = false)
|
||||
@ActionReference(path = "Menu/Tools", position = 201)
|
||||
@NbBundle.Messages({"CTL_OtherCasesSearchAction=Search Other Cases"})
|
||||
public class OtherCasesSearchAction extends CallableSystemAction {
|
||||
@NbBundle.Messages({"CTL_AllCasesSearchAction=Search All Cases"})
|
||||
public class AllCasesSearchAction extends CallableSystemAction {
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
@@ -50,15 +49,15 @@ public class OtherCasesSearchAction extends CallableSystemAction {
|
||||
|
||||
@Override
|
||||
public void performAction() {
|
||||
OtherCasesSearchDialog dialog = new OtherCasesSearchDialog();
|
||||
AllCasesSearchDialog dialog = new AllCasesSearchDialog();
|
||||
dialog.display();
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
"OtherCasesSearchAction.getName.text=Search Other Cases"})
|
||||
"AllCasesSearchAction.getName.text=Search All Cases"})
|
||||
@Override
|
||||
public String getName() {
|
||||
return Bundle.OtherCasesSearchAction_getName_text();
|
||||
return Bundle.AllCasesSearchAction_getName_text();
|
||||
}
|
||||
|
||||
@Override
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.othercasessearch;
|
||||
package org.sleuthkit.autopsy.allcasessearch;
|
||||
|
||||
import java.util.List;
|
||||
import org.openide.nodes.Children;
|
||||
@@ -27,15 +27,15 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeIns
|
||||
* Creates CorrelationAttributeInstanceNodes from a collection of
|
||||
* CorrelationAttributeInstances.
|
||||
*/
|
||||
class OtherCasesSearchChildren extends Children.Keys<CorrelationAttributeInstance> {
|
||||
class AllCasesSearchChildren extends Children.Keys<CorrelationAttributeInstance> {
|
||||
|
||||
/**
|
||||
* Create an instance of OtherCasesSearchChildren.
|
||||
* Create an instance of AllCasesSearchChildren.
|
||||
*
|
||||
* @param lazy Lazy load?
|
||||
* @param fileList List of CorrelationAttributeInstances.
|
||||
*/
|
||||
OtherCasesSearchChildren(boolean lazy, List<CorrelationAttributeInstance> instances) {
|
||||
AllCasesSearchChildren(boolean lazy, List<CorrelationAttributeInstance> instances) {
|
||||
super(lazy);
|
||||
this.setKeys(instances);
|
||||
}
|
||||
+9
-9
@@ -81,14 +81,14 @@
|
||||
<Component class="javax.swing.JLabel" name="correlationValueLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.correlationValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.correlationValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="correlationValueTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.correlationValueTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.correlationValueTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -98,15 +98,15 @@
|
||||
<Component class="javax.swing.JButton" name="searchButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.searchButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.searchButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.searchButton.AccessibleContext.accessibleName" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.searchButton.AccessibleContext.accessibleName" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.searchButton.AccessibleContext.accessibleDescription" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.searchButton.AccessibleContext.accessibleDescription" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
@@ -129,7 +129,7 @@
|
||||
<Component class="javax.swing.JLabel" name="correlationTypeLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.correlationTypeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.correlationTypeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -139,14 +139,14 @@
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="descriptionLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.descriptionLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.descriptionLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -154,7 +154,7 @@
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/othercasessearch/Bundle.properties" key="OtherCasesSearchDialog.casesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/allcasessearch/Bundle.properties" key="AllCasesSearchDialog.casesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
+66
-66
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.othercasessearch;
|
||||
package org.sleuthkit.autopsy.allcasessearch;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.ItemEvent;
|
||||
@@ -48,31 +48,31 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.datamodel.EmptyNode;
|
||||
|
||||
@Messages({
|
||||
"OtherCasesSearchDialog.dialogTitle.text=Search Other Cases",
|
||||
"OtherCasesSearchDialog.resultsTitle.text=Other Cases",
|
||||
"OtherCasesSearchDialog.resultsDescription.text=Other Cases Search",
|
||||
"OtherCasesSearchDialog.emptyNode.text=No results found.",
|
||||
"OtherCasesSearchDialog.validation.invalidHash=The supplied value is not a valid MD5 hash.",
|
||||
"OtherCasesSearchDialog.validation.invalidEmail=The supplied value is not a valid e-mail address.",
|
||||
"OtherCasesSearchDialog.validation.invalidDomain=The supplied value is not a valid domain.",
|
||||
"OtherCasesSearchDialog.validation.invalidPhone=The supplied value is not a valid phone number.",
|
||||
"OtherCasesSearchDialog.validation.invalidSsid=The supplied value is not a valid wireless network.",
|
||||
"OtherCasesSearchDialog.validation.invalidMac=The supplied value is not a valid MAC address.",
|
||||
"OtherCasesSearchDialog.validation.invalidImei=The supplied value is not a valid IMEI number.",
|
||||
"OtherCasesSearchDialog.validation.invalidImsi=The supplied value is not a valid IMSI number.",
|
||||
"OtherCasesSearchDialog.validation.invalidIccid=The supplied value is not a valid ICCID number.",
|
||||
"OtherCasesSearchDialog.validation.genericMessage=The supplied value is not valid.",
|
||||
"AllCasesSearchDialog.dialogTitle.text=Search All Cases",
|
||||
"AllCasesSearchDialog.resultsTitle.text=All Cases",
|
||||
"AllCasesSearchDialog.resultsDescription.text=All Cases Search",
|
||||
"AllCasesSearchDialog.emptyNode.text=No results found.",
|
||||
"AllCasesSearchDialog.validation.invalidHash=The supplied value is not a valid MD5 hash.",
|
||||
"AllCasesSearchDialog.validation.invalidEmail=The supplied value is not a valid e-mail address.",
|
||||
"AllCasesSearchDialog.validation.invalidDomain=The supplied value is not a valid domain.",
|
||||
"AllCasesSearchDialog.validation.invalidPhone=The supplied value is not a valid phone number.",
|
||||
"AllCasesSearchDialog.validation.invalidSsid=The supplied value is not a valid wireless network.",
|
||||
"AllCasesSearchDialog.validation.invalidMac=The supplied value is not a valid MAC address.",
|
||||
"AllCasesSearchDialog.validation.invalidImei=The supplied value is not a valid IMEI number.",
|
||||
"AllCasesSearchDialog.validation.invalidImsi=The supplied value is not a valid IMSI number.",
|
||||
"AllCasesSearchDialog.validation.invalidIccid=The supplied value is not a valid ICCID number.",
|
||||
"AllCasesSearchDialog.validation.genericMessage=The supplied value is not valid.",
|
||||
"# {0} - number of cases",
|
||||
"OtherCasesSearchDialog.caseLabel.text=The current Central Repository contains {0} case(s)."
|
||||
"AllCasesSearchDialog.caseLabel.text=The current Central Repository contains {0} case(s)."
|
||||
})
|
||||
/**
|
||||
* The Search Other Cases dialog allows users to search for specific types of
|
||||
* The Search All Cases dialog allows users to search for specific types of
|
||||
* correlation properties in the Central Repository.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
final class AllCasesSearchDialog extends javax.swing.JDialog {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(OtherCasesSearchDialog.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(AllCasesSearchDialog.class.getName());
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final List<CorrelationAttributeInstance.Type> correlationTypes;
|
||||
@@ -82,8 +82,8 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
/**
|
||||
* Creates a new instance of the Search Other Cases dialog.
|
||||
*/
|
||||
OtherCasesSearchDialog() {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.OtherCasesSearchDialog_dialogTitle_text(), true);
|
||||
AllCasesSearchDialog() {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.AllCasesSearchDialog_dialogTitle_text(), true);
|
||||
this.correlationTypes = new ArrayList<>();
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
@@ -122,20 +122,20 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
Collection<DataResultViewer> viewers = new ArrayList<>(1);
|
||||
viewers.add(table);
|
||||
|
||||
OtherCasesSearchNode searchNode = new OtherCasesSearchNode(correlationInstances);
|
||||
AllCasesSearchNode searchNode = new AllCasesSearchNode(correlationInstances);
|
||||
TableFilterNode tableFilterNode = new TableFilterNode(searchNode, true, searchNode.getName());
|
||||
|
||||
String resultsText = String.format("%s (%s; \"%s\")",
|
||||
Bundle.OtherCasesSearchDialog_resultsTitle_text(), type.getDisplayName(), value);
|
||||
Bundle.AllCasesSearchDialog_resultsTitle_text(), type.getDisplayName(), value);
|
||||
final TopComponent searchResultWin;
|
||||
if (correlationInstances.isEmpty()) {
|
||||
Node emptyNode = new TableFilterNode(
|
||||
new EmptyNode(Bundle.OtherCasesSearchDialog_emptyNode_text()), true);
|
||||
new EmptyNode(Bundle.AllCasesSearchDialog_emptyNode_text()), true);
|
||||
searchResultWin = DataResultTopComponent.createInstance(
|
||||
resultsText, Bundle.OtherCasesSearchDialog_resultsDescription_text(), emptyNode, 0);
|
||||
resultsText, Bundle.AllCasesSearchDialog_resultsDescription_text(), emptyNode, 0);
|
||||
} else {
|
||||
searchResultWin = DataResultTopComponent.createInstance(
|
||||
resultsText, Bundle.OtherCasesSearchDialog_resultsDescription_text(), tableFilterNode, correlationInstances.size(), viewers);
|
||||
resultsText, Bundle.AllCasesSearchDialog_resultsDescription_text(), tableFilterNode, correlationInstances.size(), viewers);
|
||||
}
|
||||
searchResultWin.requestActive(); // make it the active top component
|
||||
} catch (ExecutionException | InterruptedException ex) {
|
||||
@@ -166,16 +166,16 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setResizable(false);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(correlationValueLabel, org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.correlationValueLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(correlationValueLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.correlationValueLabel.text")); // NOI18N
|
||||
|
||||
correlationValueTextField.setText(org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.correlationValueTextField.text")); // NOI18N
|
||||
correlationValueTextField.setText(org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.correlationValueTextField.text")); // NOI18N
|
||||
correlationValueTextField.addKeyListener(new java.awt.event.KeyAdapter() {
|
||||
public void keyReleased(java.awt.event.KeyEvent evt) {
|
||||
valueFieldKeyReleaseListener(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.searchButton.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.searchButton.text")); // NOI18N
|
||||
searchButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
searchButtonActionPerformed(evt);
|
||||
@@ -188,15 +188,15 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(correlationTypeLabel, org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.correlationTypeLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(correlationTypeLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.correlationTypeLabel.text")); // NOI18N
|
||||
|
||||
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.errorLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.errorLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(descriptionLabel, org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.descriptionLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(descriptionLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.descriptionLabel.text")); // NOI18N
|
||||
|
||||
casesLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(casesLabel, org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.casesLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(casesLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.casesLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
@@ -243,8 +243,8 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
searchButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.searchButton.AccessibleContext.accessibleName")); // NOI18N
|
||||
searchButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(OtherCasesSearchDialog.class, "OtherCasesSearchDialog.searchButton.AccessibleContext.accessibleDescription")); // NOI18N
|
||||
searchButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.searchButton.AccessibleContext.accessibleName")); // NOI18N
|
||||
searchButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.searchButton.AccessibleContext.accessibleDescription")); // NOI18N
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
@@ -260,34 +260,34 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
String validationMessage;
|
||||
switch (correlationType.getId()) {
|
||||
case CorrelationAttributeInstance.FILES_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidHash();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidHash();
|
||||
break;
|
||||
case CorrelationAttributeInstance.DOMAIN_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidDomain();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidDomain();
|
||||
break;
|
||||
case CorrelationAttributeInstance.EMAIL_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidEmail();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidEmail();
|
||||
break;
|
||||
case CorrelationAttributeInstance.PHONE_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidPhone();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidPhone();
|
||||
break;
|
||||
case CorrelationAttributeInstance.SSID_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidSsid();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidSsid();
|
||||
break;
|
||||
case CorrelationAttributeInstance.MAC_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidMac();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidMac();
|
||||
break;
|
||||
case CorrelationAttributeInstance.IMEI_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidImei();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidImei();
|
||||
break;
|
||||
case CorrelationAttributeInstance.IMSI_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidImsi();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidImsi();
|
||||
break;
|
||||
case CorrelationAttributeInstance.ICCID_TYPE_ID:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_invalidIccid();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_invalidIccid();
|
||||
break;
|
||||
default:
|
||||
validationMessage = Bundle.OtherCasesSearchDialog_validation_genericMessage();
|
||||
validationMessage = Bundle.AllCasesSearchDialog_validation_genericMessage();
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -340,7 +340,7 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
correlationTypes.clear();
|
||||
correlationTypes.addAll(dbManager.getDefinedCorrelationTypes());
|
||||
int numberOfCases = dbManager.getCases().size();
|
||||
casesLabel.setText(Bundle.OtherCasesSearchDialog_caseLabel_text(numberOfCases));
|
||||
casesLabel.setText(Bundle.AllCasesSearchDialog_caseLabel_text(numberOfCases));
|
||||
} catch (EamDbException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to connect to the Central Repository database.", ex);
|
||||
}
|
||||
@@ -385,16 +385,16 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"OtherCasesSearchDialog.correlationValueTextField.filesExample=Example: \"f0e1d2c3b4a5968778695a4b3c2d1e0f\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.domainExample=Example: \"domain.com\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.emailExample=Example: \"user@host.com\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.phoneExample=Example: \"(800)123-4567\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.usbExample=Example: \"4&1234567&0\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.ssidExample=Example: \"WirelessNetwork-5G\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.macExample=Example: \"0C-14-F2-01-AF-45\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.imeiExample=Example: \"351756061523999\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.imsiExample=Example: \"310150123456789\"",
|
||||
"OtherCasesSearchDialog.correlationValueTextField.iccidExample=Example: \"89 91 19 1299 99 329451 0\""
|
||||
"AllCasesSearchDialog.correlationValueTextField.filesExample=Example: \"f0e1d2c3b4a5968778695a4b3c2d1e0f\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.domainExample=Example: \"domain.com\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.emailExample=Example: \"user@host.com\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.phoneExample=Example: \"(800)123-4567\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.usbExample=Example: \"4&1234567&0\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.ssidExample=Example: \"WirelessNetwork-5G\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.macExample=Example: \"0C-14-F2-01-AF-45\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.imeiExample=Example: \"351756061523999\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.imsiExample=Example: \"310150123456789\"",
|
||||
"AllCasesSearchDialog.correlationValueTextField.iccidExample=Example: \"89 91 19 1299 99 329451 0\""
|
||||
})
|
||||
/**
|
||||
* Update the text prompt of the name text field based on the input type
|
||||
@@ -407,34 +407,34 @@ final class OtherCasesSearchDialog extends javax.swing.JDialog {
|
||||
String text;
|
||||
switch (selectedCorrelationType.getId()) {
|
||||
case CorrelationAttributeInstance.FILES_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_filesExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_filesExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.DOMAIN_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_domainExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_domainExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.EMAIL_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_emailExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_emailExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.PHONE_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_phoneExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_phoneExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.USBID_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_usbExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_usbExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.SSID_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_ssidExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_ssidExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.MAC_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_macExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_macExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.IMEI_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_imeiExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_imeiExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.IMSI_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_imsiExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_imsiExample();
|
||||
break;
|
||||
case CorrelationAttributeInstance.ICCID_TYPE_ID:
|
||||
text = Bundle.OtherCasesSearchDialog_correlationValueTextField_iccidExample();
|
||||
text = Bundle.AllCasesSearchDialog_correlationValueTextField_iccidExample();
|
||||
break;
|
||||
default:
|
||||
text = "";
|
||||
+8
-8
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.othercasessearch;
|
||||
package org.sleuthkit.autopsy.allcasessearch;
|
||||
|
||||
import java.util.List;
|
||||
import org.openide.nodes.AbstractNode;
|
||||
@@ -24,24 +24,24 @@ import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
|
||||
|
||||
/**
|
||||
* Parent node to OtherCasesSearchChildren.
|
||||
* Parent node to AllCasesSearchChildren.
|
||||
*/
|
||||
class OtherCasesSearchNode extends AbstractNode {
|
||||
class AllCasesSearchNode extends AbstractNode {
|
||||
|
||||
/**
|
||||
* Create an instance of OtherCasesSearchNode.
|
||||
* Create an instance of AllCasesSearchNode.
|
||||
*
|
||||
* @param keys The list of CorrelationAttributeInstances.
|
||||
*/
|
||||
OtherCasesSearchNode(List<CorrelationAttributeInstance> keys) {
|
||||
super(new OtherCasesSearchChildren(true, keys));
|
||||
AllCasesSearchNode(List<CorrelationAttributeInstance> keys) {
|
||||
super(new AllCasesSearchChildren(true, keys));
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"OtherCasesSearchNode.getName.text=Other Cases Search"
|
||||
"AllCasesSearchNode.getName.text=Other Cases Search"
|
||||
})
|
||||
@Override
|
||||
public String getName() {
|
||||
return Bundle.OtherCasesSearchNode_getName_text();
|
||||
return Bundle.AllCasesSearchNode_getName_text();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
AllCasesSearchDialog.descriptionLabel.text=<html>Search the Central Repository for correlation properties with a specified value. The search is case insensitive.</html>
|
||||
AllCasesSearchDialog.errorLabel.text=\
|
||||
AllCasesSearchDialog.correlationTypeLabel.text=Correlation Property Type:
|
||||
AllCasesSearchDialog.searchButton.AccessibleContext.accessibleDescription=
|
||||
AllCasesSearchDialog.searchButton.AccessibleContext.accessibleName=Search
|
||||
AllCasesSearchDialog.searchButton.text=Search
|
||||
AllCasesSearchDialog.correlationValueTextField.text=
|
||||
AllCasesSearchDialog.correlationValueLabel.text=Correlation Property Value:
|
||||
AllCasesSearchDialog.casesLabel.text=\
|
||||
+2
-3
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.othercasessearch;
|
||||
package org.sleuthkit.autopsy.allcasessearch;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -29,13 +29,12 @@ import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.Lookups;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
|
||||
import org.sleuthkit.autopsy.othercasessearch.Bundle;
|
||||
import org.sleuthkit.autopsy.datamodel.DisplayableItemNode;
|
||||
import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor;
|
||||
import org.sleuthkit.autopsy.datamodel.NodeProperty;
|
||||
|
||||
/**
|
||||
* Used by the Other Cases Search feature to encapsulate instances of a given
|
||||
* Used by the All Cases Search feature to encapsulate instances of a given
|
||||
* search match.
|
||||
*/
|
||||
public final class CorrelationAttributeInstanceNode extends DisplayableItemNode {
|
||||
@@ -232,10 +232,12 @@ LocalDiskSelectionDialog.okButton.text=OK
|
||||
LocalDiskPanel.localDiskLabel.text=Local Disk:
|
||||
LocalDiskPanel.imageWriterErrorLabel.text=Error Label
|
||||
LocalDiskSelectionDialog.title=Select Local Disk
|
||||
ImageFilePanel.md5HashLabel.text=MD5 hash:
|
||||
ImageFilePanel.sha1HashLabel.text=SHA-1 hash:
|
||||
ImageFilePanel.sha256HashLabel.text=SHA-256 hash:
|
||||
ImageFilePanel.md5HashLabel.text=MD5:
|
||||
ImageFilePanel.sha1HashLabel.text=SHA-1:
|
||||
ImageFilePanel.sha256HashLabel.text=SHA-256:
|
||||
ImageFilePanel.sha256HashTextField.text=
|
||||
ImageFilePanel.sha1HashTextField.text=
|
||||
ImageFilePanel.md5HashTextField.text=
|
||||
ImageFilePanel.errorLabel.text=Error Label
|
||||
ImageFilePanel.hashValuesNoteLabel.text=NOTE: These values will not be validated when the data source is added.
|
||||
ImageFilePanel.hashValuesLabel.text=Hash Values (optional):
|
||||
|
||||
@@ -1157,12 +1157,7 @@ public class Case {
|
||||
/*
|
||||
* Enable the case-specific actions.
|
||||
*/
|
||||
|
||||
//Deny ability to add a data source if the special admin access file is present.
|
||||
File denyAddDataSourcePermissions = new File(PlatformUtil.getUserConfigDirectory(), "_ndsp");
|
||||
if(!denyAddDataSourcePermissions.exists()) {
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(true);
|
||||
}
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true);
|
||||
|
||||
@@ -46,6 +46,7 @@ import org.sleuthkit.autopsy.events.AutopsyEventPublisher;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.events.DataSourceAnalysisCompletedEvent;
|
||||
import org.sleuthkit.autopsy.ingest.events.DataSourceAnalysisStartedEvent;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
* A collaboration monitor listens to local events and translates them into
|
||||
@@ -231,9 +232,12 @@ final class CollaborationMonitor {
|
||||
* @param event A data source analysis started event.
|
||||
*/
|
||||
synchronized void addDataSourceAnalysisTask(DataSourceAnalysisStartedEvent event) {
|
||||
String status = NbBundle.getMessage(CollaborationMonitor.class, "CollaborationMonitor.analyzingDataSourceStatus.msg", hostName, event.getDataSource().getName());
|
||||
jobIdsTodataSourceAnalysisTasks.put(event.getDataSourceIngestJobId(), new Task(++nextTaskId, status));
|
||||
eventPublisher.publishRemotely(new CollaborationEvent(hostName, getCurrentTasks()));
|
||||
Content dataSource = event.getDataSource();
|
||||
if (dataSource != null) {
|
||||
String status = NbBundle.getMessage(CollaborationMonitor.class, "CollaborationMonitor.analyzingDataSourceStatus.msg", hostName, dataSource.getName());
|
||||
jobIdsTodataSourceAnalysisTasks.put(event.getDataSourceIngestJobId(), new Task(++nextTaskId, status));
|
||||
eventPublisher.publishRemotely(new CollaborationEvent(hostName, getCurrentTasks()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,29 +32,45 @@
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="sha256HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sha1HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="md5HashLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="timeZoneLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pathLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="noFatOrphansCheckbox" alignment="0" min="-2" pref="262" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="sha256HashTextField" pref="455" max="32767" attributes="0"/>
|
||||
<Component id="sha1HashTextField" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="md5HashTextField" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="sectorSizeComboBox" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="368" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pathLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="noFatOrphansCheckbox" alignment="0" min="-2" pref="262" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="timeZoneLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" min="-2" pref="455" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="sectorSizeLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeComboBox" min="-2" pref="455" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="md5HashLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="md5HashTextField" min="-2" pref="455" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="sha1HashLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="sha1HashTextField" min="-2" pref="455" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="sha256HashLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="sha256HashTextField" min="-2" pref="455" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="hashValuesNoteLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashValuesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="325" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -79,6 +95,8 @@
|
||||
<Component id="sectorSizeComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="sectorSizeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="39" max="-2" attributes="0"/>
|
||||
<Component id="hashValuesLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="md5HashTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -95,8 +113,10 @@
|
||||
<Component id="sha256HashLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashValuesNoteLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="23" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="51" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -186,6 +206,7 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.sha256HashLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="sha256HashTextField">
|
||||
@@ -193,6 +214,7 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.sha256HashTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="sha1HashTextField">
|
||||
@@ -200,6 +222,7 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.sha1HashTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="md5HashTextField">
|
||||
@@ -207,6 +230,7 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.md5HashTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="sha1HashLabel">
|
||||
@@ -214,6 +238,7 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.sha1HashLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="md5HashLabel">
|
||||
@@ -221,6 +246,23 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.md5HashLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashValuesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.hashValuesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashValuesNoteLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="ImageFilePanel.hashValuesNoteLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
|
||||
@@ -156,6 +156,8 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
md5HashTextField = new javax.swing.JTextField();
|
||||
sha1HashLabel = new javax.swing.JLabel();
|
||||
md5HashLabel = new javax.swing.JLabel();
|
||||
hashValuesLabel = new javax.swing.JLabel();
|
||||
hashValuesNoteLabel = new javax.swing.JLabel();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(0, 65));
|
||||
setPreferredSize(new java.awt.Dimension(403, 65));
|
||||
@@ -184,16 +186,28 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sectorSizeLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.sectorSizeLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sha256HashLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.sha256HashLabel.text")); // NOI18N
|
||||
sha256HashLabel.setEnabled(false);
|
||||
|
||||
sha256HashTextField.setText(org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.sha256HashTextField.text")); // NOI18N
|
||||
sha256HashTextField.setEnabled(false);
|
||||
|
||||
sha1HashTextField.setText(org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.sha1HashTextField.text")); // NOI18N
|
||||
sha1HashTextField.setEnabled(false);
|
||||
|
||||
md5HashTextField.setText(org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.md5HashTextField.text")); // NOI18N
|
||||
md5HashTextField.setEnabled(false);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sha1HashLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.sha1HashLabel.text")); // NOI18N
|
||||
sha1HashLabel.setEnabled(false);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(md5HashLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.md5HashLabel.text")); // NOI18N
|
||||
md5HashLabel.setEnabled(false);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashValuesLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.hashValuesLabel.text")); // NOI18N
|
||||
hashValuesLabel.setEnabled(false);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashValuesNoteLabel, org.openide.util.NbBundle.getMessage(ImageFilePanel.class, "ImageFilePanel.hashValuesNoteLabel.text")); // NOI18N
|
||||
hashValuesNoteLabel.setEnabled(false);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@@ -206,25 +220,36 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addGap(2, 2, 2))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(sha256HashLabel)
|
||||
.addComponent(sha1HashLabel)
|
||||
.addComponent(md5HashLabel)
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addComponent(timeZoneLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(sha256HashTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
|
||||
.addComponent(sha1HashTextField)
|
||||
.addComponent(md5HashTextField)
|
||||
.addComponent(sectorSizeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(pathLabel)
|
||||
.addComponent(noFatOrphansCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 368, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(pathLabel)
|
||||
.addComponent(errorLabel)
|
||||
.addComponent(noFatOrphansCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 325, Short.MAX_VALUE))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(timeZoneLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 455, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(sectorSizeLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 455, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(md5HashLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(md5HashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 455, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(sha1HashLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(sha1HashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 455, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(sha256HashLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(sha256HashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 455, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(hashValuesNoteLabel)
|
||||
.addComponent(hashValuesLabel))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -244,6 +269,8 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(sectorSizeLabel))
|
||||
.addGap(39, 39, 39)
|
||||
.addComponent(hashValuesLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(md5HashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -257,8 +284,10 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addComponent(sha256HashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(sha256HashLabel))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashValuesNoteLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(errorLabel)
|
||||
.addContainerGap(23, Short.MAX_VALUE))
|
||||
.addContainerGap(51, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@@ -286,6 +315,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setContentPath(path);
|
||||
}
|
||||
|
||||
@@ -295,6 +325,8 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton browseButton;
|
||||
private javax.swing.JLabel errorLabel;
|
||||
private javax.swing.JLabel hashValuesLabel;
|
||||
private javax.swing.JLabel hashValuesNoteLabel;
|
||||
private javax.swing.JLabel md5HashLabel;
|
||||
private javax.swing.JTextField md5HashTextField;
|
||||
private javax.swing.JCheckBox noFatOrphansCheckbox;
|
||||
@@ -310,6 +342,25 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
private javax.swing.JLabel timeZoneLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
* Enable or disable all of the hash values components.
|
||||
*
|
||||
* @param enabled Enable components if true; otherwise disable.
|
||||
*/
|
||||
private void setHashValuesComponentsEnabled(boolean enabled) {
|
||||
hashValuesLabel.setEnabled(enabled);
|
||||
hashValuesNoteLabel.setEnabled(enabled);
|
||||
|
||||
md5HashLabel.setEnabled(enabled);
|
||||
md5HashTextField.setEnabled(enabled);
|
||||
|
||||
sha1HashLabel.setEnabled(enabled);
|
||||
sha1HashTextField.setEnabled(enabled);
|
||||
|
||||
sha256HashLabel.setEnabled(enabled);
|
||||
sha256HashTextField.setEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path of the user selected image.
|
||||
*
|
||||
@@ -383,7 +434,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
errorLabel.setVisible(false);
|
||||
|
||||
String path = getContentPaths();
|
||||
if (StringUtils.isBlank(path) || (!(new File(path).isFile() || DriveUtils.isPhysicalDrive(path) || DriveUtils.isPartition(path)))) {
|
||||
if (!isImagePathValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -412,6 +463,16 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isImagePathValid() {
|
||||
String path = getContentPaths();
|
||||
|
||||
if (StringUtils.isBlank(path) || (!(new File(path).isFile() || DriveUtils.isPhysicalDrive(path) || DriveUtils.isPartition(path)))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void storeSettings() {
|
||||
String imagePathName = getContentPaths();
|
||||
@@ -446,13 +507,19 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
/**
|
||||
* Update functions are called by the pathTextField which has this set as
|
||||
* it's DocumentEventListener. Each update function fires a property change
|
||||
* to be caught by the parent panel.
|
||||
*
|
||||
* to be caught by the parent panel. Additionally, the hash values will be
|
||||
* enabled or disabled depending on the pathTextField input.
|
||||
*/
|
||||
@NbBundle.Messages({"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.\n"})
|
||||
private void updateHelper() {
|
||||
if (isImagePathValid() && !getContentPaths().toLowerCase().endsWith(".e01")) {
|
||||
setHashValuesComponentsEnabled(true);
|
||||
} else {
|
||||
setHashValuesComponentsEnabled(false);
|
||||
}
|
||||
|
||||
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.io.File;
|
||||
import javax.swing.JFileChooser;
|
||||
@@ -261,7 +260,7 @@ class MissingImageDialog extends javax.swing.JDialog {
|
||||
this.dispose();
|
||||
} catch (TskCoreException ex) {
|
||||
lbWarning.setText(NbBundle.getMessage(this.getClass(), "MissingImageDialog.ErrorSettingImage"));
|
||||
logger.log(Level.WARNING, "Error setting image paths", ex); //NON-NLS
|
||||
logger.log(Level.SEVERE, "Error setting image paths", ex); //NON-NLS
|
||||
}
|
||||
}//GEN-LAST:event_selectButtonActionPerformed
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ public class Services implements Closeable {
|
||||
tagsManager = new TagsManager(caseDb);
|
||||
servicesList.add(tagsManager);
|
||||
|
||||
//This lookup fails in the functional test code. See JIRA-4571 for details.
|
||||
//For the time being, the closing of this service at line 108 will be made
|
||||
//null safe so that the functional tests run with no issues.
|
||||
keywordSearchService = Lookup.getDefault().lookup(KeywordSearchService.class);
|
||||
servicesList.add(keywordSearchService);
|
||||
|
||||
@@ -108,7 +111,9 @@ public class Services implements Closeable {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
for (Closeable service : servicesList) {
|
||||
service.close();
|
||||
if(service != null) {
|
||||
service.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ import javax.swing.Action;
|
||||
import org.openide.util.Utilities;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.ContextMenuActionsProvider;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class CentralRepoContextMenuActionsProvider implements ContextMenuActions
|
||||
}
|
||||
|
||||
for (AbstractFile file : selectedFiles) {
|
||||
if (EamDbUtil.useCentralRepo() && EamArtifactUtil.isSupportedAbstractFileType(file) && file.isFile()) {
|
||||
if (EamDb.isEnabled() && EamArtifactUtil.isSupportedAbstractFileType(file) && file.isFile()) {
|
||||
AddEditCentralRepoCommentAction action = new AddEditCentralRepoCommentAction(file);
|
||||
if (action.getCorrelationAttribute() == null) {
|
||||
action.setEnabled(false);
|
||||
|
||||
+1
-2
@@ -71,7 +71,6 @@ import org.sleuthkit.datamodel.ContentTag;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
@@ -891,7 +890,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
|
||||
private void rightClickPopupMenuPopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_rightClickPopupMenuPopupMenuWillBecomeVisible
|
||||
boolean enableCentralRepoActions = false;
|
||||
|
||||
if (EamDbUtil.useCentralRepo() && otherCasesTable.getSelectedRowCount() == 1) {
|
||||
if (EamDb.isEnabled() && otherCasesTable.getSelectedRowCount() == 1) {
|
||||
int rowIndex = otherCasesTable.getSelectedRow();
|
||||
OtherOccurrenceNodeData selectedNode = (OtherOccurrenceNodeData) tableModel.getRow(rowIndex);
|
||||
if (selectedNode instanceof OtherOccurrenceNodeInstanceData) {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class DataContentViewerOtherCasesTableCellRenderer implements TableCellRe
|
||||
foreground = Color.WHITE;
|
||||
background = Color.BLUE;
|
||||
} else {
|
||||
String known_status = (String) table.getModel().getValueAt(row,
|
||||
String known_status = (String) table.getModel().getValueAt(table.convertRowIndexToModel(row),
|
||||
table.getColumn(DataContentViewerOtherCasesTableModel.TableColumns.KNOWN.columnName()).getModelIndex());
|
||||
if (known_status.equals(TskData.FileKnown.BAD.getName())) {
|
||||
foreground = Color.WHITE;
|
||||
|
||||
@@ -40,6 +40,7 @@ import java.util.Set;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.updateSchemaVersion;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
@@ -60,7 +61,7 @@ abstract class AbstractSqlEamDb implements EamDb {
|
||||
static final String SCHEMA_MINOR_VERSION_KEY = "SCHEMA_MINOR_VERSION";
|
||||
static final String CREATION_SCHEMA_MAJOR_VERSION_KEY = "CREATION_SCHEMA_MAJOR_VERSION";
|
||||
static final String CREATION_SCHEMA_MINOR_VERSION_KEY = "CREATION_SCHEMA_MINOR_VERSION";
|
||||
static final CaseDbSchemaVersionNumber CURRENT_DB_SCHEMA_VERSION = new CaseDbSchemaVersionNumber(1, 2);
|
||||
static final CaseDbSchemaVersionNumber SOFTWARE_CR_DB_SCHEMA_VERSION = new CaseDbSchemaVersionNumber(1, 2);
|
||||
|
||||
protected final List<CorrelationAttributeInstance.Type> defaultCorrelationTypes;
|
||||
|
||||
@@ -3170,8 +3171,9 @@ abstract class AbstractSqlEamDb implements EamDb {
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Messages({"AbstractSqlEamDb.upgradeSchema.incompatible=The selected Central Repository is not compatible with the current version of the application, please upgrade the application if you wish to use this Central Repository."})
|
||||
@Override
|
||||
public void upgradeSchema() throws EamDbException, SQLException {
|
||||
public void upgradeSchema() throws EamDbException, SQLException, IncompatibleCentralRepoException {
|
||||
|
||||
ResultSet resultSet = null;
|
||||
Statement statement = null;
|
||||
@@ -3220,11 +3222,18 @@ abstract class AbstractSqlEamDb implements EamDb {
|
||||
* schema updates that may already have been done once.
|
||||
*/
|
||||
CaseDbSchemaVersionNumber dbSchemaVersion = new CaseDbSchemaVersionNumber(majorVersion, minorVersion);
|
||||
if (dbSchemaVersion.equals(CURRENT_DB_SCHEMA_VERSION)) {
|
||||
|
||||
//compare the major versions for compatability
|
||||
//we can not use the CaseDbSchemaVersionNumber.isCompatible method
|
||||
//because it is specific to case db schema versions only supporting major versions greater than 1
|
||||
if (SOFTWARE_CR_DB_SCHEMA_VERSION.getMajor() < dbSchemaVersion.getMajor()) {
|
||||
throw new IncompatibleCentralRepoException(Bundle.AbstractSqlEamDb_upgradeSchema_incompatible());
|
||||
}
|
||||
if (dbSchemaVersion.equals(SOFTWARE_CR_DB_SCHEMA_VERSION)) {
|
||||
logger.log(Level.INFO, "Central Repository is up to date");
|
||||
return;
|
||||
}
|
||||
if (dbSchemaVersion.compareTo(CURRENT_DB_SCHEMA_VERSION) > 0) {
|
||||
if (dbSchemaVersion.compareTo(SOFTWARE_CR_DB_SCHEMA_VERSION) > 0) {
|
||||
logger.log(Level.INFO, "Central Repository is of newer version than software creates");
|
||||
return;
|
||||
}
|
||||
@@ -3386,8 +3395,8 @@ abstract class AbstractSqlEamDb implements EamDb {
|
||||
* column having a UNIQUE constraint. The name column could now
|
||||
* be used as the primary key, but the essentially useless id
|
||||
* column is retained for the sake of backwards compatibility.
|
||||
* Note that the creation schema version number is set to 0.0
|
||||
* to indicate that it is unknown.
|
||||
* Note that the creation schema version number is set to 0.0 to
|
||||
* indicate that it is unknown.
|
||||
*/
|
||||
String creationMajorVer;
|
||||
resultSet = statement.executeQuery("SELECT value FROM db_info WHERE name = '" + AbstractSqlEamDb.CREATION_SCHEMA_MAJOR_VERSION_KEY + "'");
|
||||
@@ -3417,7 +3426,7 @@ abstract class AbstractSqlEamDb implements EamDb {
|
||||
|
||||
updateSchemaVersion(conn);
|
||||
conn.commit();
|
||||
logger.log(Level.INFO, String.format("Central Repository schema updated to version %s", CURRENT_DB_SCHEMA_VERSION));
|
||||
logger.log(Level.INFO, String.format("Central Repository schema updated to version %s", SOFTWARE_CR_DB_SCHEMA_VERSION));
|
||||
|
||||
} catch (SQLException | EamDbException ex) {
|
||||
try {
|
||||
@@ -3425,7 +3434,7 @@ abstract class AbstractSqlEamDb implements EamDb {
|
||||
conn.rollback();
|
||||
}
|
||||
} catch (SQLException ex2) {
|
||||
logger.log(Level.SEVERE, String.format("Central Repository rollback of failed schema update to %s failed", CURRENT_DB_SCHEMA_VERSION), ex2);
|
||||
logger.log(Level.SEVERE, String.format("Central Repository rollback of failed schema update to %s failed", SOFTWARE_CR_DB_SCHEMA_VERSION), ex2);
|
||||
}
|
||||
throw ex;
|
||||
} finally {
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ public class CorrelationDataSource implements Serializable {
|
||||
}
|
||||
|
||||
CorrelationDataSource correlationDataSource = null;
|
||||
boolean useCR = EamDbUtil.useCentralRepo();
|
||||
boolean useCR = EamDb.isEnabled();
|
||||
if (useCR) {
|
||||
correlationDataSource = EamDb.getInstance().getDataSource(correlationCase, dataSource.getId());
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class DataSourceUpdateService implements AutopsyService {
|
||||
//ResultSet.getLong has a value of 0 when the value is null
|
||||
if (correlationDataSource.getCaseID() == correlationCase.getID() && correlationDataSource.getDataSourceObjectID() == 0) {
|
||||
for (Content dataSource : context.getCase().getDataSources()) {
|
||||
if (((DataSource) dataSource).getDeviceId().equals(correlationDataSource.getDeviceID())) {
|
||||
if (((DataSource) dataSource).getDeviceId().equals(correlationDataSource.getDeviceID()) && dataSource.getName().equals(correlationDataSource.getName())) {
|
||||
centralRepository.addDataSourceObjectId(correlationDataSource.getID(), dataSource.getId());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
@@ -76,85 +77,62 @@ public class EamArtifactUtil {
|
||||
artifactForInstance = artifact;
|
||||
}
|
||||
if (artifactForInstance != null) {
|
||||
switch (BlackboardArtifact.ARTIFACT_TYPE.fromID(artifactForInstance.getArtifactTypeID())) {
|
||||
case TSK_KEYWORD_HIT: {
|
||||
BlackboardAttribute setNameAttr = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME));
|
||||
if (setNameAttr != null
|
||||
&& EamArtifactUtil.getEmailAddressAttrString().equals(setNameAttr.getValueString())) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD, CorrelationAttributeInstance.EMAIL_TYPE_ID);
|
||||
}
|
||||
break;
|
||||
int artifactTypeID = artifactForInstance.getArtifactTypeID();
|
||||
if (artifactTypeID == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) {
|
||||
BlackboardAttribute setNameAttr = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME));
|
||||
if (setNameAttr != null
|
||||
&& EamArtifactUtil.getEmailAddressAttrString().equals(setNameAttr.getValueString())) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD, CorrelationAttributeInstance.EMAIL_TYPE_ID);
|
||||
}
|
||||
case TSK_WEB_BOOKMARK:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN, CorrelationAttributeInstance.DOMAIN_TYPE_ID);
|
||||
break;
|
||||
case TSK_WEB_COOKIE:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN, CorrelationAttributeInstance.DOMAIN_TYPE_ID);
|
||||
break;
|
||||
case TSK_WEB_DOWNLOAD:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN, CorrelationAttributeInstance.DOMAIN_TYPE_ID);
|
||||
break;
|
||||
case TSK_WEB_HISTORY:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN, CorrelationAttributeInstance.DOMAIN_TYPE_ID);
|
||||
break;
|
||||
case TSK_CONTACT:
|
||||
//generates the same correlation attrs as tsk_message
|
||||
case TSK_CALLLOG:
|
||||
//generates the same correlation attrs as tsk_message
|
||||
case TSK_MESSAGE: {
|
||||
String value = null;
|
||||
if (null != artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER))) {
|
||||
value = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)).getValueString();
|
||||
} else if (null != artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM))) {
|
||||
value = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM)).getValueString();
|
||||
} else if (null != artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO))) {
|
||||
value = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO)).getValueString();
|
||||
} else if (artifactTypeID == ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()
|
||||
|| artifactTypeID == ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()
|
||||
|| artifactTypeID == ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID()
|
||||
|| artifactTypeID == ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID()) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN, CorrelationAttributeInstance.DOMAIN_TYPE_ID);
|
||||
} else if (artifactTypeID == ARTIFACT_TYPE.TSK_CONTACT.getTypeID()
|
||||
|| artifactTypeID == ARTIFACT_TYPE.TSK_CALLLOG.getTypeID()
|
||||
|| artifactTypeID == ARTIFACT_TYPE.TSK_MESSAGE.getTypeID()) {
|
||||
|
||||
String value = null;
|
||||
if (null != artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER))) {
|
||||
value = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)).getValueString();
|
||||
} else if (null != artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM))) {
|
||||
value = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM)).getValueString();
|
||||
} else if (null != artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO))) {
|
||||
value = artifactForInstance.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO)).getValueString();
|
||||
}
|
||||
// Remove all non-numeric symbols to semi-normalize phone numbers, preserving leading "+" character
|
||||
if (value != null) {
|
||||
String newValue = value.replaceAll("\\D", "");
|
||||
if (value.startsWith("+")) {
|
||||
newValue = "+" + newValue;
|
||||
}
|
||||
// Remove all non-numeric symbols to semi-normalize phone numbers, preserving leading "+" character
|
||||
if (value != null) {
|
||||
String newValue = value.replaceAll("\\D", "");
|
||||
if (value.startsWith("+")) {
|
||||
newValue = "+" + newValue;
|
||||
}
|
||||
value = newValue;
|
||||
// Only add the correlation attribute if the resulting phone number large enough to be of use
|
||||
// (these 3-5 digit numbers can be valid, but are not useful for correlation)
|
||||
if (value.length() > 5) {
|
||||
CorrelationAttributeInstance inst = makeCorrelationAttributeInstanceUsingTypeValue(artifactForInstance, EamDb.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.PHONE_TYPE_ID), value);
|
||||
if (inst != null) {
|
||||
eamArtifacts.add(inst);
|
||||
}
|
||||
value = newValue;
|
||||
// Only add the correlation attribute if the resulting phone number large enough to be of use
|
||||
// (these 3-5 digit numbers can be valid, but are not useful for correlation)
|
||||
if (value.length() > 5) {
|
||||
CorrelationAttributeInstance inst = makeCorrelationAttributeInstanceUsingTypeValue(artifactForInstance, EamDb.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.PHONE_TYPE_ID), value);
|
||||
if (inst != null) {
|
||||
eamArtifacts.add(inst);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TSK_DEVICE_ATTACHED:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_ID, CorrelationAttributeInstance.USBID_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MAC_ADDRESS, CorrelationAttributeInstance.MAC_TYPE_ID);
|
||||
break;
|
||||
case TSK_WIFI_NETWORK:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SSID, CorrelationAttributeInstance.SSID_TYPE_ID);
|
||||
break;
|
||||
case TSK_WIFI_NETWORK_ADAPTER:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MAC_ADDRESS, CorrelationAttributeInstance.MAC_TYPE_ID);
|
||||
break;
|
||||
case TSK_BLUETOOTH_PAIRING:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MAC_ADDRESS, CorrelationAttributeInstance.MAC_TYPE_ID);
|
||||
break;
|
||||
case TSK_BLUETOOTH_ADAPTER:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MAC_ADDRESS, CorrelationAttributeInstance.MAC_TYPE_ID);
|
||||
break;
|
||||
case TSK_DEVICE_INFO:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IMEI, CorrelationAttributeInstance.IMEI_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IMSI, CorrelationAttributeInstance.IMSI_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ICCID, CorrelationAttributeInstance.ICCID_TYPE_ID);
|
||||
break;
|
||||
case TSK_SIM_ATTACHED:
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IMSI, CorrelationAttributeInstance.IMSI_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ICCID, CorrelationAttributeInstance.ICCID_TYPE_ID);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} else if (artifactTypeID == ARTIFACT_TYPE.TSK_DEVICE_ATTACHED.getTypeID()) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_ID, CorrelationAttributeInstance.USBID_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MAC_ADDRESS, CorrelationAttributeInstance.MAC_TYPE_ID);
|
||||
} else if (artifactTypeID == ARTIFACT_TYPE.TSK_WIFI_NETWORK.getTypeID()) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SSID, CorrelationAttributeInstance.SSID_TYPE_ID);
|
||||
} else if (artifactTypeID == ARTIFACT_TYPE.TSK_WIFI_NETWORK_ADAPTER.getTypeID()
|
||||
|| artifactTypeID == ARTIFACT_TYPE.TSK_BLUETOOTH_PAIRING.getTypeID()
|
||||
|| artifactTypeID == ARTIFACT_TYPE.TSK_BLUETOOTH_ADAPTER.getTypeID()) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MAC_ADDRESS, CorrelationAttributeInstance.MAC_TYPE_ID);
|
||||
} else if (artifactTypeID == ARTIFACT_TYPE.TSK_DEVICE_INFO.getTypeID()) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IMEI, CorrelationAttributeInstance.IMEI_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IMSI, CorrelationAttributeInstance.IMSI_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ICCID, CorrelationAttributeInstance.ICCID_TYPE_ID);
|
||||
} else if (artifactTypeID == ARTIFACT_TYPE.TSK_SIM_ATTACHED.getTypeID()) {
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IMSI, CorrelationAttributeInstance.IMSI_TYPE_ID);
|
||||
addCorrelationAttributeToList(eamArtifacts, artifactForInstance, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ICCID, CorrelationAttributeInstance.ICCID_TYPE_ID);
|
||||
}
|
||||
}
|
||||
} catch (EamDbException ex) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public interface EamDb {
|
||||
static EamDb getInstance() throws EamDbException {
|
||||
|
||||
EamDbPlatformEnum selectedPlatform = EamDbPlatformEnum.DISABLED;
|
||||
if (EamDbUtil.useCentralRepo()) {
|
||||
if (EamDbUtil.allowUseOfCentralRepository()) {
|
||||
selectedPlatform = EamDbPlatformEnum.getSelectedPlatform();
|
||||
}
|
||||
switch (selectedPlatform) {
|
||||
@@ -92,7 +92,7 @@ public interface EamDb {
|
||||
* @return Is the database enabled
|
||||
*/
|
||||
static boolean isEnabled() {
|
||||
return EamDbUtil.useCentralRepo()
|
||||
return EamDbUtil.allowUseOfCentralRepository()
|
||||
&& EamDbPlatformEnum.getSelectedPlatform() != EamDbPlatformEnum.DISABLED;
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ public interface EamDb {
|
||||
*
|
||||
* @throws EamDbException
|
||||
*/
|
||||
public void upgradeSchema() throws EamDbException, SQLException;
|
||||
public void upgradeSchema() throws EamDbException, SQLException, IncompatibleCentralRepoException;
|
||||
|
||||
/**
|
||||
* Gets an exclusive lock (if applicable). Will return the lock if
|
||||
|
||||
@@ -25,11 +25,12 @@ import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.CURRENT_DB_SCHEMA_VERSION;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.coordinationservice.CoordinationService;
|
||||
import org.sleuthkit.autopsy.coordinationservice.CoordinationService.CoordinationServiceException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.SOFTWARE_CR_DB_SCHEMA_VERSION;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -134,8 +135,8 @@ public class EamDbUtil {
|
||||
*/
|
||||
static void updateSchemaVersion(Connection conn) throws SQLException {
|
||||
try (Statement statement = conn.createStatement()) {
|
||||
statement.execute("UPDATE db_info SET value = '" + CURRENT_DB_SCHEMA_VERSION.getMajor() + "' WHERE name = '" + AbstractSqlEamDb.SCHEMA_MAJOR_VERSION_KEY + "'");
|
||||
statement.execute("UPDATE db_info SET value = '" + CURRENT_DB_SCHEMA_VERSION.getMinor() + "' WHERE name = '" + AbstractSqlEamDb.SCHEMA_MINOR_VERSION_KEY + "'");
|
||||
statement.execute("UPDATE db_info SET value = '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMajor() + "' WHERE name = '" + AbstractSqlEamDb.SCHEMA_MAJOR_VERSION_KEY + "'");
|
||||
statement.execute("UPDATE db_info SET value = '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMinor() + "' WHERE name = '" + AbstractSqlEamDb.SCHEMA_MINOR_VERSION_KEY + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,9 +173,10 @@ public class EamDbUtil {
|
||||
*
|
||||
* @return true if the upgrade succeeds, false otherwise.
|
||||
*/
|
||||
public static boolean upgradeDatabase() {
|
||||
@Messages({"EamDbUtil.centralRepoUpgradeFailed.message=Failed to upgrade central repository. It has been disabled."})
|
||||
public static void upgradeDatabase() throws EamDbException {
|
||||
if (!EamDb.isEnabled()) {
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
CoordinationService.Lock lock = null;
|
||||
@@ -188,7 +190,7 @@ public class EamDbUtil {
|
||||
|
||||
db.upgradeSchema();
|
||||
|
||||
} catch (EamDbException | SQLException ex) {
|
||||
} catch (EamDbException | SQLException | IncompatibleCentralRepoException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error updating central repository", ex);
|
||||
|
||||
// Disable the central repo and clear the current settings.
|
||||
@@ -197,13 +199,17 @@ public class EamDbUtil {
|
||||
EamDb.getInstance().shutdownConnections();
|
||||
}
|
||||
} catch (EamDbException ex2) {
|
||||
LOGGER.log(Level.SEVERE, "Error shutting down central repo connection pool", ex);
|
||||
LOGGER.log(Level.SEVERE, "Error shutting down central repo connection pool", ex2);
|
||||
}
|
||||
setUseCentralRepo(false);
|
||||
|
||||
EamDbPlatformEnum.setSelectedPlatform(EamDbPlatformEnum.DISABLED.name());
|
||||
EamDbPlatformEnum.saveSelectedPlatform();
|
||||
|
||||
return false;
|
||||
String messageForDialog = Bundle.EamDbUtil_centralRepoUpgradeFailed_message();
|
||||
if (ex instanceof IncompatibleCentralRepoException) {
|
||||
messageForDialog = ex.getMessage() + "\n\n" + messageForDialog;
|
||||
}
|
||||
throw new EamDbException(messageForDialog);
|
||||
} finally {
|
||||
if (lock != null) {
|
||||
try {
|
||||
@@ -213,7 +219,6 @@ public class EamDbUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -268,12 +273,16 @@ public class EamDbUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* If the Central Repos use has been enabled.
|
||||
* If the option to use a central repository has been selected, does not
|
||||
* indicate the central repository is configured for use simply that the
|
||||
* checkbox allowing configuration is checked on the options panel.
|
||||
*
|
||||
* @return true if the Central Repo may be configured, false if it should
|
||||
* not be able to be
|
||||
*/
|
||||
public static boolean useCentralRepo() {
|
||||
public static boolean allowUseOfCentralRepository() {
|
||||
//In almost all situations EamDb.isEnabled() should be used instead of this method
|
||||
//as EamDb.isEnabled() will call this method as well as checking that the selected type of central repository is not DISABLED
|
||||
return Boolean.parseBoolean(ModuleSettings.getConfigSetting(CENTRAL_REPO_NAME, CENTRAL_REPO_USE_KEY));
|
||||
}
|
||||
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.centralrepository.datamodel;
|
||||
|
||||
/**
|
||||
* Exception to denote that the Central Repo is not compatable with the current version of the software.
|
||||
*/
|
||||
public class IncompatibleCentralRepoException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Construct an exception with the given message.
|
||||
* @param message error message
|
||||
*/
|
||||
public IncompatibleCentralRepoException(String message){
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an exception with the given message and inner exception.
|
||||
* @param message error message
|
||||
* @param cause inner exception
|
||||
*/
|
||||
public IncompatibleCentralRepoException(String message, Throwable cause){
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an exception with the given inner exception.
|
||||
* @param cause inner exception
|
||||
*/
|
||||
public IncompatibleCentralRepoException(Throwable cause){
|
||||
super(cause);
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -28,11 +28,11 @@ import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.CURRENT_DB_SCHEMA_VERSION;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.coreutils.TextConverter;
|
||||
import org.sleuthkit.autopsy.coreutils.TextConverterException;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.SOFTWARE_CR_DB_SCHEMA_VERSION;
|
||||
|
||||
/**
|
||||
* Settings for the Postgres implementation of the Central Repository database
|
||||
@@ -437,10 +437,10 @@ public final class PostgresEamDbSettings {
|
||||
* name column could be the primary key.
|
||||
*/
|
||||
stmt.execute("CREATE TABLE db_info (id SERIAL, name TEXT UNIQUE NOT NULL, value TEXT NOT NULL)");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MAJOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MINOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MAJOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MINOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MAJOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MINOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MAJOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MINOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
|
||||
// Create a separate instance and reference table for each correlation type
|
||||
List<CorrelationAttributeInstance.Type> DEFAULT_CORRELATION_TYPES = CorrelationAttributeInstance.getDefaultCorrelationTypes();
|
||||
|
||||
@@ -1118,7 +1118,7 @@ final class SqliteEamDb extends AbstractSqlEamDb {
|
||||
* @throws EamDbException
|
||||
*/
|
||||
@Override
|
||||
public void upgradeSchema() throws EamDbException, SQLException {
|
||||
public void upgradeSchema() throws EamDbException, SQLException, IncompatibleCentralRepoException {
|
||||
try {
|
||||
acquireExclusiveLock();
|
||||
super.upgradeSchema();
|
||||
|
||||
@@ -29,10 +29,10 @@ import java.sql.Statement;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.CURRENT_DB_SCHEMA_VERSION;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.AbstractSqlEamDb.SOFTWARE_CR_DB_SCHEMA_VERSION;
|
||||
|
||||
/**
|
||||
* Settings for the sqlite implementation of the Central Repository database
|
||||
@@ -386,10 +386,10 @@ public final class SqliteEamDbSettings {
|
||||
* name column could be the primary key.
|
||||
*/
|
||||
stmt.execute("CREATE TABLE db_info (id INTEGER PRIMARY KEY, name TEXT UNIQUE NOT NULL, value TEXT NOT NULL)");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MAJOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MINOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MAJOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MINOR_VERSION_KEY + "', '" + CURRENT_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MAJOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.SCHEMA_MINOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MAJOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMajor() + "')");
|
||||
stmt.execute("INSERT INTO db_info (name, value) VALUES ('" + AbstractSqlEamDb.CREATION_SCHEMA_MINOR_VERSION_KEY + "', '" + SOFTWARE_CR_DB_SCHEMA_VERSION.getMinor() + "')");
|
||||
|
||||
// Create a separate instance and reference table for each artifact type
|
||||
List<CorrelationAttributeInstance.Type> DEFAULT_CORRELATION_TYPES = CorrelationAttributeInstance.getDefaultCorrelationTypes();
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.openide.modules.ModuleInstall;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
@@ -50,21 +51,20 @@ public class Installer extends ModuleInstall {
|
||||
super();
|
||||
}
|
||||
|
||||
@NbBundle.Messages({"Installer.centralRepoUpgradeFailed.title=Central repository upgrade failed",
|
||||
"Installer.centralRepoUpgradeFailed.message=Failed to upgrade central repository. It has been disabled."
|
||||
})
|
||||
@NbBundle.Messages({"Installer.centralRepoUpgradeFailed.title=Central repository upgrade failed"})
|
||||
@Override
|
||||
public void restored() {
|
||||
Case.addPropertyChangeListener(pcl);
|
||||
ieListener.installListeners();
|
||||
|
||||
// Perform the database upgrade and inform the user if it fails
|
||||
if (!EamDbUtil.upgradeDatabase()) {
|
||||
try {
|
||||
EamDbUtil.upgradeDatabase();
|
||||
} catch (EamDbException ex) {
|
||||
if (RuntimeProperties.runningWithGUI()) {
|
||||
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"Installer.centralRepoUpgradeFailed.message"),
|
||||
ex.getMessage(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"Installer.centralRepoUpgradeFailed.title"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
|
||||
+18
-15
@@ -90,7 +90,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
initComponents();
|
||||
fcDatabasePath.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
|
||||
fcDatabasePath.setAcceptAllFileFilterUsed(false);
|
||||
fcDatabasePath.setDialogTitle(Bundle.EamDbSettingsDialog_fcDatabasePath_title());
|
||||
fcDatabasePath.setDialogTitle(Bundle.EamDbSettingsDialog_fcDatabasePath_title());
|
||||
fcDatabasePath.setFileFilter(new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File pathname) {
|
||||
@@ -369,7 +369,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
case POSTGRESQL:
|
||||
if (dbSettingsPostgres.verifyConnection()) {
|
||||
if (dbSettingsPostgres.verifyDatabaseExists()) {
|
||||
if( dbSettingsPostgres.verifyDatabaseSchema()) {
|
||||
if (dbSettingsPostgres.verifyDatabaseSchema()) {
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
} else {
|
||||
testingStatus = DatabaseTestResult.SCHEMA_INVALID;
|
||||
@@ -382,8 +382,8 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
}
|
||||
break;
|
||||
case SQLITE:
|
||||
if (dbSettingsSqlite.dbFileExists()){
|
||||
if(dbSettingsSqlite.verifyConnection()) {
|
||||
if (dbSettingsSqlite.dbFileExists()) {
|
||||
if (dbSettingsSqlite.verifyConnection()) {
|
||||
if (dbSettingsSqlite.verifyDatabaseSchema()) {
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
} else {
|
||||
@@ -418,10 +418,10 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
}
|
||||
if (!result) {
|
||||
// Remove the incomplete database
|
||||
if(dbCreated){
|
||||
if (dbCreated) {
|
||||
dbSettingsPostgres.deleteDatabase();
|
||||
}
|
||||
|
||||
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.EamDbSettingsDialog_okButton_createPostgresDbError_message(),
|
||||
Bundle.EamDbSettingsDialog_okButton_createDbError_title(),
|
||||
@@ -439,10 +439,10 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
&& dbSettingsSqlite.insertDefaultDatabaseContent();
|
||||
}
|
||||
if (!result) {
|
||||
if(dbCreated){
|
||||
if (dbCreated) {
|
||||
dbSettingsSqlite.deleteDatabase();
|
||||
}
|
||||
|
||||
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.EamDbSettingsDialog_okButton_createSQLiteDbError_message(),
|
||||
Bundle.EamDbSettingsDialog_okButton_createDbError_title(),
|
||||
@@ -455,10 +455,13 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
valid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if changes to the central repository configuration were successfully applied
|
||||
*
|
||||
* @return true if the database configuration was successfully changed false if it was not
|
||||
* Returns if changes to the central repository configuration were
|
||||
* successfully applied
|
||||
*
|
||||
* @return true if the database configuration was successfully changed false
|
||||
* if it was not
|
||||
*/
|
||||
boolean wasConfigurationChanged() {
|
||||
return configurationChanged;
|
||||
@@ -481,12 +484,12 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
Bundle.EamDbSettingsDialog_okButton_databaseConnectionFailed_message(),
|
||||
Bundle.EamDbSettingsDialog_okButton_databaseConnectionFailed_title(),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
} else if (testingStatus == DatabaseTestResult.SCHEMA_INVALID){
|
||||
} else if (testingStatus == DatabaseTestResult.SCHEMA_INVALID) {
|
||||
// There's an existing database or file, but it's not in our format.
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.EamDbSettingsDialog_okButton_corruptDatabaseExists_message(),
|
||||
Bundle.EamDbSettingsDialog_okButton_corruptDatabaseExists_title(),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
} else if (testingStatus == DatabaseTestResult.DB_DOES_NOT_EXIST) {
|
||||
//database doesn't exist do you want to create
|
||||
if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(),
|
||||
@@ -580,10 +583,10 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
customizeComponents();
|
||||
}//GEN-LAST:event_cbDatabaseTypeActionPerformed
|
||||
|
||||
private void updateFullDbPath(){
|
||||
private void updateFullDbPath() {
|
||||
lbFullDbPath.setText(tfDatabasePath.getText() + File.separator + CENTRAL_REPO_DB_NAME + CENTRAL_REPO_SQLITE_EXT);
|
||||
}
|
||||
|
||||
|
||||
private void displayDatabaseSettings(boolean isPostgres) {
|
||||
lbDatabasePath.setVisible(!isPostgres);
|
||||
tfDatabasePath.setVisible(!isPostgres);
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbUseCentralRepoActionPerformed"/>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="useCentralRepoStateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="pnDatabaseConfiguration">
|
||||
|
||||
+23
-25
@@ -30,6 +30,7 @@ import org.netbeans.spi.options.OptionsPanelController;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
|
||||
import org.sleuthkit.autopsy.events.AutopsyEvent;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
@@ -75,9 +76,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
ingestStateUpdated(Case.isCaseOpen());
|
||||
}
|
||||
|
||||
@Messages({"GlobalSettingsPanel.updateFailed.title=Update failed",
|
||||
"GlobalSettingsPanel.updateFailed.message=Failed to update database. Central repository has been disabled."
|
||||
})
|
||||
@Messages({"GlobalSettingsPanel.updateFailed.title=Central repository upgrade failed"})
|
||||
private void updateDatabase() {
|
||||
|
||||
if (EamDbPlatformEnum.getSelectedPlatform().equals(DISABLED)) {
|
||||
@@ -86,16 +85,15 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
|
||||
try {
|
||||
boolean result = EamDbUtil.upgradeDatabase();
|
||||
EamDbUtil.upgradeDatabase();
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
if (!result) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"GlobalSettingsPanel.updateFailed.message"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"GlobalSettingsPanel.updateFailed.title"),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
}
|
||||
} catch (EamDbException ex) {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
JOptionPane.showMessageDialog(this,
|
||||
ex.getMessage(),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"GlobalSettingsPanel.updateFailed.title"),
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
} finally {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
@@ -149,9 +147,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbCentralRepository, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.lbCentralRepository.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N
|
||||
cbUseCentralRepo.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbUseCentralRepoActionPerformed(evt);
|
||||
cbUseCentralRepo.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
useCentralRepoStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -433,15 +431,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
}
|
||||
}//GEN-LAST:event_bnDbConfigureActionPerformed
|
||||
|
||||
private void cbUseCentralRepoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbUseCentralRepoActionPerformed
|
||||
//if saved setting is disabled checkbox should be disabled already
|
||||
store();
|
||||
updateDatabase();
|
||||
load();
|
||||
this.ingestStateUpdated(Case.isCaseOpen());
|
||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||
}//GEN-LAST:event_cbUseCentralRepoActionPerformed
|
||||
|
||||
private void manageOrganizationButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_manageOrganizationButtonActionPerformed
|
||||
store();
|
||||
ManageOrganizationsDialog manageOrganizationsDialog = new ManageOrganizationsDialog();
|
||||
@@ -452,13 +441,22 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
ManageCasesDialog.displayManageCasesDialog();
|
||||
}//GEN-LAST:event_showCasesButtonActionPerformed
|
||||
|
||||
private void useCentralRepoStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_useCentralRepoStateChanged
|
||||
//if saved setting is disabled checkbox should be disabled already
|
||||
store();
|
||||
updateDatabase();
|
||||
load();
|
||||
this.ingestStateUpdated(Case.isCaseOpen());
|
||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||
}//GEN-LAST:event_useCentralRepoStateChanged
|
||||
|
||||
@Override
|
||||
@Messages({"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."})
|
||||
public void load() {
|
||||
tbOops.setText("");
|
||||
enableButtonSubComponents(false);
|
||||
EamDbPlatformEnum selectedPlatform = EamDbPlatformEnum.getSelectedPlatform();
|
||||
cbUseCentralRepo.setSelected(EamDbUtil.useCentralRepo()); // NON-NLS
|
||||
cbUseCentralRepo.setSelected(EamDbUtil.allowUseOfCentralRepository()); // NON-NLS
|
||||
switch (selectedPlatform) {
|
||||
case POSTGRESQL:
|
||||
PostgresEamDbSettings dbSettingsPg = new PostgresEamDbSettings();
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ final public class CentralRepoCommonAttributeInstance extends AbstractCommonAttr
|
||||
|
||||
// Find the correct data source
|
||||
Optional<DataSource> dataSource = tskDb.getDataSources().stream()
|
||||
.filter(p -> p.getDeviceId().equals(currentAttribute.getCorrelationDataSource().getDeviceID()))
|
||||
.filter(p -> p.getId() == currentAttribute.getCorrelationDataSource().getDataSourceObjectID())
|
||||
.findFirst();
|
||||
if (!dataSource.isPresent()) {
|
||||
LOGGER.log(Level.WARNING, String.format("Unable to find data source with device ID %s in the current case", currentAttribute.getCorrelationDataSource().getDeviceID()));
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package org.sleuthkit.autopsy.commonfilesearch;
|
||||
|
||||
import org.sleuthkit.autopsy.guiutils.DataSourceComboBoxModel;
|
||||
import org.sleuthkit.autopsy.guiutils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.datamodel.utils.DataSourceLoader;
|
||||
import java.awt.Dimension;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
+2
-2
@@ -331,8 +331,8 @@ final class InterCaseSearchResultsProcessor {
|
||||
CorrelationCase correlationCase = EamDb.getInstance().getCaseById(InstanceTableCallback.getCaseId(resultSet));
|
||||
String caseName = correlationCase.getDisplayName();
|
||||
CorrelationDataSource correlationDatasource = EamDb.getInstance().getDataSourceById(correlationCase, InstanceTableCallback.getDataSourceId(resultSet));
|
||||
// String dataSourceName = correlationDatasource.getName();
|
||||
String dataSourceNameKey = correlationDatasource.getName() + correlationDatasource.getDataSourceObjectID();
|
||||
//label datasource with it's id for uniqueness done in same manner as ImageGallery does in the DataSourceCell class
|
||||
String dataSourceNameKey = correlationDatasource.getName() + " (Id: " + correlationDatasource.getDataSourceObjectID() + ")";
|
||||
if (!caseCollatedDataSourceCollections.containsKey(caseName)) {
|
||||
caseCollatedDataSourceCollections.put(caseName, new HashMap<String, CommonAttributeValueList>());
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.logging.Level;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.nodes.Sheet;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode;
|
||||
@@ -74,12 +73,12 @@ final class RelationshipNode extends BlackboardArtifactNode {
|
||||
addScoreProperty(sheetSet, tags);
|
||||
|
||||
CorrelationAttributeInstance correlationAttribute = null;
|
||||
if (EamDbUtil.useCentralRepo() && UserPreferences.hideCentralRepoCommentsAndOccurrences()== false) {
|
||||
if (UserPreferences.hideCentralRepoCommentsAndOccurrences()== false) {
|
||||
correlationAttribute = getCorrelationAttributeInstance();
|
||||
}
|
||||
addCommentProperty(sheetSet, tags, correlationAttribute);
|
||||
|
||||
if (EamDbUtil.useCentralRepo() && UserPreferences.hideCentralRepoCommentsAndOccurrences()== false) {
|
||||
if (UserPreferences.hideCentralRepoCommentsAndOccurrences()== false) {
|
||||
addCountProperty(sheetSet, correlationAttribute);
|
||||
}
|
||||
final BlackboardArtifact artifact = getArtifact();
|
||||
|
||||
@@ -47,7 +47,7 @@ public class FileViewer extends javax.swing.JPanel implements DataContentViewer
|
||||
private final Map<String, FileTypeViewer> mimeTypeToViewerMap = new HashMap<>();
|
||||
|
||||
// TBD: This hardcoded list of viewers should be replaced with a dynamic lookup
|
||||
private static final FileTypeViewer[] KNOWN_VIEWERS = new FileTypeViewer[]{
|
||||
private final FileTypeViewer[] KNOWN_VIEWERS = new FileTypeViewer[]{
|
||||
new SQLiteViewer(),
|
||||
new PListViewer(),
|
||||
new MediaFileViewer()
|
||||
|
||||
@@ -38,16 +38,12 @@ import org.openide.nodes.Node;
|
||||
import org.openide.nodes.Sheet;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultPanel;
|
||||
import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode;
|
||||
import org.sleuthkit.autopsy.datamodel.FileNode;
|
||||
import org.sleuthkit.autopsy.datamodel.NodeProperty;
|
||||
import org.sleuthkit.autopsy.directorytree.DataResultFilterNode;
|
||||
import org.sleuthkit.autopsy.directorytree.NewWindowViewAction;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
@@ -71,7 +67,6 @@ import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHO
|
||||
import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO;
|
||||
import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SUBJECT;
|
||||
import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT;
|
||||
import org.sleuthkit.datamodel.ContentTag;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Image;
|
||||
import org.sleuthkit.datamodel.DataSource;
|
||||
import org.sleuthkit.datamodel.FsContent;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM;
|
||||
@@ -116,7 +115,7 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
|
||||
}
|
||||
|
||||
private void addRow(StringBuilder sb, String key, String value) {
|
||||
sb.append("<tr><td>"); //NON-NLS
|
||||
sb.append("<tr><td valign=\"top\">"); //NON-NLS
|
||||
sb.append(key);
|
||||
sb.append("</td><td>"); //NON-NLS
|
||||
sb.append(value);
|
||||
@@ -238,6 +237,18 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
|
||||
addRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.timezone"), image.getTimeZone());
|
||||
addRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.deviceId"), image.getDeviceId());
|
||||
addRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.internalid"), Long.toString(image.getId()));
|
||||
|
||||
// Add all the data source paths to the "Local Path" value cell.
|
||||
String[] imagePaths = image.getPaths();
|
||||
StringBuilder pathValues = new StringBuilder("<div>");
|
||||
pathValues.append(imagePaths[0]);
|
||||
pathValues.append("</div>");
|
||||
for (int i=1; i < imagePaths.length; i++) {
|
||||
pathValues.append("<div>");
|
||||
pathValues.append(imagePaths[i]);
|
||||
pathValues.append("</div>");
|
||||
}
|
||||
addRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.localPath"), pathValues.toString());
|
||||
}
|
||||
|
||||
setText(sb.toString());
|
||||
|
||||
@@ -457,10 +457,10 @@ class SQLiteViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
*/
|
||||
private void initReader() {
|
||||
viewReader = new SQLiteTableReader.Builder(sqliteDbFile)
|
||||
.onColumnNames((columnName) -> {
|
||||
.forAllColumnNames((columnName) -> {
|
||||
currentTableHeader.add(columnName);
|
||||
})
|
||||
.forAll(getForAllStrategy()).build();
|
||||
.forAllTableValues(getForAllStrategy()).build();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -510,8 +510,8 @@ class SQLiteViewer extends javax.swing.JPanel implements FileTypeViewer {
|
||||
String tableName = (String) this.tablesDropdownList.getSelectedItem();
|
||||
try (FileOutputStream out = new FileOutputStream(csvFile, false)) {
|
||||
try (SQLiteTableReader sqliteStream = new SQLiteTableReader.Builder(sqliteDbFile)
|
||||
.onColumnNames(getColumnNameCSVStrategy(out))
|
||||
.forAll(getForAllCSVStrategy(out)).build()) {
|
||||
.forAllColumnNames(getColumnNameCSVStrategy(out))
|
||||
.forAllTableValues(getForAllCSVStrategy(out)).build()) {
|
||||
totalColumnCount = sqliteStream.getColumnCount(tableName);
|
||||
sqliteStream.read(tableName);
|
||||
}
|
||||
|
||||
@@ -357,6 +357,24 @@ public final class CoordinationService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a specified node.
|
||||
*
|
||||
* @param category The desired category in the namespace.
|
||||
* @param nodePath The node to be deleted.
|
||||
*
|
||||
* @throws CoordinationServiceException If there is an error deleting the
|
||||
* node.
|
||||
*/
|
||||
void deleteNode(CategoryNode category, String nodePath) throws CoordinationServiceException {
|
||||
String fullNodePath = getFullyQualifiedNodePath(category, nodePath);
|
||||
try {
|
||||
curator.delete().forPath(fullNodePath);
|
||||
} catch (Exception ex) {
|
||||
throw new CoordinationServiceException(String.format("Failed to delete node %s", fullNodePath), ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of the child nodes of a category in the namespace.
|
||||
*
|
||||
|
||||
@@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.core;
|
||||
|
||||
import java.awt.Cursor;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
@@ -29,6 +30,8 @@ import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import javafx.application.Platform;
|
||||
import javafx.embed.swing.JFXPanel;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.openide.modules.InstalledFileLocator;
|
||||
import org.openide.modules.ModuleInstall;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
@@ -285,12 +288,34 @@ public class Installer extends ModuleInstall {
|
||||
File pythonModulesDir = new File(PlatformUtil.getUserPythonModulesPath());
|
||||
pythonModulesDir.mkdir();
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a folder in the config directory for Ocr Language Packs if one does
|
||||
* not exist.
|
||||
*/
|
||||
private static void ensureOcrLanguagePacksFolderExists() {
|
||||
File ocrLanguagePacksDir = new File(PlatformUtil.getOcrLanguagePacksPath());
|
||||
boolean createDirectory = ocrLanguagePacksDir.mkdir();
|
||||
|
||||
//If the directory did not exist, copy the tessdata folder over so we
|
||||
//support english.
|
||||
if(createDirectory) {
|
||||
File tessdataDir = InstalledFileLocator.getDefault().locate(
|
||||
"Tesseract-OCR/tessdata", Installer.class.getPackage().getName(), false);
|
||||
try {
|
||||
FileUtils.copyDirectory(tessdataDir, ocrLanguagePacksDir);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Copying over default language packs for Tesseract failed.", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restored() {
|
||||
super.restored();
|
||||
ensurePythonModulesFolderExists();
|
||||
ensureClassifierFolderExists();
|
||||
ensureOcrLanguagePacksFolderExists();
|
||||
initJavaFx();
|
||||
for (ModuleInstall mi : packageInstallers) {
|
||||
try {
|
||||
|
||||
@@ -173,9 +173,8 @@ ViewPreferencesPanel.currentSessionSettingsPanel.border.title=Current Session Se
|
||||
ViewPreferencesPanel.hideRejectedResultsCheckbox.text=Hide rejected results
|
||||
ViewPreferencesPanel.selectFileLabel.text=When selecting a file:
|
||||
ViewPreferencesPanel.globalSettingsPanel.border.title=Global Settings
|
||||
ViewPreferencesPanel.translateNamesInTableRadioButton.text=Table
|
||||
ViewPreferencesPanel.commentsOccurencesColumnWrapAroundText.text=to reduce loading times
|
||||
ViewPreferencesPanel.translateTextLabel.text=Translate text in the:
|
||||
ViewPreferencesPanel.translateTextLabel.text=Translate text:
|
||||
ViewPreferencesPanel.commentsOccurencesColumnsCheckbox.text=C(omments) and O(ccurences) columns
|
||||
ViewPreferencesPanel.centralRepoLabel.text=Do not use Central Repository for:
|
||||
ViewPreferencesPanel.hideOtherUsersTagsLabel.text=Hide other users' tags in the:
|
||||
@@ -193,3 +192,4 @@ ViewPreferencesPanel.keepCurrentViewerRadioButton.toolTipText=For example, stay
|
||||
ViewPreferencesPanel.keepCurrentViewerRadioButton.text=Stay on the same file viewer
|
||||
ViewPreferencesPanel.useBestViewerRadioButton.toolTipText=For example, change from Hex to Media when a JPEG is selected.
|
||||
ViewPreferencesPanel.useBestViewerRadioButton.text=Change to the most specific file viewer
|
||||
ViewPreferencesPanel.fileNameTranslationColumnCheckbox.text=Add column in result viewer for file name translation
|
||||
|
||||
@@ -144,11 +144,11 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="fileNameTranslationColumnCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="keepCurrentViewerRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="useBestViewerRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="useLocalTimeRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="useAnotherTimeRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="translateNamesInTableRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -203,7 +203,7 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="translateTextLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="translateNamesInTableRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="fileNameTranslationColumnCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
@@ -397,14 +397,14 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="translateNamesInTableRadioButton">
|
||||
<Component class="javax.swing.JCheckBox" name="fileNameTranslationColumnCheckbox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.translateNamesInTableRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.fileNameTranslationColumnCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="translateNamesInTableRadioButtonActionPerformed"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileNameTranslationColumnCheckboxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
|
||||
@@ -26,7 +26,7 @@ import javax.swing.JPanel;
|
||||
import org.netbeans.spi.options.OptionsPanelController;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.CasePreferences;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.coreutils.TimeZoneUtils;
|
||||
import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent;
|
||||
@@ -75,15 +75,15 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
dataSourcesHideSlackCheckbox.setSelected(UserPreferences.hideSlackFilesInDataSourcesTree());
|
||||
viewsHideSlackCheckbox.setSelected(UserPreferences.hideSlackFilesInViewsTree());
|
||||
|
||||
commentsOccurencesColumnsCheckbox.setEnabled(EamDbUtil.useCentralRepo());
|
||||
commentsOccurencesColumnWrapAroundText.setEnabled(EamDbUtil.useCentralRepo());
|
||||
commentsOccurencesColumnsCheckbox.setEnabled(EamDb.isEnabled());
|
||||
commentsOccurencesColumnWrapAroundText.setEnabled(EamDb.isEnabled());
|
||||
commentsOccurencesColumnsCheckbox.setSelected(UserPreferences.hideCentralRepoCommentsAndOccurrences());
|
||||
|
||||
hideOtherUsersTagsCheckbox.setSelected(UserPreferences.showOnlyCurrentUserTags());
|
||||
translateNamesInTableRadioButton.setSelected(UserPreferences.displayTranslatedFileNames());
|
||||
fileNameTranslationColumnCheckbox.setSelected(UserPreferences.displayTranslatedFileNames());
|
||||
|
||||
TextTranslationService tts = TextTranslationService.getInstance();
|
||||
translateNamesInTableRadioButton.setEnabled(tts.hasProvider());
|
||||
fileNameTranslationColumnCheckbox.setEnabled(tts.hasProvider());
|
||||
|
||||
// Current Case Settings
|
||||
boolean caseIsOpen = Case.isCaseOpen();
|
||||
@@ -113,7 +113,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
UserPreferences.setHideSlackFilesInViewsTree(viewsHideSlackCheckbox.isSelected());
|
||||
UserPreferences.setShowOnlyCurrentUserTags(hideOtherUsersTagsCheckbox.isSelected());
|
||||
UserPreferences.setHideCentralRepoCommentsAndOccurrences(commentsOccurencesColumnsCheckbox.isSelected());
|
||||
UserPreferences.setDisplayTranslatedFileNames(translateNamesInTableRadioButton.isSelected());
|
||||
UserPreferences.setDisplayTranslatedFileNames(fileNameTranslationColumnCheckbox.isSelected());
|
||||
|
||||
storeGroupItemsInTreeByDataSource();
|
||||
|
||||
@@ -166,7 +166,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
timeZoneList = new javax.swing.JList<>();
|
||||
translateTextLabel = new javax.swing.JLabel();
|
||||
commentsOccurencesColumnWrapAroundText = new javax.swing.JLabel();
|
||||
translateNamesInTableRadioButton = new javax.swing.JRadioButton();
|
||||
fileNameTranslationColumnCheckbox = new javax.swing.JCheckBox();
|
||||
currentCaseSettingsPanel = new javax.swing.JPanel();
|
||||
groupByDataSourceCheckbox = new javax.swing.JCheckBox();
|
||||
currentSessionSettingsPanel = new javax.swing.JPanel();
|
||||
@@ -277,10 +277,10 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(commentsOccurencesColumnWrapAroundText, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.commentsOccurencesColumnWrapAroundText.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(translateNamesInTableRadioButton, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.translateNamesInTableRadioButton.text")); // NOI18N
|
||||
translateNamesInTableRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(fileNameTranslationColumnCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.fileNameTranslationColumnCheckbox.text")); // NOI18N
|
||||
fileNameTranslationColumnCheckbox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
translateNamesInTableRadioButtonActionPerformed(evt);
|
||||
fileNameTranslationColumnCheckboxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -329,11 +329,11 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
.addGroup(globalSettingsPanelLayout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(fileNameTranslationColumnCheckbox)
|
||||
.addComponent(keepCurrentViewerRadioButton)
|
||||
.addComponent(useBestViewerRadioButton)
|
||||
.addComponent(useLocalTimeRadioButton)
|
||||
.addComponent(useAnotherTimeRadioButton)
|
||||
.addComponent(translateNamesInTableRadioButton))))))
|
||||
.addComponent(useAnotherTimeRadioButton))))))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
globalSettingsPanelLayout.setVerticalGroup(
|
||||
@@ -380,7 +380,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(translateTextLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(translateNamesInTableRadioButton)))
|
||||
.addComponent(fileNameTranslationColumnCheckbox)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
@@ -487,14 +487,6 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
}
|
||||
}//GEN-LAST:event_hideRejectedResultsCheckboxActionPerformed
|
||||
|
||||
private void translateNamesInTableRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_translateNamesInTableRadioButtonActionPerformed
|
||||
if (immediateUpdates) {
|
||||
UserPreferences.setDisplayTranslatedFileNames(translateNamesInTableRadioButton.isSelected());
|
||||
} else {
|
||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||
}
|
||||
}//GEN-LAST:event_translateNamesInTableRadioButtonActionPerformed
|
||||
|
||||
private void timeZoneListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_timeZoneListValueChanged
|
||||
if (immediateUpdates && useAnotherTimeRadioButton.isSelected()) {
|
||||
UserPreferences.setTimeZoneForDisplays(timeZoneList.getSelectedValue().substring(11).trim());
|
||||
@@ -593,6 +585,14 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
}
|
||||
}//GEN-LAST:event_useBestViewerRadioButtonActionPerformed
|
||||
|
||||
private void fileNameTranslationColumnCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileNameTranslationColumnCheckboxActionPerformed
|
||||
if (immediateUpdates) {
|
||||
UserPreferences.setDisplayTranslatedFileNames(fileNameTranslationColumnCheckbox.isSelected());
|
||||
} else {
|
||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||
}
|
||||
}//GEN-LAST:event_fileNameTranslationColumnCheckboxActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel centralRepoLabel;
|
||||
@@ -603,6 +603,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
private javax.swing.JCheckBox dataSourcesHideKnownCheckbox;
|
||||
private javax.swing.JCheckBox dataSourcesHideSlackCheckbox;
|
||||
private javax.swing.JLabel displayTimeLabel;
|
||||
private javax.swing.JCheckBox fileNameTranslationColumnCheckbox;
|
||||
private javax.swing.JPanel globalSettingsPanel;
|
||||
private javax.swing.JCheckBox groupByDataSourceCheckbox;
|
||||
private javax.swing.JLabel hideKnownFilesLabel;
|
||||
@@ -614,7 +615,6 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
|
||||
private javax.swing.JRadioButton keepCurrentViewerRadioButton;
|
||||
private javax.swing.JLabel selectFileLabel;
|
||||
private javax.swing.JList<String> timeZoneList;
|
||||
private javax.swing.JRadioButton translateNamesInTableRadioButton;
|
||||
private javax.swing.JLabel translateTextLabel;
|
||||
private javax.swing.JRadioButton useAnotherTimeRadioButton;
|
||||
private javax.swing.JRadioButton useBestViewerRadioButton;
|
||||
|
||||
@@ -52,6 +52,7 @@ public class PlatformUtil {
|
||||
|
||||
private static final String PYTHON_MODULES_SUBDIRECTORY = "python_modules"; //NON-NLS
|
||||
private static final String CLASSIFIERS_SUBDIRECTORY = "object_detection_classifiers"; //NON-NLS
|
||||
private static final String OCR_LANGUAGE_SUBDIRECTORY = "ocr_language_packs"; //NON-NLS
|
||||
private static String javaPath = null;
|
||||
public static final String OS_NAME_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.nameUnknown");
|
||||
public static final String OS_VERSION_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.verUnknown");
|
||||
@@ -116,6 +117,15 @@ public class PlatformUtil {
|
||||
public static String getUserPythonModulesPath() {
|
||||
return getUserDirectory().getAbsolutePath() + File.separator + PYTHON_MODULES_SUBDIRECTORY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get root path where the user's Ocr language packs are stored.
|
||||
*
|
||||
* @return Absolute path to the Ocr language packs root directory.
|
||||
*/
|
||||
public static String getOcrLanguagePacksPath() {
|
||||
return getUserDirectory().getAbsolutePath() + File.separator + OCR_LANGUAGE_SUBDIRECTORY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get root path where the user's object detection classifiers are stored.
|
||||
|
||||
@@ -42,30 +42,14 @@ import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* Reads row by row through SQLite tables and performs user-defined actions on
|
||||
* the row values. Table values are processed by data type. Users configure
|
||||
* these actions for certain data types in the Builder. Example usage:
|
||||
*
|
||||
* SQLiteTableReader reader = new SQLiteTableReader.Builder(file)
|
||||
* .onInteger((i)
|
||||
* -> { System.out.println(i); })
|
||||
* .build();
|
||||
*
|
||||
* reader.read(tableName);
|
||||
*
|
||||
* or
|
||||
*
|
||||
* SQLiteTableReader reader = new SQLiteTableReader.Builder(file)
|
||||
* .onInteger(new Consumer<Integer>() {
|
||||
* (atSymbol)Override public void accept(Integer i) {
|
||||
* System.out.println(i);
|
||||
* }
|
||||
* }).build();
|
||||
* Reads through SQLite tables row by row. Functions performed on the
|
||||
* data must be declared up front to the Builder. For example:
|
||||
*
|
||||
* reader.reader(tableName);
|
||||
*
|
||||
* Invocation of read(String tableName) reads row by row. When an Integer is
|
||||
* encountered, its value will be passed to the Consumer that was defined above.
|
||||
* tableReader = new SQLiteTableReader.Builder(file).forAllColumnNames(System.out::println);
|
||||
* tableReader.read("Sample Table X");
|
||||
*
|
||||
* By declaring the functions up front, the SQLiteTableReader instance can stream the
|
||||
* table contents in the most memory efficient manner.
|
||||
*/
|
||||
public class SQLiteTableReader implements AutoCloseable {
|
||||
|
||||
@@ -76,13 +60,13 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
|
||||
private final AbstractFile file;
|
||||
|
||||
private Consumer<String> onColumnNameAction;
|
||||
private Consumer<String> onStringAction;
|
||||
private Consumer<Long> onLongAction;
|
||||
private Consumer<Integer> onIntegerAction;
|
||||
private Consumer<Double> onFloatAction;
|
||||
private Consumer<byte[]> onBlobAction;
|
||||
private Consumer<Object> forAllAction;
|
||||
private Consumer<String> forAllColumnNamesConsumer;
|
||||
private Consumer<String> forAllStringValuesConsumer;
|
||||
private Consumer<Long> forAllLongValuesConsumer;
|
||||
private Consumer<Integer> forAllIntegerValuesConsumer;
|
||||
private Consumer<Double> forAllFloatValuesConsumer;
|
||||
private Consumer<byte[]> forAllBlobValuesConsumer;
|
||||
private Consumer<Object> forAllTableValuesConsumer;
|
||||
|
||||
static <T> Consumer<T> doNothing() {
|
||||
return NOOP -> {};
|
||||
@@ -96,13 +80,13 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
public Builder(AbstractFile file) {
|
||||
this.file = file;
|
||||
|
||||
this.onColumnNameAction = Builder.doNothing();
|
||||
this.onStringAction = Builder.doNothing();
|
||||
this.onLongAction = Builder.doNothing();
|
||||
this.onIntegerAction = Builder.doNothing();
|
||||
this.onFloatAction = Builder.doNothing();
|
||||
this.onBlobAction = Builder.doNothing();
|
||||
this.forAllAction = Builder.doNothing();
|
||||
this.forAllColumnNamesConsumer = Builder.doNothing();
|
||||
this.forAllStringValuesConsumer = Builder.doNothing();
|
||||
this.forAllLongValuesConsumer = Builder.doNothing();
|
||||
this.forAllIntegerValuesConsumer = Builder.doNothing();
|
||||
this.forAllFloatValuesConsumer = Builder.doNothing();
|
||||
this.forAllBlobValuesConsumer = Builder.doNothing();
|
||||
this.forAllTableValuesConsumer = Builder.doNothing();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,8 +97,8 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
*
|
||||
* @return Builder reference
|
||||
*/
|
||||
public Builder onColumnNames(Consumer<String> action) {
|
||||
this.onColumnNameAction = action;
|
||||
public Builder forAllColumnNames(Consumer<String> action) {
|
||||
this.forAllColumnNamesConsumer = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -126,8 +110,8 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
*
|
||||
* @return Builder reference
|
||||
*/
|
||||
public Builder onString(Consumer<String> action) {
|
||||
this.onStringAction = action;
|
||||
public Builder forAllStringValues(Consumer<String> action) {
|
||||
this.forAllStringValuesConsumer = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -139,8 +123,8 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
*
|
||||
* @return Builder reference
|
||||
*/
|
||||
public Builder onInteger(Consumer<Integer> action) {
|
||||
this.onIntegerAction = action;
|
||||
public Builder forAllIntegerValues(Consumer<Integer> action) {
|
||||
this.forAllIntegerValuesConsumer = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -152,8 +136,8 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
*
|
||||
* @return Builder reference
|
||||
*/
|
||||
public Builder onFloat(Consumer<Double> action) {
|
||||
this.onFloatAction = action;
|
||||
public Builder forAllFloatValues(Consumer<Double> action) {
|
||||
this.forAllFloatValuesConsumer = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -165,8 +149,8 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
*
|
||||
* @return Builder reference
|
||||
*/
|
||||
public Builder onLong(Consumer<Long> action) {
|
||||
this.onLongAction = action;
|
||||
public Builder forAllLongValues(Consumer<Long> action) {
|
||||
this.forAllLongValuesConsumer = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -178,8 +162,8 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
*
|
||||
* @return Builder reference
|
||||
*/
|
||||
public Builder onBlob(Consumer<byte[]> action) {
|
||||
this.onBlobAction = action;
|
||||
public Builder forAllBlobValues(Consumer<byte[]> action) {
|
||||
this.forAllBlobValuesConsumer = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -192,8 +176,8 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
*
|
||||
* @return Builder reference
|
||||
*/
|
||||
public Builder forAll(Consumer<Object> action) {
|
||||
this.forAllAction = action;
|
||||
public Builder forAllTableValues(Consumer<Object> action) {
|
||||
this.forAllTableValuesConsumer = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -366,7 +350,7 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
if (condition.getAsBoolean()) {
|
||||
return;
|
||||
}
|
||||
builder.onColumnNameAction.accept(currentMetadata
|
||||
builder.forAllColumnNamesConsumer.accept(currentMetadata
|
||||
.getColumnName(++columnNameIndex));
|
||||
}
|
||||
|
||||
@@ -379,18 +363,18 @@ public class SQLiteTableReader implements AutoCloseable {
|
||||
|
||||
Object item = queryResults.getObject(++currRowColumnIndex);
|
||||
if (item instanceof String) {
|
||||
builder.onStringAction.accept((String) item);
|
||||
builder.forAllStringValuesConsumer.accept((String) item);
|
||||
} else if (item instanceof Integer) {
|
||||
builder.onIntegerAction.accept((Integer) item);
|
||||
builder.forAllIntegerValuesConsumer.accept((Integer) item);
|
||||
} else if (item instanceof Double) {
|
||||
builder.onFloatAction.accept((Double) item);
|
||||
builder.forAllFloatValuesConsumer.accept((Double) item);
|
||||
} else if (item instanceof Long) {
|
||||
builder.onLongAction.accept((Long) item);
|
||||
builder.forAllLongValuesConsumer.accept((Long) item);
|
||||
} else if (item instanceof byte[]) {
|
||||
builder.onBlobAction.accept((byte[]) item);
|
||||
builder.forAllBlobValuesConsumer.accept((byte[]) item);
|
||||
}
|
||||
|
||||
builder.forAllAction.accept(item);
|
||||
builder.forAllTableValuesConsumer.accept(item);
|
||||
}
|
||||
unfinishedRow = false;
|
||||
//Wrap column index back around if we've reached the end of the row
|
||||
|
||||
@@ -48,7 +48,6 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNor
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.HasCommentStatus;
|
||||
@@ -572,7 +571,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
|
||||
|
||||
CorrelationAttributeInstance getCorrelationAttributeInstance() {
|
||||
CorrelationAttributeInstance attribute = null;
|
||||
if (EamDbUtil.useCentralRepo() && !UserPreferences.hideCentralRepoCommentsAndOccurrences()) {
|
||||
if (EamDb.isEnabled() && !UserPreferences.hideCentralRepoCommentsAndOccurrences()) {
|
||||
attribute = EamArtifactUtil.getInstanceFromContent(content);
|
||||
}
|
||||
return attribute;
|
||||
|
||||
@@ -54,7 +54,6 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNor
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.Score;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
@@ -572,7 +571,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
|
||||
protected final CorrelationAttributeInstance getCorrelationAttributeInstance() {
|
||||
CorrelationAttributeInstance correlationAttribute = null;
|
||||
if (EamDbUtil.useCentralRepo()) {
|
||||
if (EamDb.isEnabled()) {
|
||||
correlationAttribute = EamArtifactUtil.getInstanceFromContent(associated);
|
||||
}
|
||||
return correlationAttribute;
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.sleuthkit.autopsy.datamodel.FileSize.FileSizeRootChildren.FileSizeNod
|
||||
import org.sleuthkit.autopsy.datamodel.FileSize.FileSizeRootNode;
|
||||
import org.sleuthkit.autopsy.datamodel.FileTypes.FileTypesNode;
|
||||
import org.sleuthkit.autopsy.datamodel.accounts.Accounts;
|
||||
import org.sleuthkit.autopsy.othercasessearch.CorrelationAttributeInstanceNode;
|
||||
import org.sleuthkit.autopsy.allcasessearch.CorrelationAttributeInstanceNode;
|
||||
|
||||
/**
|
||||
* Visitor pattern that goes over all nodes in the directory tree. This includes
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.guiutils;
|
||||
package org.sleuthkit.autopsy.datamodel.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.ResultSet;
|
||||
@@ -46,10 +46,10 @@ import java.awt.GridLayout;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
import org.openide.modules.Places;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
|
||||
/**
|
||||
* Dashboard for viewing metrics and controlling the health monitor.
|
||||
@@ -58,8 +58,8 @@ public class HealthMonitorDashboard {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(HealthMonitorDashboard.class.getName());
|
||||
|
||||
private final static String ADMIN_ACCESS_FILE_NAME = "adminAccess"; // NON-NLS
|
||||
private final static String ADMIN_ACCESS_FILE_PATH = Paths.get(Places.getUserDirectory().getAbsolutePath(), ADMIN_ACCESS_FILE_NAME).toString();
|
||||
private final static String ADMIN_ACCESS_FILE_NAME = "_aiaa"; // NON-NLS
|
||||
private final static String ADMIN_ACCESS_FILE_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), ADMIN_ACCESS_FILE_NAME).toString();
|
||||
|
||||
Map<String, List<HealthMonitor.DatabaseTimingResult>> timingData;
|
||||
List<HealthMonitor.UserData> userData;
|
||||
|
||||
@@ -39,6 +39,7 @@ public abstract class DataSourceAnalysisEvent extends AutopsyEvent implements Se
|
||||
private final long ingestJobId;
|
||||
private final long dataSourceIngestJobId;
|
||||
private transient Content dataSource;
|
||||
private final long dataSourceObjectId;
|
||||
|
||||
/**
|
||||
* Constructs an instance of the base class for events published in
|
||||
@@ -56,6 +57,7 @@ public abstract class DataSourceAnalysisEvent extends AutopsyEvent implements Se
|
||||
this.ingestJobId = ingestJobId;
|
||||
this.dataSourceIngestJobId = dataSourceIngestJobId;
|
||||
this.dataSource = dataSource;
|
||||
this.dataSourceObjectId = dataSource.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +83,8 @@ public abstract class DataSourceAnalysisEvent extends AutopsyEvent implements Se
|
||||
/**
|
||||
* Gets the data source associated with this event.
|
||||
*
|
||||
* @return The data source.
|
||||
* @return The data source or null if there is an error getting the data
|
||||
* source from an event published by a remote node.
|
||||
*/
|
||||
public Content getDataSource() {
|
||||
/**
|
||||
@@ -96,11 +99,10 @@ public abstract class DataSourceAnalysisEvent extends AutopsyEvent implements Se
|
||||
return dataSource;
|
||||
}
|
||||
try {
|
||||
long id = (Long) super.getNewValue();
|
||||
dataSource = Case.getCurrentCaseThrows().getSleuthkitCase().getContentById(id);
|
||||
dataSource = Case.getCurrentCaseThrows().getSleuthkitCase().getContentById(dataSourceObjectId);
|
||||
return dataSource;
|
||||
} catch (NoCurrentCaseException | TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
|
||||
logger.log(Level.SEVERE, String.format("Error doing lazy load of data source (objId=%d) for remote event", this.dataSourceObjectId), ex); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,12 +243,15 @@ class ReportCaseUco implements GeneralReportModule {
|
||||
catalog.writeStringField("@type", "Trace");
|
||||
|
||||
catalog.writeFieldName("propertyBundle");
|
||||
catalog.writeStartArray();
|
||||
|
||||
catalog.writeStartArray();
|
||||
catalog.writeStartObject();
|
||||
|
||||
// replace double slashes with single ones
|
||||
caseDirPath = caseDirPath.replaceAll("\\\\", "/");
|
||||
|
||||
catalog.writeStringField("@type", "File");
|
||||
if (dbType == TskData.DbType.SQLITE) {
|
||||
catalog.writeStringField("filePath", caseDirPath + java.io.File.separator + dbFileName);
|
||||
catalog.writeStringField("filePath", caseDirPath + "/" + dbFileName);
|
||||
catalog.writeBooleanField("isDirectory", false);
|
||||
} else {
|
||||
catalog.writeStringField("filePath", caseDirPath);
|
||||
@@ -300,7 +303,7 @@ class ReportCaseUco implements GeneralReportModule {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return saveDataSourceInCaseUcoFormat(jsonGenerator, imageName, imageSize, selectedDataSourceId, caseTraceId);
|
||||
}
|
||||
|
||||
@@ -317,6 +320,10 @@ class ReportCaseUco implements GeneralReportModule {
|
||||
|
||||
catalog.writeStartObject();
|
||||
catalog.writeStringField("@type", "File");
|
||||
|
||||
// replace double back slashes with single ones
|
||||
imageName = imageName.replaceAll("\\\\", "/");
|
||||
|
||||
catalog.writeStringField("filePath", imageName);
|
||||
catalog.writeEndObject();
|
||||
|
||||
@@ -391,7 +398,7 @@ class ReportCaseUco implements GeneralReportModule {
|
||||
catalog.writeStartArray();
|
||||
catalog.writeStartObject();
|
||||
catalog.writeStringField("@type", "Hash");
|
||||
catalog.writeStringField("hashMethod", "SHA256");
|
||||
catalog.writeStringField("hashMethod", "MD5");
|
||||
catalog.writeStringField("hashValue", md5Hash);
|
||||
catalog.writeEndObject();
|
||||
catalog.writeEndArray();
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import javax.swing.ComboBoxModel;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.guiutils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.datamodel.utils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.guiutils.DataSourceComboBoxModel;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
|
||||
@@ -250,6 +250,7 @@ class SevenZipExtractor {
|
||||
String msg = NbBundle.getMessage(SevenZipExtractor.class,
|
||||
"EmbeddedFileExtractorIngestModule.ArchiveExtractor.isZipBombCheck.warnMsg", archiveFile.getName(), escapedFilePath);//NON-NLS
|
||||
try {
|
||||
|
||||
Collection<BlackboardAttribute> attributes = Arrays.asList(
|
||||
new BlackboardAttribute(
|
||||
TSK_SET_NAME, MODULE_NAME,
|
||||
@@ -372,11 +373,7 @@ class SevenZipExtractor {
|
||||
* @return the archiveFilePath to be used by the unpack method
|
||||
*/
|
||||
private String getArchiveFilePath(AbstractFile archiveFile) {
|
||||
try {
|
||||
return archiveFile.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
return archiveFile.getParentPath() + archiveFile.getName();
|
||||
}
|
||||
return archiveFile.getParentPath() + archiveFile.getName();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -710,6 +707,7 @@ class SevenZipExtractor {
|
||||
parentAr.addChild(child);
|
||||
depthMap.put(unpackedFile.getId(), child);
|
||||
}
|
||||
unpackedFile.close();
|
||||
}
|
||||
|
||||
} catch (TskCoreException | NoCurrentCaseException e) {
|
||||
|
||||
@@ -215,11 +215,15 @@ final class CustomFileTypesManager {
|
||||
signatureList.add(new Signature(byteArray, 522L));
|
||||
fileType = new FileType("image/x-pict", signatureList); //NON-NLS
|
||||
autopsyDefinedFileTypes.add(fileType);
|
||||
|
||||
/* NOTE: see JIRA-4269. This MIME type seems to match a lot of random file types,
|
||||
including ZIP archives. As a result those files get assigned this MIME type instead
|
||||
of having their MIME type detected by Tika.
|
||||
byteArray = DatatypeConverter.parseHexBinary("1100"); //NON-NLS
|
||||
signatureList.clear();
|
||||
signatureList.add(new Signature(byteArray, 522L));
|
||||
fileType = new FileType("image/x-pict", signatureList); //NON-NLS
|
||||
autopsyDefinedFileTypes.add(fileType);
|
||||
autopsyDefinedFileTypes.add(fileType);*/
|
||||
|
||||
/*
|
||||
* Add type for pam.
|
||||
|
||||
@@ -194,12 +194,10 @@ AddHashValuesToDatabaseProgressDialog.addHashValuesToDatabase.errorAddingValidHa
|
||||
AddHashValuesToDatabaseProgressDialog.addHashValuesToDatabase.errorAddingValidHash.msg=Error adding valid hashes to the hash set:
|
||||
HashLookupSettingsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes.
|
||||
HashLookupSettingsPanel.addHashesToDatabaseButton.text=Add Hashes to Hash Set
|
||||
HashLookupSettingsPanel.indexPathLabel.text=
|
||||
HashLookupSettingsPanel.indexPathLabelLabel.text=Index Path:
|
||||
HashLookupSettingsPanel.createDatabaseButton.toolTipText=
|
||||
HashLookupSettingsPanel.createDatabaseButton.text=New Hash Set
|
||||
HashLookupSettingsPanel.optionsLabel.text=Options
|
||||
HashLookupSettingsPanel.informationLabel.text=Information
|
||||
HashLookupSettingsPanel.informationLabel.text=Hash Set Details
|
||||
HashLookupSettingsPanel.sendIngestMessagesCheckBox.text=Send ingest inbox message for each hit
|
||||
HashLookupSettingsPanel.indexButton.text=Index
|
||||
HashLookupSettingsPanel.indexLabel.text=Index Status:
|
||||
@@ -246,3 +244,4 @@ HashDbCreateDatabaseDialog.databasePathLabel.text=Hash Set Path:
|
||||
AddHashValuesToDatabaseDialog.okButton.text_2=OK
|
||||
HashDbImportDatabaseDialog.saveInUserConfigFolderCheckbox.text=Copy hash set into user configuration folder
|
||||
HashDbImportDatabaseDialog.saveInUserConfigFolderCheckbox.toolTipText=In Live Triage situations, this option ensures that path to the hash set will be valid
|
||||
HashLookupSettingsPanel.indexPathLabel.text=
|
||||
|
||||
@@ -187,10 +187,8 @@ AddHashValuesToDatabaseProgressDialog.addHashValuesToDatabase.errorAddingValidHa
|
||||
HashLookupSettingsPanel.deleteDatabaseButton.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u524a\u9664
|
||||
HashLookupSettingsPanel.ingestWarningLabel.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u4e2d\u3067\u3059\u3002\u5b8c\u4e86\u3059\u308b\u307e\u3067\u4e00\u90e8\u306e\u8a2d\u5b9a\u306f\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002
|
||||
HashLookupSettingsPanel.addHashesToDatabaseButton.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30cf\u30c3\u30b7\u30e5\u3092\u8ffd\u52a0
|
||||
HashLookupSettingsPanel.indexPathLabel.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093
|
||||
HashLookupSettingsPanel.indexPathLabelLabel.text=\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30b9\uff1a
|
||||
HashLookupSettingsPanel.createDatabaseButton.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210
|
||||
HashLookupSettingsPanel.optionsLabel.text=\u30aa\u30d7\u30b7\u30e7\u30f3
|
||||
HashLookupSettingsPanel.informationLabel.text=\u60c5\u5831
|
||||
HashLookupSettingsPanel.sendIngestMessagesCheckBox.text=\u30d2\u30c3\u30c8\u6bce\u306b\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30a4\u30f3\u30dc\u30c3\u30af\u30b9\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308b
|
||||
HashLookupSettingsPanel.indexButton.text=\u30a4\u30f3\u30c7\u30c3\u30af\u30b9
|
||||
@@ -206,3 +204,4 @@ HashLookupSettingsPanel.hashDatabasesLabel.text=\u30cf\u30c3\u30b7\u30e5\u30c7\u
|
||||
HashLookupSettingsPanel.importDatabaseButton.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8
|
||||
HashDbCreateDatabaseDialog.databasePathLabel.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d1\u30b9\uff1a
|
||||
AddHashValuesToDatabaseDialog.okButton.text_2=OK
|
||||
HashLookupSettingsPanel.indexPathLabel.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093
|
||||
|
||||
+340
-341
@@ -66,10 +66,7 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jScrollPane2" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane2" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
@@ -89,80 +86,35 @@
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="1" pref="1" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="informationLabel" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="309" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="informationLabel" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="356" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="indexButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="addHashesToDatabaseButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="informationScrollPanel" alignment="0" pref="420" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="indexLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="indexPathLabelLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="55" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="hashDbIndexStatusLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="indexPathLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="indexButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="10" pref="10" max="-2" attributes="0"/>
|
||||
<Component id="addHashesToDatabaseButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="locationLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="typeLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="versionLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="orgLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="readOnlyLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="nameLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="55" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="hashDbNameLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbTypeLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbLocationLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbVersionLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbOrgLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbReadOnlyLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="70" max="-2" attributes="0"/>
|
||||
<Component id="informationSeparator" min="-2" pref="305" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="optionsLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="optionsSeparator" min="-2" pref="334" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="sendIngestMessagesCheckBox" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ingestWarningLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Component id="ingestWarningLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="24" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -191,63 +143,14 @@
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="informationLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Component id="informationSeparator" min="-2" pref="3" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="nameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="typeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbTypeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="locationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbLocationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="versionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbVersionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="orgLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbOrgLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="readOnlyLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbReadOnlyLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="indexPathLabelLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="indexPathLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="indexLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbIndexStatusLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="informationLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="informationScrollPanel" min="-2" pref="185" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="indexButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="addHashesToDatabaseButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="optionsLabel" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="optionsSeparator" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="sendIngestMessagesCheckBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
@@ -268,18 +171,15 @@
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="ingestWarningLabel">
|
||||
<Component class="javax.swing.JLabel" name="hashDatabasesLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="ingestWarningLabel" property="font" relativeSize="false" size="11"/>
|
||||
<Font bold="false" component="hashDatabasesLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/modules/hashdatabase/warning16.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.ingestWarningLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDatabasesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -318,18 +218,21 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="deleteDatabaseButton">
|
||||
<Component class="javax.swing.JButton" name="createDatabaseButton">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="deleteDatabaseButton" property="font" relativeSize="false" size="11"/>
|
||||
<Font bold="false" component="createDatabaseButton" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/modules/hashdatabase/delete16.png"/>
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/modules/hashdatabase/new16.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.deleteDatabaseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.createDatabaseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.createDatabaseButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
@@ -339,7 +242,7 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteDatabaseButtonActionPerformed"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="createDatabaseButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="importDatabaseButton">
|
||||
@@ -369,114 +272,316 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="importDatabaseButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDatabasesLabel">
|
||||
<Component class="javax.swing.JButton" name="deleteDatabaseButton">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDatabasesLabel" property="font" relativeSize="false" size="11"/>
|
||||
<Font bold="false" component="deleteDatabaseButton" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/modules/hashdatabase/delete16.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDatabasesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.deleteDatabaseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteDatabaseButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="nameLabel">
|
||||
<Component class="javax.swing.JLabel" name="informationLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="nameLabel" property="font" relativeSize="false" size="11"/>
|
||||
<Font bold="false" component="informationLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.nameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.informationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbNameLabel">
|
||||
<Container class="javax.swing.JScrollPane" name="informationScrollPanel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbNameLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="verticalScrollBarPolicy" type="int" value="21"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbLocationLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbLocationLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbLocationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="locationLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="locationLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.locationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="typeLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="typeLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.typeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbTypeLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbTypeLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbTypeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbIndexStatusLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbIndexStatusLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbIndexStatusLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="indexLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="indexLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.indexLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="informationPanel">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="locationLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashDbLocationLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="nameLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashDbNameLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="typeLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashDbTypeLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="versionLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashDbVersionLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="orgLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashDbOrgLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="readOnlyLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashDbReadOnlyLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="indexLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="hashDbIndexStatusLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="indexPathLabelLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="indexPathLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="nameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="typeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbTypeLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="locationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbLocationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="versionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbVersionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="orgLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbOrgLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="readOnlyLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbReadOnlyLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="indexPathLabelLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="indexPathLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="indexLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hashDbIndexStatusLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="49" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="nameLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="nameLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.nameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbNameLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbNameLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="typeLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="typeLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.typeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbTypeLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbTypeLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbTypeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="locationLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="locationLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.locationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbLocationLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbLocationLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbLocationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="versionLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.versionLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbVersionLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbVersionLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="orgLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.orgLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbOrgLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbOrgLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="readOnlyLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.readOnlyLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbReadOnlyLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbReadOnlyLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="indexPathLabelLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="indexPathLabelLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.indexPathLabelLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="indexPathLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="indexPathLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.indexPathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="indexLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="indexLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.indexLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbIndexStatusLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="hashDbIndexStatusLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbIndexStatusLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="indexButton">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
@@ -493,100 +598,6 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="indexButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="sendIngestMessagesCheckBox">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="sendIngestMessagesCheckBox" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.sendIngestMessagesCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sendIngestMessagesCheckBoxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="informationLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="informationLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.informationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="optionsLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="optionsLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.optionsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="informationSeparator">
|
||||
</Component>
|
||||
<Component class="javax.swing.JSeparator" name="optionsSeparator">
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="createDatabaseButton">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="createDatabaseButton" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/modules/hashdatabase/new16.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.createDatabaseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.createDatabaseButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="createDatabaseButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="indexPathLabelLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="indexPathLabelLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.indexPathLabelLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="indexPathLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="indexPathLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.indexPathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="addHashesToDatabaseButton">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
@@ -603,45 +614,33 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addHashesToDatabaseButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="versionLabel">
|
||||
<Component class="javax.swing.JCheckBox" name="sendIngestMessagesCheckBox">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="sendIngestMessagesCheckBox" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.versionLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.sendIngestMessagesCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sendIngestMessagesCheckBoxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbVersionLabel">
|
||||
<Component class="javax.swing.JLabel" name="ingestWarningLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbVersionLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="false" component="ingestWarningLabel" property="font" relativeSize="false" size="11"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="orgLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.orgLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/modules/hashdatabase/warning16.png"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbOrgLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbOrgLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="readOnlyLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.readOnlyLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="hashDbReadOnlyLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.hashDbReadOnlyLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties" key="HashLookupSettingsPanel.ingestWarningLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
+191
-200
@@ -142,8 +142,6 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
// Update ingest options.
|
||||
sendIngestMessagesCheckBox.setSelected(false);
|
||||
sendIngestMessagesCheckBox.setEnabled(false);
|
||||
optionsLabel.setEnabled(false);
|
||||
optionsSeparator.setEnabled(false);
|
||||
|
||||
// Update database action buttons.
|
||||
createDatabaseButton.setEnabled(true);
|
||||
@@ -194,14 +192,14 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
deleteDatabaseButton.setEnabled(!ingestIsRunning);
|
||||
|
||||
try {
|
||||
hashDbLocationLabel.setText(shortenPath(db.getDatabasePath()));
|
||||
hashDbLocationLabel.setText(db.getDatabasePath());
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(HashLookupSettingsPanel.class.getName()).log(Level.SEVERE, "Error getting hash set path of " + db.getHashSetName() + " hash set", ex); //NON-NLS
|
||||
hashDbLocationLabel.setText(ERROR_GETTING_PATH_TEXT);
|
||||
}
|
||||
|
||||
try {
|
||||
indexPathLabel.setText(shortenPath(hashDb.getIndexPath()));
|
||||
indexPathLabel.setText(hashDb.getIndexPath());
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(HashLookupSettingsPanel.class.getName()).log(Level.SEVERE, "Error getting index path of " + db.getHashSetName() + " hash set", ex); //NON-NLS
|
||||
indexPathLabel.setText(ERROR_GETTING_PATH_TEXT);
|
||||
@@ -270,8 +268,6 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
// Update ingest option components.
|
||||
sendIngestMessagesCheckBox.setSelected(db.getSendIngestMessages());
|
||||
sendIngestMessagesCheckBox.setEnabled(!ingestIsRunning && db.getKnownFilesType().equals(KnownFilesType.KNOWN_BAD));
|
||||
optionsLabel.setEnabled(!ingestIsRunning);
|
||||
optionsSeparator.setEnabled(!ingestIsRunning);
|
||||
|
||||
// Update database action buttons.
|
||||
createDatabaseButton.setEnabled(true);
|
||||
@@ -281,14 +277,6 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
ingestWarningLabel.setVisible(ingestIsRunning);
|
||||
}
|
||||
|
||||
private static String shortenPath(String path) {
|
||||
String shortenedPath = path;
|
||||
if (shortenedPath.length() > 50) {
|
||||
shortenedPath = shortenedPath.substring(0, 10 + shortenedPath.substring(10).indexOf(File.separator) + 1) + "..." + shortenedPath.substring((shortenedPath.length() - 20) + shortenedPath.substring(shortenedPath.length() - 20).indexOf(File.separator));
|
||||
}
|
||||
return shortenedPath;
|
||||
}
|
||||
|
||||
private boolean isLocalIngestJobEvent(PropertyChangeEvent evt) {
|
||||
if (evt instanceof AutopsyEvent) {
|
||||
AutopsyEvent event = (AutopsyEvent) evt;
|
||||
@@ -591,36 +579,35 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
jButton3 = new javax.swing.JButton();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
ingestWarningLabel = new javax.swing.JLabel();
|
||||
hashDatabasesLabel = new javax.swing.JLabel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
hashSetTable = new HashSetTable();
|
||||
deleteDatabaseButton = new javax.swing.JButton();
|
||||
createDatabaseButton = new javax.swing.JButton();
|
||||
importDatabaseButton = new javax.swing.JButton();
|
||||
hashDatabasesLabel = new javax.swing.JLabel();
|
||||
deleteDatabaseButton = new javax.swing.JButton();
|
||||
informationLabel = new javax.swing.JLabel();
|
||||
informationScrollPanel = new javax.swing.JScrollPane();
|
||||
informationPanel = new javax.swing.JPanel();
|
||||
nameLabel = new javax.swing.JLabel();
|
||||
hashDbNameLabel = new javax.swing.JLabel();
|
||||
hashDbLocationLabel = new javax.swing.JLabel();
|
||||
locationLabel = new javax.swing.JLabel();
|
||||
typeLabel = new javax.swing.JLabel();
|
||||
hashDbTypeLabel = new javax.swing.JLabel();
|
||||
hashDbIndexStatusLabel = new javax.swing.JLabel();
|
||||
indexLabel = new javax.swing.JLabel();
|
||||
indexButton = new javax.swing.JButton();
|
||||
sendIngestMessagesCheckBox = new javax.swing.JCheckBox();
|
||||
informationLabel = new javax.swing.JLabel();
|
||||
optionsLabel = new javax.swing.JLabel();
|
||||
informationSeparator = new javax.swing.JSeparator();
|
||||
optionsSeparator = new javax.swing.JSeparator();
|
||||
createDatabaseButton = new javax.swing.JButton();
|
||||
indexPathLabelLabel = new javax.swing.JLabel();
|
||||
indexPathLabel = new javax.swing.JLabel();
|
||||
addHashesToDatabaseButton = new javax.swing.JButton();
|
||||
locationLabel = new javax.swing.JLabel();
|
||||
hashDbLocationLabel = new javax.swing.JLabel();
|
||||
versionLabel = new javax.swing.JLabel();
|
||||
hashDbVersionLabel = new javax.swing.JLabel();
|
||||
orgLabel = new javax.swing.JLabel();
|
||||
hashDbOrgLabel = new javax.swing.JLabel();
|
||||
readOnlyLabel = new javax.swing.JLabel();
|
||||
hashDbReadOnlyLabel = new javax.swing.JLabel();
|
||||
indexPathLabelLabel = new javax.swing.JLabel();
|
||||
indexPathLabel = new javax.swing.JLabel();
|
||||
indexLabel = new javax.swing.JLabel();
|
||||
hashDbIndexStatusLabel = new javax.swing.JLabel();
|
||||
indexButton = new javax.swing.JButton();
|
||||
addHashesToDatabaseButton = new javax.swing.JButton();
|
||||
sendIngestMessagesCheckBox = new javax.swing.JCheckBox();
|
||||
ingestWarningLabel = new javax.swing.JLabel();
|
||||
|
||||
jLabel2.setFont(jLabel2.getFont().deriveFont(jLabel2.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jLabel2.text")); // NOI18N
|
||||
@@ -634,9 +621,8 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
jButton3.setFont(jButton3.getFont().deriveFont(jButton3.getFont().getStyle() & ~java.awt.Font.BOLD, 14));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jButton3, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jButton3.text")); // NOI18N
|
||||
|
||||
ingestWarningLabel.setFont(ingestWarningLabel.getFont().deriveFont(ingestWarningLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
ingestWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/warning16.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(ingestWarningLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.ingestWarningLabel.text")); // NOI18N
|
||||
hashDatabasesLabel.setFont(hashDatabasesLabel.getFont().deriveFont(hashDatabasesLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDatabasesLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDatabasesLabel.text")); // NOI18N
|
||||
|
||||
hashSetTable.setFont(hashSetTable.getFont().deriveFont(hashSetTable.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
hashSetTable.setModel(new javax.swing.table.DefaultTableModel(
|
||||
@@ -656,14 +642,15 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
});
|
||||
jScrollPane1.setViewportView(hashSetTable);
|
||||
|
||||
deleteDatabaseButton.setFont(deleteDatabaseButton.getFont().deriveFont(deleteDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
deleteDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/delete16.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(deleteDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.deleteDatabaseButton.text")); // NOI18N
|
||||
deleteDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
deleteDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
deleteDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
createDatabaseButton.setFont(createDatabaseButton.getFont().deriveFont(createDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
createDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/new16.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(createDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.createDatabaseButton.text")); // NOI18N
|
||||
createDatabaseButton.setToolTipText(org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.createDatabaseButton.toolTipText")); // NOI18N
|
||||
createDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
createDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
createDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
deleteDatabaseButtonActionPerformed(evt);
|
||||
createDatabaseButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -679,8 +666,21 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
}
|
||||
});
|
||||
|
||||
hashDatabasesLabel.setFont(hashDatabasesLabel.getFont().deriveFont(hashDatabasesLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDatabasesLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDatabasesLabel.text")); // NOI18N
|
||||
deleteDatabaseButton.setFont(deleteDatabaseButton.getFont().deriveFont(deleteDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
deleteDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/delete16.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(deleteDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.deleteDatabaseButton.text")); // NOI18N
|
||||
deleteDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
deleteDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
deleteDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
deleteDatabaseButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
informationLabel.setFont(informationLabel.getFont().deriveFont(informationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(informationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.informationLabel.text")); // NOI18N
|
||||
|
||||
informationScrollPanel.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
|
||||
|
||||
nameLabel.setFont(nameLabel.getFont().deriveFont(nameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(nameLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.nameLabel.text")); // NOI18N
|
||||
@@ -688,73 +688,17 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
hashDbNameLabel.setFont(hashDbNameLabel.getFont().deriveFont(hashDbNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDbNameLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbNameLabel.text")); // NOI18N
|
||||
|
||||
hashDbLocationLabel.setFont(hashDbLocationLabel.getFont().deriveFont(hashDbLocationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDbLocationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbLocationLabel.text")); // NOI18N
|
||||
|
||||
locationLabel.setFont(locationLabel.getFont().deriveFont(locationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(locationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.locationLabel.text")); // NOI18N
|
||||
|
||||
typeLabel.setFont(typeLabel.getFont().deriveFont(typeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(typeLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.typeLabel.text")); // NOI18N
|
||||
|
||||
hashDbTypeLabel.setFont(hashDbTypeLabel.getFont().deriveFont(hashDbTypeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDbTypeLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbTypeLabel.text")); // NOI18N
|
||||
|
||||
hashDbIndexStatusLabel.setFont(hashDbIndexStatusLabel.getFont().deriveFont(hashDbIndexStatusLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDbIndexStatusLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbIndexStatusLabel.text")); // NOI18N
|
||||
locationLabel.setFont(locationLabel.getFont().deriveFont(locationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(locationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.locationLabel.text")); // NOI18N
|
||||
|
||||
indexLabel.setFont(indexLabel.getFont().deriveFont(indexLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexLabel.text")); // NOI18N
|
||||
|
||||
indexButton.setFont(indexButton.getFont().deriveFont(indexButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexButton.text")); // NOI18N
|
||||
indexButton.setEnabled(false);
|
||||
indexButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
indexButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
sendIngestMessagesCheckBox.setFont(sendIngestMessagesCheckBox.getFont().deriveFont(sendIngestMessagesCheckBox.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sendIngestMessagesCheckBox, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.sendIngestMessagesCheckBox.text")); // NOI18N
|
||||
sendIngestMessagesCheckBox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
sendIngestMessagesCheckBoxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
informationLabel.setFont(informationLabel.getFont().deriveFont(informationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(informationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.informationLabel.text")); // NOI18N
|
||||
|
||||
optionsLabel.setFont(optionsLabel.getFont().deriveFont(optionsLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(optionsLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.optionsLabel.text")); // NOI18N
|
||||
|
||||
createDatabaseButton.setFont(createDatabaseButton.getFont().deriveFont(createDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
createDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/new16.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(createDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.createDatabaseButton.text")); // NOI18N
|
||||
createDatabaseButton.setToolTipText(org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.createDatabaseButton.toolTipText")); // NOI18N
|
||||
createDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
createDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
createDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
createDatabaseButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
indexPathLabelLabel.setFont(indexPathLabelLabel.getFont().deriveFont(indexPathLabelLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexPathLabelLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexPathLabelLabel.text")); // NOI18N
|
||||
|
||||
indexPathLabel.setFont(indexPathLabel.getFont().deriveFont(indexPathLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexPathLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexPathLabel.text")); // NOI18N
|
||||
|
||||
addHashesToDatabaseButton.setFont(addHashesToDatabaseButton.getFont().deriveFont(addHashesToDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(addHashesToDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.addHashesToDatabaseButton.text")); // NOI18N
|
||||
addHashesToDatabaseButton.setEnabled(false);
|
||||
addHashesToDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
addHashesToDatabaseButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
hashDbLocationLabel.setFont(hashDbLocationLabel.getFont().deriveFont(hashDbLocationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDbLocationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbLocationLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(versionLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.versionLabel.text_1")); // NOI18N
|
||||
|
||||
@@ -768,6 +712,131 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDbReadOnlyLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbReadOnlyLabel.text_1")); // NOI18N
|
||||
|
||||
indexPathLabelLabel.setFont(indexPathLabelLabel.getFont().deriveFont(indexPathLabelLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexPathLabelLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexPathLabelLabel.text")); // NOI18N
|
||||
|
||||
indexPathLabel.setFont(indexPathLabel.getFont().deriveFont(indexPathLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexPathLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexPathLabel.text")); // NOI18N
|
||||
|
||||
indexLabel.setFont(indexLabel.getFont().deriveFont(indexLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexLabel.text")); // NOI18N
|
||||
|
||||
hashDbIndexStatusLabel.setFont(hashDbIndexStatusLabel.getFont().deriveFont(hashDbIndexStatusLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashDbIndexStatusLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbIndexStatusLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout informationPanelLayout = new javax.swing.GroupLayout(informationPanel);
|
||||
informationPanel.setLayout(informationPanelLayout);
|
||||
informationPanelLayout.setHorizontalGroup(
|
||||
informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(locationLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashDbLocationLabel))
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(nameLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashDbNameLabel))
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(typeLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashDbTypeLabel))
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(versionLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashDbVersionLabel))
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(orgLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashDbOrgLabel))
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(readOnlyLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashDbReadOnlyLabel))
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(indexLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(hashDbIndexStatusLabel))
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addComponent(indexPathLabelLabel)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(indexPathLabel)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
informationPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {indexLabel, indexPathLabelLabel, locationLabel, nameLabel, orgLabel, readOnlyLabel, typeLabel, versionLabel});
|
||||
|
||||
informationPanelLayout.setVerticalGroup(
|
||||
informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(informationPanelLayout.createSequentialGroup()
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(nameLabel)
|
||||
.addComponent(hashDbNameLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(typeLabel)
|
||||
.addComponent(hashDbTypeLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(locationLabel)
|
||||
.addComponent(hashDbLocationLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(versionLabel)
|
||||
.addComponent(hashDbVersionLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(orgLabel)
|
||||
.addComponent(hashDbOrgLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(readOnlyLabel)
|
||||
.addComponent(hashDbReadOnlyLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(indexPathLabelLabel)
|
||||
.addComponent(indexPathLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(informationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(indexLabel)
|
||||
.addComponent(hashDbIndexStatusLabel))
|
||||
.addGap(0, 49, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
informationScrollPanel.setViewportView(informationPanel);
|
||||
|
||||
indexButton.setFont(indexButton.getFont().deriveFont(indexButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(indexButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexButton.text")); // NOI18N
|
||||
indexButton.setEnabled(false);
|
||||
indexButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
indexButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
addHashesToDatabaseButton.setFont(addHashesToDatabaseButton.getFont().deriveFont(addHashesToDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(addHashesToDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.addHashesToDatabaseButton.text")); // NOI18N
|
||||
addHashesToDatabaseButton.setEnabled(false);
|
||||
addHashesToDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
addHashesToDatabaseButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
sendIngestMessagesCheckBox.setFont(sendIngestMessagesCheckBox.getFont().deriveFont(sendIngestMessagesCheckBox.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(sendIngestMessagesCheckBox, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.sendIngestMessagesCheckBox.text")); // NOI18N
|
||||
sendIngestMessagesCheckBox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
sendIngestMessagesCheckBoxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
ingestWarningLabel.setFont(ingestWarningLabel.getFont().deriveFont(ingestWarningLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
ingestWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/warning16.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(ingestWarningLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.ingestWarningLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
@@ -780,57 +849,23 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(informationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addGap(356, 356, 356))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(informationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(309, 309, 309))
|
||||
.addComponent(indexButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(addHashesToDatabaseButton)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(informationScrollPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 420, Short.MAX_VALUE)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(indexLabel)
|
||||
.addComponent(indexPathLabelLabel))
|
||||
.addGap(55, 55, 55)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(hashDbIndexStatusLabel)
|
||||
.addComponent(indexPathLabel)))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(indexButton)
|
||||
.addGap(10, 10, 10)
|
||||
.addComponent(addHashesToDatabaseButton))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(locationLabel)
|
||||
.addComponent(typeLabel)
|
||||
.addComponent(versionLabel)
|
||||
.addComponent(orgLabel)
|
||||
.addComponent(readOnlyLabel)
|
||||
.addComponent(nameLabel))
|
||||
.addGap(55, 55, 55)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(hashDbNameLabel)
|
||||
.addComponent(hashDbTypeLabel)
|
||||
.addComponent(hashDbLocationLabel)
|
||||
.addComponent(hashDbVersionLabel)
|
||||
.addComponent(hashDbOrgLabel)
|
||||
.addComponent(hashDbReadOnlyLabel)))))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGap(70, 70, 70)
|
||||
.addComponent(informationSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 305, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(optionsLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(optionsSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGap(25, 25, 25)
|
||||
.addComponent(sendIngestMessagesCheckBox))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addComponent(ingestWarningLabel))))
|
||||
.addContainerGap(24, Short.MAX_VALUE))))
|
||||
.addComponent(sendIngestMessagesCheckBox)
|
||||
.addComponent(ingestWarningLabel))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())))
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(hashDatabasesLabel)
|
||||
@@ -842,9 +877,6 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
.addComponent(deleteDatabaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(0, 0, Short.MAX_VALUE))))
|
||||
);
|
||||
|
||||
jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {indexLabel, indexPathLabelLabel, locationLabel, nameLabel, orgLabel, readOnlyLabel, typeLabel, versionLabel});
|
||||
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
@@ -853,51 +885,13 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(informationLabel)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGap(7, 7, 7)
|
||||
.addComponent(informationSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 3, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(7, 7, 7)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(nameLabel)
|
||||
.addComponent(hashDbNameLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(typeLabel)
|
||||
.addComponent(hashDbTypeLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(locationLabel)
|
||||
.addComponent(hashDbLocationLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(versionLabel)
|
||||
.addComponent(hashDbVersionLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(orgLabel)
|
||||
.addComponent(hashDbOrgLabel))
|
||||
.addGap(7, 7, 7)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(readOnlyLabel)
|
||||
.addComponent(hashDbReadOnlyLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(indexPathLabelLabel)
|
||||
.addComponent(indexPathLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(indexLabel)
|
||||
.addComponent(hashDbIndexStatusLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(informationLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(informationScrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(indexButton)
|
||||
.addComponent(addHashesToDatabaseButton))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(optionsLabel)
|
||||
.addComponent(optionsSeparator, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(sendIngestMessagesCheckBox)
|
||||
.addGap(18, 18, 18)
|
||||
@@ -918,9 +912,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(jScrollPane2)
|
||||
.addContainerGap())
|
||||
.addComponent(jScrollPane2)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -1059,7 +1051,8 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
private javax.swing.JLabel indexPathLabel;
|
||||
private javax.swing.JLabel indexPathLabelLabel;
|
||||
private javax.swing.JLabel informationLabel;
|
||||
private javax.swing.JSeparator informationSeparator;
|
||||
private javax.swing.JPanel informationPanel;
|
||||
private javax.swing.JScrollPane informationScrollPanel;
|
||||
private javax.swing.JLabel ingestWarningLabel;
|
||||
private javax.swing.JButton jButton3;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
@@ -1070,8 +1063,6 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JLabel locationLabel;
|
||||
private javax.swing.JLabel nameLabel;
|
||||
private javax.swing.JLabel optionsLabel;
|
||||
private javax.swing.JSeparator optionsSeparator;
|
||||
private javax.swing.JLabel orgLabel;
|
||||
private javax.swing.JLabel readOnlyLabel;
|
||||
private javax.swing.JCheckBox sendIngestMessagesCheckBox;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
OtherCasesSearchDialog.searchButton.AccessibleContext.accessibleDescription=
|
||||
OtherCasesSearchDialog.searchButton.AccessibleContext.accessibleName=Search
|
||||
OtherCasesSearchDialog.searchButton.text=Search
|
||||
OtherCasesSearchDialog.correlationValueTextField.text=
|
||||
OtherCasesSearchDialog.correlationValueLabel.text=Correlation Property Value:
|
||||
OtherCasesSearchDialog.descriptionLabel.text=<html>Search the Central Repository for correlation properties with a specified value. The search is case insensitive.</html>
|
||||
OtherCasesSearchDialog.errorLabel.text=\
|
||||
OtherCasesSearchDialog.correlationTypeLabel.text=Correlation Property Type:
|
||||
OtherCasesSearchDialog.casesLabel.text=\
|
||||
@@ -32,16 +32,16 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
* Extracts text from artifacts by concatenating the values of all of the
|
||||
* artifact's attributes.
|
||||
*/
|
||||
class ArtifactTextExtractor extends TextExtractor {
|
||||
class ArtifactTextExtractor implements TextExtractor {
|
||||
|
||||
private final BlackboardArtifact artifact;
|
||||
|
||||
public ArtifactTextExtractor(Content artifact) {
|
||||
this.artifact = (BlackboardArtifact) artifact;
|
||||
public ArtifactTextExtractor(BlackboardArtifact artifact) {
|
||||
this.artifact = artifact;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Reader getReader() throws ExtractionException {
|
||||
public Reader getReader() throws InitReaderException {
|
||||
// Concatenate the string values of all attributes into a single
|
||||
// "content" string to be indexed.
|
||||
StringBuilder artifactContents = new StringBuilder();
|
||||
@@ -50,10 +50,10 @@ class ArtifactTextExtractor extends TextExtractor {
|
||||
try {
|
||||
dataSource = artifact.getDataSource();
|
||||
} catch (TskCoreException tskCoreException) {
|
||||
throw new ExtractionException("Unable to get datasource for artifact: " + artifact.toString(), tskCoreException);
|
||||
throw new InitReaderException("Unable to get datasource for artifact: " + artifact.toString(), tskCoreException);
|
||||
}
|
||||
if (dataSource == null) {
|
||||
throw new ExtractionException("Datasource was null for artifact: " + artifact.toString());
|
||||
throw new InitReaderException("Datasource was null for artifact: " + artifact.toString());
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -75,7 +75,7 @@ class ArtifactTextExtractor extends TextExtractor {
|
||||
artifactContents.append(System.lineSeparator());
|
||||
}
|
||||
} catch (TskCoreException tskCoreException) {
|
||||
throw new ExtractionException("Unable to get attributes for artifact: " + artifact.toString(), tskCoreException);
|
||||
throw new InitReaderException("Unable to get attributes for artifact: " + artifact.toString(), tskCoreException);
|
||||
}
|
||||
|
||||
return new InputStreamReader(IOUtils.toInputStream(artifactContents,
|
||||
@@ -83,7 +83,7 @@ class ArtifactTextExtractor extends TextExtractor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported(Content file, String detectedFormat) {
|
||||
public boolean isSupported() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,17 +32,17 @@ import net.htmlparser.jericho.Source;
|
||||
import net.htmlparser.jericho.StartTag;
|
||||
import net.htmlparser.jericho.StartTagType;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
|
||||
/**
|
||||
* Extracts text from HTML content.
|
||||
*/
|
||||
final class HtmlTextExtractor extends TextExtractor {
|
||||
final class HtmlTextExtractor implements TextExtractor {
|
||||
|
||||
static final private Logger logger = Logger.getLogger(HtmlTextExtractor.class.getName());
|
||||
private final int MAX_SIZE;
|
||||
private final Content file;
|
||||
private final AbstractFile file;
|
||||
|
||||
static final List<String> WEB_MIME_TYPES = Arrays.asList(
|
||||
"application/javascript", //NON-NLS
|
||||
@@ -62,7 +62,7 @@ final class HtmlTextExtractor extends TextExtractor {
|
||||
* Creates a default instance of the HtmlTextExtractor. Supported file size
|
||||
* is 50MB.
|
||||
*/
|
||||
public HtmlTextExtractor(Content file) {
|
||||
public HtmlTextExtractor(AbstractFile file) {
|
||||
//Set default to be 50 MB.
|
||||
MAX_SIZE = 50_000_000;
|
||||
this.file = file;
|
||||
@@ -77,10 +77,10 @@ final class HtmlTextExtractor extends TextExtractor {
|
||||
* @return flag indicating support
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported(Content content, String detectedFormat) {
|
||||
return detectedFormat != null
|
||||
&& WEB_MIME_TYPES.contains(detectedFormat)
|
||||
&& content.getSize() <= MAX_SIZE;
|
||||
public boolean isSupported() {
|
||||
return file.getMIMEType() != null
|
||||
&& WEB_MIME_TYPES.contains(file.getMIMEType())
|
||||
&& file.getSize() <= MAX_SIZE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,7 +93,7 @@ final class HtmlTextExtractor extends TextExtractor {
|
||||
* @throws TextExtractorException
|
||||
*/
|
||||
@Override
|
||||
public Reader getReader() throws ExtractionException {
|
||||
public Reader getReader() throws InitReaderException {
|
||||
//TODO JIRA-4467, there is only harm in excluding HTML documents greater
|
||||
//than 50MB due to our troubled approach of extraction.
|
||||
ReadContentInputStream stream = new ReadContentInputStream(file);
|
||||
@@ -190,7 +190,7 @@ final class HtmlTextExtractor extends TextExtractor {
|
||||
return new StringReader(stringBuilder.toString());
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Error extracting HTML from content.", ex);
|
||||
throw new ExtractionException("Error extracting HTML from content.", ex);
|
||||
throw new InitReaderException("Error extracting HTML from content.", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.sleuthkit.autopsy.coreutils.SQLiteTableReaderException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.SQLiteTableReader;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
* Extracts text from SQLite database files.
|
||||
@@ -39,14 +38,14 @@ import org.sleuthkit.datamodel.Content;
|
||||
* 2) Tables that contain spaces in their name are not extracted
|
||||
* 3) Table names are not included in its output text
|
||||
*/
|
||||
final class SqliteTextExtractor extends TextExtractor {
|
||||
final class SqliteTextExtractor implements TextExtractor {
|
||||
|
||||
private static final String SQLITE_MIMETYPE = "application/x-sqlite3";
|
||||
private static final Logger logger = Logger.getLogger(SqliteTextExtractor.class.getName());
|
||||
private final AbstractFile file;
|
||||
|
||||
public SqliteTextExtractor(Content file) {
|
||||
this.file = (AbstractFile) file;
|
||||
public SqliteTextExtractor(AbstractFile file) {
|
||||
this.file = file;
|
||||
}
|
||||
/**
|
||||
* Supports only the sqlite mimetypes
|
||||
@@ -57,8 +56,8 @@ final class SqliteTextExtractor extends TextExtractor {
|
||||
* @return true if x-sqlite3
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported(Content file, String detectedFormat) {
|
||||
return SQLITE_MIMETYPE.equals(detectedFormat);
|
||||
public boolean isSupported() {
|
||||
return SQLITE_MIMETYPE.equals(file.getMIMEType());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,7 +70,7 @@ final class SqliteTextExtractor extends TextExtractor {
|
||||
* @throws TextExtractorException
|
||||
*/
|
||||
@Override
|
||||
public Reader getReader() throws ExtractionException {
|
||||
public Reader getReader() throws InitReaderException {
|
||||
return new SQLiteStreamReader(file);
|
||||
}
|
||||
|
||||
@@ -105,8 +104,8 @@ final class SqliteTextExtractor extends TextExtractor {
|
||||
public SQLiteStreamReader(AbstractFile file) {
|
||||
this.file = file;
|
||||
reader = new SQLiteTableReader.Builder(file)
|
||||
.onColumnNames(getColumnNameStrategy())
|
||||
.forAll(getForAllTableValuesStrategy()).build();
|
||||
.forAllColumnNames(getColumnNameStrategy())
|
||||
.forAllTableValues(getForAllTableValuesStrategy()).build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.Objects;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.coreutils.StringExtract;
|
||||
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT;
|
||||
import org.sleuthkit.autopsy.textextractors.extractionconfigs.DefaultExtractionConfig;
|
||||
import org.sleuthkit.autopsy.textextractors.configs.StringsConfig;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskException;
|
||||
@@ -36,7 +36,7 @@ import org.sleuthkit.datamodel.TskException;
|
||||
/**
|
||||
* Extracts raw strings from content.
|
||||
*/
|
||||
final class StringsTextExtractor extends TextExtractor {
|
||||
final class StringsTextExtractor implements TextExtractor {
|
||||
|
||||
private boolean extractUTF8;
|
||||
private boolean extractUTF16;
|
||||
@@ -78,8 +78,6 @@ final class StringsTextExtractor extends TextExtractor {
|
||||
*
|
||||
* @return A reader instance that content text can be obtained from
|
||||
*
|
||||
* @throws
|
||||
* org.sleuthkit.autopsy.textextractors.TextExtractor.TextExtractorException
|
||||
*/
|
||||
@Override
|
||||
public InputStreamReader getReader() {
|
||||
@@ -100,15 +98,15 @@ final class StringsTextExtractor extends TextExtractor {
|
||||
* Determines how the extraction process will proceed given the settings
|
||||
* stored in this context instance.
|
||||
*
|
||||
* See the DefaultExtractionConfig class in the extractionconfigs package
|
||||
* for available settings.
|
||||
* See the StringsConfig class in the extractionconfigs package for
|
||||
* available settings.
|
||||
*
|
||||
* @param context Lookup instance containing config classes
|
||||
*/
|
||||
@Override
|
||||
public void setExtractionSettings(Lookup context) {
|
||||
if (context != null) {
|
||||
DefaultExtractionConfig configInstance = context.lookup(DefaultExtractionConfig.class);
|
||||
StringsConfig configInstance = context.lookup(StringsConfig.class);
|
||||
if (configInstance == null) {
|
||||
return;
|
||||
}
|
||||
@@ -118,8 +116,8 @@ final class StringsTextExtractor extends TextExtractor {
|
||||
if (Objects.nonNull(configInstance.getExtractUTF16())) {
|
||||
extractUTF16 = configInstance.getExtractUTF16();
|
||||
}
|
||||
if (Objects.nonNull(configInstance.getExtractScripts())) {
|
||||
setScripts(configInstance.getExtractScripts());
|
||||
if (Objects.nonNull(configInstance.getLanguageScripts())) {
|
||||
setScripts(configInstance.getLanguageScripts());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,15 +127,10 @@ final class StringsTextExtractor extends TextExtractor {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
public boolean isSupported() {
|
||||
return extractUTF8 || extractUTF16;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isSupported(Content file, String detectedFormat) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
/**
|
||||
* Content input string stream reader/converter - given Content, extract
|
||||
* strings from it and return encoded bytes via read()
|
||||
|
||||
@@ -20,55 +20,37 @@ package org.sleuthkit.autopsy.textextractors;
|
||||
|
||||
import java.io.Reader;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
* Extracts the text out of {@link org.sleuthkit.datamodel.Content} instances
|
||||
* and exposes them as a {@link java.io.Reader}. Concrete implementations can be
|
||||
* obtained from
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory#getExtractor(org.sleuthkit.datamodel.Content)}
|
||||
* or
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory#getExtractor(org.sleuthkit.datamodel.Content, org.openide.util.Lookup)}.
|
||||
*
|
||||
* @see org.sleuthkit.autopsy.textextractors.TextExtractorFactory
|
||||
* Extracts the text out of Content instances and exposes them as a Reader.
|
||||
* Concrete implementations can be obtained from
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory}
|
||||
*/
|
||||
public abstract class TextExtractor {
|
||||
public interface TextExtractor {
|
||||
|
||||
/**
|
||||
* Determines if the file content is supported by the extractor.
|
||||
*
|
||||
* @param file to test if its content should be supported
|
||||
* @param detectedFormat mime-type with detected format (such as text/plain)
|
||||
* or null if not detected
|
||||
*
|
||||
* @return true if the file content is supported, false otherwise
|
||||
*/
|
||||
abstract boolean isSupported(Content file, String detectedFormat);
|
||||
|
||||
/**
|
||||
* Determines if the TextExtractor instance is enabled to read content.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a {@link java.io.Reader} that will iterate over the text extracted
|
||||
* from the {@link org.sleuthkit.datamodel.Content} passed into
|
||||
* Determines if this extractor supports the given Content and
|
||||
* configurations passed into it in
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory}.
|
||||
*
|
||||
* @return {@link java.io.Reader} that contains the text of the underlying
|
||||
* {@link org.sleuthkit.datamodel.Content}
|
||||
* @return true if content is supported, false otherwise
|
||||
*/
|
||||
boolean isSupported();
|
||||
|
||||
/**
|
||||
* Get a Reader that will iterate over the text extracted from the Content
|
||||
* passed into
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory}.
|
||||
*
|
||||
* @return Reader that contains the text of the underlying Content
|
||||
*
|
||||
* @throws
|
||||
* org.sleuthkit.autopsy.textextractors.TextExtractor.ExtractionException
|
||||
* org.sleuthkit.autopsy.textextractors.TextExtractor.InitReaderException
|
||||
*
|
||||
* @see org.sleuthkit.autopsy.textextractors.TextExtractorFactory
|
||||
*
|
||||
*/
|
||||
public abstract Reader getReader() throws ExtractionException;
|
||||
Reader getReader() throws InitReaderException;
|
||||
|
||||
/**
|
||||
* Determines how the extraction process will proceed given the settings
|
||||
@@ -76,27 +58,24 @@ public abstract class TextExtractor {
|
||||
*
|
||||
* @param context Instance containing file config classes
|
||||
*/
|
||||
void setExtractionSettings(Lookup context) {
|
||||
default void setExtractionSettings(Lookup context) {
|
||||
//no-op by default
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception encountered during
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractor#getReader()}.
|
||||
* This indicates that there was an internal parsing error that occurred
|
||||
* during the reading of Content text.
|
||||
* System level exception for reader initialization.
|
||||
*/
|
||||
public class ExtractionException extends Exception {
|
||||
public class InitReaderException extends Exception {
|
||||
|
||||
public ExtractionException(String msg, Throwable ex) {
|
||||
public InitReaderException(String msg, Throwable ex) {
|
||||
super(msg, ex);
|
||||
}
|
||||
|
||||
public ExtractionException(Throwable ex) {
|
||||
public InitReaderException(Throwable ex) {
|
||||
super(ex);
|
||||
}
|
||||
|
||||
public ExtractionException(String msg) {
|
||||
public InitReaderException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,52 +27,37 @@ import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.Report;
|
||||
|
||||
/**
|
||||
* Factory for creating
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractor}'s given a
|
||||
* {@link org.sleuthkit.datamodel.Content} instance
|
||||
* Factory for creating TextExtractors given a Content instance
|
||||
*
|
||||
* See {@link org.sleuthkit.autopsy.textextractors.extractionconfigs} for
|
||||
* available {@link org.sleuthkit.autopsy.textextractors.TextExtractor}
|
||||
* configuration options.
|
||||
* See {@link org.sleuthkit.autopsy.textextractors.textextractorconfigs} for
|
||||
* available extractor configuration options.
|
||||
*
|
||||
* @see org.openide.util.Lookup
|
||||
*/
|
||||
public class TextExtractorFactory {
|
||||
|
||||
/**
|
||||
* Auto detects the correct
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractor} given the
|
||||
* {@link org.sleuthkit.datamodel.Content}.
|
||||
* Returns a TextExtractor containing the Content text. Configuration files
|
||||
* can be added to the Lookup.
|
||||
*
|
||||
* See {@link org.sleuthkit.autopsy.textextractors.extractionconfigs} for
|
||||
* available {@link org.sleuthkit.autopsy.textextractors.TextExtractor}
|
||||
* configuration options.
|
||||
* See {@link org.sleuthkit.autopsy.textextractors.textextractorconfigs} for
|
||||
* available extractor configuration options.
|
||||
*
|
||||
* @param content Content source that will be read from
|
||||
* @param context Contains extraction configurations for certain file types
|
||||
*
|
||||
* @return A TextExtractor that supports the given content. File text can be
|
||||
* obtained from
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractor#getReader()}.
|
||||
* @return TextExtractor containing file text
|
||||
*
|
||||
* @throws NoTextExtractorFound Encountered when there is no TextExtractor
|
||||
* was found for the given content type. Use {@link
|
||||
* TextExtractorFactory#getDefaultExtractor(org.sleuthkit.datamodel.Content,
|
||||
* org.openide.util.Lookup)}
|
||||
* @throws NoTextExtractorFound Encountered when there is no Reader found
|
||||
* for the given content type or there was an
|
||||
* error while creating the reader.
|
||||
*
|
||||
* @see org.openide.util.Lookup
|
||||
*/
|
||||
public static TextExtractor getExtractor(Content content,
|
||||
Lookup context) throws NoTextExtractorFound {
|
||||
public static TextExtractor getExtractor(Content content, Lookup context) throws NoTextExtractorFound {
|
||||
if (content instanceof AbstractFile) {
|
||||
String mimeType = ((AbstractFile) content).getMIMEType();
|
||||
List<TextExtractor> extractors = Arrays.asList(
|
||||
new HtmlTextExtractor(content),
|
||||
new SqliteTextExtractor(content),
|
||||
new TikaTextExtractor(content));
|
||||
for (TextExtractor extractor : extractors) {
|
||||
extractor.setExtractionSettings(context);
|
||||
if (extractor.isEnabled() && extractor.isSupported(content, mimeType)) {
|
||||
for (TextExtractor extractor : getFileExtractors((AbstractFile) content, context)) {
|
||||
if (extractor.isSupported()) {
|
||||
return extractor;
|
||||
}
|
||||
}
|
||||
@@ -87,49 +72,69 @@ public class TextExtractorFactory {
|
||||
}
|
||||
|
||||
throw new NoTextExtractorFound(
|
||||
String.format("Could not find a suitable extractor for "
|
||||
+ "content with name [%s] and id=[%d]. Try using the default, "
|
||||
+ "non content specific extractor as an alternative.",
|
||||
String.format("Could not find a suitable reader for "
|
||||
+ "content with name [%s] and id=[%d]. Try using "
|
||||
+ "the strings extractor instead.",
|
||||
content.getName(), content.getId())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto detects the correct
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractor} given the
|
||||
* {@link org.sleuthkit.datamodel.Content}.
|
||||
* Initializes, orders, and returns all file extractors that can read
|
||||
* AbstractFile instances.
|
||||
*
|
||||
* @param content Content instance that will be read from
|
||||
* @param content AbstractFile content
|
||||
* @param context Lookup containing extractor configurations
|
||||
*
|
||||
* @return A TextExtractor that supports the given content. File text can be
|
||||
* obtained from {@link TextExtractor#getReader()}.
|
||||
*
|
||||
* @throws NoTextExtractorFound Encountered when there is no TextExtractor
|
||||
* was found for the given content type. Use {@link
|
||||
* TextExtractorFactory#getDefaultExtractor(org.sleuthkit.datamodel.Content,
|
||||
* org.openide.util.Lookup)}
|
||||
* @return
|
||||
*/
|
||||
public static TextExtractor getExtractor(Content content)
|
||||
throws NoTextExtractorFound {
|
||||
return getExtractor(content, null);
|
||||
private static List<TextExtractor> getFileExtractors(AbstractFile content, Lookup context) {
|
||||
List<TextExtractor> fileExtractors = Arrays.asList(
|
||||
new HtmlTextExtractor(content),
|
||||
new SqliteTextExtractor(content),
|
||||
new TikaTextExtractor(content));
|
||||
|
||||
fileExtractors.forEach((fileExtractor) -> {
|
||||
fileExtractor.setExtractionSettings(context);
|
||||
});
|
||||
|
||||
return fileExtractors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default extractor that can be run on any content type. This
|
||||
* extractor should be used as a backup in the event that no extractor was
|
||||
* found using or {@link TextExtractorFactory#getDefaultExtractor(org.sleuthkit.datamodel.Content, org.openide.util.Lookup)}
|
||||
* {@link TextExtractorFactory#getExtractor(org.sleuthkit.datamodel.Content)}.
|
||||
* Returns a TextExtractor containing the Content text.
|
||||
*
|
||||
* @param content Content instance that will be read from
|
||||
*
|
||||
* @return TextExtractor containing file text
|
||||
*
|
||||
* @throws NoTextExtractorFound Encountered when there is no Reader was
|
||||
* found for the given content type. Use
|
||||
* getStringsExtractor(Content,Lookup) method
|
||||
* instead.
|
||||
*/
|
||||
public static TextExtractor getExtractor(Content content) throws NoTextExtractorFound {
|
||||
return TextExtractorFactory.getExtractor(content, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a TextExtractor containing the Content strings. This method
|
||||
* supports all content types. This method should be used as a backup in the
|
||||
* event that no reader was found using getExtractor(Content) or
|
||||
* getExtractor(Content, Lookup).
|
||||
*
|
||||
* Configure this extractor with the StringsConfig in
|
||||
* {@link org.sleuthkit.autopsy.textextractors.textextractorconfigs}
|
||||
*
|
||||
* @param content Content source to read from
|
||||
* @param context Contains extraction configurations for certain file types
|
||||
*
|
||||
* @return A DefaultExtractor instance. File text can be obtained from
|
||||
* {@link TextExtractor#getReader()}.
|
||||
* @return TextExtractor containing file text
|
||||
*
|
||||
* @see org.openide.util.Lookup
|
||||
*/
|
||||
public static TextExtractor getDefaultExtractor(Content content, Lookup context) {
|
||||
TextExtractor stringsInstance = new StringsTextExtractor(content);
|
||||
public static TextExtractor getStringsExtractor(Content content, Lookup context) {
|
||||
StringsTextExtractor stringsInstance = new StringsTextExtractor(content);
|
||||
stringsInstance.setExtractionSettings(context);
|
||||
return stringsInstance;
|
||||
}
|
||||
@@ -137,12 +142,6 @@ public class TextExtractorFactory {
|
||||
/**
|
||||
* System level exception for handling content types that have no specific
|
||||
* strategy defined for extracting their text.
|
||||
*
|
||||
* @see
|
||||
* org.sleuthkit.autopsy.textextractors.TextExtractorFactory#getExtractor(org.sleuthkit.datamodel.Content)
|
||||
* @see
|
||||
* org.sleuthkit.autopsy.textextractors.TextExtractorFactory#getDefaultExtractor(org.sleuthkit.datamodel.Content,
|
||||
* org.openide.util.Lookup)}
|
||||
*/
|
||||
public static class NoTextExtractorFound extends Exception {
|
||||
|
||||
@@ -153,5 +152,9 @@ public class TextExtractorFactory {
|
||||
public NoTextExtractorFound(Throwable ex) {
|
||||
super(ex);
|
||||
}
|
||||
|
||||
private NoTextExtractorFound(String msg, Throwable ex) {
|
||||
super(msg, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,18 +20,23 @@ package org.sleuthkit.autopsy.textextractors;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.io.CharSource;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.PushbackReader;
|
||||
import java.io.Reader;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.logging.Level;
|
||||
@@ -50,8 +55,15 @@ import org.apache.tika.parser.pdf.PDFParserConfig;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.modules.InstalledFileLocator;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.ExecUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.ExecUtil.ProcessTerminator;
|
||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.textextractors.extractionconfigs.ImageFileExtractionConfig;
|
||||
import org.sleuthkit.autopsy.textextractors.configs.ImageConfig;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
|
||||
@@ -59,7 +71,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
* Extracts text from Tika supported content. Protects against Tika parser hangs
|
||||
* (for unexpected/corrupt content) using a timeout mechanism.
|
||||
*/
|
||||
final class TikaTextExtractor extends TextExtractor {
|
||||
final class TikaTextExtractor implements TextExtractor {
|
||||
|
||||
//Mimetype groups to aassist extractor implementations in ignoring binary and
|
||||
//archive files.
|
||||
@@ -110,7 +122,9 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
|
||||
private static final java.util.logging.Logger tikaLogger = java.util.logging.Logger.getLogger("Tika"); //NON-NLS
|
||||
|
||||
private final ExecutorService tikaParseExecutor = Executors.newSingleThreadExecutor();
|
||||
private final ThreadFactory tikaThreadFactory
|
||||
= new ThreadFactoryBuilder().setNameFormat("tika-reader-%d").build();
|
||||
private final ExecutorService executorService = Executors.newSingleThreadExecutor(tikaThreadFactory);
|
||||
private static final String SQLITE_MIMETYPE = "application/x-sqlite3";
|
||||
|
||||
private final AutoDetectParser parser = new AutoDetectParser();
|
||||
@@ -121,6 +135,10 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
private static final String TESSERACT_EXECUTABLE = "tesseract.exe"; //NON-NLS
|
||||
private static final File TESSERACT_PATH = locateTesseractExecutable();
|
||||
private static final String LANGUAGE_PACKS = getLanguagePacks();
|
||||
private static final String TESSERACT_LANGUAGE_PACK_EXT = "traineddata"; //NON-NLS
|
||||
private static final String TESSERACT_OUTPUT_FILE_NAME = "tess_output"; //NON-NLS
|
||||
|
||||
private ProcessTerminator processTerminator;
|
||||
|
||||
private static final List<String> TIKA_SUPPORTED_TYPES
|
||||
= new Tika().getParser().getSupportedTypes(new ParseContext())
|
||||
@@ -132,6 +150,18 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* If Tesseract has been installed and is set to be used through
|
||||
* configuration, then ocr is enabled. OCR can only currently be run on
|
||||
* 64 bit Windows OS.
|
||||
*
|
||||
* @return Flag indicating if OCR is set to be used.
|
||||
*/
|
||||
private boolean ocrEnabled() {
|
||||
return TESSERACT_PATH != null && tesseractOCREnabled
|
||||
&& PlatformUtil.isWindowsOS() == true && PlatformUtil.is64BitOS();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reader that will iterate over the text extracted from Apache
|
||||
* Tika.
|
||||
@@ -144,13 +174,46 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
* org.sleuthkit.autopsy.textextractors.TextExtractor.TextExtractorException
|
||||
*/
|
||||
@Override
|
||||
public Reader getReader() throws ExtractionException {
|
||||
ReadContentInputStream stream = new ReadContentInputStream(content);
|
||||
public Reader getReader() throws InitReaderException {
|
||||
InputStream stream = null;
|
||||
|
||||
Metadata metadata = new Metadata();
|
||||
ParseContext parseContext = new ParseContext();
|
||||
parseContext.set(Parser.class, parser);
|
||||
|
||||
if (ocrEnabled() && content instanceof AbstractFile) {
|
||||
AbstractFile file = ((AbstractFile) content);
|
||||
//Run OCR on images with Tesseract directly.
|
||||
if (file.getMIMEType().toLowerCase().startsWith("image/")) {
|
||||
stream = performOCR(file);
|
||||
} else {
|
||||
//Otherwise, go through Tika for PDFs so that it can
|
||||
//extract images and run Tesseract on them.
|
||||
PDFParserConfig pdfConfig = new PDFParserConfig();
|
||||
|
||||
// Extracting the inline images and letting Tesseract run on each inline image.
|
||||
// https://wiki.apache.org/tika/PDFParser%20%28Apache%20PDFBox%29
|
||||
// https://tika.apache.org/1.7/api/org/apache/tika/parser/pdf/PDFParserConfig.html
|
||||
pdfConfig.setExtractInlineImages(true);
|
||||
// Multiple pages within a PDF file might refer to the same underlying image.
|
||||
pdfConfig.setExtractUniqueInlineImagesOnly(true);
|
||||
parseContext.set(PDFParserConfig.class, pdfConfig);
|
||||
|
||||
// Configure Tesseract parser to perform OCR
|
||||
TesseractOCRConfig ocrConfig = new TesseractOCRConfig();
|
||||
String tesseractFolder = TESSERACT_PATH.getParent();
|
||||
ocrConfig.setTesseractPath(tesseractFolder);
|
||||
|
||||
ocrConfig.setLanguage(LANGUAGE_PACKS);
|
||||
ocrConfig.setTessdataPath(PlatformUtil.getOcrLanguagePacksPath());
|
||||
parseContext.set(TesseractOCRConfig.class, ocrConfig);
|
||||
|
||||
stream = new ReadContentInputStream(content);
|
||||
}
|
||||
} else {
|
||||
stream = new ReadContentInputStream(content);
|
||||
}
|
||||
|
||||
Metadata metadata = new Metadata();
|
||||
// Use the more memory efficient Tika SAX parsers for DOCX and
|
||||
// PPTX files (it already uses SAX for XLSX).
|
||||
OfficeParserConfig officeParserConfig = new OfficeParserConfig();
|
||||
@@ -158,60 +221,163 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
officeParserConfig.setUseSAXDocxExtractor(true);
|
||||
parseContext.set(OfficeParserConfig.class, officeParserConfig);
|
||||
|
||||
// configure OCR if it is enabled in KWS settings and installed on the machine
|
||||
if (TESSERACT_PATH != null && tesseractOCREnabled && PlatformUtil.isWindowsOS() == true) {
|
||||
|
||||
// configure PDFParser.
|
||||
PDFParserConfig pdfConfig = new PDFParserConfig();
|
||||
|
||||
// Extracting the inline images and letting Tesseract run on each inline image.
|
||||
// https://wiki.apache.org/tika/PDFParser%20%28Apache%20PDFBox%29
|
||||
// https://tika.apache.org/1.7/api/org/apache/tika/parser/pdf/PDFParserConfig.html
|
||||
pdfConfig.setExtractInlineImages(true);
|
||||
// Multiple pages within a PDF file might refer to the same underlying image.
|
||||
pdfConfig.setExtractUniqueInlineImagesOnly(true);
|
||||
parseContext.set(PDFParserConfig.class, pdfConfig);
|
||||
|
||||
// Configure Tesseract parser to perform OCR
|
||||
TesseractOCRConfig ocrConfig = new TesseractOCRConfig();
|
||||
String tesseractFolder = TESSERACT_PATH.getParent();
|
||||
ocrConfig.setTesseractPath(tesseractFolder);
|
||||
// Tesseract expects language data packs to be in a subdirectory of tesseractFolder, in a folder called "tessdata".
|
||||
// If they are stored somewhere else, use ocrConfig.setTessdataPath(String tessdataPath) to point to them
|
||||
ocrConfig.setLanguage(LANGUAGE_PACKS);
|
||||
parseContext.set(TesseractOCRConfig.class, ocrConfig);
|
||||
}
|
||||
|
||||
//Parse the file in a task, a convenient way to have a timeout...
|
||||
final Future<Reader> future = tikaParseExecutor.submit(() -> new ParsingReader(parser, stream, metadata, parseContext));
|
||||
//Make the creation of a TikaReader a cancellable future in case it takes too long
|
||||
Future<Reader> future = executorService.submit(
|
||||
new GetTikaReader(parser, stream, metadata, parseContext));
|
||||
try {
|
||||
final Reader tikaReader = future.get(getTimeout(content.getSize()), TimeUnit.SECONDS);
|
||||
|
||||
//check if the reader is empty
|
||||
PushbackReader pushbackReader = new PushbackReader(tikaReader);
|
||||
int read = pushbackReader.read();
|
||||
if (read == -1) {
|
||||
throw new ExtractionException("Unable to extract text: Tika returned empty reader for " + content);
|
||||
throw new InitReaderException("Unable to extract text: "
|
||||
+ "Tika returned empty reader for " + content);
|
||||
}
|
||||
pushbackReader.unread(read);
|
||||
|
||||
//concatenate parsed content and meta data into a single reader.
|
||||
CharSource metaDataCharSource = getMetaDataCharSource(metadata);
|
||||
return CharSource.concat(new ReaderCharSource(pushbackReader), metaDataCharSource).openStream();
|
||||
} catch (TimeoutException te) {
|
||||
final String msg = NbBundle.getMessage(this.getClass(), "AbstractFileTikaTextExtract.index.tikaParseTimeout.text", content.getId(), content.getName());
|
||||
throw new ExtractionException(msg, te);
|
||||
} catch (ExtractionException ex) {
|
||||
final String msg = NbBundle.getMessage(this.getClass(),
|
||||
"AbstractFileTikaTextExtract.index.tikaParseTimeout.text",
|
||||
content.getId(), content.getName());
|
||||
throw new InitReaderException(msg, te);
|
||||
} catch (InitReaderException ex) {
|
||||
throw ex;
|
||||
} catch (Exception ex) {
|
||||
tikaLogger.log(Level.WARNING, "Exception: Unable to Tika parse the content" + content.getId() + ": " + content.getName(), ex.getCause()); //NON-NLS
|
||||
final String msg = NbBundle.getMessage(this.getClass(), "AbstractFileTikaTextExtract.index.exception.tikaParse.msg", content.getId(), content.getName());
|
||||
throw new ExtractionException(msg, ex);
|
||||
tikaLogger.log(Level.WARNING, "Exception: Unable to Tika parse the "
|
||||
+ "content" + content.getId() + ": " + content.getName(),
|
||||
ex.getCause()); //NON-NLS
|
||||
final String msg = NbBundle.getMessage(this.getClass(),
|
||||
"AbstractFileTikaTextExtract.index.exception.tikaParse.msg",
|
||||
content.getId(), content.getName());
|
||||
throw new InitReaderException(msg, ex);
|
||||
} finally {
|
||||
future.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run OCR and return the file stream produced by Tesseract.
|
||||
*
|
||||
* @param file Image file to run OCR on
|
||||
*
|
||||
* @return InputStream connected to the output file that Tesseract produced.
|
||||
*
|
||||
* @throws
|
||||
* org.sleuthkit.autopsy.textextractors.TextExtractor.InitReaderException
|
||||
*/
|
||||
private InputStream performOCR(AbstractFile file) throws InitReaderException {
|
||||
File inputFile = null;
|
||||
File outputFile = null;
|
||||
try {
|
||||
String tempDirectory = Case.getCurrentCaseThrows().getTempDirectory();
|
||||
|
||||
//Appending file id makes the name unique
|
||||
String tempFileName = FileUtil.escapeFileName(file.getId() + file.getName());
|
||||
inputFile = Paths.get(tempDirectory, tempFileName).toFile();
|
||||
ContentUtils.writeToFile(content, inputFile);
|
||||
|
||||
String tempOutputName = FileUtil.escapeFileName(file.getId() + TESSERACT_OUTPUT_FILE_NAME);
|
||||
String outputFilePath = Paths.get(tempDirectory, tempOutputName).toString();
|
||||
String executeablePath = TESSERACT_PATH.toString();
|
||||
|
||||
//Build tesseract commands
|
||||
ProcessBuilder process = new ProcessBuilder();
|
||||
process.command(executeablePath,
|
||||
String.format("\"%s\"", inputFile.getAbsolutePath()),
|
||||
String.format("\"%s\"", outputFilePath),
|
||||
"--tessdata-dir", PlatformUtil.getOcrLanguagePacksPath(),
|
||||
//language pack command flag
|
||||
"-l", LANGUAGE_PACKS);
|
||||
|
||||
//If the ProcessTerminator was supplied during
|
||||
//configuration apply it here.
|
||||
if (processTerminator != null) {
|
||||
ExecUtil.execute(process, 1, TimeUnit.SECONDS, processTerminator);
|
||||
} else {
|
||||
ExecUtil.execute(process);
|
||||
}
|
||||
|
||||
outputFile = new File(outputFilePath + ".txt");
|
||||
//Open a stream of the Tesseract text file and send this to Tika
|
||||
return new CleanUpStream(outputFile);
|
||||
} catch (NoCurrentCaseException | IOException ex) {
|
||||
if (outputFile != null) {
|
||||
outputFile.delete();
|
||||
}
|
||||
throw new InitReaderException("Could not successfully run Tesseract", ex);
|
||||
} finally {
|
||||
if (inputFile != null) {
|
||||
inputFile.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the creation of a TikaReader into a Future so that it can be
|
||||
* cancelled.
|
||||
*/
|
||||
private class GetTikaReader implements Callable<Reader> {
|
||||
|
||||
private final AutoDetectParser parser;
|
||||
private final InputStream stream;
|
||||
private final Metadata metadata;
|
||||
private final ParseContext parseContext;
|
||||
|
||||
public GetTikaReader(AutoDetectParser parser, InputStream stream,
|
||||
Metadata metadata, ParseContext parseContext) {
|
||||
this.parser = parser;
|
||||
this.stream = stream;
|
||||
this.metadata = metadata;
|
||||
this.parseContext = parseContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Reader call() throws Exception {
|
||||
return new ParsingReader(parser, stream, metadata, parseContext);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Automatically deletes the underlying File when the close() method is
|
||||
* called. This is used to delete the Output file produced from Tesseract
|
||||
* once it has been read by Tika.
|
||||
*/
|
||||
private class CleanUpStream extends FileInputStream {
|
||||
|
||||
private File file;
|
||||
|
||||
/**
|
||||
* Store a reference to file on construction
|
||||
*
|
||||
* @param file
|
||||
*
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
public CleanUpStream(File file) throws FileNotFoundException {
|
||||
super(file);
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete this underlying file when close is called.
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
super.close();
|
||||
} finally {
|
||||
if (file != null) {
|
||||
file.delete();
|
||||
file = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and returns the path to the Tesseract executable, if able.
|
||||
*
|
||||
@@ -253,24 +419,27 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if Tika is supported for this content type and mimetype.
|
||||
*
|
||||
* @param content Source content to read
|
||||
* @param detectedFormat Mimetype of content
|
||||
* Determines if Tika is enabled for this content
|
||||
*
|
||||
* @return Flag indicating support for reading content type
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported(Content content, String detectedFormat) {
|
||||
if (detectedFormat == null
|
||||
|| BINARY_MIME_TYPES.contains(detectedFormat) //any binary unstructured blobs (string extraction will be used)
|
||||
|| ARCHIVE_MIME_TYPES.contains(detectedFormat)
|
||||
|| (detectedFormat.startsWith("video/") && !detectedFormat.equals("video/x-flv")) //skip video other than flv (tika supports flv only) //NON-NLS
|
||||
|| detectedFormat.equals(SQLITE_MIMETYPE) //Skip sqlite files, Tika cannot handle virtual tables and will fail with an exception. //NON-NLS
|
||||
public boolean isSupported() {
|
||||
if(!(content instanceof AbstractFile)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String detectedType = ((AbstractFile)content).getMIMEType();
|
||||
if (detectedType == null
|
||||
|| BINARY_MIME_TYPES.contains(detectedType) //any binary unstructured blobs (string extraction will be used)
|
||||
|| ARCHIVE_MIME_TYPES.contains(detectedType)
|
||||
|| (detectedType.startsWith("video/") && !detectedType.equals("video/x-flv")) //skip video other than flv (tika supports flv only) //NON-NLS
|
||||
|| detectedType.equals(SQLITE_MIMETYPE) //Skip sqlite files, Tika cannot handle virtual tables and will fail with an exception. //NON-NLS
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return TIKA_SUPPORTED_TYPES.contains(detectedFormat);
|
||||
|
||||
return TIKA_SUPPORTED_TYPES.contains(detectedType);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -280,26 +449,17 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
* @return String of all language packs available for Tesseract to use
|
||||
*/
|
||||
private static String getLanguagePacks() {
|
||||
File languagePackRootDir = new File(TESSERACT_PATH.getParent(), "tessdata");
|
||||
//Acceptable extensions for Tesseract-OCR version 3.05 language packs.
|
||||
//All extensions other than traineddata are associated with cube files that
|
||||
//have been made obsolete since version 4.0.
|
||||
List<String> acceptableExtensions = Arrays.asList("traineddata", "params",
|
||||
"lm", "fold", "bigrams", "nn", "word-freq", "size",
|
||||
"user-patterns", "user-words");
|
||||
//Pull out only unique languagePacks
|
||||
HashSet<String> languagePacks = new HashSet<>();
|
||||
if (languagePackRootDir.exists()) {
|
||||
for (File languagePack : languagePackRootDir.listFiles()) {
|
||||
if (languagePack.isDirectory() || !acceptableExtensions.contains(
|
||||
FilenameUtils.getExtension(languagePack.getName()))) {
|
||||
continue;
|
||||
}
|
||||
String threeLetterPackageName = languagePack.getName().substring(0, 3);
|
||||
//Ignore the eng language pack if accidentally added
|
||||
languagePacks.add(threeLetterPackageName);
|
||||
File languagePackRootDir = new File(PlatformUtil.getOcrLanguagePacksPath());
|
||||
|
||||
List<String> languagePacks = new ArrayList<>();
|
||||
for (File languagePack : languagePackRootDir.listFiles()) {
|
||||
String fileExt = FilenameUtils.getExtension(languagePack.getName());
|
||||
if (!languagePack.isDirectory() && TESSERACT_LANGUAGE_PACK_EXT.equals(fileExt)) {
|
||||
String packageName = FilenameUtils.getBaseName(languagePack.getName());
|
||||
languagePacks.add(packageName);
|
||||
}
|
||||
}
|
||||
|
||||
return String.join("+", languagePacks);
|
||||
}
|
||||
|
||||
@@ -330,21 +490,23 @@ final class TikaTextExtractor extends TextExtractor {
|
||||
* Determines how the extraction process will proceed given the settings
|
||||
* stored in this context instance.
|
||||
*
|
||||
* See the ImageFileExtractionConfig class in the extractionconfigs package
|
||||
* for available settings.
|
||||
* See the ImageConfig class in the extractionconfigs package for available
|
||||
* settings.
|
||||
*
|
||||
* @param context Instance containing config classes
|
||||
*/
|
||||
@Override
|
||||
public void setExtractionSettings(Lookup context) {
|
||||
if (context != null) {
|
||||
ImageFileExtractionConfig configInstance = context.lookup(ImageFileExtractionConfig.class);
|
||||
if (configInstance == null) {
|
||||
return;
|
||||
}
|
||||
if (Objects.nonNull(configInstance.getOCREnabled())) {
|
||||
ImageConfig configInstance = context.lookup(ImageConfig.class);
|
||||
if (configInstance != null && Objects.nonNull(configInstance.getOCREnabled())) {
|
||||
this.tesseractOCREnabled = configInstance.getOCREnabled();
|
||||
}
|
||||
|
||||
ProcessTerminator terminatorInstance = context.lookup(ProcessTerminator.class);
|
||||
if (terminatorInstance != null) {
|
||||
this.processTerminator = terminatorInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-10
@@ -16,25 +16,20 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.textextractors.extractionconfigs;
|
||||
package org.sleuthkit.autopsy.textextractors.configs;
|
||||
|
||||
/**
|
||||
* Allows for configuration of OCR on image files.
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractor}'s that use
|
||||
* ImageFileExtractionConfig can be obtained through
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory#getExtractor(org.sleuthkit.datamodel.Content)}
|
||||
* or
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory#getDefaultExtractor(org.sleuthkit.datamodel.Content, org.openide.util.Lookup)}.
|
||||
* Allows for configuration of OCR on image files. Extractors that use ImageConfig
|
||||
* can be obtained through TextExtractoryFactory.getExtractor().
|
||||
*
|
||||
* @see org.sleuthkit.autopsy.textextractors.TextExtractorFactory
|
||||
* @see org.openide.util.Lookup
|
||||
*/
|
||||
public class ImageFileExtractionConfig {
|
||||
public class ImageConfig {
|
||||
|
||||
private Boolean OCREnabled;
|
||||
|
||||
/**
|
||||
* Enables OCR to be run on the text extractor responsible for handling
|
||||
* Enables OCR to be run on the text reader responsible for handling
|
||||
* image files.
|
||||
*
|
||||
* @param enabled Flag indicating if OCR is enabled.
|
||||
+18
-19
@@ -16,33 +16,32 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.textextractors.extractionconfigs;
|
||||
package org.sleuthkit.autopsy.textextractors.configs;
|
||||
|
||||
import java.util.List;
|
||||
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT;
|
||||
|
||||
/**
|
||||
* Allows for configuration of the
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractor} obtained from
|
||||
* {@link org.sleuthkit.autopsy.textextractors.TextExtractorFactory#getDefaultExtractor(org.sleuthkit.datamodel.Content, org.openide.util.Lookup)}.
|
||||
* Allows for configuration of the TextExtractor obtained from
|
||||
* TextExtractorFactory.getStringsExtractor().
|
||||
*
|
||||
* The default extractor will read strings from the Content instance. This class
|
||||
* allows for the configuration of the encoding language script to use during
|
||||
* extraction.
|
||||
* The Strings extractor will extract strings from the Content instance. This
|
||||
* class allows for the configuration of the encoding and language scripts that
|
||||
* will be used.
|
||||
*
|
||||
* @see org.sleuthkit.autopsy.textextractors.TextExtractorFactory
|
||||
* @see
|
||||
* org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT
|
||||
* @see org.openide.util.Lookup
|
||||
*/
|
||||
public class DefaultExtractionConfig {
|
||||
public class StringsConfig {
|
||||
|
||||
private Boolean extractUTF8;
|
||||
private Boolean extractUTF16;
|
||||
private List<SCRIPT> extractScripts;
|
||||
private List<SCRIPT> languageScripts;
|
||||
|
||||
/**
|
||||
* Enables UTF-8 encoding to be used during extraction.
|
||||
* Enables UTF-8 encoding to be used during reading.
|
||||
*
|
||||
* @param enabled Flag indicating if UTF-8 should be turned on
|
||||
*/
|
||||
@@ -60,7 +59,7 @@ public class DefaultExtractionConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether extracting with UTF-8 encoding should be done.
|
||||
* Returns whether extraction with UTF-8 encoding should be done.
|
||||
*
|
||||
* @return Flag indicating if UTF-8 has been turned on/off
|
||||
*/
|
||||
@@ -69,7 +68,7 @@ public class DefaultExtractionConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether extracting with UTF-16 encoding should be done.
|
||||
* Return whether extraction with UTF-16 encoding should be done.
|
||||
*
|
||||
* @return Flag indicating if UTF-16 has been turned on/off
|
||||
*/
|
||||
@@ -78,23 +77,23 @@ public class DefaultExtractionConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type of extraction scripts that will be used during this
|
||||
* extraction. See
|
||||
* Sets the type of language scripts that will be used during extraction.
|
||||
* See
|
||||
* {@link org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT}
|
||||
* for more information about available scripts.
|
||||
*
|
||||
* @param scripts Desired set of scripts to be used during extraction
|
||||
*/
|
||||
public void setExtractScripts(List<SCRIPT> scripts) {
|
||||
this.extractScripts = scripts;
|
||||
public void setLanguageScripts(List<SCRIPT> scripts) {
|
||||
this.languageScripts = scripts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the desired set of scripts to be used during extraction.
|
||||
*
|
||||
* @return Set of extraction scripts to be used
|
||||
* @return Set of language scripts to be used
|
||||
*/
|
||||
public List<SCRIPT> getExtractScripts() {
|
||||
return this.extractScripts;
|
||||
public List<SCRIPT> getLanguageScripts() {
|
||||
return this.languageScripts;
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,7 @@ import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.autopsy.ingest.events.DataSourceAnalysisCompletedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||
import org.sleuthkit.autopsy.timeline.FilteredEventsModel;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
@@ -96,6 +97,7 @@ import org.sleuthkit.autopsy.timeline.ui.detailview.DetailViewPane;
|
||||
import org.sleuthkit.autopsy.timeline.ui.detailview.tree.EventsTree;
|
||||
import org.sleuthkit.autopsy.timeline.ui.listvew.ListViewPane;
|
||||
import org.sleuthkit.autopsy.timeline.utils.RangeDivision;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
@@ -515,8 +517,7 @@ final public class ViewFrame extends BorderPane {
|
||||
*/
|
||||
@Subscribe
|
||||
@NbBundle.Messages({
|
||||
"# {0} - datasource name",
|
||||
"ViewFrame.notification.analysisComplete=The event data has changed, the visualization may be out of date."})
|
||||
"ViewFrame.notification.cacheInvalidated=The event data has changed, the visualization may be out of date."})
|
||||
public void handleCacheInvalidated(FilteredEventsModel.CacheInvalidatedEvent event) {
|
||||
Platform.runLater(() -> {
|
||||
if (hostedView.needsRefresh() == false) {
|
||||
@@ -525,12 +526,12 @@ final public class ViewFrame extends BorderPane {
|
||||
case Paused:
|
||||
break;
|
||||
case Ready:
|
||||
notificationPane.show(Bundle.ViewFrame_notification_analysisComplete("x"));
|
||||
notificationPane.show(Bundle.ViewFrame_notification_cacheInvalidated());
|
||||
notificationState = NotificationState.Showing;
|
||||
notificationTimer.restart();
|
||||
break;
|
||||
case Showing:
|
||||
notificationPane.setText(Bundle.ViewFrame_notification_analysisComplete("x"));
|
||||
notificationPane.setText(Bundle.ViewFrame_notification_cacheInvalidated());
|
||||
notificationTimer.restart();
|
||||
break;
|
||||
}
|
||||
@@ -538,12 +539,6 @@ final public class ViewFrame extends BorderPane {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the given message in the notificationPane and then autohide it
|
||||
* after 30 seconds.
|
||||
*
|
||||
* @param message The message to display.
|
||||
*/
|
||||
/**
|
||||
* Refresh the Histogram to represent the current state of the DB.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ import org.sleuthkit.autopsy.commonfilesearch.CaseDBCommonAttributeInstanceNode;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CentralRepoCommonAttributeInstance;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CentralRepoCommonAttributeInstanceNode;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeCountSearchResults;
|
||||
import org.sleuthkit.autopsy.guiutils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.datamodel.utils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValue;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValueList;
|
||||
import org.sleuthkit.autopsy.datamodel.DisplayableItemNode;
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import org.sleuthkit.autopsy.casemodule.ImageDSProcessor;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.AbstractCommonAttributeInstance;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeCountSearchResults;
|
||||
import org.sleuthkit.autopsy.guiutils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.datamodel.utils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValue;
|
||||
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValueList;
|
||||
import org.sleuthkit.autopsy.coreutils.TimeStampUtils;
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseActionException;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseDetails;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||
|
||||
/**
|
||||
* Class with utility methods for opening and closing cases for functional
|
||||
@@ -52,13 +53,8 @@ public final class CaseUtils {
|
||||
*/
|
||||
Path caseDirectoryPath = Paths.get(System.getProperty("java.io.tmpdir"), caseName);
|
||||
File caseDirectory = caseDirectoryPath.toFile();
|
||||
if (caseDirectory.exists()) {
|
||||
try {
|
||||
FileUtils.deleteDirectory(caseDirectory);
|
||||
} catch (IOException ex) {
|
||||
Assert.fail(String.format("Failed to delete existing case %s at %s: %s", caseName, caseDirectoryPath, ex.getMessage()));
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
if(caseDirectory.exists() && !FileUtil.deleteDir(caseDirectory)){
|
||||
Assert.fail(String.format("Failed to delete existing case %s at %s", caseName, caseDirectoryPath));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -96,15 +92,8 @@ public final class CaseUtils {
|
||||
String caseDirectory = currentCase.getCaseDirectory();
|
||||
try {
|
||||
Case.closeCurrentCase();
|
||||
if (deleteCase) {
|
||||
/*
|
||||
* TODO (JIRA-4241): Restore the code to delete the case
|
||||
* directory when the Image Gallery tool cleans up its drawable
|
||||
* database connection deterministically, instead of in a
|
||||
* finalizer. As it is now, case deletion can fail due to an
|
||||
* open drawable database file handles.
|
||||
*/
|
||||
//FileUtils.deleteDirectory(caseDirectory);
|
||||
if(deleteCase && !FileUtil.deleteDir(new File(caseDirectory))){
|
||||
Assert.fail(String.format("Failed to delete case directory for case %s at %s", caseName, caseDirectory));
|
||||
}
|
||||
} catch (CaseActionException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
@@ -118,4 +107,4 @@ public final class CaseUtils {
|
||||
private CaseUtils() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user