> entry: userBookmarks) {
if (ReportFilter.cancel == true) { break; }
Long objId = entry.getKey().getObjectID();
AbstractFile file = getFile(objId);
@@ -1191,13 +1235,13 @@ public class ReportHTML implements ReportModule {
out.write(TABLE_FOOT);
out.write(HTML_FOOT);
} catch (TskCoreException ex) {
- logger.log(Level.SEVERE, "Unable to get file's path for filebookmarks.html.");
+ logger.log(Level.SEVERE, "Unable to get file's path for userbookmarks.html.");
} catch (FileNotFoundException ex) {
- logger.log(Level.SEVERE, "Could not find filebookmarks.html file to write to.");
+ logger.log(Level.SEVERE, "Could not find userbookmarks.html file to write to.");
} catch (UnsupportedEncodingException ex) {
- logger.log(Level.SEVERE, "Did not recognize encoding when writing filebookmarks.hmtl.");
+ logger.log(Level.SEVERE, "Did not recognize encoding when writing userbookmarks.hmtl.");
} catch (IOException ex) {
- logger.log(Level.SEVERE, "Error creating Writer for filebookmarks.html.");
+ logger.log(Level.SEVERE, "Error creating Writer for userbookmarks.html.");
} finally {
try {
if(out != null) {
@@ -1209,6 +1253,41 @@ public class ReportHTML implements ReportModule {
}
}
+ /**
+ * Write the hashhits.html file
+ * @param folder path to output folder
+ */
+ private void writeHashHits(String folder) {
+ Writer out = null;
+ try {
+ out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(folder + "hash.html"), "UTF-8"));
+ out.write(generateHead("Hash Hit Artifacts (" + countHash + ")"));
+ String title = "\n\n";
+ out.write(title);
+
+ Report key = new Report();
+ String HashsetTable = key.getGroupedHashsetHit();
+ out.write(HashsetTable);
+
+ out.write(TABLE_FOOT);
+ out.write(HTML_FOOT);
+ } catch (FileNotFoundException ex) {
+ logger.log(Level.SEVERE, "Could not find keywords.html file to write to.");
+ } catch (UnsupportedEncodingException ex) {
+ logger.log(Level.SEVERE, "Did not recognize encoding when writing keywords.hmtl.");
+ } catch (IOException ex) {
+ logger.log(Level.SEVERE, "Error creating Writer for keywords.html.");
+ } finally {
+ try {
+ if (out != null) {
+ out.flush();
+ out.close();
+ }
+ } catch (IOException ex) {
+ }
+ }
+ }
+
@Override
public String getName() {
String name = "HTML";
@@ -1231,12 +1310,49 @@ public class ReportHTML implements ReportModule {
writeDownload(path);
writeSearch(path);
writeRecent(path);
- writeTrackpoint(path);
+ //writeTrackpoint(path);
writeInstalled(path);
writeKeyword(path);
writeDevice(path);
writeExif(path);
- writeFileBookmarks(path);
+ writeUserBookmarks(path);
+ writeHashHits(path);
+ try {
+ String dir = PlatformUtil.getUserConfigDirectory() + File.separator;
+
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "favicon.ico");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "logo.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "summary.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "bookmarks.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "cookies.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "history.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "downloads.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "search.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "recent.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "installed.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "keywords.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "devices.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "exif.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "userbookmarks.png");
+ PlatformUtil.extractResourceToUserConfigDir(ReportHTML.class, "hash.png");
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "favicon.ico", path, "favicon", ".ico", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "logo.png", path, "logo", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "summary.png", path, "summary", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "bookmarks.png", path, "bookmarks", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "cookies.png", path, "cookies", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "history.png", path, "history", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "downloads.png", path, "downloads", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "search.png", path, "search", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "recent.png", path, "recent", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "installed.png", path, "installed", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "keywords.png", path, "keywords", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "devices.png", path, "devices", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "exif.png", path, "exif", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "userbookmarks.png", path, "userbookmarks", ".png", true);
+ org.sleuthkit.autopsy.coreutils.FileUtil.copyFile(dir + "hash.png", path, "hash", ".png", true);
+ } catch (IOException ex) {
+ System.out.println("Failed to extract images for HTML report.");
+ }
}
@Override
diff --git a/Core/src/org/sleuthkit/autopsy/report/bookmarks.png b/Core/src/org/sleuthkit/autopsy/report/bookmarks.png
new file mode 100644
index 0000000000..cbb650ad4c
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/bookmarks.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/cookies.png b/Core/src/org/sleuthkit/autopsy/report/cookies.png
new file mode 100644
index 0000000000..793964127b
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/cookies.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/devices.png b/Core/src/org/sleuthkit/autopsy/report/devices.png
new file mode 100644
index 0000000000..e49540dccc
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/devices.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/downloads.png b/Core/src/org/sleuthkit/autopsy/report/downloads.png
new file mode 100644
index 0000000000..a976964fc5
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/downloads.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/exif.png b/Core/src/org/sleuthkit/autopsy/report/exif.png
new file mode 100644
index 0000000000..046f049a48
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/exif.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/favicon.ico b/Core/src/org/sleuthkit/autopsy/report/favicon.ico
new file mode 100644
index 0000000000..efad7a3de4
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/favicon.ico differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/hash.png b/Core/src/org/sleuthkit/autopsy/report/hash.png
new file mode 100644
index 0000000000..f1caff1f30
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/hash.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/history.png b/Core/src/org/sleuthkit/autopsy/report/history.png
new file mode 100644
index 0000000000..48f4d5f324
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/history.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/installed.png b/Core/src/org/sleuthkit/autopsy/report/installed.png
new file mode 100644
index 0000000000..b8872bbcf9
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/installed.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/keywords.png b/Core/src/org/sleuthkit/autopsy/report/keywords.png
new file mode 100644
index 0000000000..133ba948b3
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/keywords.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/logo.png b/Core/src/org/sleuthkit/autopsy/report/logo.png
new file mode 100644
index 0000000000..1561f126a5
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/logo.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/recent.png b/Core/src/org/sleuthkit/autopsy/report/recent.png
new file mode 100644
index 0000000000..a3250fe168
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/recent.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/search.png b/Core/src/org/sleuthkit/autopsy/report/search.png
new file mode 100644
index 0000000000..d036553018
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/search.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/summary.png b/Core/src/org/sleuthkit/autopsy/report/summary.png
new file mode 100644
index 0000000000..cffe6d8b7f
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/summary.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/report/userbookmarks.png b/Core/src/org/sleuthkit/autopsy/report/userbookmarks.png
new file mode 100644
index 0000000000..a06c596ada
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/report/userbookmarks.png differ