mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 08:56:15 +00:00
Merge pull request #58 from aebadirad42six/master
Bug fixes for html report hashset/keyword sections
This commit is contained in:
commit
11ff57880a
@ -34,6 +34,7 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import java.sql.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.sleuthkit.autopsy.recentactivity.dbconnect;
|
||||
|
||||
public class Report {
|
||||
@ -85,7 +86,8 @@ public class Report {
|
||||
table.append("<table><thead><tr><th>").append("File Name").append("</th><th>Preview</th><th>Keyword List</th></tr><tbody>");
|
||||
}
|
||||
table.append("<tr><td>").append(uniqueresults.getString("name")).append("</td>");
|
||||
table.append("<td>").append(uniqueresults.getString("preview")).append("</td>").append("<td>").append(uniqueresults.getString("list")).append("<br />(").append(uniqueresults.getString("exp")).append(")").append("</td>").append("</tr>");
|
||||
String previewreplace = StringEscapeUtils.escapeHtml(uniqueresults.getString("preview"));
|
||||
table.append("<td>").append(previewreplace.replaceAll("<!", "")).append("</td>").append("<td>").append(uniqueresults.getString("list")).append("<br />(").append(uniqueresults.getString("exp")).append(")").append("</td>").append("</tr>");
|
||||
|
||||
}
|
||||
tempdbconnect.executeStmt("DROP TABLE IF EXISTS report_keyword;");
|
||||
@ -98,7 +100,7 @@ public class Report {
|
||||
|
||||
File f1 = new File(currentCase.getTempDirectory() + File.separator + "autopsy-copy.db");
|
||||
boolean success = f1.delete();
|
||||
|
||||
table.append("</tbody></table><br /><br />");
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger(Report.class.getName()).log(Level.WARNING, "Exception occurred", e);
|
||||
}
|
||||
@ -148,10 +150,10 @@ public class Report {
|
||||
tempdbconnect.executeStmt("DROP TABLE IF EXISTS report_hashname;");
|
||||
tempdbconnect.executeStmt("DROP TABLE IF EXISTS report_hash;");
|
||||
tempdbconnect.closeConnection();
|
||||
|
||||
|
||||
File f1 = new File(currentCase.getTempDirectory() + File.separator + "autopsy-copy.db");
|
||||
boolean success = f1.delete();
|
||||
|
||||
table.append("</tbody></table><br /><br />");
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger(Report.class.getName()).log(Level.WARNING, "Exception occurred", e);
|
||||
}
|
||||
@ -229,6 +231,7 @@ public class Report {
|
||||
|
||||
File f1 = new File(currentCase.getTempDirectory() + File.separator + "autopsy-copy.db");
|
||||
boolean success = f1.delete();
|
||||
table.append("</tbody></table><br /><br />");
|
||||
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger(Report.class.getName()).log(Level.WARNING, "Exception occurred", e);
|
||||
|
@ -38,6 +38,7 @@ import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.datamodel.*;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -150,7 +151,7 @@ public class ReportHTML implements ReportModule {
|
||||
int reportsize = report.size();
|
||||
Integer filesystemcount = currentCase.getRootObjectsCount();
|
||||
DateFormat datetimeFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||
DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy");
|
||||
DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss");
|
||||
Date date = new Date();
|
||||
String datetime = datetimeFormat.format(date);
|
||||
String datenotime = dateFormat.format(date);
|
||||
@ -446,7 +447,7 @@ public class ReportHTML implements ReportModule {
|
||||
formatted_header.append(formatted_Report);
|
||||
// unformatted_header.append(formatted_Report);
|
||||
try {
|
||||
htmlPath = currentCase.getCaseDirectory() + "/Reports/" + caseName + "-" + datenotime + ".html";
|
||||
htmlPath = currentCase.getCaseDirectory() + File.separator + "Reports" + File.separator + caseName + "-" + datenotime + ".html";
|
||||
this.save(htmlPath);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user