Added extensions, made them all lower case, fixed default settings

This commit is contained in:
Brian Carrier 2014-03-18 20:38:35 -04:00
parent b798070bdc
commit c6cd57bfd8
3 changed files with 26 additions and 11 deletions

View File

@ -60,8 +60,10 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In
private static long processTime = 0; private static long processTime = 0;
private static int messageId = 0; private static int messageId = 0;
private static long numFiles = 0; private static long numFiles = 0;
// note: because of current design, these values must be in sync with default GUI values
// they only get updated when the user changes from the default UI values
private static boolean skipNoExt = true; private static boolean skipNoExt = true;
private static boolean skipTextPlain = false; private static boolean skipTextPlain = true;
private FileExtMismatchSimpleConfigPanel simpleConfigPanel; private FileExtMismatchSimpleConfigPanel simpleConfigPanel;
private FileExtMismatchConfigPanel advancedConfigPanel; private FileExtMismatchConfigPanel advancedConfigPanel;
@ -267,10 +269,10 @@ public class FileExtMismatchIngestModule extends org.sleuthkit.autopsy.ingest.In
return false; return false;
} }
public static void setSkipNoExt(boolean flag) { protected static void setSkipNoExt(boolean flag) {
skipNoExt = flag; skipNoExt = flag;
} }
public static void setSkipTextPlain(boolean flag) { protected static void setSkipTextPlain(boolean flag) {
skipTextPlain = flag; skipTextPlain = flag;
} }
} }

View File

@ -153,20 +153,20 @@ class FileExtMismatchXML {
Element rootEl = doc.createElement(ROOT_EL); Element rootEl = doc.createElement(ROOT_EL);
doc.appendChild(rootEl); doc.appendChild(rootEl);
ArrayList<String> appTypeList = new ArrayList<>(sigTypeToExtMap.keySet()); ArrayList<String> mimeTypeList = new ArrayList<>(sigTypeToExtMap.keySet());
Collections.sort(appTypeList); Collections.sort(mimeTypeList);
for (String appType : appTypeList) { for (String mimeType : mimeTypeList) {
Element sigEl = doc.createElement(SIG_EL); Element sigEl = doc.createElement(SIG_EL);
sigEl.setAttribute(SIG_MIMETYPE_ATTR, appType); sigEl.setAttribute(SIG_MIMETYPE_ATTR, mimeType.toLowerCase());
String[] extArray = sigTypeToExtMap.get(appType); String[] extArray = sigTypeToExtMap.get(mimeType);
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); 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.toLowerCase());
sigEl.appendChild(extEl); sigEl.appendChild(extEl);
} }
} }

View File

@ -69,8 +69,9 @@
<ext>tgz</ext> <ext>tgz</ext>
</signature> </signature>
<signature mimetype="application/x-msoffice"> <signature mimetype="application/x-msoffice">
<ext>automaticDestinations-ms</ext> <ext>automaticdestinations-ms</ext>
<ext>customDestinations-ms</ext> <ext>bag</ext>
<ext>customdestinations-ms</ext>
<ext>db</ext> <ext>db</ext>
<ext>db.keep</ext> <ext>db.keep</ext>
<ext>doc</ext> <ext>doc</ext>
@ -79,6 +80,7 @@
<ext>dot</ext> <ext>dot</ext>
<ext>dotm</ext> <ext>dotm</ext>
<ext>dotx</ext> <ext>dotx</ext>
<ext>dpb</ext>
<ext>feed-ms</ext> <ext>feed-ms</ext>
<ext>gra</ext> <ext>gra</ext>
<ext>msi</ext> <ext>msi</ext>
@ -139,6 +141,7 @@
<ext>ppsm</ext> <ext>ppsm</ext>
<ext>pptm</ext> <ext>pptm</ext>
<ext>pptx</ext> <ext>pptx</ext>
<ext>vs</ext>
<ext>wmz</ext> <ext>wmz</ext>
<ext>xlam</ext> <ext>xlam</ext>
<ext>xlsb</ext> <ext>xlsb</ext>
@ -251,6 +254,7 @@
<signature mimetype="text/plain"> <signature mimetype="text/plain">
<ext>acro</ext> <ext>acro</ext>
<ext>adm</ext> <ext>adm</ext>
<ext>admx</ext>
<ext>aff</ext> <ext>aff</ext>
<ext>arff</ext> <ext>arff</ext>
<ext>ashx</ext> <ext>ashx</ext>
@ -263,6 +267,7 @@
<ext>c</ext> <ext>c</ext>
<ext>catalog</ext> <ext>catalog</ext>
<ext>cc</ext> <ext>cc</ext>
<ext>cdxml</ext>
<ext>cfg</ext> <ext>cfg</ext>
<ext>chs</ext> <ext>chs</ext>
<ext>cht</ext> <ext>cht</ext>
@ -308,6 +313,7 @@
<ext>iem</ext> <ext>iem</ext>
<ext>inc</ext> <ext>inc</ext>
<ext>inf</ext> <ext>inf</ext>
<ext>inf_loc</ext>
<ext>ini</ext> <ext>ini</ext>
<ext>ins</ext> <ext>ins</ext>
<ext>iqy</ext> <ext>iqy</ext>
@ -356,7 +362,11 @@
<ext>properties</ext> <ext>properties</ext>
<ext>prx</ext> <ext>prx</ext>
<ext>ps</ext> <ext>ps</ext>
<ext>ps1</ext>
<ext>ps1xml</ext>
<ext>psd1</ext>
<ext>psm</ext> <ext>psm</ext>
<ext>psm1</ext>
<ext>psp</ext> <ext>psp</ext>
<ext>py</ext> <ext>py</ext>
<ext>pyw</ext> <ext>pyw</ext>
@ -397,10 +407,12 @@
<ext>winprf_backup</ext> <ext>winprf_backup</ext>
<ext>wpl</ext> <ext>wpl</ext>
<ext>wsdl</ext> <ext>wsdl</ext>
<ext>xaml</ext>
<ext>xdc</ext> <ext>xdc</ext>
<ext>xdr</ext> <ext>xdr</ext>
<ext>xhtml</ext> <ext>xhtml</ext>
<ext>xml</ext> <ext>xml</ext>
<ext>xrm-ms</ext>
<ext>xsd</ext> <ext>xsd</ext>
<ext>xsl</ext> <ext>xsl</ext>
<ext>xsml</ext> <ext>xsml</ext>
@ -421,6 +433,7 @@
<ext>mpv</ext> <ext>mpv</ext>
</signature> </signature>
<signature mimetype="video/quicktime"> <signature mimetype="video/quicktime">
<ext>m4a</ext>
<ext>mov</ext> <ext>mov</ext>
<ext>mp4</ext> <ext>mp4</ext>
<ext>qt</ext> <ext>qt</ext>