mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-18 10:37:43 +00:00
messages could have attachments too
This commit is contained in:
parent
f0c2e3c796
commit
0f6acfe53b
@ -521,8 +521,17 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
|
|||||||
configureTextArea(TSK_EMAIL_CONTENT_HTML, HTML_TAB_INDEX);
|
configureTextArea(TSK_EMAIL_CONTENT_HTML, HTML_TAB_INDEX);
|
||||||
configureTextArea(TSK_EMAIL_CONTENT_RTF, RTF_TAB_INDEX);
|
configureTextArea(TSK_EMAIL_CONTENT_RTF, RTF_TAB_INDEX);
|
||||||
|
|
||||||
|
|
||||||
|
configureAttachments();
|
||||||
|
|
||||||
|
} catch (TskCoreException ex) {
|
||||||
|
LOGGER.log(Level.WARNING, "Failed to get attributes for email message.", ex); //NON-NLS
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configureAttachments() throws TskCoreException {
|
||||||
//TODO: Replace this with code to get the actual attachements!
|
//TODO: Replace this with code to get the actual attachements!
|
||||||
final Set<AbstractFile> attachments = artifact.getDataSource().getChildren().stream()
|
final Set<AbstractFile> attachments = artifact.getChildren().stream()
|
||||||
.filter(AbstractFile.class::isInstance)
|
.filter(AbstractFile.class::isInstance)
|
||||||
.map(AbstractFile.class::cast)
|
.map(AbstractFile.class::cast)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
@ -532,10 +541,6 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
|
|||||||
msgbodyTabbedPane.setTitleAt(4, "Attachments (" + numberOfAttachments + ")");
|
msgbodyTabbedPane.setTitleAt(4, "Attachments (" + numberOfAttachments + ")");
|
||||||
drp.setNode(new TableFilterNode(new DataResultFilterNode(new AbstractNode(
|
drp.setNode(new TableFilterNode(new DataResultFilterNode(new AbstractNode(
|
||||||
new AttachmentsChildren(attachments)), null), true));
|
new AttachmentsChildren(attachments)), null), true));
|
||||||
|
|
||||||
} catch (TskCoreException ex) {
|
|
||||||
LOGGER.log(Level.WARNING, "Failed to get attributes for email message.", ex); //NON-NLS
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String wrapInHtmlBody(String htmlText) {
|
private static String wrapInHtmlBody(String htmlText) {
|
||||||
@ -565,8 +570,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
|
|||||||
msgbodyTabbedPane.setEnabledAt(HDR_TAB_INDEX, false);
|
msgbodyTabbedPane.setEnabledAt(HDR_TAB_INDEX, false);
|
||||||
msgbodyTabbedPane.setEnabledAt(HDR_TAB_INDEX, false);
|
msgbodyTabbedPane.setEnabledAt(HDR_TAB_INDEX, false);
|
||||||
configureTextArea(TSK_TEXT, TEXT_TAB_INDEX);
|
configureTextArea(TSK_TEXT, TEXT_TAB_INDEX);
|
||||||
msgbodyTabbedPane.setEnabledAt(ATTM_TAB_INDEX, false);
|
configureAttachments();
|
||||||
msgbodyTabbedPane.setTitleAt(ATTM_TAB_INDEX, "Attachments");
|
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.WARNING, "Failed to get attributes for message.", ex); //NON-NLS
|
LOGGER.log(Level.WARNING, "Failed to get attributes for message.", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
@ -637,6 +641,8 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont
|
|||||||
ss.put(new NodeProperty<>("Size", "Size", "Size", file.getSize()));
|
ss.put(new NodeProperty<>("Size", "Size", "Size", file.getSize()));
|
||||||
ss.put(new NodeProperty<>("Mime Type", "Mime Type", "Mime Type", file.getMIMEType()));
|
ss.put(new NodeProperty<>("Mime Type", "Mime Type", "Mime Type", file.getMIMEType()));
|
||||||
ss.put(new NodeProperty<>("Known", "Known", "Known", file.getKnown().getName()));
|
ss.put(new NodeProperty<>("Known", "Known", "Known", file.getKnown().getName()));
|
||||||
|
|
||||||
|
addTagProperty(ss);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user