Merge remote-tracking branch 'upstream/develop' into keywordDocs

This commit is contained in:
Ann Priestman 2017-03-31 16:26:45 -04:00
commit b7d8fc527d
7 changed files with 232 additions and 124 deletions

View File

@ -26,44 +26,58 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="diskLabel" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="errorLabel" min="-2" max="-2" attributes="0"/> <Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
<Component id="copyImageCheckbox" min="-2" max="-2" attributes="0"/>
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="pathTextField" min="-2" pref="342" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="browseButton" pref="92" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="imageWriterErrorLabel" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<Component id="changeDatabasePathCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="timeZoneLabel" min="-2" max="-2" attributes="0"/> <Component id="timeZoneLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="timeZoneComboBox" max="32767" attributes="0"/> <Component id="timeZoneComboBox" max="32767" attributes="0"/>
</Group> </Group>
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
<Component id="jScrollPane1" alignment="0" min="-2" pref="461" max="-2" attributes="0"/>
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
<Component id="copyImageCheckbox" min="-2" max="-2" attributes="0"/>
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="pathTextField" min="-2" pref="342" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="browseButton" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="imageWriterErrorLabel" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<Component id="changeDatabasePathCheckbox" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</Group> </Group>
</Group> </Group>
<Component id="jScrollPane1" alignment="1" pref="488" max="32767" attributes="0"/>
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Component id="refreshTablebutton" min="-2" pref="129" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="diskLabel" min="-2" max="-2" attributes="0"/>
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -73,14 +87,14 @@
<Component id="diskLabel" min="-2" max="-2" attributes="0"/> <Component id="diskLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="100" max="-2" attributes="0"/> <Component id="jScrollPane1" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="errorLabel" min="-2" max="-2" attributes="0"/> <Component id="refreshTablebutton" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="timeZoneLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="timeZoneLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="timeZoneComboBox" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="timeZoneComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/> <Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="descLabel" min="-2" max="-2" attributes="0"/> <Component id="descLabel" min="-2" max="-2" attributes="0"/>
@ -97,7 +111,9 @@
<Component id="jLabel1" min="-2" max="-2" attributes="0"/> <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="imageWriterErrorLabel" min="-2" max="-2" attributes="0"/> <Component id="imageWriterErrorLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="66" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="58" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -260,5 +276,15 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JButton" name="refreshTablebutton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalDiskPanel.refreshTablebutton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshTablebuttonActionPerformed"/>
</Events>
</Component>
</SubComponents> </SubComponents>
</Form> </Form>

View File

