Go to the documentation of this file.
19package org.sleuthkit.autopsy.modules.hashdatabase;
22import java.io.InputStreamReader;
23import java.io.FileInputStream;
24import java.io.IOException;
25import java.util.logging.Level;
26import java.util.Iterator;
27import org.apache.commons.csv.CSVFormat;
28import org.apache.commons.csv.CSVParser;
29import org.apache.commons.csv.CSVRecord;
30import org.sleuthkit.autopsy.coreutils.Logger;
31import org.sleuthkit.datamodel.TskCoreException;
45 HashkeeperHashSetParser(String
filename)
throws TskCoreException {
50 File importFile =
new File(
filename);
51 long fileSize = importFile.length();
59 if (!
csvParser.getHeaderMap().keySet().contains(
"hash")) {
61 throw new TskCoreException(
"Hashkeeper file format invalid - does not contain 'hash' column");
71 }
catch (IOException ex) {
73 throw new TskCoreException(
"Error reading " +
filename, ex);
90 if (hash.length() != 32) {
91 throw new TskCoreException(
"Hash has incorrect length: " + hash);
128 }
catch (IOException ex) {
129 Logger.
getLogger(HashkeeperHashSetParser.class.getName()).log(Level.SEVERE,
"Error closing Hashkeeper hash set " +
filename, ex);
synchronized static Logger getLogger(String name)
InputStreamReader inputStreamReader
long getExpectedHashCount()
final Iterator< CSVRecord > recordIterator
final long expectedHashCount
final int hashColumnIndex
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.