mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Merge branch 'develop' of github.com:sleuthkit/autopsy into 7217-errorHandling
This commit is contained in:
commit
308eeab73a
@ -16,13 +16,13 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="detailsScrollPane" alignment="1" pref="62" max="32767" attributes="0"/>
|
<Component id="detailsScrollPane" alignment="1" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="detailsScrollPane" pref="93" max="32767" attributes="0"/>
|
<Component id="detailsScrollPane" max="32767" attributes="0"/>
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
@ -30,6 +30,11 @@
|
|||||||
</Layout>
|
</Layout>
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Container class="javax.swing.JScrollPane" name="detailsScrollPane">
|
<Container class="javax.swing.JScrollPane" name="detailsScrollPane">
|
||||||
|
<Properties>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[300, 0]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||||
</Container>
|
</Container>
|
||||||
|
@ -215,16 +215,18 @@ public class GeneralPurposeArtifactViewer extends AbstractArtifactDetailsPanel i
|
|||||||
|
|
||||||
detailsScrollPane = new javax.swing.JScrollPane();
|
detailsScrollPane = new javax.swing.JScrollPane();
|
||||||
|
|
||||||
|
detailsScrollPane.setPreferredSize(new java.awt.Dimension(300, 0));
|
||||||
|
|
||||||
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)
|
||||||
.addComponent(detailsScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)
|
.addComponent(detailsScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 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)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(detailsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)
|
.addComponent(detailsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGap(0, 0, 0))
|
.addGap(0, 0, 0))
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
@ -586,6 +586,7 @@ final class MessageAccountPanel extends JPanel {
|
|||||||
// Set up each matching account. We don't know what type of account we have, so check all the types to
|
// Set up each matching account. We don't know what type of account we have, so check all the types to
|
||||||
// find any matches.
|
// find any matches.
|
||||||
try {
|
try {
|
||||||
|
boolean showErrorMessage = true;
|
||||||
for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) {
|
for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) {
|
||||||
try {
|
try {
|
||||||
// Try to load any matching accounts of this type. Throws an InvalidAccountIDException if the account is the
|
// Try to load any matching accounts of this type. Throws an InvalidAccountIDException if the account is the
|
||||||
@ -593,13 +594,15 @@ final class MessageAccountPanel extends JPanel {
|
|||||||
CentralRepoAccount account = CentralRepository.getInstance().getAccount(type, accountContainer.getAccount().getTypeSpecificID());
|
CentralRepoAccount account = CentralRepository.getInstance().getAccount(type, accountContainer.getAccount().getTypeSpecificID());
|
||||||
if (account != null) {
|
if (account != null) {
|
||||||
personaPanel.addAccount(account, Bundle.MessageAccountPanel_account_justification(), Persona.Confidence.HIGH);
|
personaPanel.addAccount(account, Bundle.MessageAccountPanel_account_justification(), Persona.Confidence.HIGH);
|
||||||
} else {
|
showErrorMessage = false;
|
||||||
createPersonaDialog.setStartupPopupMessage(Bundle.MessageAccountPanel_id_not_found_in_cr(accountContainer.getAccount().getTypeSpecificID()));
|
}
|
||||||
}
|
|
||||||
} catch (InvalidAccountIDException ex2) {
|
} catch (InvalidAccountIDException ex2) {
|
||||||
// These are expected when the account identifier doesn't match the format of the account type.
|
// These are expected when the account identifier doesn't match the format of the account type.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(showErrorMessage) {
|
||||||
|
createPersonaDialog.setStartupPopupMessage(Bundle.MessageAccountPanel_id_not_found_in_cr(accountContainer.getAccount().getTypeSpecificID()));
|
||||||
|
}
|
||||||
} catch (CentralRepoException ex) {
|
} catch (CentralRepoException ex) {
|
||||||
logger.log(Level.SEVERE, "Error looking up account types in the central repository", ex);
|
logger.log(Level.SEVERE, "Error looking up account types in the central repository", ex);
|
||||||
}
|
}
|
||||||
|
@ -200,6 +200,7 @@ class PersonaAccountFetcher extends SwingWorker<Map<String, Collection<Persona>>
|
|||||||
// Set up each matching account. We don't know what type of account we have, so check all the types to
|
// Set up each matching account. We don't know what type of account we have, so check all the types to
|
||||||
// find any matches.
|
// find any matches.
|
||||||
try {
|
try {
|
||||||
|
boolean showErrorMessage = true;
|
||||||
for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) {
|
for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) {
|
||||||
try {
|
try {
|
||||||
// Try to load any matching accounts of this type. Throws an InvalidAccountIDException if the account is the
|
// Try to load any matching accounts of this type. Throws an InvalidAccountIDException if the account is the
|
||||||
@ -207,16 +208,17 @@ class PersonaAccountFetcher extends SwingWorker<Map<String, Collection<Persona>>
|
|||||||
CentralRepoAccount account = CentralRepository.getInstance().getAccount(type, personaSearcherData.getAccountIdentifer());
|
CentralRepoAccount account = CentralRepository.getInstance().getAccount(type, personaSearcherData.getAccountIdentifer());
|
||||||
if (account != null) {
|
if (account != null) {
|
||||||
personaPanel.addAccount(account, Bundle.PersonaAccountFetcher_account_justification(), Persona.Confidence.HIGH);
|
personaPanel.addAccount(account, Bundle.PersonaAccountFetcher_account_justification(), Persona.Confidence.HIGH);
|
||||||
|
showErrorMessage = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((personaSearcherData.getAccountIdentifer() != null &&
|
|
||||||
!personaSearcherData.getAccountIdentifer().isEmpty()) && account == null) {
|
|
||||||
dialog.setStartupPopupMessage(Bundle.PersonaAccountFetcher_not_account_in_cr(personaSearcherData.getAccountIdentifer()));
|
|
||||||
}
|
|
||||||
} catch (InvalidAccountIDException ex2) {
|
} catch (InvalidAccountIDException ex2) {
|
||||||
// These are expected when the account identifier doesn't match the format of the account type.
|
// These are expected when the account identifier doesn't match the format of the account type.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((personaSearcherData.getAccountIdentifer() != null
|
||||||
|
&& !personaSearcherData.getAccountIdentifer().isEmpty()) && showErrorMessage) {
|
||||||
|
dialog.setStartupPopupMessage(Bundle.PersonaAccountFetcher_not_account_in_cr(personaSearcherData.getAccountIdentifer()));
|
||||||
|
}
|
||||||
} catch (CentralRepoException ex) {
|
} catch (CentralRepoException ex) {
|
||||||
logger.log(Level.SEVERE, "Error looking up account types in the central repository", ex);
|
logger.log(Level.SEVERE, "Error looking up account types in the central repository", ex);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ import org.openide.util.lookup.ServiceProvider;
|
|||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.TextViewer;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.TextViewer;
|
||||||
import org.sleuthkit.autopsy.corecomponents.DataContentViewerUtility;
|
import org.sleuthkit.autopsy.corecomponents.DataContentViewerUtility;
|
||||||
import org.sleuthkit.autopsy.datamodel.StringContent;
|
import org.sleuthkit.autopsy.datamodel.StringContent;
|
||||||
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,7 +82,7 @@ public class StringsTextViewer implements TextViewer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Content content = DataContentViewerUtility.getDefaultContent(node);
|
Content content = DataContentViewerUtility.getDefaultContent(node);
|
||||||
return (content != null && content.getSize() > 0);
|
return (content != null && !(content instanceof BlackboardArtifact) && content.getSize() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,6 +46,7 @@ import static org.sleuthkit.autopsy.corecomponents.Bundle.*;
|
|||||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
||||||
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
|
|
||||||
@ -606,7 +607,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Content content = DataContentViewerUtility.getDefaultContent(node);
|
Content content = DataContentViewerUtility.getDefaultContent(node);
|
||||||
return content != null && content.getSize() > 0;
|
return content != null && !(content instanceof BlackboardArtifact) && content.getSize() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -32,9 +32,6 @@ public class DataContentViewerUtility {
|
|||||||
* preferring to return any Content object other than a BlackboardArtifact
|
* preferring to return any Content object other than a BlackboardArtifact
|
||||||
* object.
|
* object.
|
||||||
*
|
*
|
||||||
* This method was written with the needs of the hex and strings content
|
|
||||||
* viewers in mind - the algorithm is exactly what those viewers require.
|
|
||||||
*
|
|
||||||
* @param node A display Node object.
|
* @param node A display Node object.
|
||||||
*
|
*
|
||||||
* @return If there are multiple Content objects associated with the Node,
|
* @return If there are multiple Content objects associated with the Node,
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.datamodel;
|
package org.sleuthkit.autopsy.datamodel;
|
||||||
|
|
||||||
|
import com.google.common.annotations.Beta;
|
||||||
import com.google.common.cache.Cache;
|
import com.google.common.cache.Cache;
|
||||||
import com.google.common.cache.CacheBuilder;
|
import com.google.common.cache.CacheBuilder;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
@ -234,7 +235,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
|||||||
* @param iconPath The path to the icon for the artifact type.
|
* @param iconPath The path to the icon for the artifact type.
|
||||||
*/
|
*/
|
||||||
public BlackboardArtifactNode(BlackboardArtifact artifact, String iconPath) {
|
public BlackboardArtifactNode(BlackboardArtifact artifact, String iconPath) {
|
||||||
super(artifact, createLookup(artifact));
|
super(artifact, createLookup(artifact, false));
|
||||||
this.artifact = artifact;
|
this.artifact = artifact;
|
||||||
for (Content lookupContent : this.getLookup().lookupAll(Content.class)) {
|
for (Content lookupContent : this.getLookup().lookupAll(Content.class)) {
|
||||||
if ((lookupContent != null) && (!(lookupContent instanceof BlackboardArtifact))) {
|
if ((lookupContent != null) && (!(lookupContent instanceof BlackboardArtifact))) {
|
||||||
@ -264,6 +265,49 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
|||||||
Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakListener);
|
Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a BlackboardArtifactNode, an AbstractNode implementation that
|
||||||
|
* can be used to represent an artifact of any type.
|
||||||
|
*
|
||||||
|
* @param artifact The artifact to represent.
|
||||||
|
* @param lookupIsAssociatedFile True if the Content lookup should be made
|
||||||
|
* for the associated file instead of the
|
||||||
|
* parent file.
|
||||||
|
*/
|
||||||
|
@Beta
|
||||||
|
public BlackboardArtifactNode(BlackboardArtifact artifact, boolean lookupIsAssociatedFile) {
|
||||||
|
super(artifact, createLookup(artifact, lookupIsAssociatedFile));
|
||||||
|
this.artifact = artifact;
|
||||||
|
try {
|
||||||
|
//The lookup for a file may or may not exist so we define the srcContent as the parent.
|
||||||
|
srcContent = artifact.getParent();
|
||||||
|
} catch (TskCoreException ex) {
|
||||||
|
logger.log(Level.WARNING, MessageFormat.format("Error getting the parent of the artifact for (artifact objID={0})", artifact.getId()), ex);
|
||||||
|
}
|
||||||
|
if (srcContent != null) {
|
||||||
|
try {
|
||||||
|
/*
|
||||||
|
* Calling this getter causes the unique path of the source
|
||||||
|
* content to be cached in the Content object. This is
|
||||||
|
* advantageous as long as this node is constructed in a
|
||||||
|
* background thread instead of a UI thread.
|
||||||
|
*/
|
||||||
|
srcContent.getUniquePath();
|
||||||
|
} catch (TskCoreException ex) {
|
||||||
|
logger.log(Level.WARNING, MessageFormat.format("Error getting the unique path of the source content (artifact objID={0})", artifact.getId()), ex);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException(MessageFormat.format("Artifact missing source content (artifact objID={0})", artifact));
|
||||||
|
}
|
||||||
|
setName(Long.toString(artifact.getArtifactID()));
|
||||||
|
String displayName = srcContent.getName();
|
||||||
|
setDisplayName(displayName);
|
||||||
|
setShortDescription(displayName);
|
||||||
|
String iconPath = IconsUtil.getIconFilePath(artifact.getArtifactTypeID());
|
||||||
|
setIconBaseWithExtension(iconPath != null && iconPath.charAt(0) == '/' ? iconPath.substring(1) : iconPath);
|
||||||
|
Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakListener);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a BlackboardArtifactNode, an AbstractNode implementation that
|
* Constructs a BlackboardArtifactNode, an AbstractNode implementation that
|
||||||
* can be used to represent an artifact of any type.
|
* can be used to represent an artifact of any type.
|
||||||
@ -284,22 +328,46 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
|||||||
*/
|
*/
|
||||||
private static Lookup createLookup(BlackboardArtifact artifact) {
|
private static Lookup createLookup(BlackboardArtifact artifact) {
|
||||||
final long objectID = artifact.getObjectID();
|
final long objectID = artifact.getObjectID();
|
||||||
Content content = null;
|
|
||||||
try {
|
try {
|
||||||
if (artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID() || artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE.getTypeID()) {
|
Content content = contentCache.get(objectID, () -> artifact.getSleuthkitCase().getContentById(objectID));
|
||||||
content = getPathIdFile(artifact);
|
|
||||||
}
|
|
||||||
if (content == null) {
|
if (content == null) {
|
||||||
content = contentCache.get(objectID, () -> artifact.getSleuthkitCase().getContentById(objectID));
|
return Lookups.fixed(artifact);
|
||||||
|
} else {
|
||||||
|
return Lookups.fixed(artifact, content);
|
||||||
}
|
}
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
logger.log(Level.SEVERE, MessageFormat.format("Error getting source content (artifact objID={0}", artifact.getId()), ex); //NON-NLS
|
logger.log(Level.SEVERE, MessageFormat.format("Error getting source content (artifact objID={0}", artifact.getId()), ex); //NON-NLS
|
||||||
content = null;
|
|
||||||
}
|
|
||||||
if (content == null) {
|
|
||||||
return Lookups.fixed(artifact);
|
return Lookups.fixed(artifact);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a Lookup object for this node and populates it with both the
|
||||||
|
* artifact this node represents and its source content.
|
||||||
|
*
|
||||||
|
* @param artifact The artifact this node represents.
|
||||||
|
* @param lookupIsAssociatedFile True if the Content lookup should be made
|
||||||
|
* for the associated file instead of the
|
||||||
|
* parent file.
|
||||||
|
*
|
||||||
|
* @return The Lookup.
|
||||||
|
*/
|
||||||
|
private static Lookup createLookup(BlackboardArtifact artifact, boolean lookupIsAssociatedFile) {
|
||||||
|
Content content = null;
|
||||||
|
if (lookupIsAssociatedFile) {
|
||||||
|
try {
|
||||||
|
content = getPathIdFile(artifact);
|
||||||
|
} catch (ExecutionException ex) {
|
||||||
|
logger.log(Level.SEVERE, MessageFormat.format("Error getting source content (artifact objID={0}", artifact.getId()), ex); //NON-NLS
|
||||||
|
content = null;
|
||||||
|
}
|
||||||
|
if (content == null) {
|
||||||
|
return Lookups.fixed(artifact);
|
||||||
|
} else {
|
||||||
|
return Lookups.fixed(artifact, content);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return Lookups.fixed(artifact, content);
|
return createLookup(artifact);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -982,7 +1050,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
|||||||
}
|
}
|
||||||
map.put(attribute.getAttributeType().getDisplayName(), value);
|
map.put(attribute.getAttributeType().getDisplayName(), value);
|
||||||
} else {
|
} else {
|
||||||
switch(attribute.getAttributeType().getValueType()) {
|
switch (attribute.getAttributeType().getValueType()) {
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueInt());
|
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueInt());
|
||||||
break;
|
break;
|
||||||
@ -990,13 +1058,13 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
|||||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueDouble());
|
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueDouble());
|
||||||
break;
|
break;
|
||||||
case LONG:
|
case LONG:
|
||||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueLong());
|
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueLong());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getDisplayString());
|
map.put(attribute.getAttributeType().getDisplayName(), attribute.getDisplayString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
|
@ -25,6 +25,7 @@ import java.util.logging.Level;
|
|||||||
import javax.swing.JPopupMenu;
|
import javax.swing.JPopupMenu;
|
||||||
import javax.swing.event.ListSelectionListener;
|
import javax.swing.event.ListSelectionListener;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
import javax.swing.table.TableCellRenderer;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
@ -32,6 +33,7 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
|||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
|
import org.sleuthkit.autopsy.guiutils.SimpleTableCellRenderer;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||||
import org.sleuthkit.datamodel.TimeUtilities;
|
import org.sleuthkit.datamodel.TimeUtilities;
|
||||||
@ -56,6 +58,11 @@ final class ArtifactsListPanel extends AbstractArtifactListPanel {
|
|||||||
ArtifactsListPanel(BlackboardArtifact.ARTIFACT_TYPE artifactType) {
|
ArtifactsListPanel(BlackboardArtifact.ARTIFACT_TYPE artifactType) {
|
||||||
tableModel = new DomainArtifactTableModel(artifactType);
|
tableModel = new DomainArtifactTableModel(artifactType);
|
||||||
initComponents();
|
initComponents();
|
||||||
|
// add the cell renderer to all columns
|
||||||
|
TableCellRenderer renderer = new SimpleTableCellRenderer();
|
||||||
|
for (int i = 0; i < tableModel.getColumnCount(); ++i) {
|
||||||
|
artifactsTable.getColumnModel().getColumn(i).setCellRenderer(renderer);
|
||||||
|
}
|
||||||
artifactsTable.getRowSorter().toggleSortOrder(0);
|
artifactsTable.getRowSorter().toggleSortOrder(0);
|
||||||
artifactsTable.getRowSorter().toggleSortOrder(0);
|
artifactsTable.getRowSorter().toggleSortOrder(0);
|
||||||
}
|
}
|
||||||
@ -391,7 +398,8 @@ final class ArtifactsListPanel extends AbstractArtifactListPanel {
|
|||||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||||
return Bundle.ArtifactsListPanel_noResultsFound_text();
|
return Bundle.ArtifactsListPanel_noResultsFound_text();
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
|
@Override
|
||||||
public String getColumnName(int column) {
|
public String getColumnName(int column) {
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[500, 0]"/>
|
<Dimension value="[300, 0]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
|
@ -50,7 +50,7 @@ final class ContentViewerDetailsPanel extends AbstractArtifactDetailsPanel {
|
|||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
setPreferredSize(new java.awt.Dimension(500, 0));
|
setPreferredSize(new java.awt.Dimension(300, 0));
|
||||||
setLayout(new java.awt.BorderLayout());
|
setLayout(new java.awt.BorderLayout());
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
@ -59,7 +59,9 @@ final class ContentViewerDetailsPanel extends AbstractArtifactDetailsPanel {
|
|||||||
public void setArtifact(BlackboardArtifact artifact) {
|
public void setArtifact(BlackboardArtifact artifact) {
|
||||||
Node node = Node.EMPTY;
|
Node node = Node.EMPTY;
|
||||||
if (artifact != null) {
|
if (artifact != null) {
|
||||||
node = new BlackboardArtifactNode(artifact);
|
boolean useAssociatedFile = artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID()
|
||||||
|
|| artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE.getTypeID();
|
||||||
|
node = new BlackboardArtifactNode(artifact, useAssociatedFile);
|
||||||
}
|
}
|
||||||
contentViewer.setNode(node);
|
contentViewer.setNode(node);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
</Container>
|
</Container>
|
||||||
</NonVisualComponents>
|
</NonVisualComponents>
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||||
|
<Color id="Default Cursor"/>
|
||||||
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[0, 0]"/>
|
<Dimension value="[0, 0]"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
@ -180,6 +180,7 @@ final class DomainArtifactsTabPanel extends JPanel {
|
|||||||
mainSplitPane.setDividerLocation(350);
|
mainSplitPane.setDividerLocation(350);
|
||||||
mainSplitPane.setResizeWeight(0.1);
|
mainSplitPane.setResizeWeight(0.1);
|
||||||
|
|
||||||
|
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||||
setMinimumSize(new java.awt.Dimension(0, 0));
|
setMinimumSize(new java.awt.Dimension(0, 0));
|
||||||
setLayout(new java.awt.BorderLayout());
|
setLayout(new java.awt.BorderLayout());
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
@ -25,10 +25,12 @@ import java.util.logging.Level;
|
|||||||
import javax.swing.JPopupMenu;
|
import javax.swing.JPopupMenu;
|
||||||
import javax.swing.event.ListSelectionListener;
|
import javax.swing.event.ListSelectionListener;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
import javax.swing.table.TableCellRenderer;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||||
|
import org.sleuthkit.autopsy.guiutils.SimpleTableCellRenderer;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||||
import org.sleuthkit.datamodel.BlackboardAttribute.Type;
|
import org.sleuthkit.datamodel.BlackboardAttribute.Type;
|
||||||
@ -54,6 +56,11 @@ class MiniTimelineArtifactListPanel extends AbstractArtifactListPanel {
|
|||||||
MiniTimelineArtifactListPanel() {
|
MiniTimelineArtifactListPanel() {
|
||||||
tableModel = new TypeDescriptionTableModel();
|
tableModel = new TypeDescriptionTableModel();
|
||||||
initComponents();
|
initComponents();
|
||||||
|
// add the cell renderer to all columns
|
||||||
|
TableCellRenderer renderer = new SimpleTableCellRenderer();
|
||||||
|
for (int i = 0; i < tableModel.getColumnCount(); ++i) {
|
||||||
|
artifactsTable.getColumnModel().getColumn(i).setCellRenderer(renderer);
|
||||||
|
}
|
||||||
artifactsTable.getRowSorter().toggleSortOrder(0);
|
artifactsTable.getRowSorter().toggleSortOrder(0);
|
||||||
artifactsTable.getRowSorter().toggleSortOrder(0);
|
artifactsTable.getRowSorter().toggleSortOrder(0);
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,11 @@ import java.util.List;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.event.ListSelectionListener;
|
import javax.swing.event.ListSelectionListener;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
import javax.swing.table.TableCellRenderer;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||||
import org.sleuthkit.autopsy.discovery.search.MiniTimelineResult;
|
import org.sleuthkit.autopsy.discovery.search.MiniTimelineResult;
|
||||||
|
import org.sleuthkit.autopsy.guiutils.SimpleTableCellRenderer;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,6 +44,11 @@ class MiniTimelineDateListPanel extends JPanel {
|
|||||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||||
MiniTimelineDateListPanel() {
|
MiniTimelineDateListPanel() {
|
||||||
initComponents();
|
initComponents();
|
||||||
|
// add the cell renderer to all columns
|
||||||
|
TableCellRenderer renderer = new SimpleTableCellRenderer();
|
||||||
|
for (int i = 0; i < tableModel.getColumnCount(); ++i) {
|
||||||
|
jTable1.getColumnModel().getColumn(i).setCellRenderer(renderer);
|
||||||
|
}
|
||||||
jTable1.getRowSorter().toggleSortOrder(0);
|
jTable1.getRowSorter().toggleSortOrder(0);
|
||||||
jTable1.getRowSorter().toggleSortOrder(0);
|
jTable1.getRowSorter().toggleSortOrder(0);
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +1348,7 @@ class TableReportGenerator {
|
|||||||
new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH)));
|
new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH)));
|
||||||
|
|
||||||
columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"),
|
columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"),
|
||||||
new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME)));
|
new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED )));
|
||||||
|
|
||||||
attributeTypeSet.remove(new Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID));
|
attributeTypeSet.remove(new Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID));
|
||||||
} else if (BlackboardArtifact.ARTIFACT_TYPE.TSK_INSTALLED_PROG.getTypeID() == artifactTypeId) {
|
} else if (BlackboardArtifact.ARTIFACT_TYPE.TSK_INSTALLED_PROG.getTypeID() == artifactTypeId) {
|
||||||
|
@ -256,7 +256,7 @@ public class RecentFilesSummaryTest {
|
|||||||
*/
|
*/
|
||||||
private BlackboardArtifact getRecentDocumentArtifact(DataSource ds, long artifactId, Long dateTime, String path) {
|
private BlackboardArtifact getRecentDocumentArtifact(DataSource ds, long artifactId, Long dateTime, String path) {
|
||||||
return getArtifact(ds, artifactId, ARTIFACT_TYPE.TSK_RECENT_OBJECT, Arrays.asList(
|
return getArtifact(ds, artifactId, ARTIFACT_TYPE.TSK_RECENT_OBJECT, Arrays.asList(
|
||||||
Pair.of(ATTRIBUTE_TYPE.TSK_DATETIME, dateTime),
|
Pair.of(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED , dateTime),
|
||||||
Pair.of(ATTRIBUTE_TYPE.TSK_PATH, path)
|
Pair.of(ATTRIBUTE_TYPE.TSK_PATH, path)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ ExtractZone_progress_Msg=Extracting :Zone.Identifer files
|
|||||||
ExtractZone_Restricted=Restricted Sites Zone
|
ExtractZone_Restricted=Restricted Sites Zone
|
||||||
ExtractZone_Trusted=Trusted Sites Zone
|
ExtractZone_Trusted=Trusted Sites Zone
|
||||||
OpenIDE-Module-Display-Category=Ingest Module
|
OpenIDE-Module-Display-Category=Ingest Module
|
||||||
OpenIDE-Module-Long-Description=Recent Activity ingest module.\n\nThe module extracts useful information about the recent user activity on the disk image being ingested, such as:\n\n- Recently open documents,\n- Web activity (sites visited, stored cookies, book marked sites, search engine queries, file downloads),\n- Recently attached devices,\n- Installed programs.\n\nThe module currently supports Windows only disk images.\nThe plugin is also fully functional when deployed on Windows version of Autopsy.
|
OpenIDE-Module-Long-Description=Recent Activity ingest module.\n\n\The module extracts useful information about the recent user activity on the disk image being ingested, such as:\n\n- Recently open documents,\n- Web activity (sites visited, stored cookies, book marked sites, search engine queries, file downloads),\n- Recently attached devices,\n- Installed programs.\n\nThe module currently supports Windows only disk images.\nThe plugin is also fully functional when deployed on Windows version of Autopsy.
|
||||||
OpenIDE-Module-Name=RecentActivity
|
OpenIDE-Module-Name=RecentActivity
|
||||||
OpenIDE-Module-Short-Description=Recent Activity finder ingest module
|
OpenIDE-Module-Short-Description=Recent Activity finder ingest module
|
||||||
Chrome.moduleName=Chromium
|
Chrome.moduleName=Chromium
|
||||||
|
@ -1501,7 +1501,7 @@ class ExtractRegistry extends Extract {
|
|||||||
}
|
}
|
||||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||||
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
||||||
attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, getName(), adobeUsedTime));
|
attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, getName(), adobeUsedTime));
|
||||||
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
||||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||||
if (bba != null) {
|
if (bba != null) {
|
||||||
@ -1742,7 +1742,7 @@ class ExtractRegistry extends Extract {
|
|||||||
String fileName = fileNameTokens[1];
|
String fileName = fileNameTokens[1];
|
||||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||||
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
||||||
attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, getName(), docDate));
|
attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, getName(), docDate));
|
||||||
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
||||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||||
if (bba != null) {
|
if (bba != null) {
|
||||||
@ -1805,7 +1805,7 @@ class ExtractRegistry extends Extract {
|
|||||||
}
|
}
|
||||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||||
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
||||||
attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, getName(), usedTime));
|
attributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, getName(), usedTime));
|
||||||
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
||||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||||
if (bba != null) {
|
if (bba != null) {
|
||||||
|
@ -119,7 +119,7 @@ class RecentDocumentsByLnk extends Extract {
|
|||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"RecentDocumentsByLnk.parentModuleName.noSpace"),
|
"RecentDocumentsByLnk.parentModuleName.noSpace"),
|
||||||
Util.findID(dataSource, path)));
|
Util.findID(dataSource, path)));
|
||||||
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME,
|
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"RecentDocumentsByLnk.parentModuleName.noSpace"),
|
"RecentDocumentsByLnk.parentModuleName.noSpace"),
|
||||||
recentFile.getCrtime()));
|
recentFile.getCrtime()));
|
||||||
|
@ -638,7 +638,7 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info
|
|||||||
return line
|
return line
|
||||||
|
|
||||||
def cleanupEventDescription(description):
|
def cleanupEventDescription(description):
|
||||||
test = re.search("^\D+:\d+$", description)
|
test = re.search("^'\D+:\d+'$", description)
|
||||||
if test is not None:
|
if test is not None:
|
||||||
return re.sub(":\d+", ":<artifact_id>", description)
|
return re.sub(":\d+", ":<artifact_id>", description)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user