@ -42,6 +42,8 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.coreutils.PlatformUtil; import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.imagewriter.ImageWriterSettings; import org.sleuthkit.autopsy.imagewriter.ImageWriterSettings;
@NbBundle.Messages({"LocalDiskPanel.refreshTablebutton.text=Refresh Local Disks"
})
/** /**
* ImageTypePanel for adding a local disk or partition such as PhysicalDrive0 or * ImageTypePanel for adding a local disk or partition such as PhysicalDrive0 or
* C:. * C:.
@ -141,6 +143,7 @@ final class LocalDiskPanel extends JPanel {
jLabel1 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel();
imageWriterErrorLabel = new javax.swing.JLabel(); imageWriterErrorLabel = new javax.swing.JLabel();
changeDatabasePathCheckbox = new javax.swing.JCheckBox(); changeDatabasePathCheckbox = new javax.swing.JCheckBox();
refreshTablebutton = new javax.swing.JButton();
setMinimumSize(new java.awt.Dimension(0, 420)); setMinimumSize(new java.awt.Dimension(0, 420));
setPreferredSize(new java.awt.Dimension(485, 410)); setPreferredSize(new java.awt.Dimension(485, 410));
@ -198,40 +201,56 @@ final class LocalDiskPanel extends JPanel {
org.openide.awt.Mnemonics.setLocalizedText(changeDatabasePathCheckbox, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.changeDatabasePathCheckbox.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(changeDatabasePathCheckbox, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.changeDatabasePathCheckbox.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(refreshTablebutton, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.refreshTablebutton.text")); // NOI18N
refreshTablebutton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
refreshTablebuttonActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(diskLabel)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(errorLabel) .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(noFatOrphansCheckbox)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(copyImageCheckbox)
.addComponent(descLabel))
.addGroup(layout.createSequentialGroup()
.addGap(21, 21, 21)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(browseButton, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(imageWriterErrorLabel)
.addComponent(jLabel1)
.addComponent(changeDatabasePathCheckbox))
.addGap(0, 0, Short.MAX_VALUE)))))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(timeZoneLabel) .addComponent(timeZoneLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addComponent(noFatOrphansCheckbox) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGap(0, 0, Short.MAX_VALUE)
.addComponent(copyImageCheckbox) .addComponent(refreshTablebutton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(descLabel)) .addGroup(layout.createSequentialGroup()
.addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(21, 21, 21) .addComponent(diskLabel)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(errorLabel))
.addGroup(layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE)))
.addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(browseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(imageWriterErrorLabel)
.addComponent(jLabel1)
.addComponent(changeDatabasePathCheckbox))
.addGap(0, 0, Short.MAX_VALUE)))))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -239,13 +258,13 @@ final class LocalDiskPanel extends JPanel {
.addComponent(diskLabel) .addComponent(diskLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(errorLabel) .addComponent(refreshTablebutton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(timeZoneLabel) .addComponent(timeZoneLabel)
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(noFatOrphansCheckbox) .addComponent(noFatOrphansCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(descLabel) .addComponent(descLabel)
@ -261,7 +280,9 @@ final class LocalDiskPanel extends JPanel {
.addComponent(jLabel1) .addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(imageWriterErrorLabel) .addComponent(imageWriterErrorLabel)
.addContainerGap(66, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(errorLabel)
.addContainerGap(58, Short.MAX_VALUE))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
@ -292,6 +313,10 @@ final class LocalDiskPanel extends JPanel {
fireUpdateEvent(); fireUpdateEvent();
}//GEN-LAST:event_browseButtonActionPerformed }//GEN-LAST:event_browseButtonActionPerformed
private void refreshTablebuttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshTablebuttonActionPerformed
refreshTable();
}//GEN-LAST:event_refreshTablebuttonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton browseButton; private javax.swing.JButton browseButton;
private javax.swing.JCheckBox changeDatabasePathCheckbox; private javax.swing.JCheckBox changeDatabasePathCheckbox;
@ -305,6 +330,7 @@ final class LocalDiskPanel extends JPanel {
private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JCheckBox noFatOrphansCheckbox; private javax.swing.JCheckBox noFatOrphansCheckbox;
private javax.swing.JTextField pathTextField; private javax.swing.JTextField pathTextField;
private javax.swing.JButton refreshTablebutton;
private javax.swing.JComboBox<String> timeZoneComboBox; private javax.swing.JComboBox<String> timeZoneComboBox;
private javax.swing.JLabel timeZoneLabel; private javax.swing.JLabel timeZoneLabel;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
@ -357,26 +383,26 @@ final class LocalDiskPanel extends JPanel {
} }
String path = disk.getName(); String path = disk.getName();
// Remove any character that isn't alphanumeric, a space, parent, or underscore. // Remove any character that isn't alphanumeric, a space, parent, or underscore.
// If the name ends up empty or starting with a space, prepend "localDisk" // If the name ends up empty or starting with a space, prepend "localDisk"
path = path.replaceAll("[^0-9A-Za-z _()]", ""); // NON-NLS path = path.replaceAll("[^0-9A-Za-z _()]", ""); // NON-NLS
if(path.isEmpty() || path.startsWith(" ")){ if (path.isEmpty() || path.startsWith(" ")) {
path = "localDisk" + path; path = "localDisk" + path;
} }
path += " " + System.currentTimeMillis(); path += " " + System.currentTimeMillis();
path += ".vhd"; path += ".vhd";
pathTextField.setText(Paths.get(getDefaultImageWriterFolder(), path).toString()); pathTextField.setText(Paths.get(getDefaultImageWriterFolder(), path).toString());
} }
private boolean imageWriterPathIsValid() { private boolean imageWriterPathIsValid() {
if((! copyImageCheckbox.isSelected()) || ! (diskTable.getSelectedRow() >= 0 && diskTable.getSelectedRow() < disks.size())){ if ((!copyImageCheckbox.isSelected()) || !(diskTable.getSelectedRow() >= 0 && diskTable.getSelectedRow() < disks.size())) {
imageWriterErrorLabel.setVisible(false); imageWriterErrorLabel.setVisible(false);
imageWriterErrorLabel.setText(""); imageWriterErrorLabel.setText("");
return true; return true;
} }
if (pathTextField.getText().isEmpty()) { if (pathTextField.getText().isEmpty()) {
imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setVisible(true);
imageWriterErrorLabel.setText(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.imageWriterEmptyPathError.text")); imageWriterErrorLabel.setText(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.imageWriterEmptyPathError.text"));
@ -611,12 +637,14 @@ final class LocalDiskPanel extends JPanel {
errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(), errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(),
"LocalDiskPanel.errLabel.drivesNotDetected.toolTipText")); "LocalDiskPanel.errLabel.drivesNotDetected.toolTipText"));
} }
errorLabel.setVisible(true);
diskTable.setEnabled(false); diskTable.setEnabled(false);
} else if (physicalDrives.isEmpty()) { } else if (physicalDrives.isEmpty()) {
errorLabel.setText( errorLabel.setText(
NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.someDisksNotDetected.text")); NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.someDisksNotDetected.text"));
errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(), errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(),
"LocalDiskPanel.errLabel.someDisksNotDetected.toolTipText")); "LocalDiskPanel.errLabel.someDisksNotDetected.toolTipText"));
errorLabel.setVisible(true);
} }
} }
@ -625,7 +653,7 @@ final class LocalDiskPanel extends JPanel {
try { try {
super.get(); //block and get all exceptions thrown while doInBackground() super.get(); //block and get all exceptions thrown while doInBackground()
} catch (CancellationException ex) { } catch (CancellationException ex) {
logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible."); //NON-NLS logger.log(Level.INFO, "Loading local disks was canceled."); //NON-NLS
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
logger.log(Level.INFO, "Loading local disks was interrupted."); //NON-NLS logger.log(Level.INFO, "Loading local disks was interrupted."); //NON-NLS
} catch (Exception ex) { } catch (Exception ex) {
@ -644,14 +672,15 @@ final class LocalDiskPanel extends JPanel {
diskTable.clearSelection(); diskTable.clearSelection();
} }
pathTextField.setText(""); pathTextField.setText("");
errorLabel.setText("");
errorLabel.setVisible(false);
fireUpdateEvent(); fireUpdateEvent();
ready = true; ready = true;
} else { } else {
logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible."); //NON-NLS //this should not be possible but happens
//possible threading error when this method is called while running
logger.log(Level.INFO, "Loading local disks was canceled"); //NON-NLS
} }
} }
diskTable.revalidate();
} }
} }
} }

View File

@ -24,7 +24,7 @@ DataContentViewerString.pageLabel2.text=Page
# Product Information panel # Product Information panel
LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div> LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div>
Format_OperatingSystem_Value={0} version {1} running on {2} Format_OperatingSystem_Value={0} version {1} running on {2}
LBL_Copyright=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; ">Autopsy&trade; is a digital forensics platform based on The Sleuth Kit&trade; and other tools. <br><ul><li>General Information: <a style\="color\: \#1E2A60;" href\="http\://www.sleuthkit.org">http\://www.sleuthkit.org</a>.</li><li>Training: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/autopsy-training">http://www.basistech.com/autopsy-training</a></li><li>Commercial Support: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/digital-forensics/autopsy/support/">http://www.basistech.com/digital-forensics/autopsy/support/</a></li></ul>Copyright &copy; 2003-2016. </div> LBL_Copyright=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; ">Autopsy&trade; is a digital forensics platform based on The Sleuth Kit&trade; and other tools. <br><ul><li>General Information: <a style\="color\: \#1E2A60;" href\="http\://www.sleuthkit.org">http\://www.sleuthkit.org</a>.</li><li>Training: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/autopsy-training">http://www.basistech.com/autopsy-training</a></li><li>Commercial Support: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/digital-forensics/autopsy/support/">http://www.basistech.com/digital-forensics/autopsy/support/</a></li></ul>Copyright &copy; 2003-2017. </div>
URL_ON_IMG=http://www.sleuthkit.org/ URL_ON_IMG=http://www.sleuthkit.org/
URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.3/ URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.3/

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -70,7 +70,8 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
private static final Integer[] SHOW_UNIQUE_PATH = new Integer[]{ private static final Integer[] SHOW_UNIQUE_PATH = new Integer[]{
BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID(), BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID(),
BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID(), BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID(),
BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID(),}; BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID(),
BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID(),};
// TODO (RC): This is an unattractive alternative to subclassing BlackboardArtifactNode, // TODO (RC): This is an unattractive alternative to subclassing BlackboardArtifactNode,
// cut from the same cloth as the equally unattractive SHOW_UNIQUE_PATH array // cut from the same cloth as the equally unattractive SHOW_UNIQUE_PATH array
@ -207,7 +208,9 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
// If this is a node for a keyword hit on an artifact, we set the // If this is a node for a keyword hit on an artifact, we set the
// display name to be the artifact type name followed by " Artifact" // display name to be the artifact type name followed by " Artifact"
// e.g. "Messages Artifact". // e.g. "Messages Artifact".
if (artifact != null && artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { if (artifact != null &&
(artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID() ||
artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID())) {
try { try {
for (BlackboardAttribute attribute : artifact.getAttributes()) { for (BlackboardAttribute attribute : artifact.getAttributes()) {
if (attribute.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) { if (attribute.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) {

View File

@ -20,18 +20,20 @@ package org.sleuthkit.autopsy.ingest.runIngestModuleWizard;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridBagConstraints; import java.awt.GridBagConstraints;
import java.awt.GridBagLayout; import java.awt.GridBagLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent; import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import javax.swing.Box;
import static javax.swing.Box.createVerticalGlue; import static javax.swing.Box.createVerticalGlue;
import javax.swing.ButtonModel;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.JToggleButton;
import org.openide.util.NbBundle.Messages; import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog; import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog;
import org.sleuthkit.autopsy.ingest.IngestOptionsPanel; import org.sleuthkit.autopsy.ingest.IngestOptionsPanel;
@ -42,7 +44,7 @@ import org.sleuthkit.autopsy.ingest.IngestProfiles.IngestProfile;
* Visual panel for the choosing of ingest profiles by the user when running * Visual panel for the choosing of ingest profiles by the user when running
* ingest. * ingest.
*/ */
final class IngestProfileSelectionPanel extends JPanel implements ItemListener { final class IngestProfileSelectionPanel extends JPanel {
@Messages({"IngestProfileSelectionPanel.customSettings.name=Custom Settings", @Messages({"IngestProfileSelectionPanel.customSettings.name=Custom Settings",
"IngestProfileSelectionPanel.customSettings.description=configure individual module settings in next step of wizard"}) "IngestProfileSelectionPanel.customSettings.description=configure individual module settings in next step of wizard"})
@ -55,6 +57,10 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
private List<IngestProfile> profiles = Collections.emptyList(); private List<IngestProfile> profiles = Collections.emptyList();
boolean isLastPanel = false; boolean isLastPanel = false;
//Listener for profile button selection
ActionListener buttonGroupActionListener = (ActionEvent e) -> {
updateSelectedProfile();
};
/** /**
* Creates new IngestProfileSelectionPanel * Creates new IngestProfileSelectionPanel
* *
@ -65,8 +71,9 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
initComponents(); initComponents();
wizardPanel = panel; wizardPanel = panel;
selectedProfile = lastSelectedProfile; selectedProfile = lastSelectedProfile;
isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext());
populateListOfCheckboxes(); populateProfilesList();
} }
/** /**
@ -79,11 +86,28 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
} }
/** /**
* Adds a radio button for custom settings as well as one for each profile * Handles the change to selected profile
* if custom settings button is selected, it enables the next button, otherwise
* it enables the Finish button.
*/
private void updateSelectedProfile() {
ButtonModel selectedButton = profileListButtonGroup.getSelection();
selectedProfile = selectedButton.getActionCommand();
boolean wasLastPanel = isLastPanel;
isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext());
wizardPanel.fireChangeEvent();
this.firePropertyChange("LAST_ENABLED", wasLastPanel, isLastPanel); //NON-NLS
}
/**
* Adds a button for custom settings as well as one for each profile
* that has been created to the panel containing them. * that has been created to the panel containing them.
*/ */
private void populateListOfCheckboxes() { private void populateProfilesList() {
profiles = getProfiles(); profiles = getProfiles();
GridBagLayout gridBagLayout = new GridBagLayout(); GridBagLayout gridBagLayout = new GridBagLayout();
GridBagConstraints constraints = new GridBagConstraints(); GridBagConstraints constraints = new GridBagConstraints();
constraints.fill = GridBagConstraints.HORIZONTAL; constraints.fill = GridBagConstraints.HORIZONTAL;
@ -92,13 +116,15 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
constraints.weighty = .0; constraints.weighty = .0;
constraints.anchor = GridBagConstraints.FIRST_LINE_START; constraints.anchor = GridBagConstraints.FIRST_LINE_START;
addRadioButton(CUSTOM_SETTINGS_DISPLAY_NAME, wizardPanel.getDefaultContext(), CUSTOM_SETTINGS_DESCRIPTION, gridBagLayout, constraints); addButton(CUSTOM_SETTINGS_DISPLAY_NAME, wizardPanel.getDefaultContext(), CUSTOM_SETTINGS_DESCRIPTION, gridBagLayout, constraints);
for (IngestProfile profile : profiles) {
profiles.forEach((profile) -> {
constraints.weightx = 0; constraints.weightx = 0;
constraints.gridy++; constraints.gridy++;
constraints.gridx = 0; constraints.gridx = 0;
addRadioButton(profile.toString(), profile.toString(), profile.getDescription(), gridBagLayout, constraints);
} addButton(profile.toString(), profile.toString(), profile.getDescription(), gridBagLayout, constraints);
});
//Add vertical glue at the bottom of the scroll panel so spacing //Add vertical glue at the bottom of the scroll panel so spacing
//between elements is less dependent on the number of elements //between elements is less dependent on the number of elements
constraints.gridy++; constraints.gridy++;
@ -119,29 +145,64 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
* programmatically * programmatically
* @param profileDesc - the description of the profile * @param profileDesc - the description of the profile
*/ */
private void addRadioButton(String profileDisplayName, String profileContextName, String profileDesc, GridBagLayout layout, GridBagConstraints constraints) { private void addButton(String profileDisplayName, String profileContextName, String profileDesc, GridBagLayout layout, GridBagConstraints constraints) {
String displayText = profileDisplayName + " - " + profileDesc;
JRadioButton myRadio = new JRadioButton(); //Add a spacer
Dimension spacerBlockDimension = new Dimension(6, 4); // Space between left edge and button, Space between rows
Box.Filler spacer = new Box.Filler(spacerBlockDimension, spacerBlockDimension, spacerBlockDimension);
constraints.weightx = 1;
layout.setConstraints(spacer, constraints);
profileListPanel.add(spacer);
constraints.gridx++;
constraints.gridy++;
JToggleButton profileButton = new JToggleButton();
profileButton.setMaximumSize(new java.awt.Dimension(48, 48));
profileButton.setMinimumSize(new java.awt.Dimension(48, 48));
profileButton.setPreferredSize(new java.awt.Dimension(48, 48));
profileButton.setName(profileContextName);
profileButton.setActionCommand(profileContextName);
profileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/timeline/images/magnifier-zoom-in-green.png")));
profileButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/checkbox24.png")));
profileButton.setFocusable(false);
profileButton.setFocusPainted(false);
profileButton.addActionListener(buttonGroupActionListener);
if (profileContextName.equals(selectedProfile)) {
profileButton.setSelected(true);
}
profileListButtonGroup.add(profileButton);
profileListPanel.add(profileButton);
layout.setConstraints(profileButton, constraints);
constraints.gridx++;
constraints.weightx = 1;
//Using a JTextArea as though it is a label in order to get multi-line support //Using a JTextArea as though it is a label in order to get multi-line support
String displayText = profileDisplayName;
if (!profileDesc.isEmpty()) {
displayText += " - " + profileDesc;
}
JTextArea myLabel = new JTextArea(displayText); JTextArea myLabel = new JTextArea(displayText);
Color gray = new Color(240, 240, 240); //matches background of panel Color gray = new Color(240, 240, 240); //matches background of panel
myLabel.setBackground(gray); myLabel.setBackground(gray);
myLabel.setEditable(false); myLabel.setEditable(false);
myLabel.setWrapStyleWord(true); myLabel.setWrapStyleWord(true);
myLabel.setLineWrap(true); myLabel.setLineWrap(true);
myRadio.setName(profileContextName);
myRadio.setToolTipText(profileDesc); //Add space between the button and text
myRadio.addItemListener(this); Box.Filler buttonTextSpacer = new Box.Filler(spacerBlockDimension, spacerBlockDimension, spacerBlockDimension);
if (profileContextName.equals(selectedProfile)) { layout.setConstraints(buttonTextSpacer, constraints);
myRadio.setSelected(true); profileListPanel.add(buttonTextSpacer);
}
profileListButtonGroup.add(myRadio);
profileListPanel.add(myRadio);
layout.setConstraints(myRadio, constraints);
constraints.gridx++; constraints.gridx++;
constraints.weightx = 1;
//Add the text area serving as a label to the right of the button
profileListPanel.add(myLabel); profileListPanel.add(myLabel);
layout.setConstraints(myLabel, constraints); layout.setConstraints(myLabel, constraints);
} }
/** /**
@ -164,30 +225,6 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
profileListPanel.removeAll(); profileListPanel.removeAll();
} }
/**
* Listens for changes and checks the currently selected radio button if
* custom settings button is enabled it enables the next button, otherwise
* it enables the Finish button.
*
* @param e
*/
@Override
public void itemStateChanged(ItemEvent e) {
for (Component rButton : profileListPanel.getComponents()) {
if (rButton instanceof JRadioButton){
JRadioButton jrb = (JRadioButton) rButton;
if (jrb.isSelected()) {
selectedProfile = jrb.getName();
break;
}
}
}
boolean wasLastPanel = isLastPanel;
isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext());
wizardPanel.fireChangeEvent();
this.firePropertyChange("LAST_ENABLED", wasLastPanel, isLastPanel); //NON-NLS
}
/** /**
* Get all the currently existing ingest profiles. * Get all the currently existing ingest profiles.
*/ */
@ -272,7 +309,7 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
fetchProfileList(); fetchProfileList();
profileListPanel.revalidate(); profileListPanel.revalidate();
profileListPanel.repaint(); profileListPanel.repaint();
populateListOfCheckboxes(); populateProfilesList();
dialog.close(); dialog.close();
} }
); );

