Merge branch 'develop' of github.com:sleuthkit/autopsy into develop

This commit is contained in:
Brian Carrier 2014-02-24 12:19:11 -05:00
commit d4c67aef7d
23 changed files with 499 additions and 477 deletions

View File

@ -89,7 +89,7 @@ import org.sleuthkit.datamodel.TskCoreException;
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
// do nothing // do nothing
} }

View File

@ -72,7 +72,7 @@ import org.sleuthkit.datamodel.TskData;
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
/* For this demo, we are going to make a private attribute to post our /* For this demo, we are going to make a private attribute to post our
* results to the blackbaord with. There are many standard blackboard artifact * results to the blackbaord with. There are many standard blackboard artifact
* and attribute types and you should first consider using one of those before * and attribute types and you should first consider using one of those before

View File

@ -31,6 +31,7 @@ import org.openide.util.Cancellable;
import org.sleuthkit.autopsy.coreutils.PlatformUtil; import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.coreutils.StopWatch; import org.sleuthkit.autopsy.coreutils.StopWatch;
import org.sleuthkit.autopsy.ingest.IngestManager.IngestModuleEvent; import org.sleuthkit.autopsy.ingest.IngestManager.IngestModuleEvent;
import org.sleuthkit.autopsy.ingest.IngestModuleAbstract.IngestModuleException;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
/** /**
@ -75,13 +76,13 @@ import org.sleuthkit.datamodel.Content;
return module; return module;
} }
public void init() { public void init() throws IngestModuleException{
logger.log(Level.INFO, "Initializing module: " + module.getName()); logger.log(Level.INFO, "Initializing module: " + module.getName());
try { try {
module.init(init); module.init(init);
inited = true; inited = true;
} catch (Exception e) { } catch (IngestModuleException e) {
logger.log(Level.INFO, "Failed initializing module: " + module.getName() + ", will not run."); logger.log(Level.INFO, "Failed initializing module: " + module.getName() + ", will not run.");
//will not run //will not run
inited = false; inited = false;

View File

@ -42,6 +42,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.coreutils.StopWatch; import org.sleuthkit.autopsy.coreutils.StopWatch;
import org.sleuthkit.autopsy.ingest.IngestMessage.MessageType; import org.sleuthkit.autopsy.ingest.IngestMessage.MessageType;
import org.sleuthkit.autopsy.ingest.IngestScheduler.FileScheduler.FileTask; import org.sleuthkit.autopsy.ingest.IngestScheduler.FileScheduler.FileTask;
import org.sleuthkit.autopsy.ingest.IngestModuleAbstract.IngestModuleException;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
@ -459,7 +460,7 @@ public class IngestManager {
IngestModuleInit moduleInit = new IngestModuleInit(); IngestModuleInit moduleInit = new IngestModuleInit();
try { try {
s.init(moduleInit); s.init(moduleInit);
} catch (Exception e) { } catch (IngestModuleException e) {
logger.log(Level.SEVERE, "File ingest module failed init(): " + s.getName(), e); logger.log(Level.SEVERE, "File ingest module failed init(): " + s.getName(), e);
allInited = false; allInited = false;
failedModule = s; failedModule = s;

View File

@ -23,7 +23,7 @@ package org.sleuthkit.autopsy.ingest;
/** /**
* Base interface for ingest modules * Base interface for ingest modules
*/ */
abstract class IngestModuleAbstract { public abstract class IngestModuleAbstract {
private String args; private String args;
@ -42,6 +42,13 @@ package org.sleuthkit.autopsy.ingest;
AbstractFile AbstractFile
}; };
public class IngestModuleException extends Exception {
public IngestModuleException(String msg) {
super(msg);
}
}
/** /**
* Invoked every time an ingest session is started by the framework. * Invoked every time an ingest session is started by the framework.
* A module should support multiple invocations of init() throughout the application life-cycle. * A module should support multiple invocations of init() throughout the application life-cycle.
@ -55,8 +62,10 @@ package org.sleuthkit.autopsy.ingest;
* NEVER initialize IngestServices handle in the member declaration, because it might result * NEVER initialize IngestServices handle in the member declaration, because it might result
* in multiple instances of the singleton -- different class loaders are used in different modules. * in multiple instances of the singleton -- different class loaders are used in different modules.
* @param initContext context used to initialize some modules * @param initContext context used to initialize some modules
*
* @throws IngestModuleException if a critical error occurs in initializing the module.
*/ */
abstract public void init(IngestModuleInit initContext); abstract public void init(IngestModuleInit initContext) throws IngestModuleException;
/** /**
* Invoked when an ingest session completes. * Invoked when an ingest session completes.

View File

@ -226,7 +226,7 @@ public final class ExifParserFileIngestModule extends IngestModuleAbstractFile {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
logger.log(Level.INFO, "init() " + this.toString()); logger.log(Level.INFO, "init() " + this.toString());

View File

@ -83,7 +83,7 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
// Load mapping // Load mapping

View File

@ -23,8 +23,8 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
@ -33,7 +33,6 @@ import javax.xml.parsers.ParserConfigurationException;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.PlatformUtil; import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.coreutils.XMLUtil; import org.sleuthkit.autopsy.coreutils.XMLUtil;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
@ -143,7 +142,7 @@ class FileExtMismatchXML {
* @return Loaded hash map or null on error or null if data does not exist * @return Loaded hash map or null on error or null if data does not exist
*/ */
public boolean save(HashMap<String, String[]> sigTypeToExtMap) { public boolean save(HashMap<String, String[]> sigTypeToExtMap) {
boolean success = false; boolean success;
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
@ -154,16 +153,17 @@ class FileExtMismatchXML {
Element rootEl = doc.createElement(ROOT_EL); Element rootEl = doc.createElement(ROOT_EL);
doc.appendChild(rootEl); doc.appendChild(rootEl);
Iterator<String> keyIt = sigTypeToExtMap.keySet().iterator(); ArrayList<String> appTypeList = new ArrayList<>(sigTypeToExtMap.keySet());
Collections.sort(appTypeList);
while (keyIt.hasNext()) { for (String appType : appTypeList) {
String key = keyIt.next();
Element sigEl = doc.createElement(SIG_EL); Element sigEl = doc.createElement(SIG_EL);
sigEl.setAttribute(SIG_MIMETYPE_ATTR, key); sigEl.setAttribute(SIG_MIMETYPE_ATTR, appType);
String[] extArray = sigTypeToExtMap.get(key); String[] extArray = sigTypeToExtMap.get(appType);
if (extArray != null) { if (extArray != null) {
ArrayList<String> extList = new ArrayList<>(Arrays.asList(extArray)); ArrayList<String> extList = new ArrayList<>(Arrays.asList(extArray));
Collections.sort(extList);
for (String ext : extList) { for (String ext : extList) {
Element extEl = doc.createElement(EXT_EL); Element extEl = doc.createElement(EXT_EL);
extEl.setTextContent(ext); extEl.setTextContent(ext);

View File

@ -1,444 +1,439 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<mismatch_config> <mismatch_config>
<!-- Applications/Miscellaneous --> <signature mimetype="application/x-tar">
<signature mimetype="text/plain"> <ext>tar</ext>
<ext>txt</ext>
<ext>ini</ext>
<ext>inf</ext>
<ext>url</ext>
<ext>reg</ext>
<ext>cfg</ext>
<ext>log</ext>
<ext>lo_</ext>
<ext>dat</ext>
<ext>lst</ext>
<ext>xml</ext>
<ext>dtd</ext>
<ext>xsd</ext>
<ext>xdr</ext>
<ext>xsl</ext>
<ext>xsml</ext>
<ext>kml</ext>
<ext>wsdl</ext>
<ext>box</ext>
<ext>rdf</ext>
<ext>manifest</ext>
<ext>htm</ext>
<ext>html</ext>
<ext>shtml</ext>
<ext>shtm</ext>
<ext>xhtml</ext>
<ext>hta</ext>
<ext>css</ext>
<ext>js</ext>
<ext>jsm</ext>
<ext>vbs</ext>
<ext>vb</ext>
<ext>php</ext>
<ext>php3</ext>
<ext>phtml</ext>
<ext>h</ext>
<ext>hpp</ext>
<ext>hxx</ext>
<ext>cpp</ext>
<ext>cxx</ext>
<ext>cc</ext>
<ext>c</ext>
<ext>java</ext>
<ext>cs</ext>
<ext>asp</ext>
<ext>aspx</ext>
<ext>axd</ext>
<ext>ashx</ext>
<ext>properties</ext>
<ext>mak</ext>
<ext>cmake</ext>
<ext>la</ext>
<ext>pl</ext>
<ext>pm</ext>
<ext>plx</ext>
<ext>py</ext>
<ext>pyw</ext>
<ext>bat</ext>
<ext>lua</ext>
<ext>tex</ext>
<ext>lsp</ext>
<ext>lisp</ext>
<ext>rb</ext>
<ext>rbw</ext>
<ext>ps</ext>
<ext>json</ext>
<ext>mof</ext>
<ext>mfl</ext>
<ext>inc</ext>
<ext>milk</ext>
<ext>acro</ext>
<ext>adm</ext>
<ext>dun</ext>
<ext>obe</ext>
<ext>pro</ext>
<ext>sam</ext>
<ext>cmd</ext>
<ext>rat</ext>
<ext>htt</ext>
<ext>iem</ext>
<ext>policy</ext>
<ext>pc</ext>
<ext>catalog</ext>
<ext>hlp</ext>
<ext>cnt</ext>
<ext>sql</ext>
<ext>rbf</ext>
<ext>rsp</ext>
<ext>wpl</ext>
<ext>dic</ext>
<ext>aff</ext>
<ext>iqy</ext>
<ext>ecf</ext>
<ext>elm</ext>
<ext>ent</ext>
<ext>gdl</ext>
<ext>gpd</ext>
<ext>isp</ext>
<ext>theme</ext>
<ext>nt</ext>
<ext>cty</ext>
<ext>icw</ext>
<ext>man</ext>
<ext>ppd</ext>
<ext>cpx</ext>
<ext>scp</ext>
<ext>ver</ext>
<ext>library-ms</ext>
<ext>winprf</ext>
<ext>winprf_backup</ext>
<ext>svg</ext>
<ext>psp</ext>
<ext>jsp</ext>
<ext>oem</ext>
<ext>map</ext>
<ext>det</ext>
<ext>ins</ext>
<ext>ph</ext>
<ext>prx</ext>
<ext>sif</ext>
<ext>idl</ext>
<ext>isl</ext>
<ext>nld</ext>
<ext>sve</ext>
<ext>ita</ext>
<ext>fra</ext>
<ext>esn</ext>
<ext>enu</ext>
<ext>deu</ext>
<ext>sep</ext>
<ext>sve</ext>
<ext>cht</ext>
<ext>chs</ext>
<ext>psm</ext>
<ext>rq0</ext>
<ext>old</ext>
<ext>eng</ext>
<ext>dlg</ext>
<ext>org</ext>
<ext>ic</ext>
<ext>ths</ext>
<ext>sig</ext>
<ext>std</ext>
<ext>cmp</ext>
<ext>stp</ext>
<ext>rst</ext>
<ext>lng</ext>
<ext>xdc</ext>
<ext>tha</ext>
</signature>sys
<signature mimetype="application/x-msoffice">
<ext>doc</ext>
<ext>docx</ext>
<ext>docm</ext>
<ext>dotm</ext>
<ext>dot</ext>
<ext>dotx</ext>
<ext>xls</ext>
<ext>xlt</ext>
<ext>xla</ext>
<ext>xlsx</ext>
<ext>xlsm</ext>
<ext>xltm</ext>
<ext>xlam</ext>
<ext>xlsb</ext>
<ext>ppt</ext>
<ext>pot</ext>
<ext>pps</ext>
<ext>ppa</ext>
<ext>pptx</ext>
<ext>potx</ext>
<ext>ppam</ext>
<ext>pptm</ext>
<ext>potm</ext>
<ext>ppsm</ext>
<ext>msi</ext>
<ext>mst</ext>
<ext>db</ext>
<ext>db.keep</ext>
<ext>wiz</ext>
<ext>gra</ext>
<ext>automaticDestinations-ms</ext>
<ext>customDestinations-ms</ext>
<ext>feed-ms</ext>
</signature>
<signature mimetype="application/x-ooxml">
<ext>docx</ext>
<ext>dotx</ext>
<ext>xlsx</ext>
<ext>xlsm</ext>
<ext>xltm</ext>
<ext>xlam</ext>
<ext>xlsb</ext>
<ext>pptx</ext>
<ext>potx</ext>
<ext>ppam</ext>
<ext>pptm</ext>
<ext>potm</ext>
<ext>ppsm</ext>
</signature>
<signature mimetype="application/msword">
<ext>doc</ext>
<ext>dot</ext>
</signature>
<signature mimetype="application/vnd.ms-excel">
<ext>xls</ext>
<ext>xlt</ext>
<ext>xla</ext>
</signature>
<signature mimetype="application/vnd.ms-powerpoint">
<ext>ppt</ext>
<ext>pot</ext>
<ext>pps</ext>
<ext>ppa</ext>
</signature>
<signature mimetype="application/zip">
<ext>zip</ext>
<ext>docx</ext>
<ext>dotx</ext>
<ext>xlsx</ext>
<ext>xlsm</ext>
<ext>xltm</ext>
<ext>xlam</ext>
<ext>xlsb</ext>
<ext>pptx</ext>
<ext>potx</ext>
<ext>ppam</ext>
<ext>pptm</ext>
<ext>potm</ext>
<ext>ppsm</ext>
<ext>wmz</ext>
<ext>jar</ext>
<ext>amo</ext>
<ext>xpi</ext>
</signature>
<signature mimetype="application/vnd.oasis.opendocument.text">
<ext>odt</ext>
</signature>
<signature mimetype="application/vnd.oasis.opendocument.spreadsheet">
<ext>ods</ext>
</signature>
<signature mimetype="application/vnd.oasis.opendocument.presentation">
<ext>odp</ext>
</signature>
<signature mimetype="application/pdf">
<ext>pdf</ext>
</signature>
<signature mimetype="application/rtf">
<ext>rtf</ext>
</signature>
<signature mimetype="text/html">
<ext>htm</ext>
<ext>html</ext>
<ext>htx</ext>
<ext>htmls</ext>
<ext>hhk</ext>
<ext>hta</ext>
<ext>wpl</ext>
<ext>htt</ext>
<ext>shtml</ext>
</signature>
<!-- Images -->
<signature mimetype="image/jpeg">
<ext>jpg</ext>
<ext>jpeg</ext>
<ext>jpe</ext>
<ext>jif</ext>
<ext>jfif</ext>
<ext>jfi</ext>
</signature>
<signature mimetype="image/vnd.adobe.photoshop">
<ext>psd</ext>
</signature> </signature>
<signature mimetype="image/x-raw-nikon"> <signature mimetype="image/x-raw-nikon">
<ext>nef</ext> <ext>nef</ext>
</signature> </signature>
<signature mimetype="application/vnd.ms-excel">
<ext>xla</ext>
<ext>xls</ext>
<ext>xlt</ext>
</signature>
<signature mimetype="application/x-ooxml">
<ext>docx</ext>
<ext>dotx</ext>
<ext>potm</ext>
<ext>potx</ext>
<ext>ppam</ext>
<ext>ppsm</ext>
<ext>pptm</ext>
<ext>pptx</ext>
<ext>xlam</ext>
<ext>xlsb</ext>
<ext>xlsm</ext>
<ext>xlsx</ext>
<ext>xltm</ext>
</signature>
<signature mimetype="application/x-bzip2">
<ext>bzip2</ext>
</signature>
<signature mimetype="image/tiff"> <signature mimetype="image/tiff">
<ext>tif</ext> <ext>tif</ext>
<ext>tiff</ext> <ext>tiff</ext>
</signature> </signature>
<signature mimetype="audio/x-aiff">
<ext>aif</ext>
<ext>aiff</ext>
</signature>
<signature mimetype="application/x-arj">
<ext>arj</ext>
</signature>
<signature mimetype="application/vnd.ms-powerpoint">
<ext>pot</ext>
<ext>ppa</ext>
<ext>pps</ext>
<ext>ppt</ext>
</signature>
<signature mimetype="application/zip">
<ext>amo</ext>
<ext>docx</ext>
<ext>dotx</ext>
<ext>jar</ext>
<ext>kmz</ext>
<ext>potm</ext>
<ext>potx</ext>
<ext>ppam</ext>
<ext>ppsm</ext>
<ext>pptm</ext>
<ext>pptx</ext>
<ext>wmz</ext>
<ext>xlam</ext>
<ext>xlsb</ext>
<ext>xlsm</ext>
<ext>xlsx</ext>
<ext>xltm</ext>
<ext>xpi</ext>
<ext>zip</ext>
</signature>
<signature mimetype="audio/x-aac">
<ext>aac</ext>
</signature>
<signature mimetype="image/png"> <signature mimetype="image/png">
<ext>png</ext> <ext>png</ext>
</signature> </signature>
<signature mimetype="image/gif"> <signature mimetype="image/gif">
<ext>gif</ext> <ext>gif</ext>
</signature> </signature>
<signature mimetype="image/x-ms-bmp"> <signature mimetype="text/html">
<ext>bmp</ext> <ext>hhk</ext>
</signature> <ext>hta</ext>
<signature mimetype="image/bmp"> <ext>htm</ext>
<ext>bmp</ext> <ext>html</ext>
<ext>bm</ext> <ext>htmls</ext>
</signature> <ext>htt</ext>
<signature mimetype="image/x-icon"> <ext>htx</ext>
<ext>ico</ext> <ext>shtml</ext>
</signature> <ext>wpl</ext>
<!-- Video -->
<signature mimetype="video/mp4">
<ext>mp4</ext>
<ext>m4r</ext>
</signature>
<signature mimetype="video/quicktime">
<ext>mov</ext>
<ext>qt</ext>
<ext>mp4</ext>
</signature>
<signature mimetype="application/vnd.rn-realmedia">
<ext>rm</ext>
</signature>
<signature mimetype="video/3gpp">
<ext>3gp</ext>
</signature>
<signature mimetype="video/x-msvideo">
<ext>avi</ext>
</signature>
<signature mimetype="video/x-ms-wmv">
<ext>wmv</ext>
</signature>
<signature mimetype="application/vnd.ms-asf">
<ext>wmv</ext>
<ext>asf</ext>
</signature>
<signature mimetype="video/x-ms-asf">
<ext>wmv</ext>
<ext>asf</ext>
<ext>wma</ext>
</signature>
<signature mimetype="audio/x-ms-wma">
<ext>wma</ext>
<ext>asf</ext>
</signature>
<signature mimetype="video/mpeg">
<ext>mpg</ext>
<ext>mpeg</ext>
<ext>m1v</ext>
<ext>m2v</ext>
<ext>mpe</ext>
<ext>mpv</ext>
</signature>
<signature mimetype="video/x-flv">
<ext>flv</ext>
</signature>
<signature mimetype="video/x-m4v">
<ext>m4v</ext>
</signature>
<signature mimetype="application/vnd.rn-realmedia">
<ext>rm</ext>
</signature>
<signature mimetype="application/vnd.rn-realvideo">
<ext>rv</ext>
</signature>
<signature mimetype="application/x-shockwave-flash">
<ext>swf</ext>
</signature>
<!-- Audio -->
<signature mimetype="audio/x-aiff">
<ext>aif</ext>
<ext>aiff</ext>
</signature>
<signature mimetype="audio/aiff">
<ext>aif</ext>
<ext>aiff</ext>
</signature>
<signature mimetype="audio/x-flac">
<ext>flac</ext>
</signature>
<signature mimetype="audio/x-wav">
<ext>wav</ext>
</signature>
<signature mimetype="audio/mp4">
<ext>m4a</ext>
<ext>mp4</ext>
</signature> </signature>
<signature mimetype="audio/mpeg"> <signature mimetype="audio/mpeg">
<ext>m2a</ext>
<ext>mp2</ext> <ext>mp2</ext>
<ext>mp3</ext> <ext>mp3</ext>
<ext>mpa</ext> <ext>mpa</ext>
<ext>m2a</ext>
</signature> </signature>
<signature mimetype="audio/x-aac"> <signature mimetype="application/x-dosexec">
<ext>aac</ext> <ext>exe</ext>
</signature>
<signature mimetype="audio/mpa">
<ext>mp2</ext>
<ext>mp3</ext>
<ext>mpa</ext>
<ext>m2a</ext>
</signature>
<signature mimetype="audio/x-mpeg">
<ext>mp2</ext>
<ext>mp3</ext>
<ext>mpa</ext>
<ext>m2a</ext>
</signature>
<signature mimetype="audio/x-mpegurl">
<ext>m3u</ext>
</signature> </signature>
<signature mimetype="audio/midi"> <signature mimetype="audio/midi">
<ext>mid</ext> <ext>mid</ext>
<ext>midi</ext> <ext>midi</ext>
</signature> </signature>
<signature mimetype="audio/ogg"> <signature mimetype="image/x-icon">
<ext>ogg</ext> <ext>ico</ext>
</signature> </signature>
<!-- File Compression --> <signature mimetype="image/vnd.adobe.photoshop">
<signature mimetype="application/x-rar-compressed"> <ext>psd</ext>
<ext>rar</ext>
</signature> </signature>
<signature mimetype="application/x-arj"> <signature mimetype="audio/mpa">
<ext>arj</ext> <ext>m2a</ext>
<ext>mp2</ext>
<ext>mp3</ext>
<ext>mpa</ext>
</signature> </signature>
<signature mimetype="application/x-tar"> <signature mimetype="application/vnd.rn-realvideo">
<ext>tar</ext> <ext>rv</ext>
</signature>
<signature mimetype="image/jpeg">
<ext>jfi</ext>
<ext>jfif</ext>
<ext>jif</ext>
<ext>jpe</ext>
<ext>jpeg</ext>
<ext>jpg</ext>
</signature>
<signature mimetype="video/mp4">
<ext>m4r</ext>
<ext>mp4</ext>
</signature>
<signature mimetype="application/rtf">
<ext>doc</ext>
<ext>rtf</ext>
</signature>
<signature mimetype="application/vnd.ms-cab-compressed">
<ext>cab</ext>
</signature>
<signature mimetype="audio/aiff">
<ext>aif</ext>
<ext>aiff</ext>
</signature>
<signature mimetype="audio/x-wav">
<ext>wav</ext>
</signature>
<signature mimetype="application/java-archive">
<ext>jar</ext>
</signature>
<signature mimetype="video/x-ms-wmv">
<ext>wmv</ext>
</signature>
<signature mimetype="application/vnd.ms-asf">
<ext>asf</ext>
<ext>wmv</ext>
</signature>
<signature mimetype="audio/x-ms-wma">
<ext>asf</ext>
<ext>wma</ext>
</signature>
<signature mimetype="application/vnd.oasis.opendocument.presentation">
<ext>odp</ext>
</signature>
<signature mimetype="video/x-ms-asf">
<ext>asf</ext>
<ext>wma</ext>
<ext>wmv</ext>
</signature>
<signature mimetype="application/vnd.oasis.opendocument.spreadsheet">
<ext>ods</ext>
</signature>
<signature mimetype="application/msword">
<ext>doc</ext>
<ext>dot</ext>
</signature> </signature>
<signature mimetype="application/x-gzip"> <signature mimetype="application/x-gzip">
<ext>gz</ext> <ext>gz</ext>
<ext>gzip</ext> <ext>gzip</ext>
<ext>tgz</ext> <ext>tgz</ext>
</signature> </signature>
<signature mimetype="video/x-msvideo">
<ext>avi</ext>
</signature>
<signature mimetype="video/x-flv">
<ext>flv</ext>
</signature>
<signature mimetype="application/vnd.oasis.opendocument.text">
<ext>odt</ext>
</signature>
<signature mimetype="application/x-bzip"> <signature mimetype="application/x-bzip">
<ext>bzip</ext>
<ext>bz</ext> <ext>bz</ext>
<ext>bzip</ext>
</signature> </signature>
<signature mimetype="application/vnd.ms-cab-compressed"> <signature mimetype="application/x-shockwave-flash">
<ext>cab</ext> <ext>swf</ext>
</signature> </signature>
<signature mimetype="application/java-archive"> <signature mimetype="audio/x-mpeg">
<ext>jar</ext> <ext>m2a</ext>
<ext>mp2</ext>
<ext>mp3</ext>
<ext>mpa</ext>
</signature> </signature>
<signature mimetype="application/x-bzip2"> <signature mimetype="audio/ogg">
<ext>bzip2</ext> <ext>ogg</ext>
</signature> </signature>
<signature mimetype="application/x-cpio"> <signature mimetype="application/x-cpio">
<ext>cpio</ext> <ext>cpio</ext>
</signature> </signature>
<!-- Executables --> <signature mimetype="video/3gpp">
<signature mimetype="application/x-dosexec"> <ext>3gp</ext>
<ext>exe</ext> </signature>
<signature mimetype="image/x-ms-bmp">
<ext>bmp</ext>
</signature>
<signature mimetype="application/x-rar-compressed">
<ext>rar</ext>
</signature>
<signature mimetype="text/plain">
<ext>acro</ext>
<ext>adm</ext>
<ext>aff</ext>
<ext>ashx</ext>
<ext>asp</ext>
<ext>aspx</ext>
<ext>axd</ext>
<ext>bat</ext>
<ext>box</ext>
<ext>c</ext>
<ext>catalog</ext>
<ext>cc</ext>
<ext>cfg</ext>
<ext>chs</ext>
<ext>cht</ext>
<ext>cmake</ext>
<ext>cmd</ext>
<ext>cmp</ext>
<ext>cnt</ext>
<ext>cpp</ext>
<ext>cpx</ext>
<ext>cs</ext>
<ext>css</ext>
<ext>csv</ext>
<ext>cty</ext>
<ext>cxx</ext>
<ext>dat</ext>
<ext>det</ext>
<ext>deu</ext>
<ext>dic</ext>
<ext>dlg</ext>
<ext>dtd</ext>
<ext>dun</ext>
<ext>ecf</ext>
<ext>elm</ext>
<ext>eng</ext>
<ext>ent</ext>
<ext>enu</ext>
<ext>esn</ext>
<ext>fra</ext>
<ext>gdl</ext>
<ext>gpd</ext>
<ext>h</ext>
<ext>hlp</ext>
<ext>hpp</ext>
<ext>hta</ext>
<ext>htm</ext>
<ext>html</ext>
<ext>htt</ext>
<ext>hxx</ext>
<ext>ic</ext>
<ext>icw</ext>
<ext>idl</ext>
<ext>iem</ext>
<ext>inc</ext>
<ext>inf</ext>
<ext>ini</ext>
<ext>ins</ext>
<ext>iqy</ext>
<ext>isl</ext>
<ext>isp</ext>
<ext>ita</ext>
<ext>java</ext>
<ext>js</ext>
<ext>jsm</ext>
<ext>json</ext>
<ext>jsp</ext>
<ext>kml</ext>
<ext>la</ext>
<ext>library-ms</ext>
<ext>lisp</ext>
<ext>lng</ext>
<ext>lo_</ext>
<ext>log</ext>
<ext>lsp</ext>
<ext>lst</ext>
<ext>lua</ext>
<ext>mak</ext>
<ext>man</ext>
<ext>manifest</ext>
<ext>map</ext>
<ext>mfl</ext>
<ext>milk</ext>
<ext>mof</ext>
<ext>nld</ext>
<ext>nt</ext>
<ext>obe</ext>
<ext>oem</ext>
<ext>old</ext>
<ext>org</ext>
<ext>pc</ext>
<ext>ph</ext>
<ext>php</ext>
<ext>php3</ext>
<ext>phtml</ext>
<ext>pl</ext>
<ext>plx</ext>
<ext>pm</ext>
<ext>policy</ext>
<ext>ppd</ext>
<ext>pro</ext>
<ext>properties</ext>
<ext>prx</ext>
<ext>ps</ext>
<ext>psm</ext>
<ext>psp</ext>
<ext>py</ext>
<ext>pyw</ext>
<ext>rat</ext>
<ext>rb</ext>
<ext>rbf</ext>
<ext>rbw</ext>
<ext>rdf</ext>
<ext>reg</ext>
<ext>rq0</ext>
<ext>rsp</ext>
<ext>rst</ext>
<ext>sam</ext>
<ext>scp</ext>
<ext>sep</ext>
<ext>shtm</ext>
<ext>shtml</ext>
<ext>sif</ext>
<ext>sig</ext>
<ext>sql</ext>
<ext>std</ext>
<ext>stp</ext>
<ext>sve</ext>
<ext>sve</ext>
<ext>svg</ext>
<ext>tex</ext>
<ext>text</ext>
<ext>tha</ext>
<ext>theme</ext>
<ext>ths</ext>
<ext>txt</ext>
<ext>url</ext>
<ext>vb</ext>
<ext>vbs</ext>
<ext>ver</ext>
<ext>winprf</ext>
<ext>winprf_backup</ext>
<ext>wpl</ext>
<ext>wsdl</ext>
<ext>xdc</ext>
<ext>xdr</ext>
<ext>xhtml</ext>
<ext>xml</ext>
<ext>xsd</ext>
<ext>xsl</ext>
<ext>xsml</ext>
</signature>
<signature mimetype="audio/x-mpegurl">
<ext>m3u</ext>
</signature>
<signature mimetype="audio/mp4">
<ext>m4a</ext>
<ext>mp4</ext>
</signature>
<signature mimetype="video/quicktime">
<ext>mov</ext>
<ext>mp4</ext>
<ext>qt</ext>
</signature>
<signature mimetype="audio/x-flac">
<ext>flac</ext>
</signature>
<signature mimetype="image/bmp">
<ext>bm</ext>
<ext>bmp</ext>
</signature>
<signature mimetype="video/mpeg">
<ext>m1v</ext>
<ext>m2v</ext>
<ext>mpe</ext>
<ext>mpeg</ext>
<ext>mpg</ext>
<ext>mpv</ext>
</signature>
<signature mimetype="application/x-msoffice">
<ext>automaticDestinations-ms</ext>
<ext>customDestinations-ms</ext>
<ext>db</ext>
<ext>db.keep</ext>
<ext>doc</ext>
<ext>docm</ext>
<ext>docx</ext>
<ext>dot</ext>
<ext>dotm</ext>
<ext>dotx</ext>
<ext>feed-ms</ext>
<ext>gra</ext>
<ext>msi</ext>
<ext>mst</ext>
<ext>pot</ext>
<ext>potm</ext>
<ext>potx</ext>
<ext>ppa</ext>
<ext>ppam</ext>
<ext>pps</ext>
<ext>ppsm</ext>
<ext>ppt</ext>
<ext>pptm</ext>
<ext>pptx</ext>
<ext>wiz</ext>
<ext>xla</ext>
<ext>xlam</ext>
<ext>xls</ext>
<ext>xlsb</ext>
<ext>xlsm</ext>
<ext>xlsx</ext>
<ext>xlt</ext>
<ext>xltm</ext>
</signature>
<signature mimetype="application/vnd.rn-realmedia">
<ext>rm</ext>
</signature>
<signature mimetype="video/x-m4v">
<ext>m4v</ext>
</signature>
<signature mimetype="application/pdf">
<ext>pdf</ext>
</signature> </signature>
</mismatch_config> </mismatch_config>

View File

@ -76,7 +76,7 @@ import org.sleuthkit.datamodel.TskException;
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
} }

View File

@ -38,11 +38,26 @@ class TikaFileTypeDetector implements FileTypeDetectionInterface {
byte buffer[] = new byte[maxBytesInitial]; byte buffer[] = new byte[maxBytesInitial];
int len = abstractFile.read(buffer, 0, maxBytesInitial); int len = abstractFile.read(buffer, 0, maxBytesInitial);
boolean found = false;
try { try {
String mimetype = tikaInst.detect(buffer); // the xml detection in Tika tries to parse the entire file and throws exceptions
// for files that are not complete
try {
String tagHeader = new String(buffer, 0, 5);
if (tagHeader.equals("<?xml")) {
ret.type = "text/xml";
found = true;
}
}
catch (IndexOutOfBoundsException e) {
// do nothing
}
if (found == false) {
String mimetype = tikaInst.detect(buffer);
// Remove tika's name out of the general types like msoffice and ooxml // Remove tika's name out of the general types like msoffice and ooxml
ret.type = mimetype.replace("tika-", ""); ret.type = mimetype.replace("tika-", "");
}
} catch (Exception ex) { } catch (Exception ex) {
//do nothing //do nothing
} }

View File

@ -45,6 +45,7 @@ import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData; import org.sleuthkit.datamodel.TskData;
import org.sleuthkit.datamodel.TskException; import org.sleuthkit.datamodel.TskException;
import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb; import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb;
import org.sleuthkit.autopsy.ingest.IngestModuleAbstract.IngestModuleException;
import org.sleuthkit.datamodel.HashInfo; import org.sleuthkit.datamodel.HashInfo;
public class HashDbIngestModule extends IngestModuleAbstractFile { public class HashDbIngestModule extends IngestModuleAbstractFile {
@ -145,7 +146,7 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
skCase = Case.getCurrentCase().getSleuthkitCase(); skCase = Case.getCurrentCase().getSleuthkitCase();

View File

@ -343,7 +343,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAbstractFile {
* *
*/ */
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
logger.log(Level.INFO, "init()"); logger.log(Level.INFO, "init()");
services = IngestServices.getDefault(); services = IngestServices.getDefault();
initialized = false; initialized = false;

View File

@ -502,7 +502,7 @@ class Chrome extends Extract {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
} }

View File

@ -480,7 +480,7 @@ class ExtractIE extends Extract {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
} }

View File

@ -540,7 +540,7 @@ class ExtractRegistry extends Extract {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
} }
@Override @Override

View File

@ -479,7 +479,7 @@ class Firefox extends Extract {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
} }

View File

@ -150,7 +150,7 @@ public final class RAImageIngestModule extends IngestModuleDataSource {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
modules = new ArrayList<>(); modules = new ArrayList<>();
browserModules = new ArrayList(); browserModules = new ArrayList();
logger.log(Level.INFO, "init() {0}", this.toString()); logger.log(Level.INFO, "init() {0}", this.toString());
@ -180,7 +180,7 @@ public final class RAImageIngestModule extends IngestModuleDataSource {
for (Extract module : modules) { for (Extract module : modules) {
try { try {
module.init(initContext); module.init(initContext);
} catch (Exception ex) { } catch (IngestModuleException ex) {
logger.log(Level.SEVERE, "Exception during init() of " + module.getName(), ex); logger.log(Level.SEVERE, "Exception during init() of " + module.getName(), ex);
} }
} }

View File

@ -121,7 +121,7 @@ class RecentDocumentsByLnk extends Extract {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
} }

View File

@ -333,7 +333,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
try{ try{
services = IngestServices.getDefault(); services = IngestServices.getDefault();
PlatformUtil.extractResourceToUserConfigDir(SearchEngineURLQueryAnalyzer.class, XMLFILE); PlatformUtil.extractResourceToUserConfigDir(SearchEngineURLQueryAnalyzer.class, XMLFILE);

View File

@ -113,7 +113,7 @@ public final class SevenZipIngestModule extends IngestModuleAbstractFile {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
initialized = false; initialized = false;

View File

@ -153,7 +153,7 @@ public class EwfVerifyIngestModule extends IngestModuleDataSource {
} }
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
skCase = Case.getCurrentCase().getSleuthkitCase(); skCase = Case.getCurrentCase().getSleuthkitCase();
running = false; running = false;

View File

@ -285,7 +285,7 @@ public class ThunderbirdMboxFileIngestModule extends IngestModuleAbstractFile {
@Override @Override
public void init(IngestModuleInit initContext) { public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault(); services = IngestServices.getDefault();
fileManager = Case.getCurrentCase().getServices().getFileManager(); fileManager = Case.getCurrentCase().getServices().getFileManager();
} }