Autopsy  4.14.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter Class Reference

Classes

class  ImportCaseData
 

Static Public Member Functions

static void importCase (ImportCaseData icd) throws Exception
 

Static Private Member Functions

static void copyImages (ImportCaseData icd) throws Exception
 
static void copyResults (ImportCaseData icd) throws IOException
 
static void deconflictDatabaseName (ImportCaseData icd) throws ClassNotFoundException, SQLException, Exception
 
static File findInputFolder (ImportCaseData icd)
 
static void fixPaths (ImportCaseData icd) throws SQLException, Exception
 
static String getNullableInt (ResultSet rs, int index) throws SQLException
 
static String getNullableLong (ResultSet rs, int index) throws SQLException
 
static Connection getPostgreSQLConnection (ImportCaseData icd) throws SQLException
 
static Connection getPostgreSQLConnection (ImportCaseData icd, String dbName) throws SQLException
 
static Connection getSQLiteConnection (ImportCaseData icd) throws SQLException
 
static void importDb (ImportCaseData icd) throws SQLException, ClassNotFoundException, Exception
 
static void populateNullableByteArray (PreparedStatement pst, ResultSet rs, int rsIndex, int psIndex) throws SQLException
 
static void populateNullableNumeric (PreparedStatement pst, ResultSet rs, int rsIndex, int psIndex) throws SQLException
 
static void populateNullableString (PreparedStatement pst, ResultSet rs, int rsIndex, int psIndex) throws SQLException
 

Static Private Attributes

static final String AUTOPSY_DB_FILE = "autopsy.db"
 
static final String DOTAUT = CaseMetadata.getFileExtension()
 
static final int MAX_DB_NAME_LENGTH = 63
 
static final String MODULE_FOLDER = "ModuleOutput"
 
static final String POSTGRES_DEFAULT_DB_NAME = "postgres"
 
static final String TIMELINE_FILE = "events.db"
 
static final String TIMELINE_FOLDER = "Timeline"
 

Detailed Description

Import a case from single-user to multi-user.

DO NOT USE, NEEDS TO BE UPDATED

Definition at line 49 of file SingleUserCaseConverter.java.

Member Function Documentation

static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.copyImages ( ImportCaseData  icd) throws Exception
staticprivate

Get the images from the old case and stage them for the new case, if the user chose to copy images over.

Parameters
icdthe Import Case Data for the current case
Exceptions
IOException

Definition at line 973 of file SingleUserCaseConverter.java.

References org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.findInputFolder().

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importCase().

static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.copyResults ( ImportCaseData  icd) throws IOException
staticprivate
static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.deconflictDatabaseName ( ImportCaseData  icd) throws ClassNotFoundException, SQLException, Exception
staticprivate

Checks that the database name is unique. If it is not, attempts to add numbers to it until it is unique. Gives up if it goes through all positive integers without finding a unique name.

Parameters
icdthe Import Case Data for the current case
Exceptions
Exception
SQLException
ClassNotFoundException

Definition at line 923 of file SingleUserCaseConverter.java.

References org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.getPostgreSQLConnection(), and org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.MAX_DB_NAME_LENGTH.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

static File org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.findInputFolder ( ImportCaseData  icd)
staticprivate

Figure out the input folder for images and return it.

Parameters
icdthe Import Case Data for the current case
Returns
the name of the proper Image input folder

we've found it

we've found it

Definition at line 232 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.copyImages().

static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.fixPaths ( ImportCaseData  icd) throws SQLException, Exception
staticprivate

Fix up any paths in the database that refer to items that have moved. Candidates include events.db, input images, reports, file paths, etc.

Parameters
icdthe Import Case Data for the current case
Exceptions
Exception
SQLExceptionException

Fix paths in reports, tsk_files_path, and tsk_image_names tables

Definition at line 997 of file SingleUserCaseConverter.java.

References org.sleuthkit.autopsy.coreutils.NetworkUtils.getLocalHostName(), and org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.getPostgreSQLConnection().

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importCase().

static String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.getNullableInt ( ResultSet  rs,
int  index 
) throws SQLException
staticprivate

