Customizing the Appearance of Reports

OSForensics is an affordable digital forensics solution

Introduction

OSForensics generates reports as HTML web pages. This means their appearances can be modified with any web authoring application of your choice (examples include Microsoft Web Expressions, Adobe Dreamweaver and UltraEdit) or of course, you can directly edit the HTML and CSS. You can change everything from the fonts, colors and layout.

The report templates can be found in the following program data folder: C:\ProgramData\PassMark\OSForensics\ReportTemplates

Each report type comprises of a folder (the report name) and a set of files for the report, at the very minimum a single HTML file "report.html", this file must exist and OSForensics will create the report based on this file. You can include images (for company logos, headers or footers), CSS files, or JS files. All files in the folder will be copied across and included with the generated report. All HTML files must be saved in UTF-8 encoding (character set).

Multiple styles can exist for each report and each CSS file discovered in the report's folder will be listed as an available style. When creating the report OSForensics will replace the HTML comment tag "<!--OSF_CASE_TITLE-->" with the selected style name.

The following are HTML comment tags are needed to specify the location for the different elements of the report to be displayed.

HTML Comment Tag Tag Description
<!--OSF_CSS_NAME--> This will be replaced with a reference to the selected style sheet
<!--OSF_CASE_TITLE--> This is the Case Name.
<!--OSF_CASE_INVESTIGATOR--> This is the Investigator of the case.
<!--OSF_CASE_ORGANISATION--> This is the Organization details from the case.
<!--OSF_CASE_CONTACTDETAILS--> This is the Contact details from the case.
<!--OSF_CASE_TIMEZONE--> This is the Timezone from the case.
<!--OSF_CASE_DEFAULTDRIVE--> This is the default drive selected in the case
<!--OSF_CASE_CASEFOLDER--> This is the where the OSForensics case file is saved
<!--OSF_CASE_REPORTDATE--> This is the date that the report was generated.
<!--OSF_CASE_REPORTSHORTDATE--> This is the date the report was generated without timezone information
<!--OSF_CASE_EXPORTSTABLE--> This will display the table of items added to the case.
<!--OSF_CASE_FILESTABLE--> This will display the table of files added to the case.
<!--OSF_CASE_BOOKMARKSGREEN-> This table contains all green bookmarks added to the case.
<!--OSF_CASE_BOOKMARKSYELLOW--> This table contains all yellow bookmarks added to the case.
<!--OSF_CASE_BOOKMARKSRED-> This table contains all red bookmarks added to the case.

Adding a Company Logo

To replace the OSForensics logo at the start of the report with a custom company logo, first copy the custom image into one of the report folders in the ReportTemplates directory and delete "osf_logo.png". Open the "report.html" file in a text editor (such as Notepad) or a HTML editor of your choice and search for this line in the HTML contents;

<div class="customHeader"><img src="osf_logo.png"></div>

Replace "osf_logo.png" with the name of your custom image and save the file, for example;

<div class="customHeader"><img src="company_logo1.png"></div>

Adding a Company Address

To add company details such as an address under the investigator name open the "report.html" file in a text editor (such as Notepad) or a HTML editor of your choice and search for this line in the HTML contents (this example is based on the Case Report);

<p class="reportHeader">Investigator: <!--OSF_CASE_INVESTIGATOR--> </p>

Copy and paste this line under the original and then you can edit it to add any information as required, for example;

<p class="reportHeader">Investigator: <!--OSF_CASE_INVESTIGATOR--> </p>
<p class="reportHeader">PassMark Software Pty Ltd - Level 2, 35 Buckingham Street Surry Hills, NSW 2010</p>

Creating a Custom Report Type

To create a custom report type you should create a copy of one of the report folders already in the ReportTemplates folder and then modify it as you require to create the layout and information you wish to have in the report. As long as there is a "report.html" file in the folder OSForensics will process it and replace any of the HTML comment tags found (see above) with the relevant information from the OSForensics case.

Cascading Style Sheets (CSS)

The fonts, colors and general appearance of the page, and in particular the tables in the report, are defined by CSS. If you are not familiar with CSS, you can take a look at the default templates supplied with OSForensics as reference (or simply make a copy of it, and modify it as required).

Most of the CSS would be depending on the template file used and the markup of the HTML you place in the template.

However, the table for the items and the files are hard-coded but you can style them by their multiple class names. In the provided examples, they are specified in a CSS file named "Default.css".

CSS Reference Graphics

The graphics below show the locations of each CSS element in the default OSForensics report style.

Reference graphic for CSS Elements in the Files Table


Reference graphic for CSS Elements in the Lists Table


Reference graphic for CSS Elements in the Attachments Table