View File

@ -32,6 +32,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.ingest.FileIngestModule; import org.sleuthkit.autopsy.ingest.FileIngestModule;
import org.sleuthkit.autopsy.ingest.IngestJobContext; import org.sleuthkit.autopsy.ingest.IngestJobContext;
import org.sleuthkit.autopsy.ingest.IngestMessage;
import org.sleuthkit.autopsy.ingest.IngestModuleReferenceCounter; import org.sleuthkit.autopsy.ingest.IngestModuleReferenceCounter;
import org.sleuthkit.autopsy.ingest.IngestServices; import org.sleuthkit.autopsy.ingest.IngestServices;
import org.sleuthkit.autopsy.ingest.ModuleDataEvent; import org.sleuthkit.autopsy.ingest.ModuleDataEvent;
@ -55,6 +56,7 @@ final class FilesIdentifierIngestModule implements FileIngestModule {
private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter(); private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter();
private static final Map<Long, List<FilesSet>> interestingFileSetsByJob = new ConcurrentHashMap<>(); private static final Map<Long, List<FilesSet>> interestingFileSetsByJob = new ConcurrentHashMap<>();
private final FilesIdentifierIngestJobSettings settings; private final FilesIdentifierIngestJobSettings settings;
private final IngestServices services = IngestServices.getInstance();
private IngestJobContext context; private IngestJobContext context;
private Blackboard blackboard; private Blackboard blackboard;
@ -141,7 +143,18 @@ final class FilesIdentifierIngestModule implements FileIngestModule {
MessageNotifyUtil.Notify.error(Bundle.FilesIdentifierIngestModule_indexError_message(), artifact.getDisplayName()); MessageNotifyUtil.Notify.error(Bundle.FilesIdentifierIngestModule_indexError_message(), artifact.getDisplayName());
} }
IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(moduleName, BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, Collections.singletonList(artifact))); services.fireModuleDataEvent(new ModuleDataEvent(moduleName, BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, Collections.singletonList(artifact)));
// make an ingest inbox message
StringBuilder detailsSb = new StringBuilder();
detailsSb.append("File: " + file.getParentPath() + file.getName() + "<br/>\n");
detailsSb.append("Rule Set: " + filesSet.getName());
services.postMessage(IngestMessage.createDataMessage(InterestingItemsIngestModuleFactory.getModuleName(),
"Interesting File Match: " + filesSet.getName() + "(" + file.getName() +")",
detailsSb.toString(),
file.getName(),
artifact));
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
FilesIdentifierIngestModule.logger.log(Level.SEVERE, "Error posting to the blackboard", ex); //NOI18N NON-NLS FilesIdentifierIngestModule.logger.log(Level.SEVERE, "Error posting to the blackboard", ex); //NOI18N NON-NLS