Replaced NOI18N with NON-NLS to be consistent.

This commit is contained in:
Nick Davis 2014-12-04 12:58:29 -05:00 committed by Nick Davis
parent b106659a9f
commit 2d29876f78
9 changed files with 122 additions and 122 deletions

View File

@ -57,7 +57,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
return IngestModule.ProcessResult.OK; return IngestModule.ProcessResult.OK;
} }
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Contacts"); //NOI18N errors.add("Error getting Contacts"); //NON-NLS
} }
try { try {
@ -67,7 +67,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
return IngestModule.ProcessResult.OK; return IngestModule.ProcessResult.OK;
} }
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Call Logs"); //NOI18N errors.add("Error getting Call Logs"); //NON-NLS
} }
try { try {
@ -77,7 +77,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
return IngestModule.ProcessResult.OK; return IngestModule.ProcessResult.OK;
} }
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Text Messages"); //NOI18N errors.add("Error getting Text Messages"); //NON-NLS
} }
try { try {
@ -87,7 +87,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
return IngestModule.ProcessResult.OK; return IngestModule.ProcessResult.OK;
} }
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Tango Messages"); //NOI18N errors.add("Error getting Tango Messages"); //NON-NLS
} }
try { try {
@ -97,7 +97,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
return IngestModule.ProcessResult.OK; return IngestModule.ProcessResult.OK;
} }
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Words with Friends Messages"); //NOI18N errors.add("Error getting Words with Friends Messages"); //NON-NLS
} }
try { try {
@ -107,7 +107,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
return IngestModule.ProcessResult.OK; return IngestModule.ProcessResult.OK;
} }
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Google Map Locations"); //NOI18N errors.add("Error getting Google Map Locations"); //NON-NLS
} }
try { try {
@ -117,14 +117,14 @@ class AndroidIngestModule implements DataSourceIngestModule {
return IngestModule.ProcessResult.OK; return IngestModule.ProcessResult.OK;
} }
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Browser Locations"); //NOI18N errors.add("Error getting Browser Locations"); //NON-NLS
} }
try { try {
CacheLocationAnalyzer.findGeoLocations(); CacheLocationAnalyzer.findGeoLocations();
progressBar.progress(8); progressBar.progress(8);
} catch (Exception e) { } catch (Exception e) {
errors.add("Error getting Cache Locations"); //NOI18N errors.add("Error getting Cache Locations"); //NON-NLS
} }
// create the final message for inbox // create the final message for inbox
@ -133,20 +133,20 @@ class AndroidIngestModule implements DataSourceIngestModule {
IngestMessage.MessageType msgLevel = IngestMessage.MessageType.INFO; IngestMessage.MessageType msgLevel = IngestMessage.MessageType.INFO;
if (errors.isEmpty() == false) { if (errors.isEmpty() == false) {
msgLevel = IngestMessage.MessageType.ERROR; msgLevel = IngestMessage.MessageType.ERROR;
errorMessage.append("Errors were encountered"); //NOI18N errorMessage.append("Errors were encountered"); //NON-NLS
for (String msg : errors) { for (String msg : errors) {
errorMessage.append("<li>").append(msg).append("</li>\n"); //NON-NLS errorMessage.append("<li>").append(msg).append("</li>\n"); //NON-NLS
} }
errorMessage.append("</ul>\n"); //NON-NLS errorMessage.append("</ul>\n"); //NON-NLS
if (errors.size() == 1) { if (errors.size() == 1) {
errorMsgSubject = "One error was found"; //NOI18N errorMsgSubject = "One error was found"; //NON-NLS
} else { } else {
errorMsgSubject = "errors found: " + errors.size(); //NOI18N errorMsgSubject = "errors found: " + errors.size(); //NON-NLS
} }
} else { } else {
errorMessage.append("No errors"); //NOI18N errorMessage.append("No errors"); //NON-NLS
errorMsgSubject = "No errors"; //NOI18N errorMsgSubject = "No errors"; //NON-NLS
} }
services.postMessage(IngestMessage.createMessage(msgLevel, AndroidModuleFactory.getModuleName(), "Finished Analysis: " + errorMsgSubject, errorMessage.toString())); services.postMessage(IngestMessage.createMessage(msgLevel, AndroidModuleFactory.getModuleName(), "Finished Analysis: " + errorMsgSubject, errorMessage.toString()));

View File

@ -43,7 +43,7 @@ class BrowserLocationAnalyzer {
public static void findGeoLocations() { public static void findGeoLocations() {
try { try {
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
List<AbstractFile> abstractFiles = skCase.findAllFilesWhere("name LIKE 'CachedGeoposition%.db'"); //NOI18N //get exact file names List<AbstractFile> abstractFiles = skCase.findAllFilesWhere("name LIKE 'CachedGeoposition%.db'"); //NON-NLS //get exact file names
for (AbstractFile abstractFile : abstractFiles) { for (AbstractFile abstractFile : abstractFiles) {
try { try {
@ -54,11 +54,11 @@ class BrowserLocationAnalyzer {
ContentUtils.writeToFile(abstractFile, jFile); ContentUtils.writeToFile(abstractFile, jFile);
findGeoLocationsInDB(jFile.toString(), abstractFile); findGeoLocationsInDB(jFile.toString(), abstractFile);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Browser Location files", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Browser Location files", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding Browser Location files", e); //NOI18N logger.log(Level.SEVERE, "Error finding Browser Location files", e); //NON-NLS
} }
} }
@ -71,22 +71,22 @@ class BrowserLocationAnalyzer {
return; return;
} }
try { try {
Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver
connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS
statement = connection.createStatement(); statement = connection.createStatement();
} catch (ClassNotFoundException | SQLException e) { } catch (ClassNotFoundException | SQLException e) {
logger.log(Level.SEVERE, "Error connecting to sql database", e); //NOI18N logger.log(Level.SEVERE, "Error connecting to sql database", e); //NON-NLS
return; return;
} }
try { try {
resultSet = statement.executeQuery( resultSet = statement.executeQuery(
"Select timestamp, latitude, longitude, accuracy FROM CachedPosition;"); //NOI18N "Select timestamp, latitude, longitude, accuracy FROM CachedPosition;"); //NON-NLS
while (resultSet.next()) { while (resultSet.next()) {
Long timestamp = Long.valueOf(resultSet.getString("timestamp")) / 1000; //NOI18N Long timestamp = Long.valueOf(resultSet.getString("timestamp")) / 1000; //NON-NLS
double latitude = Double.valueOf(resultSet.getString("latitude")); //NOI18N double latitude = Double.valueOf(resultSet.getString("latitude")); //NON-NLS
double longitude = Double.valueOf(resultSet.getString("longitude")); //NOI18N double longitude = Double.valueOf(resultSet.getString("longitude")); //NON-NLS
BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT); BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT);
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID(), moduleName, latitude)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID(), moduleName, latitude));
@ -96,7 +96,7 @@ class BrowserLocationAnalyzer {
// bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(),moduleName, accuracy)); // bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(),moduleName, accuracy));
} }
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error Putting artifacts to Blackboard", e); //NOI18N logger.log(Level.SEVERE, "Error Putting artifacts to Blackboard", e); //NON-NLS
} finally { } finally {
try { try {
if (resultSet != null) { if (resultSet != null) {
@ -105,7 +105,7 @@ class BrowserLocationAnalyzer {
statement.close(); statement.close();
connection.close(); connection.close();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error closing database", e); //NOI18N logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS
} }
} }

View File

@ -43,7 +43,7 @@ class CacheLocationAnalyzer {
try { try {
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
List<AbstractFile> abstractFiles = skCase.findAllFilesWhere("name ='cache.cell' OR name='cache.wifi'"); //NOI18N //get exact file names List<AbstractFile> abstractFiles = skCase.findAllFilesWhere("name ='cache.cell' OR name='cache.wifi'"); //NON-NLS //get exact file names
for (AbstractFile abstractFile : abstractFiles) { for (AbstractFile abstractFile : abstractFiles) {
try { try {
@ -55,11 +55,11 @@ class CacheLocationAnalyzer {
findGeoLocationsInFile(jFile, abstractFile); findGeoLocationsInFile(jFile, abstractFile);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing cached Location files", e); //NOI18N logger.log(Level.SEVERE, "Error parsing cached Location files", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding cached Location files", e); //NOI18N logger.log(Level.SEVERE, "Error finding cached Location files", e); //NON-NLS
} }
} }
@ -124,7 +124,7 @@ class CacheLocationAnalyzer {
} }
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Cached GPS locations to Blackboard", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Cached GPS locations to Blackboard", e); //NON-NLS
} }
} }

View File

@ -47,11 +47,11 @@ class CallLogAnalyzer {
/** the where clause(without 'where' of sql select statement to choose call /** the where clause(without 'where' of sql select statement to choose call
* log dbs, update the list of file names to include more files */ * log dbs, update the list of file names to include more files */
private static final String fileNameQuery = Stream.of("'logs.db'", "'contacts2.db'", "'contacts.db'") //NOI18N private static final String fileNameQuery = Stream.of("'logs.db'", "'contacts2.db'", "'contacts.db'") //NON-NLS
.collect(Collectors.joining(" OR name = ", "name = ", "")); //NOI18N .collect(Collectors.joining(" OR name = ", "name = ", "")); //NON-NLS
/** the names of tables that potentially hold call logs in the dbs */ /** the names of tables that potentially hold call logs in the dbs */
private static final Iterable<String> tableNames = Arrays.asList("calls", "logs"); //NOI18N private static final Iterable<String> tableNames = Arrays.asList("calls", "logs"); //NON-NLS
public static void findCallLogs() { public static void findCallLogs() {
try { try {
@ -63,11 +63,11 @@ class CallLogAnalyzer {
ContentUtils.writeToFile(abstractFile, file); ContentUtils.writeToFile(abstractFile, file);
findCallLogsInDB(file.toString(), abstractFile); findCallLogsInDB(file.toString(), abstractFile);
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.SEVERE, "Error writing temporary call log db to disk", e); //NOI18N logger.log(Level.SEVERE, "Error writing temporary call log db to disk", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding call logs", e); //NOI18N logger.log(Level.SEVERE, "Error finding call logs", e); //NON-NLS
} }
} }
@ -76,20 +76,20 @@ class CallLogAnalyzer {
if (DatabasePath == null || DatabasePath.isEmpty()) { if (DatabasePath == null || DatabasePath.isEmpty()) {
return; return;
} }
try (Connection connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N try (Connection connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS
Statement statement = connection.createStatement();) { Statement statement = connection.createStatement();) {
for (String tableName : tableNames) { for (String tableName : tableNames) {
try (ResultSet resultSet = statement.executeQuery( try (ResultSet resultSet = statement.executeQuery(
"SELECT number,date,duration,type, name FROM " + tableName + " ORDER BY date DESC;");) { //NOI18N "SELECT number,date,duration,type, name FROM " + tableName + " ORDER BY date DESC;");) { //NON-NLS
logger.log(Level.INFO, "Reading call log from table {0} in db {1}", new Object[]{tableName, DatabasePath}); //NOI18N logger.log(Level.INFO, "Reading call log from table {0} in db {1}", new Object[]{tableName, DatabasePath}); //NON-NLS
while (resultSet.next()) { while (resultSet.next()) {
Long date = resultSet.getLong("date") / 1000; Long date = resultSet.getLong("date") / 1000;
final CallDirection direction = CallDirection.fromType(resultSet.getInt("type")); //NOI18N final CallDirection direction = CallDirection.fromType(resultSet.getInt("type")); //NON-NLS
String directionString = direction != null ? direction.getDisplayName() : ""; String directionString = direction != null ? direction.getDisplayName() : "";
final String number = resultSet.getString("number"); //NOI18N final String number = resultSet.getString("number"); //NON-NLS
final long duration = resultSet.getLong("duration"); //NOI18N //duration of call is in seconds final long duration = resultSet.getLong("duration"); //NON-NLS //duration of call is in seconds
final String name = resultSet.getString("name"); //NOI18N // name of person dialed or called. null if unregistered final String name = resultSet.getString("name"); //NON-NLS // name of person dialed or called. null if unregistered
try { try {
BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG); //create a call log and then add attributes from result set. BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG); //create a call log and then add attributes from result set.
@ -104,21 +104,21 @@ class CallLogAnalyzer {
bba.addAttribute(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID(), moduleName, directionString)); bba.addAttribute(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID(), moduleName, directionString));
bba.addAttribute(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), moduleName, name)); bba.addAttribute(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), moduleName, name));
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error posting call log record to the Blackboard", ex); //NOI18N logger.log(Level.SEVERE, "Error posting call log record to the Blackboard", ex); //NON-NLS
} }
} }
} catch (SQLException e) { } catch (SQLException e) {
logger.log(Level.WARNING, "Could not read table {0} in db {1}", new Object[]{tableName, DatabasePath}); //NOI18N logger.log(Level.WARNING, "Could not read table {0} in db {1}", new Object[]{tableName, DatabasePath}); //NON-NLS
} }
} }
} catch (SQLException e) { } catch (SQLException e) {
logger.log(Level.SEVERE, "Could not parse call log; error connecting to db " + DatabasePath, e); //NOI18N logger.log(Level.SEVERE, "Could not parse call log; error connecting to db " + DatabasePath, e); //NON-NLS
} }
} }
private static enum CallDirection { private static enum CallDirection {
INCOMING(1, "Incoming"), OUTGOING(2, "Outgoing"), MISSED(3, "Missed"); //NOI18N INCOMING(1, "Incoming"), OUTGOING(2, "Outgoing"), MISSED(3, "Missed"); //NON-NLS
private final int type; private final int type;

View File

@ -45,7 +45,7 @@ class ContactAnalyzer {
List<AbstractFile> absFiles; List<AbstractFile> absFiles;
try { try {
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
absFiles = skCase.findAllFilesWhere("name ='contacts2.db' OR name ='contacts.db'"); //NOI18N //get exact file names absFiles = skCase.findAllFilesWhere("name ='contacts2.db' OR name ='contacts.db'"); //NON-NLS //get exact file names
if (absFiles.isEmpty()) { if (absFiles.isEmpty()) {
return; return;
} }
@ -55,11 +55,11 @@ class ContactAnalyzer {
ContentUtils.writeToFile(AF, jFile); ContentUtils.writeToFile(AF, jFile);
findContactsInDB(jFile.toString(), AF); findContactsInDB(jFile.toString(), AF);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Contacts", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Contacts", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding Contacts", e); //NOI18N logger.log(Level.SEVERE, "Error finding Contacts", e); //NON-NLS
} }
} }
@ -78,11 +78,11 @@ class ContactAnalyzer {
return; return;
} }
try { try {
Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver
connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS
statement = connection.createStatement(); statement = connection.createStatement();
} catch (ClassNotFoundException | SQLException e) { } catch (ClassNotFoundException | SQLException e) {
logger.log(Level.SEVERE, "Error opening database", e); //NOI18N logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS
return; return;
} }
@ -90,13 +90,13 @@ class ContactAnalyzer {
// get display_name, mimetype(email or phone number) and data1 (phonenumber or email address depending on mimetype) // get display_name, mimetype(email or phone number) and data1 (phonenumber or email address depending on mimetype)
//sorted by name, so phonenumber/email would be consecutive for a person if they exist. //sorted by name, so phonenumber/email would be consecutive for a person if they exist.
resultSet = statement.executeQuery( resultSet = statement.executeQuery(
"SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" //NOI18N "SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" //NON-NLS
+ "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" //NOI18N + "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" //NON-NLS
+ "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " //NOI18N + "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " //NON-NLS
+ "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" //NOI18N + "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" //NON-NLS
+ "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" //NOI18N + "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" //NON-NLS
+ "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" //NOI18N + "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" //NON-NLS
+ "ORDER BY name_raw_contact.display_name ASC;"); //NOI18N + "ORDER BY name_raw_contact.display_name ASC;"); //NON-NLS
BlackboardArtifact bba; BlackboardArtifact bba;
bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT);
@ -105,15 +105,15 @@ class ContactAnalyzer {
String mimetype; // either phone or email String mimetype; // either phone or email
String data1; // the phone number or email String data1; // the phone number or email
while (resultSet.next()) { while (resultSet.next()) {
name = resultSet.getString("display_name"); //NOI18N name = resultSet.getString("display_name"); //NON-NLS
data1 = resultSet.getString("data1"); //NOI18N data1 = resultSet.getString("data1"); //NON-NLS
mimetype = resultSet.getString("mimetype"); //NOI18N mimetype = resultSet.getString("mimetype"); //NON-NLS
// System.out.println(resultSet.getString("data1") + resultSet.getString("mimetype") + resultSet.getString("display_name")); //Test code // System.out.println(resultSet.getString("data1") + resultSet.getString("mimetype") + resultSet.getString("display_name")); //Test code
if (name.equals(oldName) == false) { if (name.equals(oldName) == false) {
bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT);
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), moduleName, name)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), moduleName, name));
} }
if (mimetype.equals("vnd.android.cursor.item/phone_v2")) { //NOI18N if (mimetype.equals("vnd.android.cursor.item/phone_v2")) { //NON-NLS
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID(), moduleName, data1)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID(), moduleName, data1));
} else { } else {
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID(), moduleName, data1)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID(), moduleName, data1));
@ -122,7 +122,7 @@ class ContactAnalyzer {
} }
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); //NON-NLS
} finally { } finally {
try { try {
if (resultSet != null) { if (resultSet != null) {
@ -131,7 +131,7 @@ class ContactAnalyzer {
statement.close(); statement.close();
connection.close(); connection.close();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error closing database", e); //NOI18N logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS
} }
} }

View File

@ -44,7 +44,7 @@ class GoogleMapLocationAnalyzer {
List<AbstractFile> absFiles; List<AbstractFile> absFiles;
try { try {
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
absFiles = skCase.findAllFilesWhere("name ='da_destination_history'"); //NOI18N //get exact file name absFiles = skCase.findAllFilesWhere("name ='da_destination_history'"); //NON-NLS //get exact file name
if (absFiles.isEmpty()) { if (absFiles.isEmpty()) {
return; return;
} }
@ -54,11 +54,11 @@ class GoogleMapLocationAnalyzer {
ContentUtils.writeToFile(abstractFile, jFile); ContentUtils.writeToFile(abstractFile, jFile);
findGeoLocationsInDB(jFile.toString(), abstractFile); findGeoLocationsInDB(jFile.toString(), abstractFile);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Google map locations", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Google map locations", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding Google map locations", e); //NOI18N logger.log(Level.SEVERE, "Error finding Google map locations", e); //NON-NLS
} }
} }
@ -71,27 +71,27 @@ class GoogleMapLocationAnalyzer {
return; return;
} }
try { try {
Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver
connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS
statement = connection.createStatement(); statement = connection.createStatement();
} catch (ClassNotFoundException | SQLException e) { } catch (ClassNotFoundException | SQLException e) {
logger.log(Level.SEVERE, "Error opening database", e); //NOI18N logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS
return; return;
} }
try { try {
resultSet = statement.executeQuery( resultSet = statement.executeQuery(
"Select time,dest_lat,dest_lng,dest_title,dest_address,source_lat,source_lng FROM destination_history;"); //NOI18N "Select time,dest_lat,dest_lng,dest_title,dest_address,source_lat,source_lng FROM destination_history;"); //NON-NLS
while (resultSet.next()) { while (resultSet.next()) {
Long time = Long.valueOf(resultSet.getString("time")) / 1000; //NOI18N Long time = Long.valueOf(resultSet.getString("time")) / 1000; //NON-NLS
String dest_title = resultSet.getString("dest_title"); //NOI18N String dest_title = resultSet.getString("dest_title"); //NON-NLS
String dest_address = resultSet.getString("dest_address"); //NOI18N String dest_address = resultSet.getString("dest_address"); //NON-NLS
double dest_lat = convertGeo(resultSet.getString("dest_lat")); //NOI18N double dest_lat = convertGeo(resultSet.getString("dest_lat")); //NON-NLS
double dest_lng = convertGeo(resultSet.getString("dest_lng")); //NOI18N double dest_lng = convertGeo(resultSet.getString("dest_lng")); //NON-NLS
double source_lat = convertGeo(resultSet.getString("source_lat")); //NOI18N double source_lat = convertGeo(resultSet.getString("source_lat")); //NON-NLS
double source_lng = convertGeo(resultSet.getString("source_lng")); //NOI18N double source_lng = convertGeo(resultSet.getString("source_lng")); //NON-NLS
// bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT);//src // bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT);//src
@ -123,7 +123,7 @@ class GoogleMapLocationAnalyzer {
} }
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Google map locations to the Blackboard", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Google map locations to the Blackboard", e); //NON-NLS
} finally { } finally {
try { try {
if (resultSet != null) { if (resultSet != null) {
@ -132,7 +132,7 @@ class GoogleMapLocationAnalyzer {
statement.close(); statement.close();
connection.close(); connection.close();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error closing the database", e); //NOI18N logger.log(Level.SEVERE, "Error closing the database", e); //NON-NLS
} }
} }
} }

View File

@ -45,18 +45,18 @@ class TangoMessageAnalyzer {
List<AbstractFile> absFiles; List<AbstractFile> absFiles;
try { try {
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
absFiles = skCase.findAllFilesWhere("name ='tc.db' "); //NOI18N //get exact file names absFiles = skCase.findAllFilesWhere("name ='tc.db' "); //NON-NLS //get exact file names
for (AbstractFile abstractFile : absFiles) { for (AbstractFile abstractFile : absFiles) {
try { try {
File jFile = new File(Case.getCurrentCase().getTempDirectory(), abstractFile.getName()); File jFile = new File(Case.getCurrentCase().getTempDirectory(), abstractFile.getName());
ContentUtils.writeToFile(abstractFile, jFile); ContentUtils.writeToFile(abstractFile, jFile);
findTangoMessagesInDB(jFile.toString(), abstractFile); findTangoMessagesInDB(jFile.toString(), abstractFile);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Tango messages", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Tango messages", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding Tango messages", e); //NOI18N logger.log(Level.SEVERE, "Error finding Tango messages", e); //NON-NLS
} }
} }
@ -69,31 +69,31 @@ class TangoMessageAnalyzer {
return; return;
} }
try { try {
Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver
connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS
statement = connection.createStatement(); statement = connection.createStatement();
} catch (ClassNotFoundException | SQLException e) { } catch (ClassNotFoundException | SQLException e) {
logger.log(Level.SEVERE, "Error opening database", e); //NOI18N logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS
return; return;
} }
try { try {
resultSet = statement.executeQuery( resultSet = statement.executeQuery(
"Select conv_id, create_time,direction,payload FROM messages ORDER BY create_time DESC;"); //NOI18N "Select conv_id, create_time,direction,payload FROM messages ORDER BY create_time DESC;"); //NON-NLS
String conv_id; // seems to wrap around the message found in payload after decoding from base-64 String conv_id; // seems to wrap around the message found in payload after decoding from base-64
String direction; // 1 incoming, 2 outgoing String direction; // 1 incoming, 2 outgoing
String payload; // seems to be a base64 message wrapped by the conv_id String payload; // seems to be a base64 message wrapped by the conv_id
while (resultSet.next()) { while (resultSet.next()) {
conv_id = resultSet.getString("conv_id"); //NOI18N conv_id = resultSet.getString("conv_id"); //NON-NLS
Long create_time = Long.valueOf(resultSet.getString("create_time")) / 1000; //NOI18N Long create_time = Long.valueOf(resultSet.getString("create_time")) / 1000; //NON-NLS
if (resultSet.getString("direction").equals("1")) { //NOI18N if (resultSet.getString("direction").equals("1")) { //NON-NLS
direction = "Incoming"; //NOI18N direction = "Incoming"; //NON-NLS
} else { } else {
direction = "Outgoing"; //NOI18N direction = "Outgoing"; //NON-NLS
} }
payload = resultSet.getString("payload"); //NOI18N payload = resultSet.getString("payload"); //NON-NLS
BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create a call log and then add attributes from result set. BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create a call log and then add attributes from result set.
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), moduleName, create_time)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), moduleName, create_time));
@ -104,7 +104,7 @@ class TangoMessageAnalyzer {
} }
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing Tango messages to the Blackboard", e); //NOI18N logger.log(Level.SEVERE, "Error parsing Tango messages to the Blackboard", e); //NON-NLS
} finally { } finally {
try { try {
if (resultSet != null) { if (resultSet != null) {
@ -113,7 +113,7 @@ class TangoMessageAnalyzer {
statement.close(); statement.close();
connection.close(); connection.close();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error closing database", e); //NOI18N logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS
} }
} }
} }
@ -126,7 +126,7 @@ class TangoMessageAnalyzer {
String Z = new String(decoded, "UTF-8"); String Z = new String(decoded, "UTF-8");
result = Z.split(wrapper)[1]; result = Z.split(wrapper)[1];
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error decoding a Tango message", e); //NOI18N logger.log(Level.SEVERE, "Error decoding a Tango message", e); //NON-NLS
} }
return result; return result;
} }

