mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07: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>
|
||||
<DimensionLayout dim="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>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="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"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -30,6 +30,11 @@
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<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"/>
|
||||
</Container>
|
||||
|
@ -215,16 +215,18 @@ public class GeneralPurposeArtifactViewer extends AbstractArtifactDetailsPanel i
|
||||
|
||||
detailsScrollPane = new javax.swing.JScrollPane();
|
||||
|
||||
detailsScrollPane.setPreferredSize(new java.awt.Dimension(300, 0));
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
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.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.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))
|
||||
);
|
||||
}// </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
|
||||
// find any matches.
|
||||
try {
|
||||
boolean showErrorMessage = true;
|
||||
for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) {
|
||||
try {
|
||||
// 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());
|
||||
if (account != null) {
|
||||
personaPanel.addAccount(account, Bundle.MessageAccountPanel_account_justification(), Persona.Confidence.HIGH);
|
||||
} else {
|
||||
createPersonaDialog.setStartupPopupMessage(Bundle.MessageAccountPanel_id_not_found_in_cr(accountContainer.getAccount().getTypeSpecificID()));
|
||||
}
|
||||
showErrorMessage = false;
|
||||
}
|
||||
} catch (InvalidAccountIDException ex2) {
|
||||
// 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) {
|
||||
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
|
||||
// find any matches.
|
||||
try {
|
||||
boolean showErrorMessage = true;
|
||||
for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) {
|
||||
try {
|
||||
// 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());
|
||||
if (account != null) {
|
||||
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) {
|
||||
// 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) {
|
||||
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.corecomponents.DataContentViewerUtility;
|
||||
import org.sleuthkit.autopsy.datamodel.StringContent;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
@ -81,7 +82,7 @@ public class StringsTextViewer implements TextViewer {
|
||||
return false;
|
||||
}
|
||||
Content content = DataContentViewerUtility.getDefaultContent(node);
|
||||
return (content != null && content.getSize() > 0);
|
||||
return (content != null && !(content instanceof BlackboardArtifact) && content.getSize() > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,6 +46,7 @@ import static org.sleuthkit.autopsy.corecomponents.Bundle.*;
|
||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@ -606,7 +607,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
return false;
|
||||
}
|
||||
Content content = DataContentViewerUtility.getDefaultContent(node);
|
||||
return content != null && content.getSize() > 0;
|
||||
return content != null && !(content instanceof BlackboardArtifact) && content.getSize() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -32,9 +32,6 @@ public class DataContentViewerUtility {
|
||||
* preferring to return any Content object other than a BlackboardArtifact
|
||||
* 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.
|
||||
*
|
||||
* @return If there are multiple Content objects associated with the Node,
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.datamodel;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
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.
|
||||
*/
|
||||
public BlackboardArtifactNode(BlackboardArtifact artifact, String iconPath) {
|
||||
super(artifact, createLookup(artifact));
|
||||
super(artifact, createLookup(artifact, false));
|
||||
this.artifact = artifact;
|
||||
for (Content lookupContent : this.getLookup().lookupAll(Content.class)) {
|
||||
if ((lookupContent != null) && (!(lookupContent instanceof BlackboardArtifact))) {
|
||||
@ -264,6 +265,49 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
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
|
||||
* 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) {
|
||||
final long objectID = artifact.getObjectID();
|
||||
Content content = null;
|
||||
try {
|
||||
if (artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID() || artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE.getTypeID()) {
|
||||
content = getPathIdFile(artifact);
|
||||
}
|
||||
Content content = contentCache.get(objectID, () -> artifact.getSleuthkitCase().getContentById(objectID));
|
||||
if (content == null) {
|
||||
content = contentCache.get(objectID, () -> artifact.getSleuthkitCase().getContentById(objectID));
|
||||
return Lookups.fixed(artifact);
|
||||
} else {
|
||||
return Lookups.fixed(artifact, content);
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
return Lookups.fixed(artifact, content);
|
||||
return createLookup(artifact);
|
||||
}
|
||||
|
||||
}
|
||||
@ -982,7 +1050,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
}
|
||||
map.put(attribute.getAttributeType().getDisplayName(), value);
|
||||
} else {
|
||||
switch(attribute.getAttributeType().getValueType()) {
|
||||
switch (attribute.getAttributeType().getValueType()) {
|
||||
case INTEGER:
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueInt());
|
||||
break;
|
||||
@ -990,13 +1058,13 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueDouble());
|
||||
break;
|
||||
case LONG:
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueLong());
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getValueLong());
|
||||
break;
|
||||
default:
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getDisplayString());
|
||||
|
||||
map.put(attribute.getAttributeType().getDisplayName(), attribute.getDisplayString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
|
@ -25,6 +25,7 @@ import java.util.logging.Level;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
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.ThreadConfined;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.autopsy.guiutils.SimpleTableCellRenderer;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.TimeUtilities;
|
||||
@ -56,6 +58,11 @@ final class ArtifactsListPanel extends AbstractArtifactListPanel {
|
||||
ArtifactsListPanel(BlackboardArtifact.ARTIFACT_TYPE artifactType) {
|
||||
tableModel = new DomainArtifactTableModel(artifactType);
|
||||
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);
|
||||
}
|
||||
@ -391,7 +398,8 @@ final class ArtifactsListPanel extends AbstractArtifactListPanel {
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
return Bundle.ArtifactsListPanel_noResultsFound_text();
|
||||
}
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public String getColumnName(int column) {
|
||||
switch (column) {
|
||||
case 0:
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[500, 0]"/>
|
||||
<Dimension value="[300, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
|
@ -50,7 +50,7 @@ final class ContentViewerDetailsPanel extends AbstractArtifactDetailsPanel {
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(500, 0));
|
||||
setPreferredSize(new java.awt.Dimension(300, 0));
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -59,7 +59,9 @@ final class ContentViewerDetailsPanel extends AbstractArtifactDetailsPanel {
|
||||
public void setArtifact(BlackboardArtifact artifact) {
|
||||
Node node = Node.EMPTY;
|
||||
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);
|
||||
}
|
||||
|
@ -12,6 +12,9 @@
|
||||
</Container>
|
||||
</NonVisualComponents>
|
||||
<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">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
|
@ -180,6 +180,7 @@ final class DomainArtifactsTabPanel extends JPanel {
|
||||
mainSplitPane.setDividerLocation(350);
|
||||
mainSplitPane.setResizeWeight(0.1);
|
||||
|
||||
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
@ -25,10 +25,12 @@ import java.util.logging.Level;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.autopsy.guiutils.SimpleTableCellRenderer;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute.Type;
|
||||
@ -54,6 +56,11 @@ class MiniTimelineArtifactListPanel extends AbstractArtifactListPanel {
|
||||
MiniTimelineArtifactListPanel() {
|
||||
tableModel = new TypeDescriptionTableModel();
|
||||
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);
|
||||
}
|
||||
|
@ -23,9 +23,11 @@ import java.util.List;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.autopsy.discovery.search.MiniTimelineResult;
|
||||
import org.sleuthkit.autopsy.guiutils.SimpleTableCellRenderer;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
|
||||
/**
|
||||
@ -42,6 +44,11 @@ class MiniTimelineDateListPanel extends JPanel {
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
MiniTimelineDateListPanel() {
|
||||
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);
|
||||
}
|
||||
|
@ -1348,7 +1348,7 @@ class TableReportGenerator {
|
||||
new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH)));
|
||||
|
||||
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));
|
||||
} 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) {
|
||||
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)
|
||||
));
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ ExtractZone_progress_Msg=Extracting :Zone.Identifer files
|
||||
ExtractZone_Restricted=Restricted Sites Zone
|
||||
ExtractZone_Trusted=Trusted Sites Zone
|
||||
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-Short-Description=Recent Activity finder ingest module
|
||||
Chrome.moduleName=Chromium
|
||||
|
@ -1501,7 +1501,7 @@ class ExtractRegistry extends Extract {
|
||||
}
|
||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||
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));
|
||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||
if (bba != null) {
|
||||
@ -1742,7 +1742,7 @@ class ExtractRegistry extends Extract {
|
||||
String fileName = fileNameTokens[1];
|
||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||
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));
|
||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||
if (bba != null) {
|
||||
@ -1805,7 +1805,7 @@ class ExtractRegistry extends Extract {
|
||||
}
|
||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||
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));
|
||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||
if (bba != null) {
|
||||
|
@ -119,7 +119,7 @@ class RecentDocumentsByLnk extends Extract {
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"RecentDocumentsByLnk.parentModuleName.noSpace"),
|
||||
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(),
|
||||
"RecentDocumentsByLnk.parentModuleName.noSpace"),
|
||||
recentFile.getCrtime()));
|
||||
|
@ -638,7 +638,7 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info
|
||||
return line
|
||||
|
||||
def cleanupEventDescription(description):
|
||||
test = re.search("^\D+:\d+$", description)
|
||||
test = re.search("^'\D+:\d+'$", description)
|
||||
if test is not None:
|
||||
return re.sub(":\d+", ":<artifact_id>", description)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user