From 85be6d968800eec1e1caceef0c1f725e5a38d87c Mon Sep 17 00:00:00 2001
From: Brian Carrier <carrier@sleuthkit.org>
Date: Thu, 7 Jun 2012 12:43:33 -0400
Subject: [PATCH] Added e-mail content

---
 .../datamodel/BlackboardAttribute.java        | 31 ++++++++++---------
 framework/Services/TskBlackboard.cpp          |  3 ++
 framework/Services/TskBlackboard.h            | 31 ++++++++++---------
 3 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java
index d8d670e67..bd8b83f95 100755
--- a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java
+++ b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java
@@ -135,20 +135,23 @@ public enum ATTRIBUTE_TYPE {
 		TSK_EMAIL_CC(42,"TSK_EMAIL_CC","E-Mail CC"),
 		TSK_EMAIL_BCC(43,"TSK_EMAIL_BCC","E-Mail BCC"),
 		TSK_EMAIL_FROM(44,"TSK_EMAIL_FROM","E-Mail From"),
-		TSK_MSG_ID(45,"TSK_MSG_ID","Message ID"),
-		TSK_MSG_REPLY_ID(46,"TSK_MSG_REPLY_ID","Message Reply ID"),
-		TSK_DATETIME_RCVD(47, "TSK_DATETIME_RCVD", "Date Received"),
-		TSK_DATETIME_SENT(48, "TSK_DATETIME_SENT", "Date Sent"),
-		TSK_SUBJECT(49, "TSK_SUBJECT", "Subject"),
-		TSK_TITLE(50, "TSK_TITLE", "Title"),
-		TSK_GEO_LATITUDE(51, "TSK_GEO_LATITUDE", "Latitude"),
-		TSK_GEO_LONGITUDE(52, "TSK_GEO_LONGITUDE", "Longitude"),
-		TSK_GEO_VELOCITY(53, "TSK_GEO_VELOCITY", "Velocity"),
-		TSK_GEO_ALTITUDE(54, "TSK_GEO_ALTITUDE", "Altitude"),
-		TSK_GEO_BEARING(55, "TSK_GEO_BEARING", "Bearing"),
-		TSK_GEO_HPRECISION(56, "TSK_GEO_HPRECISION", "Horizontal Precision"),
-		TSK_GEO_VPRECISION(57, "TSK_GEO_VPRECISION", "Vertical Precision"),
-		TSK_GEO_MAPDATUM(58, "TSK_GEO_MAPDATUM", "Map Datum");
+		TSK_EMAIL_CONTENT_PLAIN(45, "TSK_EMAIL_CONTENT_PLAIN", "Message (Plaintext)"),
+		TSK_EMAIL_CONTENT_HTML(46, "TSK_EMAIL_CONTENT_HTML", "Message (HTML)"),
+		TSK_EMAIL_CONTENT_RTF(47, "TSK_EMAIL_CONTENT_RTF", "Message (RTF)"),
+		TSK_MSG_ID(48,"TSK_MSG_ID","Message ID"),
+		TSK_MSG_REPLY_ID(49,"TSK_MSG_REPLY_ID","Message Reply ID"),
+		TSK_DATETIME_RCVD(50, "TSK_DATETIME_RCVD", "Date Received"),
+		TSK_DATETIME_SENT(51, "TSK_DATETIME_SENT", "Date Sent"),
+		TSK_SUBJECT(52, "TSK_SUBJECT", "Subject"),
+		TSK_TITLE(53, "TSK_TITLE", "Title"),
+		TSK_GEO_LATITUDE(54, "TSK_GEO_LATITUDE", "Latitude"),
+		TSK_GEO_LONGITUDE(55, "TSK_GEO_LONGITUDE", "Longitude"),
+		TSK_GEO_VELOCITY(56, "TSK_GEO_VELOCITY", "Velocity"),
+		TSK_GEO_ALTITUDE(57, "TSK_GEO_ALTITUDE", "Altitude"),
+		TSK_GEO_BEARING(58, "TSK_GEO_BEARING", "Bearing"),
+		TSK_GEO_HPRECISION(59, "TSK_GEO_HPRECISION", "Horizontal Precision"),
+		TSK_GEO_VPRECISION(60, "TSK_GEO_VPRECISION", "Vertical Precision"),
+		TSK_GEO_MAPDATUM(61, "TSK_GEO_MAPDATUM", "Map Datum");
 		/* SEE ABOVE -- ALSO ADD TO C++ CODE */
 		
 		private String label;
diff --git a/framework/Services/TskBlackboard.cpp b/framework/Services/TskBlackboard.cpp
index 95c39d373..54022a69d 100755
--- a/framework/Services/TskBlackboard.cpp
+++ b/framework/Services/TskBlackboard.cpp
@@ -73,6 +73,9 @@ map<int, TskAttributeNames> initializeAttributeTypeMap(){
     retval.insert(pair<int, TskAttributeNames>(TSK_EMAIL_CC, TskAttributeNames("TSK_EMAIL_CC", "E-Mail CC")));
     retval.insert(pair<int, TskAttributeNames>(TSK_EMAIL_BCC, TskAttributeNames("TSK_EMAIL_BCC", "E-Mail BCC")));
     retval.insert(pair<int, TskAttributeNames>(TSK_EMAIL_FROM, TskAttributeNames("TSK_EMAIL_FROM", "E-Mail From")));
+    retval.insert(pair<int, TskAttributeNames>(TSK_EMAIL_CONTENT_PLAIN, TskAttributeNames("TSK_EMAIL_CONTENT_PLAIN", "Content (Plain Text)")));
+    retval.insert(pair<int, TskAttributeNames>(TSK_EMAIL_CONTENT_HTML, TskAttributeNames("TSK_EMAIL_CONTENT_HTML", "Content (HTML)")));
+    retval.insert(pair<int, TskAttributeNames>(TSK_EMAIL_CONTENT_RTF, TskAttributeNames("TSK_EMAIL_CONTENT_RTF", "Content (RTF)")));
     retval.insert(pair<int, TskAttributeNames>(TSK_MSG_ID, TskAttributeNames("TSK_MSG_ID", "Message ID")));
     retval.insert(pair<int, TskAttributeNames>(TSK_MSG_REPLY_ID, TskAttributeNames("TSK_MSG_REPLY_ID", "Message Reply ID")));
     retval.insert(pair<int, TskAttributeNames>(TSK_DATETIME_RCVD, TskAttributeNames("TSK_DATETIME_RCVD", "Date Received")));
diff --git a/framework/Services/TskBlackboard.h b/framework/Services/TskBlackboard.h
index 06b9290d3..d7c35da3c 100755
--- a/framework/Services/TskBlackboard.h
+++ b/framework/Services/TskBlackboard.h
@@ -120,20 +120,23 @@ typedef enum TSK_ATTRIBUTE_TYPE {
     TSK_EMAIL_CC = 42, ///< String of an e-mail address that a message is being sent to as a cc:.
     TSK_EMAIL_BCC = 43, ///< String of an e-mail address that a message is being sent to as a bcc:.
     TSK_EMAIL_FROM = 44, ///< String of an e-mail address that a message is being sent from.
-    TSK_MSG_ID = 45, ///< String of a message ID (such as one of an e-mail message)
-    TSK_MSG_REPLY_ID = 46, ///< String of a message ID that a given message is in response to (such as one of an e-mail message) 
-    TSK_DATETIME_RCVD = 47, ///< Time in Unix epoch that something was received.
-    TSK_DATETIME_SENT = 48, ///< Time in Unix epoch that something was sent.
-    TSK_SUBJECT = 49, ///< String of a subject (such as one of an e-mail message)
-    TSK_TITLE = 50, ///< String of a title (such as a webpage or other document)
-    TSK_GEO_LATITUDE = 51, ///< Floating point of latitude coordinate.  Should be in WGS84. Positive North, Negative South. 
-    TSK_GEO_LONGITUDE = 52, ///< Floating point of longitude coordinate.  Should be in WGS84.  Positive East, Negative West.
-    TSK_GEO_VELOCITY = 53, ///< Floating point of velocity in geo coordinate in meters per second.
-    TSK_GEO_ALTITUDE = 54, ///< Floating point of altitude in geo coordinate in meters.
-    TSK_GEO_BEARING = 55, ///< Floating point of bearing in geo coordinate in true degrees.
-    TSK_GEO_HPRECISION = 56, ///< Floating point of horizontal precision in geo coordinate in meters.
-    TSK_GEO_VPRECISION = 57, ///< Floating point of vertical precision in geo coordinate in meters.
-    TSK_GEO_MAPDATUM = 58, ///< String of map datum used for coordinates if not WGS84.
+    TSK_EMAIL_CONTENT_PLAIN = 45, ///< String of e-mail message body in plain text
+    TSK_EMAIL_CONTENT_HTML = 46, ///< STring of e-mail message body in HTML
+    TSK_EMAIL_CONTENT_RTF = 47, ///< STring of e-mail message body in RTF
+    TSK_MSG_ID = 48, ///< String of a message ID (such as one of an e-mail message)
+    TSK_MSG_REPLY_ID = 49, ///< String of a message ID that a given message is in response to (such as one of an e-mail message) 
+    TSK_DATETIME_RCVD = 50, ///< Time in Unix epoch that something was received.
+    TSK_DATETIME_SENT = 51, ///< Time in Unix epoch that something was sent.
+    TSK_SUBJECT = 52, ///< String of a subject (such as one of an e-mail message)
+    TSK_TITLE = 53, ///< String of a title (such as a webpage or other document)
+    TSK_GEO_LATITUDE = 54, ///< Floating point of latitude coordinate.  Should be in WGS84. Positive North, Negative South. 
+    TSK_GEO_LONGITUDE = 55, ///< Floating point of longitude coordinate.  Should be in WGS84.  Positive East, Negative West.
+    TSK_GEO_VELOCITY = 56, ///< Floating point of velocity in geo coordinate in meters per second.
+    TSK_GEO_ALTITUDE = 57, ///< Floating point of altitude in geo coordinate in meters.
+    TSK_GEO_BEARING = 58, ///< Floating point of bearing in geo coordinate in true degrees.
+    TSK_GEO_HPRECISION = 59, ///< Floating point of horizontal precision in geo coordinate in meters.
+    TSK_GEO_VPRECISION = 60, ///< Floating point of vertical precision in geo coordinate in meters.
+    TSK_GEO_MAPDATUM = 61, ///< String of map datum used for coordinates if not WGS84.
 
     /* SEE ABOVE: 
      * - KEEP JAVA CODE IN SYNC 
-- 
GitLab