View File

@ -43,7 +43,7 @@ class TextMessageAnalyzer {
public static void findTexts() { public static void findTexts() {
try { try {
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
List<AbstractFile> absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NOI18N //get exact file name List<AbstractFile> absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NON-NLS //get exact file name
for (AbstractFile abstractFile : absFiles) { for (AbstractFile abstractFile : absFiles) {
try { try {
@ -51,11 +51,11 @@ class TextMessageAnalyzer {
ContentUtils.writeToFile(abstractFile, jFile); ContentUtils.writeToFile(abstractFile, jFile);
findTextsInDB(jFile.toString(), abstractFile); findTextsInDB(jFile.toString(), abstractFile);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing text messages", e); //NOI18N logger.log(Level.SEVERE, "Error parsing text messages", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding text messages", e); //NOI18N logger.log(Level.SEVERE, "Error finding text messages", e); //NON-NLS
} }
} }
@ -68,17 +68,17 @@ class TextMessageAnalyzer {
return; return;
} }
try { try {
Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver
connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS
statement = connection.createStatement(); statement = connection.createStatement();
} catch (ClassNotFoundException | SQLException e) { } catch (ClassNotFoundException | SQLException e) {
logger.log(Level.SEVERE, "Error opening database", e); //NOI18N logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS
return; return;
} }
try { try {
resultSet = statement.executeQuery( resultSet = statement.executeQuery(
"Select address,date,read,type,subject,body FROM sms;"); //NOI18N "Select address,date,read,type,subject,body FROM sms;"); //NON-NLS
String address; // may be phone number, or other addresses String address; // may be phone number, or other addresses
@ -87,15 +87,15 @@ class TextMessageAnalyzer {
Integer read; // may be unread = 0, read = 1 Integer read; // may be unread = 0, read = 1
String body; //message body String body; //message body
while (resultSet.next()) { while (resultSet.next()) {
address = resultSet.getString("address"); //NOI18N address = resultSet.getString("address"); //NON-NLS
Long date = Long.valueOf(resultSet.getString("date")) / 1000; //NOI18N Long date = Long.valueOf(resultSet.getString("date")) / 1000; //NON-NLS
read = resultSet.getInt("read"); //NOI18N read = resultSet.getInt("read"); //NON-NLS
subject = resultSet.getString("subject"); //NOI18N subject = resultSet.getString("subject"); //NON-NLS
body = resultSet.getString("body"); //NOI18N body = resultSet.getString("body"); //NON-NLS
BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create Message artifact and then add attributes from result set. BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create Message artifact and then add attributes from result set.
if (resultSet.getString("type").equals("1")) { //NOI18N if (resultSet.getString("type").equals("1")) { //NON-NLS
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID(), moduleName, "Incoming")); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID(), moduleName, "Incoming"));
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM.getTypeID(), moduleName, address)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM.getTypeID(), moduleName, address));
} else { } else {
@ -111,7 +111,7 @@ class TextMessageAnalyzer {
} }
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); //NOI18N logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); //NON-NLS
} finally { } finally {
try { try {
if (resultSet != null) { if (resultSet != null) {
@ -120,7 +120,7 @@ class TextMessageAnalyzer {
statement.close(); statement.close();
connection.close(); connection.close();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error closing database", e); //NOI18N logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS
} }
} }
} }

View File

@ -44,7 +44,7 @@ class WWFMessageAnalyzer {
List<AbstractFile> absFiles; List<AbstractFile> absFiles;
try { try {
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
absFiles = skCase.findAllFilesWhere("name ='WordsFramework' "); //NOI18N //get exact file names absFiles = skCase.findAllFilesWhere("name ='WordsFramework' "); //NON-NLS //get exact file names
for (AbstractFile abstractFile : absFiles) { for (AbstractFile abstractFile : absFiles) {
try { try {
@ -53,11 +53,11 @@ class WWFMessageAnalyzer {
findWWFMessagesInDB(jFile.toString(), abstractFile); findWWFMessagesInDB(jFile.toString(), abstractFile);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing WWF messages", e); //NOI18N logger.log(Level.SEVERE, "Error parsing WWF messages", e); //NON-NLS
} }
} }
} catch (TskCoreException e) { } catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error finding WWF messages", e); //NOI18N logger.log(Level.SEVERE, "Error finding WWF messages", e); //NON-NLS
} }
} }
@ -74,23 +74,23 @@ class WWFMessageAnalyzer {
connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath);
statement = connection.createStatement(); statement = connection.createStatement();
} catch (ClassNotFoundException | SQLException e) { } catch (ClassNotFoundException | SQLException e) {
logger.log(Level.SEVERE, "Error opening database", e); //NOI18N logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS
return; return;
} }
try { try {
resultSet = statement.executeQuery( resultSet = statement.executeQuery(
"SELECT message,strftime('%s' ,created_at) as datetime,user_id,game_id FROM chat_messages ORDER BY game_id DESC, created_at DESC;"); //NOI18N "SELECT message,strftime('%s' ,created_at) as datetime,user_id,game_id FROM chat_messages ORDER BY game_id DESC, created_at DESC;"); //NON-NLS
String message; // WWF Message String message; // WWF Message
String user_id; // the ID of the user who sent the message. String user_id; // the ID of the user who sent the message.
String game_id; // ID of the game which the the message was sent. String game_id; // ID of the game which the the message was sent.
while (resultSet.next()) { while (resultSet.next()) {
message = resultSet.getString("message"); //NOI18N message = resultSet.getString("message"); //NON-NLS
Long created_at = resultSet.getLong("datetime"); //NOI18N Long created_at = resultSet.getLong("datetime"); //NON-NLS
user_id = resultSet.getString("user_id"); //NOI18N user_id = resultSet.getString("user_id"); //NON-NLS
game_id = resultSet.getString("game_id"); //NOI18N game_id = resultSet.getString("game_id"); //NON-NLS
BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create a call log and then add attributes from result set. BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create a call log and then add attributes from result set.
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), moduleName, created_at)); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), moduleName, created_at));
@ -100,7 +100,7 @@ class WWFMessageAnalyzer {
bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE.getTypeID(), moduleName, "Words With Friends Message")); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE.getTypeID(), moduleName, "Words With Friends Message"));
} }
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error parsing WWF messages to the Blackboard", e); //NOI18N logger.log(Level.SEVERE, "Error parsing WWF messages to the Blackboard", e); //NON-NLS
} finally { } finally {
try { try {
if (resultSet != null) { if (resultSet != null) {
@ -109,7 +109,7 @@ class WWFMessageAnalyzer {
statement.close(); statement.close();
connection.close(); connection.close();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "Error closing database", e); //NOI18N logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS
} }
} }
} }