Return an integer from the ResultSet converted to String or NULL, by checking ResultSet.wasNull()

Parameters
rsthe ResultSet to work with
indexthe index into the ResultSet to work with
Returns
the proper value, the integer, or NULL
Exceptions
SQLException

Definition at line 1053 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

static String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.getNullableLong ( ResultSet  rs,
int  index 
) throws SQLException
staticprivate

Return a long from the ResultSet converted to String or NULL, by checking ResultSet.wasNull()

Parameters
rsthe ResultSet to work with
indexthe index into the ResultSet to work with
Returns
the proper value, the long, or NULL
Exceptions
SQLException

Definition at line 1073 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

static Connection org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.getPostgreSQLConnection ( ImportCaseData  icd) throws SQLException
staticprivate

Open the PostgreSQL database

Parameters
icdImport Case Data holding connection credentials
Returns
returns a Connection
Exceptions
SQLExceptionif unable to open

Definition at line 1151 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.deconflictDatabaseName(), org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.fixPaths(), and org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

static Connection org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.getPostgreSQLConnection ( ImportCaseData  icd,
String  dbName 
) throws SQLException
staticprivate

Open the PostgreSQL database

Parameters
icdImport Case Data holding connection credentials
dbNamethe name of the database to open
Returns
returns a Connection
Exceptions
SQLExceptionif unable to open

Definition at line 1165 of file SingleUserCaseConverter.java.

static Connection org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.getSQLiteConnection ( ImportCaseData  icd) throws SQLException
staticprivate

Open the SQLite database

Parameters
icdImport Case Data holding database path details
Returns
returns a Connection
Exceptions
SQLExceptionif unable to open

Definition at line 1183 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importCase ( ImportCaseData  icd) throws Exception
static
static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb ( ImportCaseData  icd) throws SQLException, ClassNotFoundException, Exception
staticprivate
static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.populateNullableByteArray ( PreparedStatement  pst,
ResultSet  rs,
int  rsIndex,
int  psIndex 
) throws SQLException
staticprivate

Place a NULL inside a prepared statement if needed, otherwise, place the byte array that was in the ResultSet.

Parameters
pstthe prepared statement
rsthe ResultSet to work with
rsIndexindex for the result set
psIndexindex for the prepared statement
Exceptions
SQLException

Definition at line 1113 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.populateNullableNumeric ( PreparedStatement  pst,
ResultSet  rs,
int  rsIndex,
int  psIndex 
) throws SQLException
staticprivate

Place a NULL inside a prepared statement if needed, otherwise, place the double that was in the ResultSet.

Parameters
pstthe prepared statement
rsthe ResultSet to work with
rsIndexindex for the result set
psIndexindex for the prepared statement
Exceptions
SQLException

Definition at line 1133 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

static void org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.populateNullableString ( PreparedStatement  pst,
ResultSet  rs,
int  rsIndex,
int  psIndex 
) throws SQLException
staticprivate

Place a NULL inside a prepared statement if needed, otherwise, place the String that was in the ResultSet.

Parameters
pstthe prepared statement
rsthe ResultSet to work with
rsIndexindex for the result set
psIndexindex for the prepared statement
Exceptions
SQLException

Definition at line 1093 of file SingleUserCaseConverter.java.

Referenced by org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importDb().

Member Data Documentation

final String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.AUTOPSY_DB_FILE = "autopsy.db"
staticprivate
final String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.DOTAUT = CaseMetadata.getFileExtension()
staticprivate
final int org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.MAX_DB_NAME_LENGTH = 63
staticprivate
final String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.MODULE_FOLDER = "ModuleOutput"
staticprivate
final String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.POSTGRES_DEFAULT_DB_NAME = "postgres"
staticprivate

Definition at line 56 of file SingleUserCaseConverter.java.

final String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.TIMELINE_FILE = "events.db"
staticprivate
final String org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.TIMELINE_FOLDER = "Timeline"
staticprivate

The documentation for this class was generated from the following file:

Copyright © 2012-2020 Basis Technology. Generated on: Wed Apr 8 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.