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

This commit is contained in:
raman-bt 2014-01-21 08:13:06 -05:00
commit c3330e3968
55 changed files with 1449 additions and 1634 deletions

View File

@ -1,9 +1,5 @@
Changes to make to API when we are ready to make backward incompatible changes:
- HTMLReport has special API for more context on columns and special handling in REportGenerator. Change all reports to the new API.
- DataContentViewer.isPreferred does not need isSupported to be passed in
- DataContentViewerHex and Strings can have the public setDataView methods removed in favor of the new private ones
- Content.getUniquePath() should not thrown TskException. We should deal with it in the method.
- Make the list of events that Case fires off to be part of an enum to group them together (like IngestManager does).
- Sub-modules in RecentActivity have a bunch of public/protected variables that do not need to be. (i.e. ExtractRegistry.rrFullFound).
- Delete BrowserType enum and BrowserActivityType in RecentActivity.

View File

@ -234,9 +234,6 @@ public class AddImageTask implements Runnable {
if (!(cancelled || hasCritError)) {
try {
// Tell the progress monitor we're done
progressMonitor.setProgress(100);
if (newContents.isEmpty()) {
if (addImageProcess != null) { // and if we're done configuring ingest
// commit anything
@ -255,6 +252,8 @@ public class AddImageTask implements Runnable {
else { //already commited?
logger.log(Level.INFO, "Assuming image already committed, will not commit.");
}
// Tell the progress monitor we're done
progressMonitor.setProgress(100);
} catch (Exception ex) {
//handle unchecked exceptions post image add

View File

@ -185,7 +185,7 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer
}
@Override
public int isPreferred(Node node, boolean isSupported) {
public int isPreferred(Node node) {
return 1;
}
}

View File

@ -83,16 +83,15 @@ public interface DataContentViewer {
* Checks whether the given viewer is preferred for the Node.
* This is a bit subjective, but the idea is that Autopsy wants to display
* the most relevant tab. The more generic the viewer, the lower
* the return value should be.
* the return value should be. This will only be called on viewers that
* support the given node.
*
* @param node Node to check for preference
* @param isSupported true if the viewer is supported by the node, false otherwise
* as determined by a previous check
* @return an int (0-10) higher return means the viewer has higher priority
* 0 means not supported
* 1 to 2 means the module will display all file types (such as the hex viewer)
* 3-10 are prioritized by Content viewer developer. Modules that operate on very
* few file types should be towards 10.
*/
public int isPreferred(Node node, boolean isSupported);
public int isPreferred(Node node);
}

View File

@ -181,7 +181,7 @@ public class DataContentPanel extends javax.swing.JPanel implements DataContent,
jTabbedPane1.setEnabledAt(i, true);
// remember the viewer with the highest preference value
int currentPreferred = dcv.isPreferred(selectedNode, true);
int currentPreferred = dcv.isPreferred(selectedNode);
if (currentPreferred > maxPreferred) {
preferredViewerIndex = i;
maxPreferred = currentPreferred;
@ -258,8 +258,8 @@ public class DataContentPanel extends javax.swing.JPanel implements DataContent,
return this.wrapped.isSupported(node);
}
int isPreferred(Node node, boolean isSupported) {
return this.wrapped.isPreferred(node, isSupported);
int isPreferred(Node node) {
return this.wrapped.isPreferred(node);
}
}

View File

@ -330,9 +330,8 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
}
@Override
public int isPreferred(Node node, boolean isSupported) {
public int isPreferred(Node node) {
BlackboardArtifact artifact = node.getLookup().lookup(BlackboardArtifact.class);
if(isSupported) {
if(artifact == null) {
return 3;
}
@ -340,10 +339,6 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
return 5;
}
}
else {
return 0;
}
}
/**
* Instances of this class are simple containers for view update information generated by a background thread.

View File

@ -434,12 +434,8 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
}
@Override
public int isPreferred(Node node, boolean isSupported) {
if (isSupported) {
public int isPreferred(Node node) {
return 1;
} else {
return 0;
}
}
@Override

View File

@ -226,8 +226,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
}
@Override
public int isPreferred(Node node, boolean isSupported) {
if (isSupported) {
public int isPreferred(Node node) {
//special case, check if deleted video, then do not make it preferred
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
if (file == null) {
@ -242,9 +241,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
else {
return 7;
}
} else {
return 0;
}
}
private static boolean containsExt(String name, String[] exts) {

View File

@ -322,14 +322,6 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
private javax.swing.JLabel totalPageLabel;
// End of variables declaration//GEN-END:variables
@Deprecated
public void setDataView(Content dataSource, long offset, boolean reset) {
if (reset) {
resetComponent();
return;
}
setDataView(dataSource, offset);
}
/**
* Sets the DataView (The tabbed panel)
@ -400,6 +392,30 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
this.setCursor(null);
}
private void setDataView(StringContent dataSource) {
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
this.dataSource = null;
// set the data on the bottom and show it
String text = dataSource.getString();
nextPageButton.setEnabled(false);
prevPageButton.setEnabled(false);
currentPage = 1;
int totalPage = 1;
totalPageLabel.setText(Integer.toString(totalPage));
currentPageLabel.setText(Integer.toString(currentPage));
outputViewPane.setText(text); // set the output view
setComponentsVisibility(true); // shows the components that not needed
outputViewPane.moveCaretPosition(0);
} finally {
this.setCursor(null);
}
}
/**
* To set the visibility of specific components in this class.
*
@ -484,12 +500,8 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
}
@Override
public int isPreferred(Node node, boolean isSupported) {
if (node != null && isSupported) {
public int isPreferred(Node node) {
return 1;
} else {
return 0;
}
}
@Override
@ -497,29 +509,6 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
return this;
}
private void setDataView(StringContent dataSource) {
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
this.dataSource = null;
// set the data on the bottom and show it
String text = dataSource.getString();
nextPageButton.setEnabled(false);
prevPageButton.setEnabled(false);
currentPage = 1;
int totalPage = 1;
totalPageLabel.setText(Integer.toString(totalPage));
currentPageLabel.setText(Integer.toString(currentPage));
outputViewPane.setText(text); // set the output view
setComponentsVisibility(true); // shows the components that not needed
outputViewPane.moveCaretPosition(0);
} finally {
this.setCursor(null);
}
}
/* Show the right click menu only if evt is the correct mouse event */
private void maybeShowPopup(java.awt.event.MouseEvent evt) {

View File

@ -166,10 +166,7 @@ public class SampleContentViewer extends javax.swing.JPanel implements DataConte
}
@Override
public int isPreferred(Node node, boolean isSupported) {
if (isSupported == false) {
return 0;
}
public int isPreferred(Node node) {
// we return 1 since this module will operate on nearly all files
return 1;
}

View File

@ -50,7 +50,6 @@ public final class HashDbConfigPanel extends javax.swing.JPanel implements Optio
private static final String NO_SELECTION_TEXT = "No database selected";
private static final String ERROR_GETTING_PATH_TEXT = "Error occurred getting path";
private static final String ERROR_GETTING_INDEX_STATUS_TEXT = "Error occurred getting status";
private static final String LEGACY_INDEX_FILE_EXTENSION = "-md5.idx";
private HashDbManager hashSetManager = HashDbManager.getInstance();
private HashSetTableModel hashSetTableModel = new HashSetTableModel();
@ -161,13 +160,10 @@ public final class HashDbConfigPanel extends javax.swing.JPanel implements Optio
hashDbIndexStatusLabel.setForeground(Color.black);
indexButton.setEnabled(false);
}
else if (db.hasLookupIndex()) {
else if (db.hasIndex()) {
if (db.hasIndexOnly()) {
hashDbIndexStatusLabel.setText("Index only");
}
else if (db.getIndexPath().endsWith(LEGACY_INDEX_FILE_EXTENSION)) {
hashDbIndexStatusLabel.setText("Indexed (old format)");
}
else {
hashDbIndexStatusLabel.setText("Indexed");
}
@ -242,7 +238,7 @@ public final class HashDbConfigPanel extends javax.swing.JPanel implements Optio
List<HashDb> unindexed = new ArrayList<>();
for (HashDb hashSet : hashSetManager.getAllHashSets()) {
try {
if (!hashSet.hasLookupIndex()) {
if (!hashSet.hasIndex()) {
unindexed.add(hashSet);
}
}
@ -376,7 +372,7 @@ public final class HashDbConfigPanel extends javax.swing.JPanel implements Optio
private boolean indexExists(int rowIndex){
try {
return hashSets.get(rowIndex).hasLookupIndex();
return hashSets.get(rowIndex).hasIndex();
}
catch (TskCoreException ex) {
Logger.getLogger(HashSetTableModel.class.getName()).log(Level.SEVERE, "Error getting index info for hash database", ex);

View File

@ -43,6 +43,7 @@ import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData;
import org.sleuthkit.datamodel.TskException;
import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb;
import org.sleuthkit.datamodel.HashInfo;
public class HashDbIngestModule extends IngestModuleAbstractFile {
private static HashDbIngestModule instance = null;
@ -164,7 +165,7 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
for (HashDb db : hashDbs) {
if (db.getSearchDuringIngest()) {
try {
if (db.hasLookupIndex()) {
if (db.hasIndex()) {
hashDbsForIngest.add(db);
}
}
@ -218,7 +219,8 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
for (HashDb db : knownBadHashSets) {
try {
long lookupstart = System.currentTimeMillis();
if (db.hasMd5HashOf(file)) {
HashInfo hashInfo = db.lookUp(file);
if (null != hashInfo) {
foundBad = true;
knownBadCount += 1;
try {
@ -232,13 +234,13 @@ public class HashDbIngestModule extends IngestModuleAbstractFile {
String hashSetName = db.getHashSetName();
String comment = "";
ArrayList<String> comments = db.lookUp(file).getComments();
ArrayList<String> comments = hashInfo.getComments();
int i = 0;
for (String c : comments) {
comment += c;
if (++i > 1) {
c += ". ";
comment += " ";
}
comment += c;
if (comment.length() > MAX_COMMENT_SIZE) {
comment = comment.substring(0, MAX_COMMENT_SIZE) + "...";
break;

View File

@ -243,9 +243,9 @@ public class HashDbManager implements PropertyChangeListener {
return hashDb;
}
synchronized void indexHashDatabase(HashDb hashDb, boolean deleteIndexFile) {
synchronized void indexHashDatabase(HashDb hashDb) {
hashDb.addPropertyChangeListener(this);
HashDbIndexer creator = new HashDbIndexer(hashDb, deleteIndexFile);
HashDbIndexer creator = new HashDbIndexer(hashDb);
creator.execute();
}
@ -788,7 +788,7 @@ public class HashDbManager implements PropertyChangeListener {
* @throws TskCoreException
*/
public void addHashes(Content content, String comment) throws TskCoreException {
// TODO: This only works for AbstractFiles and MD5 hashes at present.
// This only works for AbstractFiles and MD5 hashes at present.
assert content instanceof AbstractFile;
if (content instanceof AbstractFile) {
AbstractFile file = (AbstractFile)content;
@ -812,7 +812,7 @@ public class HashDbManager implements PropertyChangeListener {
public HashInfo lookUp(Content content) throws TskCoreException {
HashInfo result = null;
// TODO: This only works for AbstractFiles and MD5 hashes at present.
// This only works for AbstractFiles and MD5 hashes at present.
assert content instanceof AbstractFile;
if (content instanceof AbstractFile) {
AbstractFile file = (AbstractFile)content;
@ -823,12 +823,12 @@ public class HashDbManager implements PropertyChangeListener {
return result;
}
boolean hasLookupIndex() throws TskCoreException {
boolean hasIndex() throws TskCoreException {
return SleuthkitJNI.hashDatabaseHasLookupIndex(handle);
}
boolean hasIndexOnly() throws TskCoreException {
return SleuthkitJNI.hashDatabaseHasLegacyLookupIndexOnly(handle);
return SleuthkitJNI.hashDatabaseIsIndexOnly(handle);
}
boolean canBeReIndexed() throws TskCoreException {
@ -847,11 +847,9 @@ public class HashDbManager implements PropertyChangeListener {
private class HashDbIndexer extends SwingWorker<Object, Void> {
private ProgressHandle progress = null;
private HashDb hashDb = null;
private boolean deleteIndexFile = false;
HashDbIndexer(HashDb hashDb, boolean deleteIndexFile) {
HashDbIndexer(HashDb hashDb) {
this.hashDb = hashDb;
this.deleteIndexFile = deleteIndexFile;
};
@Override
@ -861,7 +859,7 @@ public class HashDbManager implements PropertyChangeListener {
progress.start();
progress.switchToIndeterminate();
try {
SleuthkitJNI.createLookupIndexForHashDatabase(hashDb.handle, deleteIndexFile);
SleuthkitJNI.createLookupIndexForHashDatabase(hashDb.handle);
}
catch (TskCoreException ex) {
Logger.getLogger(HashDb.class.getName()).log(Level.SEVERE, "Error indexing hash database", ex);

View File

@ -146,7 +146,7 @@ public class HashDbSimpleConfigPanel extends javax.swing.JPanel {
HashDb db = hashDatabases.get(rowIndex);
boolean dbHasIndex = false;
try {
dbHasIndex = db.hasLookupIndex();
dbHasIndex = db.hasIndex();
}
catch (TskCoreException ex) {
Logger.getLogger(HashDbSimpleConfigPanel.class.getName()).log(Level.SEVERE, "Error getting info for " + db.getHashSetName() + " hash database", ex);

View File

@ -21,13 +21,9 @@ package org.sleuthkit.autopsy.hashdatabase;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import javax.swing.JOptionPane;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb;
/**
@ -42,7 +38,6 @@ import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb;
*/
class ModalNoButtons extends javax.swing.JDialog implements PropertyChangeListener {
private static final String INDEX_FILE_EXTENSION = ".kdb";
List<HashDb> unindexed;
HashDb toIndex;
HashDbConfigPanel hdbmp;
@ -211,7 +206,7 @@ class ModalNoButtons extends javax.swing.JDialog implements PropertyChangeListen
this.CURRENTLYON_LABEL.setText("Currently indexing 1 database");
if (!this.toIndex.isIndexing()) {
this.toIndex.addPropertyChangeListener(this);
HashDbManager.getInstance().indexHashDatabase(toIndex, okToDeleteOldIndexFile(toIndex));
HashDbManager.getInstance().indexHashDatabase(toIndex);
}
}
@ -227,7 +222,7 @@ class ModalNoButtons extends javax.swing.JDialog implements PropertyChangeListen
this.CURRENTLYON_LABEL.setText("Currently indexing 1 of " + length);
if (!db.isIndexing()) {
db.addPropertyChangeListener(this);
HashDbManager.getInstance().indexHashDatabase(db, okToDeleteOldIndexFile(db));
HashDbManager.getInstance().indexHashDatabase(db);
}
}
}
@ -256,22 +251,4 @@ class ModalNoButtons extends javax.swing.JDialog implements PropertyChangeListen
}
}
}
private boolean okToDeleteOldIndexFile(HashDb hashDb) {
boolean deleteOldIndexFile = true;
try {
if (hashDb.hasLookupIndex()) {
String indexPath = hashDb.getIndexPath();
File indexFile = new File(indexPath);
if (!indexPath.endsWith(INDEX_FILE_EXTENSION)) {
deleteOldIndexFile = JOptionPane.showConfirmDialog(this, "Updating index file format, delete " + indexFile.getName() + " file that uses the old file format?", "Delete Obsolete Index File", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
}
}
}
catch (TskCoreException ex) {
Logger.getLogger(HashDbConfigPanel.class.getName()).log(Level.SEVERE, "Error getting index info for hash database", ex);
JOptionPane.showMessageDialog(null, "Error gettting index information for " + hashDb.getHashSetName() + " hash database. Cannot perform indexing operation.", "Hash Database Index Status Error", JOptionPane.ERROR_MESSAGE);
}
return deleteOldIndexFile;
}
}

View File

@ -311,10 +311,9 @@ public class ExtractedContentViewer implements DataContentViewer {
}
@Override
public int isPreferred(Node node,
boolean isSupported) {
public int isPreferred(Node node) {
BlackboardArtifact art = node.getLookup().lookup(BlackboardArtifact.class);
if (isSupported) {
if (art == null) {
return 4;
} else if (art.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) {
@ -322,9 +321,6 @@ public class ExtractedContentViewer implements DataContentViewer {
} else {
return 4;
}
} else {
return 0;
}
}
/**

View File

@ -1,61 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sleuthkit.autopsy.recentactivity;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
/**
*
* No one seems to be using this
*/
@Deprecated
public enum BrowserActivityType {
Cookies(0),
Url(1),
Bookmarks(2);
private static final Map<Integer,BrowserActivityType> lookup
= new HashMap<Integer,BrowserActivityType>();
static {
for(BrowserActivityType bat : values())
lookup.put(bat.type, bat);
}
private int type;
private BrowserActivityType(int type)
{
this.type = type;
}
public int getType() { return type; }
public static BrowserActivityType get(int type) {
switch(type) {
case 0: return Cookies;
case 1: return Url;
case 2: return Bookmarks;
}
return null;
}
}

View File

@ -1,60 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sleuthkit.autopsy.recentactivity;
import java.util.HashMap;
import java.util.Map;
/**
*
* No one is using this. It should go away
*/
@Deprecated
public enum BrowserType {
IE(0), //Internet Explorer
FF(1), //Firefox
CH(2); //Chrome
private static final Map<Integer,BrowserType> lookup
= new HashMap<Integer,BrowserType>();
static {
for(BrowserType bt : values())
lookup.put(bt.type, bt);
}
private int type;
private BrowserType(int type)
{
this.type = type;
}
public int getType() { return type; }
public static BrowserType get(int type) {
switch(type) {
case 0: return IE;
case 1: return FF;
case 2: return CH;
}
return null;
}
}

View File

@ -55,7 +55,7 @@ import org.sleuthkit.datamodel.TskData;
/**
* Chrome recent activity extraction
*/
public class Chrome extends Extract {
class Chrome extends Extract {
private static final String historyQuery = "SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, "
+ "last_visit_time, urls.hidden, visits.visit_time, (SELECT urls.url FROM urls WHERE urls.id=visits.url) as from_visit, visits.transition FROM urls, visits WHERE urls.id = visits.url";
@ -65,8 +65,8 @@ public class Chrome extends Extract {
private static final String downloadQueryVersion30 = "SELECT current_path as full_path, url, start_time, received_bytes FROM downloads, downloads_url_chains WHERE downloads.id=downloads_url_chains.id";
private static final String loginQuery = "select origin_url, username_value, signon_realm from logins";
private final Logger logger = Logger.getLogger(this.getClass().getName());
public int ChromeCount = 0;
final public static String MODULE_VERSION = "1.0";
private int ChromeCount = 0;
final private static String MODULE_VERSION = "1.0";
private IngestServices services;
//hide public constructor to prevent from instantiation by ingest module loader

View File

@ -33,14 +33,14 @@ import org.sleuthkit.autopsy.ingest.IngestModuleDataSource;
import org.sleuthkit.autopsy.report.SQLiteDBConnect;
import org.sleuthkit.datamodel.*;
abstract public class Extract extends IngestModuleDataSource{
abstract class Extract extends IngestModuleDataSource{
protected Case currentCase = Case.getCurrentCase(); // get the most updated case
protected SleuthkitCase tskCase = currentCase.getSleuthkitCase();
public final Logger logger = Logger.getLogger(this.getClass().getName());
protected final ArrayList<String> errorMessages = new ArrayList<>();
protected String moduleName = "";
protected boolean dataFound = false;
private final ArrayList<String> errorMessages = new ArrayList<>();
String moduleName = "";
boolean dataFound = false;
//hide public constructor to prevent from instantiation by ingest module loader
Extract() {

View File

@ -68,7 +68,7 @@ import org.sleuthkit.autopsy.ingest.IngestModuleDataSource;
import org.sleuthkit.autopsy.ingest.IngestModuleInit;
import org.sleuthkit.datamodel.*;
public class ExtractIE extends Extract {
class ExtractIE extends Extract {
private static final Logger logger = Logger.getLogger(ExtractIE.class.getName());
private IngestServices services;
@ -77,7 +77,7 @@ public class ExtractIE extends Extract {
private String PASCO_LIB_PATH;
private String JAVA_PATH;
final public static String MODULE_VERSION = "1.0";
final private static String MODULE_VERSION = "1.0";
private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
private ExecUtil execPasco;

View File

@ -57,14 +57,14 @@ import org.xml.sax.SAXException;
* and the second is a set that were customized for Autopsy to produce a more structured
* output of XML so that we can parse and turn into blackboard artifacts.
*/
public class ExtractRegistry extends Extract {
class ExtractRegistry extends Extract {
public Logger logger = Logger.getLogger(this.getClass().getName());
private Logger logger = Logger.getLogger(this.getClass().getName());
private String RR_PATH;
private String RR_FULL_PATH;
boolean rrFound = false; // true if we found the Autopsy-specific version of regripper
boolean rrFullFound = false; // true if we found the full version of regripper
final public static String MODULE_VERSION = "1.0";
private boolean rrFound = false; // true if we found the Autopsy-specific version of regripper
private boolean rrFullFound = false; // true if we found the full version of regripper
final private static String MODULE_VERSION = "1.0";
private ExecUtil execRR;
//hide public constructor to prevent from instantiation by ingest module loader

View File

@ -40,7 +40,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil;
* Loads a file that maps USB IDs to names of makes and models. Uses Linux USB info.
* This should be renamed because it isn't extracting. It's just mapping IDs to names.
*/
public class ExtractUSB {
class ExtractUSB {
private static final Logger logger = Logger.getLogger(ExtractUSB.class.getName());
private HashMap<String, USBInfo> devices;
private static final String DataFile = "USB_DATA.txt";

View File

@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException;
/**
* Firefox recent activity extraction
*/
public class Firefox extends Extract {
class Firefox extends Extract {
private static final String historyQuery = "SELECT moz_historyvisits.id,url,title,visit_count,(visit_date/1000000) as visit_date,from_visit,(SELECT url FROM moz_places WHERE id=moz_historyvisits.from_visit) as ref FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id AND hidden = 0";
private static final String cookieQuery = "SELECT name,value,host,expiry,(lastAccessed/1000000) as lastAccessed,(creationTime/1000000) as creationTime FROM moz_cookies";
@ -59,8 +59,7 @@ public class Firefox extends Extract {
private static final String downloadQuery = "SELECT target, source,(startTime/1000000) as startTime, maxBytes FROM moz_downloads";
private static final String downloadQueryVersion24 = "SELECT url, content as target, (lastModified/1000000) as lastModified FROM moz_places, moz_annos WHERE moz_places.id = moz_annos.place_id AND moz_annos.anno_attribute_id = 3";
public int FireFoxCount = 0;
final public static String MODULE_VERSION = "1.0";
final private static String MODULE_VERSION = "1.0";
private IngestServices services;
//hide public constructor to prevent from instantiation by ingest module loader

View File

@ -51,7 +51,7 @@ public final class RAImageIngestModule extends IngestModuleDataSource {
private StringBuilder subCompleted = new StringBuilder();
private ArrayList<Extract> modules;
private List<Extract> browserModules;
final public static String MODULE_VERSION = Version.getVersion();
final private static String MODULE_VERSION = Version.getVersion();
//public constructor is required
//as multiple instances are created for processing multiple images simultenously

View File

@ -62,14 +62,14 @@ import org.xml.sax.SAXException;
* To add search engines, edit SearchEngines.xml under RecentActivity
*
*/
public class SearchEngineURLQueryAnalyzer extends Extract {
class SearchEngineURLQueryAnalyzer extends Extract {
private IngestServices services;
public static final String MODULE_NAME = "Search Engine URL Query Analyzer";
public final static String MODULE_VERSION = "1.0";
private static final String MODULE_NAME = "Search Engine URL Query Analyzer";
private final static String MODULE_VERSION = "1.0";
public static final String XMLFILE = "SEUQAMappings.xml";
private static final String XMLFILE = "SEUQAMappings.xml";
private static final String XSDFILE = "SearchEngineSchema.xsd";

View File

@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException;
*
* @author Alex
*/
public class Util {
class Util {
private static Logger logger = Logger.getLogger(Util.class.getName());