diff --git a/Core/src/org/sleuthkit/autopsy/report/Bundle.properties b/Core/src/org/sleuthkit/autopsy/report/Bundle.properties index 6e920ad631..09c6fa8906 100644 --- a/Core/src/org/sleuthkit/autopsy/report/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/report/Bundle.properties @@ -87,7 +87,7 @@ ReportGenerator.htmlOutput.header.timeAccessed=Accessed Time ReportGenerator.htmlOutput.header.timeCreated=Created Time ReportGenerator.htmlOutput.header.size=Size (Bytes) ReportGenerator.htmlOutput.header.hash=Hash -ReportGenerator.thumbnailTable.name=Thumbnails +ReportGenerator.thumbnailTable.name=Tagged Images ReportGenerator.thumbnailTable.desc=Contains thumbnails of images that are associated with tagged files and results. ReportGenerator.writeKwHits.userSrchs=User Searches ReportGenerator.progress.processingList=Now processing {0} ({1})... diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index ffc1325f89..0ca661ab38 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -22,6 +22,7 @@ */ package org.sleuthkit.autopsy.report; +import java.awt.image.BufferedImage; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; @@ -43,7 +44,7 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.logging.Level; -import org.openide.filesystems.FileObject; +import javax.imageio.ImageIO; import org.openide.filesystems.FileUtil; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; @@ -268,7 +269,8 @@ class ReportHTML implements TableReportModule { break; } } else if (dataType.startsWith(ARTIFACT_TYPE.TSK_ACCOUNT.getDisplayName())) { - /* TSK_ACCOUNT artifacts get separated by their TSK_ACCOUNT_TYPE + /* + * TSK_ACCOUNT artifacts get separated by their TSK_ACCOUNT_TYPE * attribute, with a synthetic compound dataType name, so they are * not caught by the switch statement above. For now we just give * them all the general account icon, but we could do something else @@ -623,7 +625,7 @@ class ReportHTML implements TableReportModule { public void addThumbnailRows(List images) { List currentRow = new ArrayList<>(); int totalCount = 0; - int pages = 0; + int pages = 1; for (Content content : images) { if (currentRow.size() == THUMBNAIL_COLUMNS) { addRow(currentRow); @@ -670,7 +672,7 @@ class ReportHTML implements TableReportModule { StringBuilder linkToThumbnail = new StringBuilder(); linkToThumbnail.append(""); + linkToThumbnail.append("\" target=\"_top\">"); linkToThumbnail.append(""); //NON-NLS linkToThumbnail.append("
"); //NON-NLS linkToThumbnail.append(file.getName()).append("
"); //NON-NLS @@ -808,23 +810,40 @@ class ReportHTML implements TableReportModule { Writer cssOut = null; try { cssOut = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path + "index.css"), "UTF-8")); //NON-NLS NON-NLS - String css = "body {margin: 0px; padding: 0px; background: #FFFFFF; font: 13px/20px Arial, Helvetica, sans-serif; color: #535353;}\n" + //NON-NLS - "#content {padding: 30px;}\n" + //NON-NLS - "#header {width:100%; padding: 10px; line-height: 25px; background: #07A; color: #FFF; font-size: 20px;}\n" + //NON-NLS - "h1 {font-size: 20px; font-weight: normal; color: #07A; padding: 0 0 7px 0; margin-top: 25px; border-bottom: 1px solid #D6D6D6;}\n" + //NON-NLS - "h2 {font-size: 20px; font-weight: bolder; color: #07A;}\n" + //NON-NLS - "h3 {font-size: 16px; color: #07A;}\n" + //NON-NLS - "h4 {background: #07A; color: #FFF; font-size: 16px; margin: 0 0 0 25px; padding: 0; padding-left: 15px;}\n" + //NON-NLS - "ul.nav {list-style-type: none; line-height: 35px; padding: 0px; margin-left: 15px;}\n" + //NON-NLS - "ul li a {font-size: 14px; color: #444; text-decoration: none; padding-left: 25px;}\n" + //NON-NLS - "ul li a:hover {text-decoration: underline;}\n" + //NON-NLS - "p {margin: 0 0 20px 0;}\n" + //NON-NLS - "table {white-space:nowrap; min-width: 700px; padding: 2; margin: 0; border-collapse: collapse; border-bottom: 2px solid #e5e5e5;}\n" + //NON-NLS - ".keyword_list table {margin: 0 0 25px 25px; border-bottom: 2px solid #dedede;}\n" + //NON-NLS - "table th {white-space:nowrap; display: table-cell; text-align: center; padding: 2px 4px; background: #e5e5e5; color: #777; font-size: 11px; text-shadow: #e9f9fd 0 1px 0; border-top: 1px solid #dedede; border-bottom: 2px solid #e5e5e5;}\n" + //NON-NLS - "table .left_align_cell{display: table-cell; padding: 2px 4px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align: left; }\n" + //NON-NLS - "table .right_align_cell{display: table-cell; padding: 2px 4px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align: right; }\n" + //NON-NLS - "table td {white-space:nowrap; display: table-cell; padding: 2px 3px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align:left; }\n" + //NON-NLS + String css = "body {margin: 0px; padding: 0px; background: #FFFFFF; font: 13px/20px Arial, Helvetica, sans-serif; color: #535353;}\n" + + //NON-NLS + "#content {padding: 30px;}\n" + + //NON-NLS + "#header {width:100%; padding: 10px; line-height: 25px; background: #07A; color: #FFF; font-size: 20px;}\n" + + //NON-NLS + "h1 {font-size: 20px; font-weight: normal; color: #07A; padding: 0 0 7px 0; margin-top: 25px; border-bottom: 1px solid #D6D6D6;}\n" + + //NON-NLS + "h2 {font-size: 20px; font-weight: bolder; color: #07A;}\n" + + //NON-NLS + "h3 {font-size: 16px; color: #07A;}\n" + + //NON-NLS + "h4 {background: #07A; color: #FFF; font-size: 16px; margin: 0 0 0 25px; padding: 0; padding-left: 15px;}\n" + + //NON-NLS + "ul.nav {list-style-type: none; line-height: 35px; padding: 0px; margin-left: 15px;}\n" + + //NON-NLS + "ul li a {font-size: 14px; color: #444; text-decoration: none; padding-left: 25px;}\n" + + //NON-NLS + "ul li a:hover {text-decoration: underline;}\n" + + //NON-NLS + "p {margin: 0 0 20px 0;}\n" + + //NON-NLS + "table {white-space:nowrap; min-width: 700px; padding: 2; margin: 0; border-collapse: collapse; border-bottom: 2px solid #e5e5e5;}\n" + + //NON-NLS + ".keyword_list table {margin: 0 0 25px 25px; border-bottom: 2px solid #dedede;}\n" + + //NON-NLS + "table th {white-space:nowrap; display: table-cell; text-align: center; padding: 2px 4px; background: #e5e5e5; color: #777; font-size: 11px; text-shadow: #e9f9fd 0 1px 0; border-top: 1px solid #dedede; border-bottom: 2px solid #e5e5e5;}\n" + + //NON-NLS + "table .left_align_cell{display: table-cell; padding: 2px 4px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align: left; }\n" + + //NON-NLS + "table .right_align_cell{display: table-cell; padding: 2px 4px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align: right; }\n" + + //NON-NLS + "table td {white-space:nowrap; display: table-cell; padding: 2px 3px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align:left; }\n" + + //NON-NLS "table tr:nth-child(even) td {background: #f3f3f3;}"; //NON-NLS cssOut.write(css); } catch (FileNotFoundException ex) { @@ -1128,24 +1147,23 @@ class ReportHTML implements TableReportModule { } private String prepareThumbnail(AbstractFile file) { - File thumbFile = ImageUtils.getCachedThumbnailFile(file, ImageUtils.ICON_SIZE_MEDIUM); - if (thumbFile.exists() == false) { + BufferedImage bufferedThumb = ImageUtils.getThumbnail(file, ImageUtils.ICON_SIZE_MEDIUM); + File thumbFile = Paths.get(thumbsPath, file.getName() + ".png").toFile(); + if (bufferedThumb == null) { return null; } - File to = new File(thumbsPath); - FileObject from = FileUtil.toFileObject(thumbFile); - FileObject dest = FileUtil.toFileObject(to); try { - FileUtil.copyFile(from, dest, thumbFile.getName(), ""); + ImageIO.write(bufferedThumb, "png", thumbFile); } catch (IOException ex) { - logger.log(Level.SEVERE, "Failed to write thumb file to report directory.", ex); //NON-NLS - } catch (NullPointerException ex) { - logger.log(Level.SEVERE, "NPE generated from FileUtil.copyFile, probably because FileUtil.toFileObject returned null. \n" + - "The File argument for toFileObject was " + thumbFile + " with toString: " + thumbFile.toString() + "\n" + - "The FileObject returned by toFileObject, passed into FileUtil.copyFile, was " + from, ex); + logger.log(Level.WARNING, "Failed to write thumb file to report directory.", ex); //NON-NLS + return null; } - - return THUMBS_REL_PATH + thumbFile.getName(); + if (thumbFile.exists() + == false) { + return null; + } + return THUMBS_REL_PATH + + thumbFile.getName(); } } diff --git a/Experimental/build.xml b/Experimental/build.xml index 6dc68cd1b5..07de3bd2f4 100644 --- a/Experimental/build.xml +++ b/Experimental/build.xml @@ -10,24 +10,25 @@ - - - - - - - - - - - + - + + + + + + + + + + + + - + + @@ -12,5 +13,13 @@ + + + + + + + + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.form b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.form index 29d715b8e5..f3d1638b95 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.form @@ -79,7 +79,7 @@ - + @@ -95,14 +95,14 @@ - + - + @@ -112,6 +112,11 @@ + + + + + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.java b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.java index f4679d52a6..da3c28ac3a 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCases.java @@ -483,7 +483,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D Collection eamArtifactInstances = new ArrayList<>(); try { EamDb dbManager = EamDb.getInstance(); - if (dbManager.getCorrelationArtifactTypeByName("FILES") == eamArtifact.getArtifactType()) { + if (dbManager.getCorrelationArtifactTypeByName("FILES").equals(eamArtifact.getArtifactType())) { try { Collection eamGlobalFileInstances = dbManager.getGlobalFileInstancesByHash(eamArtifact.getArtifactValue()); for (EamGlobalFileInstance eamGlobalFileInstance : eamGlobalFileInstances) { @@ -519,6 +519,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D return; } + readSettings(); // reset the table to empty. populateTable(node); } @@ -613,6 +614,8 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D org.openide.awt.Mnemonics.setLocalizedText(showCommonalityMenuItem, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.showCommonalityMenuItem.text")); // NOI18N rightClickPopupMenu.add(showCommonalityMenuItem); + tableScrollPane.setPreferredSize(new java.awt.Dimension(452, 30)); + otherCasesTable.setAutoCreateRowSorter(true); otherCasesTable.setModel(tableModel); otherCasesTable.setToolTipText(org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.table.toolTip.text")); // NOI18N @@ -646,13 +649,13 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D tableContainerPanel.setLayout(tableContainerPanelLayout); tableContainerPanelLayout.setHorizontalGroup( tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(tableScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE) + .addComponent(tableScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(tableStatusPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); tableContainerPanelLayout.setVerticalGroup( tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tableContainerPanelLayout.createSequentialGroup() - .addComponent(tableScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE) + .addComponent(tableScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tableStatusPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) @@ -668,7 +671,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D ); otherCasesPanelLayout.setVerticalGroup( otherCasesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 404, Short.MAX_VALUE) + .addGap(0, 144, Short.MAX_VALUE) .addGroup(otherCasesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(otherCasesPanelLayout.createSequentialGroup() .addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCasesTableModel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCasesTableModel.java index 5977444044..9181b6f844 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCasesTableModel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/contentviewer/DataContentViewerOtherCasesTableModel.java @@ -133,13 +133,19 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel { switch (colId) { case CASE_NAME: - value = eamArtifactInstance.getEamCase().getDisplayName(); + if (null != eamArtifactInstance.getEamCase()) { + value = eamArtifactInstance.getEamCase().getDisplayName(); + } break; case DEVICE: - value = eamArtifactInstance.getEamDataSource().getDeviceID(); + if (null != eamArtifactInstance.getEamDataSource()) { + value = eamArtifactInstance.getEamDataSource().getDeviceID(); + } break; case DATA_SOURCE: - value = eamArtifactInstance.getEamDataSource().getName(); + if (null != eamArtifactInstance.getEamDataSource()) { + value = eamArtifactInstance.getEamDataSource().getName(); + } break; case FILE_PATH: value = eamArtifactInstance.getFilePath(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/datamodel/AbstractSqlEamDb.java b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/datamodel/AbstractSqlEamDb.java index 4c7c0e09a4..fd522ec7dd 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/datamodel/AbstractSqlEamDb.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/enterpriseartifactsmanager/datamodel/AbstractSqlEamDb.java @@ -1204,7 +1204,7 @@ public abstract class AbstractSqlEamDb implements EamDb { public boolean isArtifactGlobalKnownBad(EamArtifact eamArtifact) throws EamDbException { // TEMP: Only support file types - if (eamArtifact.getArtifactType() != getCorrelationArtifactTypeByName("FILES")) { + if (!eamArtifact.getArtifactType().equals(getCorrelationArtifactTypeByName("FILES"))) { return false; } diff --git a/thirdparty/commons/commons-dbcp2-2.1.1-javadoc.jar b/thirdparty/commons/commons-dbcp2-2.1.1-javadoc.jar deleted file mode 100644 index c3435208c8..0000000000 Binary files a/thirdparty/commons/commons-dbcp2-2.1.1-javadoc.jar and /dev/null differ diff --git a/thirdparty/commons/commons-dbcp2-2.1.1.jar b/thirdparty/commons/commons-dbcp2-2.1.1.jar deleted file mode 100644 index 674f367638..0000000000 Binary files a/thirdparty/commons/commons-dbcp2-2.1.1.jar and /dev/null differ diff --git a/thirdparty/commons/commons-logging-1.2.jar b/thirdparty/commons/commons-logging-1.2.jar deleted file mode 100644 index 93a3b9f6db..0000000000 Binary files a/thirdparty/commons/commons-logging-1.2.jar and /dev/null differ diff --git a/thirdparty/commons/commons-pool2-2.4.2-javadoc.jar b/thirdparty/commons/commons-pool2-2.4.2-javadoc.jar deleted file mode 100644 index 9f3f951b8e..0000000000 Binary files a/thirdparty/commons/commons-pool2-2.4.2-javadoc.jar and /dev/null differ diff --git a/thirdparty/commons/commons-pool2-2.4.2.jar b/thirdparty/commons/commons-pool2-2.4.2.jar deleted file mode 100644 index fdf8b6faaf..0000000000 Binary files a/thirdparty/commons/commons-pool2-2.4.2.jar and /dev/null differ diff --git a/thirdparty/postgresql-jdbc/postgresql-42.0.0.jar b/thirdparty/postgresql-jdbc/postgresql-42.0.0.jar deleted file mode 100644 index b89509b143..0000000000 Binary files a/thirdparty/postgresql-jdbc/postgresql-42.0.0.jar and /dev/null differ diff --git a/thirdparty/sqlite-jdbc/sqlite-jdbc-3.16.1.jar b/thirdparty/sqlite-jdbc/sqlite-jdbc-3.16.1.jar deleted file mode 100644 index 9d4b5bbf16..0000000000 Binary files a/thirdparty/sqlite-jdbc/sqlite-jdbc-3.16.1.jar and /dev/null differ