From 4e1da6b73e75a11d0ce19d505b9b0413d85bcfaa Mon Sep 17 00:00:00 2001 From: Eamonn Saunders Date: Mon, 1 Dec 2014 10:21:57 -0500 Subject: [PATCH 01/13] Code that results in UI interaction needs to be invoked on the EDT. --- .../sleuthkit/autopsy/casemodule/Case.java | 76 +++++++++++-------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 6e833bbacb..ba6360fa00 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.casemodule; +import java.awt.EventQueue; import java.awt.Frame; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; @@ -1077,7 +1078,7 @@ public class Case implements SleuthkitCase.ErrorObserver { } //case change helper - private static void doCaseChange(Case toChangeTo) { + private static void doCaseChange(final Case toChangeTo) { logger.log(Level.INFO, "Changing Case to: " + toChangeTo); //NON-NLS if (toChangeTo != null) { // new case is open @@ -1085,39 +1086,49 @@ public class Case implements SleuthkitCase.ErrorObserver { Case.clearTempFolder(); checkSubFolders(toChangeTo); - // enable these menus - CallableSystemAction.get(AddImageAction.class).setEnabled(true); - CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); - CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); - CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + // enable these menus + CallableSystemAction.get(AddImageAction.class).setEnabled(true); + CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); + CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); + CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); // Delete Case menu + + if (toChangeTo.hasData()) { + // open all top components + CoreComponentControl.openCoreWindows(); + } else { + // close all top components + CoreComponentControl.closeCoreWindows(); + } + } + }); - if (toChangeTo.hasData()) { - // open all top components - CoreComponentControl.openCoreWindows(); - } else { - // close all top components - CoreComponentControl.closeCoreWindows(); - } } else { // case is closed - // close all top components first - CoreComponentControl.closeCoreWindows(); + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + // close all top components first + CoreComponentControl.closeCoreWindows(); - // disable these menus - CallableSystemAction.get(AddImageAction.class).setEnabled(false); // Add Image menu - CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); // Case Close menu - CallableSystemAction.get(CasePropertiesAction.class).setEnabled(false); // Case Properties menu - CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); // Delete Case menu + // disable these menus + CallableSystemAction.get(AddImageAction.class).setEnabled(false); // Add Image menu + CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); // Case Close menu + CallableSystemAction.get(CasePropertiesAction.class).setEnabled(false); // Case Properties menu + CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); // Delete Case menu - //clear pending notifications - MessageNotifyUtil.Notify.clear(); + //clear pending notifications + MessageNotifyUtil.Notify.clear(); + Frame f = WindowManager.getDefault().getMainWindow(); + f.setTitle(Case.getAppName()); // set the window name to just application name - Frame f = WindowManager.getDefault().getMainWindow(); - f.setTitle(Case.getAppName()); // set the window name to just application name - - //try to force gc to happen - System.gc(); - System.gc(); + //try to force gc to happen + System.gc(); + System.gc(); + } + }); } //log memory usage after case changed @@ -1130,8 +1141,13 @@ public class Case implements SleuthkitCase.ErrorObserver { private static void doCaseNameChange(String newCaseName) { // update case name if (!newCaseName.equals("")) { - Frame f = WindowManager.getDefault().getMainWindow(); - f.setTitle(newCaseName + " - " + Case.getAppName()); // set the window name to the new value + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + Frame f = WindowManager.getDefault().getMainWindow(); + f.setTitle(newCaseName + " - " + Case.getAppName()); // set the window name to the new value + } + }); } } From 2a851dd267423a043c5f3d83a0192ee7fe33519c Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Tue, 2 Dec 2014 14:28:48 -0500 Subject: [PATCH 02/13] Marked internal/log/exception strings with NOI18N. Created Bundle_ja.properties. --- .../modules/android/AndroidIngestModule.java | 26 ++++++------- .../android/BrowserLocationAnalyzer.java | 24 ++++++------ .../modules/android/Bundle_ja.properties | 0 .../android/CacheLocationAnalyzer.java | 8 ++-- .../modules/android/CallLogAnalyzer.java | 32 ++++++++-------- .../modules/android/ContactAnalyzer.java | 38 +++++++++---------- .../android/GoogleMapLocationAnalyzer.java | 32 ++++++++-------- .../modules/android/TangoMessageAnalyzer.java | 32 ++++++++-------- .../modules/android/TextMessageAnalyzer.java | 30 +++++++-------- .../modules/android/WWFMessageAnalyzer.java | 22 +++++------ 10 files changed, 122 insertions(+), 122 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java index f3d1e56019..ee0dac4221 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java @@ -57,7 +57,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Contacts"); + errors.add("Error getting Contacts"); //NOI18N } try { @@ -67,7 +67,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Call Logs"); + errors.add("Error getting Call Logs"); //NOI18N } try { @@ -77,7 +77,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Text Messages"); + errors.add("Error getting Text Messages"); //NOI18N } try { @@ -87,7 +87,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Tango Messages"); + errors.add("Error getting Tango Messages"); //NOI18N } try { @@ -97,7 +97,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Words with Friends Messages"); + errors.add("Error getting Words with Friends Messages"); //NOI18N } try { @@ -107,7 +107,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Google Map Locations"); + errors.add("Error getting Google Map Locations"); //NOI18N } try { @@ -117,14 +117,14 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Browser Locations"); + errors.add("Error getting Browser Locations"); //NOI18N } try { CacheLocationAnalyzer.findGeoLocations(); progressBar.progress(8); } catch (Exception e) { - errors.add("Error getting Cache Locations"); + errors.add("Error getting Cache Locations"); //NOI18N } // create the final message for inbox @@ -133,20 +133,20 @@ class AndroidIngestModule implements DataSourceIngestModule { IngestMessage.MessageType msgLevel = IngestMessage.MessageType.INFO; if (errors.isEmpty() == false) { msgLevel = IngestMessage.MessageType.ERROR; - errorMessage.append("Errors were encountered"); + errorMessage.append("Errors were encountered"); //NOI18N for (String msg : errors) { errorMessage.append("
  • ").append(msg).append("
  • \n"); //NON-NLS } errorMessage.append("\n"); //NON-NLS if (errors.size() == 1) { - errorMsgSubject = "One error was found"; + errorMsgSubject = "One error was found"; //NOI18N } else { - errorMsgSubject = "errors found: " + errors.size(); + errorMsgSubject = "errors found: " + errors.size(); //NOI18N } } else { - errorMessage.append("No errors"); - errorMsgSubject = "No errors"; + errorMessage.append("No errors"); //NOI18N + errorMsgSubject = "No errors"; //NOI18N } services.postMessage(IngestMessage.createMessage(msgLevel, AndroidModuleFactory.getModuleName(), "Finished Analysis: " + errorMsgSubject, errorMessage.toString())); diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java index 69add3d978..acf6774a6f 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java @@ -43,7 +43,7 @@ class BrowserLocationAnalyzer { public static void findGeoLocations() { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - List abstractFiles = skCase.findAllFilesWhere("name LIKE 'CachedGeoposition%.db'"); //get exact file names + List abstractFiles = skCase.findAllFilesWhere("name LIKE 'CachedGeoposition%.db'"); //NOI18N //get exact file names for (AbstractFile abstractFile : abstractFiles) { try { @@ -54,11 +54,11 @@ class BrowserLocationAnalyzer { ContentUtils.writeToFile(abstractFile, jFile); findGeoLocationsInDB(jFile.toString(), abstractFile); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Browser Location files", e); + logger.log(Level.SEVERE, "Error parsing Browser Location files", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding Browser Location files", e); + logger.log(Level.SEVERE, "Error finding Browser Location files", e); //NOI18N } } @@ -71,22 +71,22 @@ class BrowserLocationAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error connecting to sql database", e); + logger.log(Level.SEVERE, "Error connecting to sql database", e); //NOI18N return; } try { resultSet = statement.executeQuery( - "Select timestamp, latitude, longitude, accuracy FROM CachedPosition;"); + "Select timestamp, latitude, longitude, accuracy FROM CachedPosition;"); //NOI18N while (resultSet.next()) { - Long timestamp = Long.valueOf(resultSet.getString("timestamp")) / 1000; - double latitude = Double.valueOf(resultSet.getString("latitude")); - double longitude = Double.valueOf(resultSet.getString("longitude")); + Long timestamp = Long.valueOf(resultSet.getString("timestamp")) / 1000; //NOI18N + double latitude = Double.valueOf(resultSet.getString("latitude")); //NOI18N + double longitude = Double.valueOf(resultSet.getString("longitude")); //NOI18N BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT); 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)); } } catch (Exception e) { - logger.log(Level.SEVERE, "Error Putting artifacts to Blackboard", e); + logger.log(Level.SEVERE, "Error Putting artifacts to Blackboard", e); //NOI18N } finally { try { if (resultSet != null) { @@ -105,7 +105,7 @@ class BrowserLocationAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); + logger.log(Level.SEVERE, "Error closing database", e); //NOI18N } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java index 89d5472f25..6e5bae3027 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java @@ -43,7 +43,7 @@ class CacheLocationAnalyzer { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - List abstractFiles = skCase.findAllFilesWhere("name ='cache.cell' OR name='cache.wifi'"); //get exact file names + List abstractFiles = skCase.findAllFilesWhere("name ='cache.cell' OR name='cache.wifi'"); //NOI18N //get exact file names for (AbstractFile abstractFile : abstractFiles) { try { @@ -55,11 +55,11 @@ class CacheLocationAnalyzer { findGeoLocationsInFile(jFile, abstractFile); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing cached Location files", e); + logger.log(Level.SEVERE, "Error parsing cached Location files", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding cached Location files", e); + logger.log(Level.SEVERE, "Error finding cached Location files", e); //NOI18N } } @@ -124,7 +124,7 @@ class CacheLocationAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Cached GPS locations to Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Cached GPS locations to Blackboard", e); //NOI18N } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java index 5f06532860..b213e95004 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java @@ -47,11 +47,11 @@ class CallLogAnalyzer { /** the where clause(without 'where' of sql select statement to choose call * 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'") - .collect(Collectors.joining(" OR name = ", "name = ", "")); + private static final String fileNameQuery = Stream.of("'logs.db'", "'contacts2.db'", "'contacts.db'") //NOI18N + .collect(Collectors.joining(" OR name = ", "name = ", "")); //NOI18N /** the names of tables that potentially hold call logs in the dbs */ - private static final Iterable tableNames = Arrays.asList("calls", "logs"); + private static final Iterable tableNames = Arrays.asList("calls", "logs"); //NOI18N public static void findCallLogs() { try { @@ -63,11 +63,11 @@ class CallLogAnalyzer { ContentUtils.writeToFile(abstractFile, file); findCallLogsInDB(file.toString(), abstractFile); } catch (IOException e) { - logger.log(Level.SEVERE, "Error writing temporary call log db to disk", e); + logger.log(Level.SEVERE, "Error writing temporary call log db to disk", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding call logs", e); + logger.log(Level.SEVERE, "Error finding call logs", e); //NOI18N } } @@ -76,20 +76,20 @@ class CallLogAnalyzer { if (DatabasePath == null || DatabasePath.isEmpty()) { return; } - try (Connection connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + try (Connection connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N Statement statement = connection.createStatement();) { for (String tableName : tableNames) { try (ResultSet resultSet = statement.executeQuery( - "SELECT number,date,duration,type, name FROM " + tableName + " ORDER BY date DESC;");) { - logger.log(Level.INFO, "Reading call log from table {0} in db {1}", new Object[]{tableName, DatabasePath}); + "SELECT number,date,duration,type, name FROM " + tableName + " ORDER BY date DESC;");) { //NOI18N + logger.log(Level.INFO, "Reading call log from table {0} in db {1}", new Object[]{tableName, DatabasePath}); //NOI18N while (resultSet.next()) { Long date = resultSet.getLong("date") / 1000; - final CallDirection direction = CallDirection.fromType(resultSet.getInt("type")); + final CallDirection direction = CallDirection.fromType(resultSet.getInt("type")); //NOI18N String directionString = direction != null ? direction.getDisplayName() : ""; - final String number = resultSet.getString("number"); - final long duration = resultSet.getLong("duration");//duration of call is in seconds - final String name = resultSet.getString("name");// name of person dialed or called. null if unregistered + final String number = resultSet.getString("number"); //NOI18N + final long duration = resultSet.getLong("duration"); //NOI18N //duration of call is in seconds + final String name = resultSet.getString("name"); //NOI18N // name of person dialed or called. null if unregistered try { 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_NAME.getTypeID(), moduleName, name)); } catch (TskCoreException ex) { - logger.log(Level.SEVERE, "Error posting call log record to the Blackboard", ex); + logger.log(Level.SEVERE, "Error posting call log record to the Blackboard", ex); //NOI18N } } } catch (SQLException e) { - logger.log(Level.WARNING, "Could not read table {0} in db {1}", new Object[]{tableName, DatabasePath}); + logger.log(Level.WARNING, "Could not read table {0} in db {1}", new Object[]{tableName, DatabasePath}); //NOI18N } } } catch (SQLException e) { - logger.log(Level.SEVERE, "Could not parse call log; error connecting to db " + DatabasePath, e); + logger.log(Level.SEVERE, "Could not parse call log; error connecting to db " + DatabasePath, e); //NOI18N } } private static enum CallDirection { - INCOMING(1, "Incoming"), OUTGOING(2, "Outgoing"), MISSED(3, "Missed"); + INCOMING(1, "Incoming"), OUTGOING(2, "Outgoing"), MISSED(3, "Missed"); //NOI18N private final int type; diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java index 173d506372..68e021f0fa 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java @@ -45,7 +45,7 @@ class ContactAnalyzer { List absFiles; try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name ='contacts2.db' OR name ='contacts.db'"); //get exact file names + absFiles = skCase.findAllFilesWhere("name ='contacts2.db' OR name ='contacts.db'"); //NOI18N //get exact file names if (absFiles.isEmpty()) { return; } @@ -55,11 +55,11 @@ class ContactAnalyzer { ContentUtils.writeToFile(AF, jFile); findContactsInDB(jFile.toString(), AF); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Contacts", e); + logger.log(Level.SEVERE, "Error parsing Contacts", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding Contacts", e); + logger.log(Level.SEVERE, "Error finding Contacts", e); //NOI18N } } @@ -78,11 +78,11 @@ class ContactAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N return; } @@ -90,13 +90,13 @@ class ContactAnalyzer { // 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. resultSet = statement.executeQuery( - "SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" - + "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" - + "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " - + "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" - + "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" - + "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" - + "ORDER BY name_raw_contact.display_name ASC;"); + "SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" //NOI18N + + "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" //NOI18N + + "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " //NOI18N + + "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" //NOI18N + + "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" //NOI18N + + "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" //NOI18N + + "ORDER BY name_raw_contact.display_name ASC;"); //NOI18N BlackboardArtifact bba; bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); @@ -105,15 +105,15 @@ class ContactAnalyzer { String mimetype; // either phone or email String data1; // the phone number or email while (resultSet.next()) { - name = resultSet.getString("display_name"); - data1 = resultSet.getString("data1"); - mimetype = resultSet.getString("mimetype"); + name = resultSet.getString("display_name"); //NOI18N + data1 = resultSet.getString("data1"); //NOI18N + mimetype = resultSet.getString("mimetype"); //NOI18N // System.out.println(resultSet.getString("data1") + resultSet.getString("mimetype") + resultSet.getString("display_name")); //Test code if (name.equals(oldName) == false) { bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), moduleName, name)); } - if (mimetype.equals("vnd.android.cursor.item/phone_v2")) { + if (mimetype.equals("vnd.android.cursor.item/phone_v2")) { //NOI18N bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID(), moduleName, data1)); } else { bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID(), moduleName, data1)); @@ -122,7 +122,7 @@ class ContactAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); //NOI18N } finally { try { if (resultSet != null) { @@ -131,7 +131,7 @@ class ContactAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); + logger.log(Level.SEVERE, "Error closing database", e); //NOI18N } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java index 0174b81e1f..09925e3a8f 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java @@ -44,7 +44,7 @@ class GoogleMapLocationAnalyzer { List absFiles; try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name ='da_destination_history'"); //get exact file name + absFiles = skCase.findAllFilesWhere("name ='da_destination_history'"); //NOI18N //get exact file name if (absFiles.isEmpty()) { return; } @@ -54,11 +54,11 @@ class GoogleMapLocationAnalyzer { ContentUtils.writeToFile(abstractFile, jFile); findGeoLocationsInDB(jFile.toString(), abstractFile); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Google map locations", e); + logger.log(Level.SEVERE, "Error parsing Google map locations", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding Google map locations", e); + logger.log(Level.SEVERE, "Error finding Google map locations", e); //NOI18N } } @@ -71,27 +71,27 @@ class GoogleMapLocationAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N return; } try { resultSet = statement.executeQuery( - "Select time,dest_lat,dest_lng,dest_title,dest_address,source_lat,source_lng FROM destination_history;"); + "Select time,dest_lat,dest_lng,dest_title,dest_address,source_lat,source_lng FROM destination_history;"); //NOI18N while (resultSet.next()) { - Long time = Long.valueOf(resultSet.getString("time")) / 1000; - String dest_title = resultSet.getString("dest_title"); - String dest_address = resultSet.getString("dest_address"); + Long time = Long.valueOf(resultSet.getString("time")) / 1000; //NOI18N + String dest_title = resultSet.getString("dest_title"); //NOI18N + String dest_address = resultSet.getString("dest_address"); //NOI18N - double dest_lat = convertGeo(resultSet.getString("dest_lat")); - double dest_lng = convertGeo(resultSet.getString("dest_lng")); - double source_lat = convertGeo(resultSet.getString("source_lat")); - double source_lng = convertGeo(resultSet.getString("source_lng")); + double dest_lat = convertGeo(resultSet.getString("dest_lat")); //NOI18N + double dest_lng = convertGeo(resultSet.getString("dest_lng")); //NOI18N + double source_lat = convertGeo(resultSet.getString("source_lat")); //NOI18N + double source_lng = convertGeo(resultSet.getString("source_lng")); //NOI18N // bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT);//src @@ -123,7 +123,7 @@ class GoogleMapLocationAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Google map locations to the Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Google map locations to the Blackboard", e); //NOI18N } finally { try { if (resultSet != null) { @@ -132,7 +132,7 @@ class GoogleMapLocationAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing the database", e); + logger.log(Level.SEVERE, "Error closing the database", e); //NOI18N } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java index 23e4f07695..5b8cee3b4d 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java @@ -45,18 +45,18 @@ class TangoMessageAnalyzer { List absFiles; try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name ='tc.db' "); //get exact file names + absFiles = skCase.findAllFilesWhere("name ='tc.db' "); //NOI18N //get exact file names for (AbstractFile abstractFile : absFiles) { try { File jFile = new File(Case.getCurrentCase().getTempDirectory(), abstractFile.getName()); ContentUtils.writeToFile(abstractFile, jFile); findTangoMessagesInDB(jFile.toString(), abstractFile); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Tango messages", e); + logger.log(Level.SEVERE, "Error parsing Tango messages", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding Tango messages", e); + logger.log(Level.SEVERE, "Error finding Tango messages", e); //NOI18N } } @@ -69,31 +69,31 @@ class TangoMessageAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N return; } try { resultSet = statement.executeQuery( - "Select conv_id, create_time,direction,payload FROM messages ORDER BY create_time DESC;"); + "Select conv_id, create_time,direction,payload FROM messages ORDER BY create_time DESC;"); //NOI18N String conv_id; // seems to wrap around the message found in payload after decoding from base-64 String direction; // 1 incoming, 2 outgoing String payload; // seems to be a base64 message wrapped by the conv_id while (resultSet.next()) { - conv_id = resultSet.getString("conv_id"); - Long create_time = Long.valueOf(resultSet.getString("create_time")) / 1000; - if (resultSet.getString("direction").equals("1")) { - direction = "Incoming"; + conv_id = resultSet.getString("conv_id"); //NOI18N + Long create_time = Long.valueOf(resultSet.getString("create_time")) / 1000; //NOI18N + if (resultSet.getString("direction").equals("1")) { //NOI18N + direction = "Incoming"; //NOI18N } else { - direction = "Outgoing"; + direction = "Outgoing"; //NOI18N } - payload = resultSet.getString("payload"); + payload = resultSet.getString("payload"); //NOI18N 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)); @@ -104,7 +104,7 @@ class TangoMessageAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Tango messages to the Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Tango messages to the Blackboard", e); //NOI18N } finally { try { if (resultSet != null) { @@ -113,7 +113,7 @@ class TangoMessageAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); + logger.log(Level.SEVERE, "Error closing database", e); //NOI18N } } } @@ -126,7 +126,7 @@ class TangoMessageAnalyzer { String Z = new String(decoded, "UTF-8"); result = Z.split(wrapper)[1]; } catch (Exception e) { - logger.log(Level.SEVERE, "Error decoding a Tango message", e); + logger.log(Level.SEVERE, "Error decoding a Tango message", e); //NOI18N } return result; } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java index 627c64f327..0b58b75313 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java @@ -43,7 +43,7 @@ class TextMessageAnalyzer { public static void findTexts() { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - List absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //get exact file name + List absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NOI18N //get exact file name for (AbstractFile abstractFile : absFiles) { try { @@ -51,11 +51,11 @@ class TextMessageAnalyzer { ContentUtils.writeToFile(abstractFile, jFile); findTextsInDB(jFile.toString(), abstractFile); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing text messages", e); + logger.log(Level.SEVERE, "Error parsing text messages", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding text messages", e); + logger.log(Level.SEVERE, "Error finding text messages", e); //NOI18N } } @@ -68,17 +68,17 @@ class TextMessageAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N return; } try { resultSet = statement.executeQuery( - "Select address,date,read,type,subject,body FROM sms;"); + "Select address,date,read,type,subject,body FROM sms;"); //NOI18N String address; // may be phone number, or other addresses @@ -87,15 +87,15 @@ class TextMessageAnalyzer { Integer read; // may be unread = 0, read = 1 String body; //message body while (resultSet.next()) { - address = resultSet.getString("address"); - Long date = Long.valueOf(resultSet.getString("date")) / 1000; + address = resultSet.getString("address"); //NOI18N + Long date = Long.valueOf(resultSet.getString("date")) / 1000; //NOI18N - read = resultSet.getInt("read"); - subject = resultSet.getString("subject"); - body = resultSet.getString("body"); + read = resultSet.getInt("read"); //NOI18N + subject = resultSet.getString("subject"); //NOI18N + body = resultSet.getString("body"); //NOI18N 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")) { + if (resultSet.getString("type").equals("1")) { //NOI18N 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)); } else { @@ -111,7 +111,7 @@ class TextMessageAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); + logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); //NOI18N } finally { try { if (resultSet != null) { @@ -120,7 +120,7 @@ class TextMessageAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); + logger.log(Level.SEVERE, "Error closing database", e); //NOI18N } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java index 3bda358a24..d5c584dbce 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java @@ -44,7 +44,7 @@ class WWFMessageAnalyzer { List absFiles; try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name ='WordsFramework' "); //get exact file names + absFiles = skCase.findAllFilesWhere("name ='WordsFramework' "); //NOI18N //get exact file names for (AbstractFile abstractFile : absFiles) { try { @@ -53,11 +53,11 @@ class WWFMessageAnalyzer { findWWFMessagesInDB(jFile.toString(), abstractFile); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing WWF messages", e); + logger.log(Level.SEVERE, "Error parsing WWF messages", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding WWF messages", e); + logger.log(Level.SEVERE, "Error finding WWF messages", e); //NOI18N } } @@ -74,23 +74,23 @@ class WWFMessageAnalyzer { connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N return; } try { 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;"); + "SELECT message,strftime('%s' ,created_at) as datetime,user_id,game_id FROM chat_messages ORDER BY game_id DESC, created_at DESC;"); //NOI18N String message; // WWF 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. while (resultSet.next()) { - message = resultSet.getString("message"); - Long created_at = resultSet.getLong("datetime"); - user_id = resultSet.getString("user_id"); - game_id = resultSet.getString("game_id"); + message = resultSet.getString("message"); //NOI18N + Long created_at = resultSet.getLong("datetime"); //NOI18N + user_id = resultSet.getString("user_id"); //NOI18N + game_id = resultSet.getString("game_id"); //NOI18N 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)); @@ -100,7 +100,7 @@ class WWFMessageAnalyzer { bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE.getTypeID(), moduleName, "Words With Friends Message")); } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing WWF messages to the Blackboard", e); + logger.log(Level.SEVERE, "Error parsing WWF messages to the Blackboard", e); //NOI18N } finally { try { if (resultSet != null) { @@ -109,7 +109,7 @@ class WWFMessageAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); + logger.log(Level.SEVERE, "Error closing database", e); //NOI18N } } } From 5751a4aa8ba3be372ff690f1777121f38c859e46 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Tue, 2 Dec 2014 14:56:03 -0500 Subject: [PATCH 03/13] Marked internal/log/exception strings with NOI18N. Created Bundle_ja.properties. --- .../autopsy/modules/iOS/Bundle_ja.properties | 0 .../autopsy/modules/iOS/CallLogAnalyzer.java | 32 +++++++------- .../autopsy/modules/iOS/ContactAnalyzer.java | 44 +++++++++---------- .../modules/iOS/TextMessageAnalyzer.java | 30 ++++++------- 4 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java index 38831120e0..3514a5d9bc 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java @@ -49,7 +49,7 @@ class CallLogAnalyzer { List absFiles; try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name ='contacts2.db' OR name ='contacts.db'"); //get exact file names + absFiles = skCase.findAllFilesWhere("name ='contacts2.db' OR name ='contacts.db'"); //NOI18N //get exact file names if (absFiles.isEmpty()) { return; } @@ -61,11 +61,11 @@ class CallLogAnalyzer { fileId = AF.getId(); findCallLogsInDB(dbPath, fileId); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Call logs", e); + logger.log(Level.SEVERE, "Error parsing Call logs", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding Call logs", e); + logger.log(Level.SEVERE, "Error finding Call logs", e); //NOI18N } } @@ -74,11 +74,11 @@ class CallLogAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N } Case currentCase = Case.getCurrentCase(); @@ -87,7 +87,7 @@ class CallLogAnalyzer { AbstractFile f = skCase.getAbstractFileById(fId); try { resultSet = statement.executeQuery( - "SELECT number,date,duration,type, name FROM calls ORDER BY date DESC;"); + "SELECT number,date,duration,type, name FROM calls ORDER BY date DESC;"); //NOI18N BlackboardArtifact bba; String name; // name of person dialed or called. null if unregistered @@ -97,14 +97,14 @@ class CallLogAnalyzer { String type; // 1 incoming, 2 outgoing, 3 missed while (resultSet.next()) { - name = resultSet.getString("name"); - number = resultSet.getString("number"); - duration = resultSet.getString("duration"); - date = resultSet.getString("date"); - type = resultSet.getString("type"); + name = resultSet.getString("name"); //NOI18N + number = resultSet.getString("number"); //NOI18N + duration = resultSet.getString("duration"); //NOI18N + date = resultSet.getString("date"); //NOI18N + type = resultSet.getString("type"); //NOI18N bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG); //create a call log and then add attributes from result set. - if(type.equalsIgnoreCase("outgoing")) { + if(type.equalsIgnoreCase("outgoing")) { //NOI18N bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO.getTypeID(), moduleName, number)); } else { /// Covers INCOMING and MISSED @@ -117,18 +117,18 @@ class CallLogAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); //NOI18N } finally { try { resultSet.close(); statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing the database", e); + logger.log(Level.SEVERE, "Error closing the database", e); //NOI18N } } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); //NOI18N } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java index 0e7ee51e76..a119666993 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java @@ -56,7 +56,7 @@ class ContactAnalyzer { List absFiles; try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name LIKE '%call_history%' "); //get exact file names + absFiles = skCase.findAllFilesWhere("name LIKE '%call_history%' "); //NOI18N //get exact file names if (absFiles.isEmpty()) { //asdfkjasfakljsdfhlaksdjfhasdlkjf return; } @@ -71,11 +71,11 @@ class ContactAnalyzer { fileId = AF.getId(); //findContactsInDB(dbPath, fileId); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Contacts", e); + logger.log(Level.SEVERE, "Error parsing Contacts", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding Contacts", e); + logger.log(Level.SEVERE, "Error finding Contacts", e); //NOI18N } } @@ -90,11 +90,11 @@ class ContactAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N } Case currentCase = Case.getCurrentCase(); @@ -105,13 +105,13 @@ class ContactAnalyzer { // 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. resultSet = statement.executeQuery( - "SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" - + "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" - + "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " - + "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" - + "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" - + "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" - + "ORDER BY name_raw_contact.display_name ASC;"); + "SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" //NOI18N + + "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" //NOI18N + + "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " //NOI18N + + "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" //NOI18N + + "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" //NOI18N + + "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" //NOI18N + + "ORDER BY name_raw_contact.display_name ASC;"); //NOI18N BlackboardArtifact bba; bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); @@ -120,15 +120,15 @@ class ContactAnalyzer { String mimetype; // either phone or email String data1; // the phone number or email while (resultSet.next()) { - name = resultSet.getString("display_name"); - data1 = resultSet.getString("data1"); - mimetype = resultSet.getString("mimetype"); + name = resultSet.getString("display_name"); //NOI18N + data1 = resultSet.getString("data1"); //NOI18N + mimetype = resultSet.getString("mimetype"); //NOI18N // System.out.println(resultSet.getString("data1") + resultSet.getString("mimetype") + resultSet.getString("display_name")); //Test code if (name.equals(oldName) == false) { bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), moduleName, name)); } - if (mimetype.equals("vnd.android.cursor.item/phone_v2")) { + if (mimetype.equals("vnd.android.cursor.item/phone_v2")) { //NOI18N bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID(), moduleName, data1)); } else { bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID(), moduleName, data1)); @@ -137,18 +137,18 @@ class ContactAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); //NOI18N } finally { try { resultSet.close(); statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); + logger.log(Level.SEVERE, "Error closing database", e); //NOI18N } } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); + logger.log(Level.SEVERE, "Error parsing Contacts to Blackboard", e); //NOI18N } } @@ -186,13 +186,13 @@ class ContactAnalyzer { ostream.write(c); } } catch (IOException e) { - System.out.println("Error: " + e.getMessage()); + System.out.println("Error: " + e.getMessage()); //NOI18N } finally { try { istream.close(); ostream.close(); } catch (IOException e) { - System.out.println("File did not close"); + System.out.println("File did not close"); //NOI18N } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java index 434bcd0ea0..18dae2c61c 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java @@ -49,7 +49,7 @@ class TextMessageAnalyzer { void findTexts() { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //get exact file name + absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NOI18N //get exact file name if (absFiles.isEmpty()) { return; } @@ -61,11 +61,11 @@ class TextMessageAnalyzer { fileId = AF.getId(); findTextsInDB(dbPath, fileId); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing text messages", e); + logger.log(Level.SEVERE, "Error parsing text messages", e); //NOI18N } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding text messages", e); + logger.log(Level.SEVERE, "Error finding text messages", e); //NOI18N } } @@ -74,11 +74,11 @@ class TextMessageAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); + Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); + logger.log(Level.SEVERE, "Error opening database", e); //NOI18N } Case currentCase = Case.getCurrentCase(); @@ -87,7 +87,7 @@ class TextMessageAnalyzer { AbstractFile f = skCase.getAbstractFileById(fId); try { resultSet = statement.executeQuery( - "Select address,date,type,subject,body FROM sms;"); + "Select address,date,type,subject,body FROM sms;"); //NOI18N BlackboardArtifact bba; String address; // may be phone number, or other addresses @@ -96,11 +96,11 @@ class TextMessageAnalyzer { String subject;//message subject String body; //message body while (resultSet.next()) { - address = resultSet.getString("address"); - date = resultSet.getString("date"); - type = resultSet.getString("type"); - subject = resultSet.getString("subject"); - body = resultSet.getString("body"); + address = resultSet.getString("address"); //NOI18N + date = resultSet.getString("date"); //NOI18N + type = resultSet.getString("type"); //NOI18N + subject = resultSet.getString("subject"); //NOI18N + body = resultSet.getString("body"); //NOI18N bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create Message artifact and then add attributes from result set. @@ -122,18 +122,18 @@ class TextMessageAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); + logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); //NOI18N } finally { try { resultSet.close(); statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); + logger.log(Level.SEVERE, "Error closing database", e); //NOI18N } } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); + logger.log(Level.SEVERE, "Error parsing text messages to Blackboard", e); //NOI18N } } From a80209836a6d44078ada0314b45f85ff296a9bae Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Tue, 2 Dec 2014 21:43:34 -0800 Subject: [PATCH 04/13] Translation completed --- Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties index e69de29bb2..d54e28a55a 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties @@ -0,0 +1,2 @@ +iOSModuleFactory.moduleDescription=\u30B7\u30B9\u30C6\u30E0\u304A\u3088\u3073\u7B2C\u4E09\u8005\u30A2\u30D7\u30EA\u30C7\u30FC\u30BF\u3092\u62BD\u51FA +iOSModuleFactory.moduleName=iOS\u30A2\u30CA\u30E9\u30A4\u30B6\u30FC \ No newline at end of file From 606e8a901da44dcb3364de50961b669cf9049c04 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Wed, 3 Dec 2014 10:58:18 -0500 Subject: [PATCH 05/13] Marked internal/log/exception strings with NON-NLS. Fixed incorrect name of bundle string. Created Bundle_ja.properties. --- .../autopsy/modules/photoreccarver/Bundle.properties | 3 ++- .../modules/photoreccarver/Bundle_ja.properties | 0 .../photoreccarver/PhotoRecCarverFileIngestModule.java | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties index 81d6260109..b9a9d6c609 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties @@ -2,9 +2,10 @@ OpenIDE-Module-Name=PhotoRec Carver Ingest Module OpenIDE-Module-Display-Category=Ingest Module OpenIDE-Module-Long-Description=PhotoRec Carver ingest module. \n\n Carves unallocated space and feeds the resulting carved files back into the system for processing. OpenIDE-Module-Short-Description=Carves unallocated space and feeds carved files back into the system for processing. -unallocatedSpaceProcessingSettingsError.message="Process Unallocated Space" is not checked. This module is designed to carve unallocated space. Either allow processing of unallocated space, or do not use this module. moduleDisplayName.text=PhotoRec Carver moduleDescription.text=Runs PhotoRec carver against unallocated space on the system. + +unallocatedSpaceProcessingSettingsError.message="Process Unallocated Space" is not checked. This module is designed to carve unallocated space. Either allow processing of unallocated space, or do not use this module. unsupportedOS.message=Module is not supported for other than Windows platforms missingExecutable.message=Unable to locate unallocated carver executable. cannotRunExecutable.message=Unable to execute unallocated carver diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java index ffb5447804..7accfe711b 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java @@ -113,7 +113,7 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule { PhotoRecCarverFileIngestModule.pathsByJob.put(this.context.getJobId(), new WorkingPaths(outputDirPath, tempDirPath)); } catch (SecurityException | IOException | UnsupportedOperationException ex) { - throw new IngestModule.IngestModuleException(NbBundle.getMessage(this.getClass(), "Utilities.cannotCreateOutputDir.message", ex.getLocalizedMessage())); + throw new IngestModule.IngestModuleException(NbBundle.getMessage(this.getClass(), "cannotCreateOutputDir.message", ex.getLocalizedMessage())); } } } @@ -145,7 +145,7 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule { // Check that we have roughly enough disk space left to complete the operation long freeDiskSpace = IngestServices.getInstance().getFreeDiskSpace(); if ((file.getSize() * 2) > freeDiskSpace) { - logger.log(Level.SEVERE, "PhotoRec error processing {0} with {1} Not enough space on primary disk to carve unallocated space.", + logger.log(Level.SEVERE, "PhotoRec error processing {0} with {1} Not enough space on primary disk to carve unallocated space.", // NON-NLS new Object[]{file.getName(), PhotoRecCarverIngestModuleFactory.getModuleName()}); // NON-NLS return IngestModule.ProcessResult.ERROR; } @@ -163,9 +163,9 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule { // Scan the file with Unallocated Carver. ProcessBuilder processAndSettings = new ProcessBuilder( "\"" + executableFile + "\"", - "/d", + "/d", // NON-NLS "\"" + outputDirPath.toAbsolutePath() + File.separator + PHOTOREC_RESULTS_BASE + "\"", - "/cmd", + "/cmd", // NON-NLS "\"" + tempFilePath.toFile() + "\"", "search"); // NON_NLS @@ -194,7 +194,7 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule { if (null != tempFilePath && Files.exists(tempFilePath)) { tempFilePath.toFile().delete(); } - logger.log(Level.SEVERE, "PhotoRec carver returned error exit value = {0} when scanning {1}", + logger.log(Level.SEVERE, "PhotoRec carver returned error exit value = {0} when scanning {1}", // NON-NLS new Object[]{exitValue, file.getName()}); // NON-NLS return IngestModule.ProcessResult.ERROR; } From ce0aa56973da572a6073c53626bbc1a650234901 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Wed, 3 Dec 2014 13:19:06 -0500 Subject: [PATCH 06/13] Fix error in image file name referenced in timeline code --- .../org/sleuthkit/autopsy/timeline/events/type/MiscTypes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/events/type/MiscTypes.java b/Core/src/org/sleuthkit/autopsy/timeline/events/type/MiscTypes.java index 5555b0ce2c..68851e9caf 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/events/type/MiscTypes.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/events/type/MiscTypes.java @@ -62,7 +62,7 @@ public enum MiscTypes implements EventType, ArtifactEventType { final BlackboardAttribute longEnd = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_END); return String.format("from %1$g %2$g to %3$g %4$g", latStart.getValueDouble(), longStart.getValueDouble(), latEnd.getValueDouble(), longEnd.getValueDouble()); }), - GPS_TRACKPOINT("Location History", "gps_trackpoint.png", + GPS_TRACKPOINT("Location History", "gps-trackpoint.png", BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME, new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME), From fd73aff88b8bdf3177a45ce5bbf82916f4e39587 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Wed, 3 Dec 2014 13:51:00 -0800 Subject: [PATCH 07/13] Translation completed --- Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties index d54e28a55a..38b86e4f10 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/Bundle_ja.properties @@ -1,2 +1,2 @@ iOSModuleFactory.moduleDescription=\u30B7\u30B9\u30C6\u30E0\u304A\u3088\u3073\u7B2C\u4E09\u8005\u30A2\u30D7\u30EA\u30C7\u30FC\u30BF\u3092\u62BD\u51FA -iOSModuleFactory.moduleName=iOS\u30A2\u30CA\u30E9\u30A4\u30B6\u30FC \ No newline at end of file +iOSModuleFactory.moduleName=iOS\u30A2\u30CA\u30E9\u30A4\u30B6 \ No newline at end of file From 1a93da00995591d00840b25ee9a1627784d08615 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Wed, 3 Dec 2014 13:55:07 -0800 Subject: [PATCH 08/13] Translation completed --- .../org/sleuthkit/autopsy/modules/android/Bundle_ja.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties index e69de29bb2..dc3ed0fa78 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties @@ -0,0 +1,2 @@ +AndroidModuleFactory.moduleName= +AndroidModuleFactory.moduleDescription=Android\u30B7\u30B9\u30C6\u30E0\u304A\u3088\u3073\u7B2C\u4E09\u8005\u30A2\u30D7\u30EA\u30C7\u30FC\u30BF\u3092\u62BD\u51FA \ No newline at end of file From c2a36a8c95826fbb84b87a168c8615c3f3983509 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Wed, 3 Dec 2014 16:42:28 -0800 Subject: [PATCH 09/13] Translation complete --- .../autopsy/modules/photoreccarver/Bundle_ja.properties | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties index e69de29bb2..ed5e42a0a5 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties @@ -0,0 +1,6 @@ +moduleDescription.text=\u30B7\u30B9\u30C6\u30E0\u306E\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u306B\u5BFE\u3057\u3066PhotoRec\u30AB\u30FC\u30D0\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002 +moduleDisplayName.text=PhotoRec\u30AB\u30FC\u30D0 +OpenIDE-Module-Display-Category=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB +OpenIDE-Module-Long-Description=PhotoRec\u30AB\u30FC\u30D0\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n\n\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u5207\u308A\u51FA\u3057\u3001\u51E6\u7406\u3059\u308B\u3081\u306B\u30B7\u30B9\u30C6\u30E0\u3078\u30D5\u30A3\u30FC\u30C9\u3057\u307E\u3059\u3002 +OpenIDE-Module-Name=PhotoRec\u30AB\u30FC\u30D0\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB +OpenIDE-Module-Short-Description=\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u5207\u308A\u51FA\u3057\u3001\u51E6\u7406\u3059\u308B\u3081\u306B\u30B7\u30B9\u30C6\u30E0\u3078\u30D5\u30A3\u30FC\u30C9\u3057\u307E\u3059\u3002 \ No newline at end of file From e723a1f365e060077144169ea7683376efcb901d Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Wed, 3 Dec 2014 18:12:05 -0800 Subject: [PATCH 10/13] Deleted empty string --- .../org/sleuthkit/autopsy/modules/android/Bundle_ja.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties index dc3ed0fa78..a091c264ff 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/android/Bundle_ja.properties @@ -1,2 +1 @@ -AndroidModuleFactory.moduleName= AndroidModuleFactory.moduleDescription=Android\u30B7\u30B9\u30C6\u30E0\u304A\u3088\u3073\u7B2C\u4E09\u8005\u30A2\u30D7\u30EA\u30C7\u30FC\u30BF\u3092\u62BD\u51FA \ No newline at end of file From 0e00d6cfed86f870021e17491cdad770c680f4c9 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Wed, 3 Dec 2014 20:23:40 -0800 Subject: [PATCH 11/13] Made minor changes for better translation. Translation completed. --- .../autopsy/modules/photoreccarver/Bundle_ja.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties index ed5e42a0a5..45cdd48789 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle_ja.properties @@ -3,4 +3,4 @@ moduleDisplayName.text=PhotoRec\u30AB\u30FC\u30D0 OpenIDE-Module-Display-Category=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB OpenIDE-Module-Long-Description=PhotoRec\u30AB\u30FC\u30D0\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n\n\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u5207\u308A\u51FA\u3057\u3001\u51E6\u7406\u3059\u308B\u3081\u306B\u30B7\u30B9\u30C6\u30E0\u3078\u30D5\u30A3\u30FC\u30C9\u3057\u307E\u3059\u3002 OpenIDE-Module-Name=PhotoRec\u30AB\u30FC\u30D0\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB -OpenIDE-Module-Short-Description=\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u5207\u308A\u51FA\u3057\u3001\u51E6\u7406\u3059\u308B\u3081\u306B\u30B7\u30B9\u30C6\u30E0\u3078\u30D5\u30A3\u30FC\u30C9\u3057\u307E\u3059\u3002 \ No newline at end of file +OpenIDE-Module-Short-Description=\u51E6\u7406\u3059\u308B\u3081\u306B\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u5207\u308A\u51FA\u3057\u3001\u30B7\u30B9\u30C6\u30E0\u3078\u30D5\u30A3\u30FC\u30C9\u3057\u307E\u3059\u3002 \ No newline at end of file From 2d29876f789144ea3587ff50a5e39c70e8517c38 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Thu, 4 Dec 2014 12:58:29 -0500 Subject: [PATCH 12/13] Replaced NOI18N with NON-NLS to be consistent. --- .../modules/android/AndroidIngestModule.java | 26 ++++++------- .../android/BrowserLocationAnalyzer.java | 24 ++++++------ .../android/CacheLocationAnalyzer.java | 8 ++-- .../modules/android/CallLogAnalyzer.java | 32 ++++++++-------- .../modules/android/ContactAnalyzer.java | 38 +++++++++---------- .../android/GoogleMapLocationAnalyzer.java | 32 ++++++++-------- .../modules/android/TangoMessageAnalyzer.java | 32 ++++++++-------- .../modules/android/TextMessageAnalyzer.java | 30 +++++++-------- .../modules/android/WWFMessageAnalyzer.java | 22 +++++------ 9 files changed, 122 insertions(+), 122 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java index ee0dac4221..52439eb6fd 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/AndroidIngestModule.java @@ -57,7 +57,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Contacts"); //NOI18N + errors.add("Error getting Contacts"); //NON-NLS } try { @@ -67,7 +67,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Call Logs"); //NOI18N + errors.add("Error getting Call Logs"); //NON-NLS } try { @@ -77,7 +77,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Text Messages"); //NOI18N + errors.add("Error getting Text Messages"); //NON-NLS } try { @@ -87,7 +87,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Tango Messages"); //NOI18N + errors.add("Error getting Tango Messages"); //NON-NLS } try { @@ -97,7 +97,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Words with Friends Messages"); //NOI18N + errors.add("Error getting Words with Friends Messages"); //NON-NLS } try { @@ -107,7 +107,7 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Google Map Locations"); //NOI18N + errors.add("Error getting Google Map Locations"); //NON-NLS } try { @@ -117,14 +117,14 @@ class AndroidIngestModule implements DataSourceIngestModule { return IngestModule.ProcessResult.OK; } } catch (Exception e) { - errors.add("Error getting Browser Locations"); //NOI18N + errors.add("Error getting Browser Locations"); //NON-NLS } try { CacheLocationAnalyzer.findGeoLocations(); progressBar.progress(8); } catch (Exception e) { - errors.add("Error getting Cache Locations"); //NOI18N + errors.add("Error getting Cache Locations"); //NON-NLS } // create the final message for inbox @@ -133,20 +133,20 @@ class AndroidIngestModule implements DataSourceIngestModule { IngestMessage.MessageType msgLevel = IngestMessage.MessageType.INFO; if (errors.isEmpty() == false) { msgLevel = IngestMessage.MessageType.ERROR; - errorMessage.append("Errors were encountered"); //NOI18N + errorMessage.append("Errors were encountered"); //NON-NLS for (String msg : errors) { errorMessage.append("
  • ").append(msg).append("
  • \n"); //NON-NLS } errorMessage.append("\n"); //NON-NLS if (errors.size() == 1) { - errorMsgSubject = "One error was found"; //NOI18N + errorMsgSubject = "One error was found"; //NON-NLS } else { - errorMsgSubject = "errors found: " + errors.size(); //NOI18N + errorMsgSubject = "errors found: " + errors.size(); //NON-NLS } } else { - errorMessage.append("No errors"); //NOI18N - errorMsgSubject = "No errors"; //NOI18N + errorMessage.append("No errors"); //NON-NLS + errorMsgSubject = "No errors"; //NON-NLS } services.postMessage(IngestMessage.createMessage(msgLevel, AndroidModuleFactory.getModuleName(), "Finished Analysis: " + errorMsgSubject, errorMessage.toString())); diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java index acf6774a6f..339a7d5fca 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/BrowserLocationAnalyzer.java @@ -43,7 +43,7 @@ class BrowserLocationAnalyzer { public static void findGeoLocations() { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - List abstractFiles = skCase.findAllFilesWhere("name LIKE 'CachedGeoposition%.db'"); //NOI18N //get exact file names + List abstractFiles = skCase.findAllFilesWhere("name LIKE 'CachedGeoposition%.db'"); //NON-NLS //get exact file names for (AbstractFile abstractFile : abstractFiles) { try { @@ -54,11 +54,11 @@ class BrowserLocationAnalyzer { ContentUtils.writeToFile(abstractFile, jFile); findGeoLocationsInDB(jFile.toString(), abstractFile); } 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) { - 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; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } 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; } try { resultSet = statement.executeQuery( - "Select timestamp, latitude, longitude, accuracy FROM CachedPosition;"); //NOI18N + "Select timestamp, latitude, longitude, accuracy FROM CachedPosition;"); //NON-NLS while (resultSet.next()) { - Long timestamp = Long.valueOf(resultSet.getString("timestamp")) / 1000; //NOI18N - double latitude = Double.valueOf(resultSet.getString("latitude")); //NOI18N - double longitude = Double.valueOf(resultSet.getString("longitude")); //NOI18N + Long timestamp = Long.valueOf(resultSet.getString("timestamp")) / 1000; //NON-NLS + double latitude = Double.valueOf(resultSet.getString("latitude")); //NON-NLS + double longitude = Double.valueOf(resultSet.getString("longitude")); //NON-NLS BlackboardArtifact bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT); 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)); } } 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 { try { if (resultSet != null) { @@ -105,7 +105,7 @@ class BrowserLocationAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java index 6e5bae3027..3e942136f8 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/CacheLocationAnalyzer.java @@ -43,7 +43,7 @@ class CacheLocationAnalyzer { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - List abstractFiles = skCase.findAllFilesWhere("name ='cache.cell' OR name='cache.wifi'"); //NOI18N //get exact file names + List abstractFiles = skCase.findAllFilesWhere("name ='cache.cell' OR name='cache.wifi'"); //NON-NLS //get exact file names for (AbstractFile abstractFile : abstractFiles) { try { @@ -55,11 +55,11 @@ class CacheLocationAnalyzer { findGeoLocationsInFile(jFile, abstractFile); } 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) { - 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) { - 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 } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java index b213e95004..8c8542f789 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/CallLogAnalyzer.java @@ -47,11 +47,11 @@ class CallLogAnalyzer { /** the where clause(without 'where' of sql select statement to choose call * 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 - .collect(Collectors.joining(" OR name = ", "name = ", "")); //NOI18N + private static final String fileNameQuery = Stream.of("'logs.db'", "'contacts2.db'", "'contacts.db'") //NON-NLS + .collect(Collectors.joining(" OR name = ", "name = ", "")); //NON-NLS /** the names of tables that potentially hold call logs in the dbs */ - private static final Iterable tableNames = Arrays.asList("calls", "logs"); //NOI18N + private static final Iterable tableNames = Arrays.asList("calls", "logs"); //NON-NLS public static void findCallLogs() { try { @@ -63,11 +63,11 @@ class CallLogAnalyzer { ContentUtils.writeToFile(abstractFile, file); findCallLogsInDB(file.toString(), abstractFile); } 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) { - 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()) { return; } - try (Connection connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + try (Connection connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS Statement statement = connection.createStatement();) { for (String tableName : tableNames) { try (ResultSet resultSet = statement.executeQuery( - "SELECT number,date,duration,type, name FROM " + tableName + " ORDER BY date DESC;");) { //NOI18N - logger.log(Level.INFO, "Reading call log from table {0} in db {1}", new Object[]{tableName, DatabasePath}); //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}); //NON-NLS while (resultSet.next()) { 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() : ""; - final String number = resultSet.getString("number"); //NOI18N - final long duration = resultSet.getLong("duration"); //NOI18N //duration of call is in seconds - final String name = resultSet.getString("name"); //NOI18N // name of person dialed or called. null if unregistered + final String number = resultSet.getString("number"); //NON-NLS + final long duration = resultSet.getLong("duration"); //NON-NLS //duration of call is in seconds + final String name = resultSet.getString("name"); //NON-NLS // name of person dialed or called. null if unregistered try { 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_NAME.getTypeID(), moduleName, name)); } 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) { - 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) { - 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 { - 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; diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java index 68e021f0fa..3d4784864f 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java @@ -45,7 +45,7 @@ class ContactAnalyzer { List absFiles; try { 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()) { return; } @@ -55,11 +55,11 @@ class ContactAnalyzer { ContentUtils.writeToFile(AF, jFile); findContactsInDB(jFile.toString(), AF); } 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) { - 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; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS return; } @@ -90,13 +90,13 @@ class ContactAnalyzer { // 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. resultSet = statement.executeQuery( - "SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" //NOI18N - + "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" //NOI18N - + "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " //NOI18N - + "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" //NOI18N - + "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" //NOI18N - + "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" //NOI18N - + "ORDER BY name_raw_contact.display_name ASC;"); //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" //NON-NLS + + "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" //NON-NLS + + "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" //NON-NLS + + "ORDER BY name_raw_contact.display_name ASC;"); //NON-NLS BlackboardArtifact bba; bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); @@ -105,15 +105,15 @@ class ContactAnalyzer { String mimetype; // either phone or email String data1; // the phone number or email while (resultSet.next()) { - name = resultSet.getString("display_name"); //NOI18N - data1 = resultSet.getString("data1"); //NOI18N - mimetype = resultSet.getString("mimetype"); //NOI18N + name = resultSet.getString("display_name"); //NON-NLS + data1 = resultSet.getString("data1"); //NON-NLS + mimetype = resultSet.getString("mimetype"); //NON-NLS // System.out.println(resultSet.getString("data1") + resultSet.getString("mimetype") + resultSet.getString("display_name")); //Test code if (name.equals(oldName) == false) { bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); 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)); } else { bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID(), moduleName, data1)); @@ -122,7 +122,7 @@ class ContactAnalyzer { } } 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 { try { if (resultSet != null) { @@ -131,7 +131,7 @@ class ContactAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java index 09925e3a8f..88f1aa87ec 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/GoogleMapLocationAnalyzer.java @@ -44,7 +44,7 @@ class GoogleMapLocationAnalyzer { List absFiles; try { 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()) { return; } @@ -54,11 +54,11 @@ class GoogleMapLocationAnalyzer { ContentUtils.writeToFile(abstractFile, jFile); findGeoLocationsInDB(jFile.toString(), abstractFile); } 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) { - 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; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS return; } try { 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()) { - Long time = Long.valueOf(resultSet.getString("time")) / 1000; //NOI18N - String dest_title = resultSet.getString("dest_title"); //NOI18N - String dest_address = resultSet.getString("dest_address"); //NOI18N + Long time = Long.valueOf(resultSet.getString("time")) / 1000; //NON-NLS + String dest_title = resultSet.getString("dest_title"); //NON-NLS + String dest_address = resultSet.getString("dest_address"); //NON-NLS - double dest_lat = convertGeo(resultSet.getString("dest_lat")); //NOI18N - double dest_lng = convertGeo(resultSet.getString("dest_lng")); //NOI18N - double source_lat = convertGeo(resultSet.getString("source_lat")); //NOI18N - double source_lng = convertGeo(resultSet.getString("source_lng")); //NOI18N + double dest_lat = convertGeo(resultSet.getString("dest_lat")); //NON-NLS + double dest_lng = convertGeo(resultSet.getString("dest_lng")); //NON-NLS + double source_lat = convertGeo(resultSet.getString("source_lat")); //NON-NLS + double source_lng = convertGeo(resultSet.getString("source_lng")); //NON-NLS // bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT);//src @@ -123,7 +123,7 @@ class GoogleMapLocationAnalyzer { } } 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 { try { if (resultSet != null) { @@ -132,7 +132,7 @@ class GoogleMapLocationAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing the database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing the database", e); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java index 5b8cee3b4d..cdae0bfcad 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/TangoMessageAnalyzer.java @@ -45,18 +45,18 @@ class TangoMessageAnalyzer { List absFiles; try { 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) { try { File jFile = new File(Case.getCurrentCase().getTempDirectory(), abstractFile.getName()); ContentUtils.writeToFile(abstractFile, jFile); findTangoMessagesInDB(jFile.toString(), abstractFile); } 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) { - 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; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS return; } try { 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 direction; // 1 incoming, 2 outgoing String payload; // seems to be a base64 message wrapped by the conv_id while (resultSet.next()) { - conv_id = resultSet.getString("conv_id"); //NOI18N - Long create_time = Long.valueOf(resultSet.getString("create_time")) / 1000; //NOI18N - if (resultSet.getString("direction").equals("1")) { //NOI18N - direction = "Incoming"; //NOI18N + conv_id = resultSet.getString("conv_id"); //NON-NLS + Long create_time = Long.valueOf(resultSet.getString("create_time")) / 1000; //NON-NLS + if (resultSet.getString("direction").equals("1")) { //NON-NLS + direction = "Incoming"; //NON-NLS } 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. bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), moduleName, create_time)); @@ -104,7 +104,7 @@ class TangoMessageAnalyzer { } } 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 { try { if (resultSet != null) { @@ -113,7 +113,7 @@ class TangoMessageAnalyzer { statement.close(); connection.close(); } 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"); result = Z.split(wrapper)[1]; } 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; } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java index 0b58b75313..10058dba6b 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/TextMessageAnalyzer.java @@ -43,7 +43,7 @@ class TextMessageAnalyzer { public static void findTexts() { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - List absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NOI18N //get exact file name + List absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NON-NLS //get exact file name for (AbstractFile abstractFile : absFiles) { try { @@ -51,11 +51,11 @@ class TextMessageAnalyzer { ContentUtils.writeToFile(abstractFile, jFile); findTextsInDB(jFile.toString(), abstractFile); } 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) { - 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; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS return; } try { 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 @@ -87,15 +87,15 @@ class TextMessageAnalyzer { Integer read; // may be unread = 0, read = 1 String body; //message body while (resultSet.next()) { - address = resultSet.getString("address"); //NOI18N - Long date = Long.valueOf(resultSet.getString("date")) / 1000; //NOI18N + address = resultSet.getString("address"); //NON-NLS + Long date = Long.valueOf(resultSet.getString("date")) / 1000; //NON-NLS - read = resultSet.getInt("read"); //NOI18N - subject = resultSet.getString("subject"); //NOI18N - body = resultSet.getString("body"); //NOI18N + read = resultSet.getInt("read"); //NON-NLS + subject = resultSet.getString("subject"); //NON-NLS + 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. - 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_PHONE_NUMBER_FROM.getTypeID(), moduleName, address)); } else { @@ -111,7 +111,7 @@ class TextMessageAnalyzer { } } 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 { try { if (resultSet != null) { @@ -120,7 +120,7 @@ class TextMessageAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java index d5c584dbce..8977d514be 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/WWFMessageAnalyzer.java @@ -44,7 +44,7 @@ class WWFMessageAnalyzer { List absFiles; try { 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) { try { @@ -53,11 +53,11 @@ class WWFMessageAnalyzer { findWWFMessagesInDB(jFile.toString(), abstractFile); } 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) { - 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); statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS return; } try { 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 user_id; // the ID of the user who sent the message. String game_id; // ID of the game which the the message was sent. while (resultSet.next()) { - message = resultSet.getString("message"); //NOI18N - Long created_at = resultSet.getLong("datetime"); //NOI18N - user_id = resultSet.getString("user_id"); //NOI18N - game_id = resultSet.getString("game_id"); //NOI18N + message = resultSet.getString("message"); //NON-NLS + Long created_at = resultSet.getLong("datetime"); //NON-NLS + user_id = resultSet.getString("user_id"); //NON-NLS + 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. 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")); } } 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 { try { if (resultSet != null) { @@ -109,7 +109,7 @@ class WWFMessageAnalyzer { statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS } } } From 73448065d6d3bea18f251e47a3bf7ff00eae8756 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Thu, 4 Dec 2014 13:18:25 -0500 Subject: [PATCH 13/13] Switch NOI18N to NON-NLS for consistency. --- .../autopsy/modules/iOS/CallLogAnalyzer.java | 32 +++++++------- .../autopsy/modules/iOS/ContactAnalyzer.java | 44 +++++++++---------- .../modules/iOS/TextMessageAnalyzer.java | 30 ++++++------- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java index 3514a5d9bc..a3d8cc44ba 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/CallLogAnalyzer.java @@ -49,7 +49,7 @@ class CallLogAnalyzer { List absFiles; try { 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()) { return; } @@ -61,11 +61,11 @@ class CallLogAnalyzer { fileId = AF.getId(); findCallLogsInDB(dbPath, fileId); } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Call logs", e); //NOI18N + logger.log(Level.SEVERE, "Error parsing Call logs", e); //NON-NLS } } } catch (TskCoreException e) { - logger.log(Level.SEVERE, "Error finding Call logs", e); //NOI18N + logger.log(Level.SEVERE, "Error finding Call logs", e); //NON-NLS } } @@ -74,11 +74,11 @@ class CallLogAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS } Case currentCase = Case.getCurrentCase(); @@ -87,7 +87,7 @@ class CallLogAnalyzer { AbstractFile f = skCase.getAbstractFileById(fId); try { resultSet = statement.executeQuery( - "SELECT number,date,duration,type, name FROM calls ORDER BY date DESC;"); //NOI18N + "SELECT number,date,duration,type, name FROM calls ORDER BY date DESC;"); //NON-NLS BlackboardArtifact bba; String name; // name of person dialed or called. null if unregistered @@ -97,14 +97,14 @@ class CallLogAnalyzer { String type; // 1 incoming, 2 outgoing, 3 missed while (resultSet.next()) { - name = resultSet.getString("name"); //NOI18N - number = resultSet.getString("number"); //NOI18N - duration = resultSet.getString("duration"); //NOI18N - date = resultSet.getString("date"); //NOI18N - type = resultSet.getString("type"); //NOI18N + name = resultSet.getString("name"); //NON-NLS + number = resultSet.getString("number"); //NON-NLS + duration = resultSet.getString("duration"); //NON-NLS + date = resultSet.getString("date"); //NON-NLS + type = resultSet.getString("type"); //NON-NLS bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG); //create a call log and then add attributes from result set. - if(type.equalsIgnoreCase("outgoing")) { //NOI18N + if(type.equalsIgnoreCase("outgoing")) { //NON-NLS bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO.getTypeID(), moduleName, number)); } else { /// Covers INCOMING and MISSED @@ -117,18 +117,18 @@ class CallLogAnalyzer { } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); //NOI18N + logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); //NON-NLS } finally { try { resultSet.close(); statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing the database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing the database", e); //NON-NLS } } } catch (Exception e) { - logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); //NOI18N + logger.log(Level.SEVERE, "Error parsing Call logs to the Blackboard", e); //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java index a119666993..becafbafc0 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/ContactAnalyzer.java @@ -56,7 +56,7 @@ class ContactAnalyzer { List absFiles; try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name LIKE '%call_history%' "); //NOI18N //get exact file names + absFiles = skCase.findAllFilesWhere("name LIKE '%call_history%' "); //NON-NLS //get exact file names if (absFiles.isEmpty()) { //asdfkjasfakljsdfhlaksdjfhasdlkjf return; } @@ -71,11 +71,11 @@ class ContactAnalyzer { fileId = AF.getId(); //findContactsInDB(dbPath, fileId); } 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) { - logger.log(Level.SEVERE, "Error finding Contacts", e); //NOI18N + logger.log(Level.SEVERE, "Error finding Contacts", e); //NON-NLS } } @@ -90,11 +90,11 @@ class ContactAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS } Case currentCase = Case.getCurrentCase(); @@ -105,13 +105,13 @@ class ContactAnalyzer { // 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. resultSet = statement.executeQuery( - "SELECT mimetype,data1, name_raw_contact.display_name AS display_name \n" //NOI18N - + "FROM raw_contacts JOIN contacts ON (raw_contacts.contact_id=contacts._id) \n" //NOI18N - + "JOIN raw_contacts AS name_raw_contact ON(name_raw_contact_id=name_raw_contact._id) " //NOI18N - + "LEFT OUTER JOIN data ON (data.raw_contact_id=raw_contacts._id) \n" //NOI18N - + "LEFT OUTER JOIN mimetypes ON (data.mimetype_id=mimetypes._id) \n" //NOI18N - + "WHERE mimetype = 'vnd.android.cursor.item/phone_v2' OR mimetype = 'vnd.android.cursor.item/email_v2'\n" //NOI18N - + "ORDER BY name_raw_contact.display_name ASC;"); //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" //NON-NLS + + "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" //NON-NLS + + "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" //NON-NLS + + "ORDER BY name_raw_contact.display_name ASC;"); //NON-NLS BlackboardArtifact bba; bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); @@ -120,15 +120,15 @@ class ContactAnalyzer { String mimetype; // either phone or email String data1; // the phone number or email while (resultSet.next()) { - name = resultSet.getString("display_name"); //NOI18N - data1 = resultSet.getString("data1"); //NOI18N - mimetype = resultSet.getString("mimetype"); //NOI18N + name = resultSet.getString("display_name"); //NON-NLS + data1 = resultSet.getString("data1"); //NON-NLS + mimetype = resultSet.getString("mimetype"); //NON-NLS // System.out.println(resultSet.getString("data1") + resultSet.getString("mimetype") + resultSet.getString("display_name")); //Test code if (name.equals(oldName) == false) { bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); 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)); } else { bba.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID(), moduleName, data1)); @@ -137,18 +137,18 @@ class ContactAnalyzer { } } 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 { try { resultSet.close(); statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS } } } 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 } } @@ -186,13 +186,13 @@ class ContactAnalyzer { ostream.write(c); } } catch (IOException e) { - System.out.println("Error: " + e.getMessage()); //NOI18N + System.out.println("Error: " + e.getMessage()); //NON-NLS } finally { try { istream.close(); ostream.close(); } catch (IOException e) { - System.out.println("File did not close"); //NOI18N + System.out.println("File did not close"); //NON-NLS } } } diff --git a/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java index 18dae2c61c..04d67b78f7 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/iOS/TextMessageAnalyzer.java @@ -49,7 +49,7 @@ class TextMessageAnalyzer { void findTexts() { try { SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); - absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NOI18N //get exact file name + absFiles = skCase.findAllFilesWhere("name ='mmssms.db'"); //NON-NLS //get exact file name if (absFiles.isEmpty()) { return; } @@ -61,11 +61,11 @@ class TextMessageAnalyzer { fileId = AF.getId(); findTextsInDB(dbPath, fileId); } 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) { - logger.log(Level.SEVERE, "Error finding text messages", e); //NOI18N + logger.log(Level.SEVERE, "Error finding text messages", e); //NON-NLS } } @@ -74,11 +74,11 @@ class TextMessageAnalyzer { return; } try { - Class.forName("org.sqlite.JDBC"); //NOI18N //load JDBC driver - connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NOI18N + Class.forName("org.sqlite.JDBC"); //NON-NLS //load JDBC driver + connection = DriverManager.getConnection("jdbc:sqlite:" + DatabasePath); //NON-NLS statement = connection.createStatement(); } catch (ClassNotFoundException | SQLException e) { - logger.log(Level.SEVERE, "Error opening database", e); //NOI18N + logger.log(Level.SEVERE, "Error opening database", e); //NON-NLS } Case currentCase = Case.getCurrentCase(); @@ -87,7 +87,7 @@ class TextMessageAnalyzer { AbstractFile f = skCase.getAbstractFileById(fId); try { resultSet = statement.executeQuery( - "Select address,date,type,subject,body FROM sms;"); //NOI18N + "Select address,date,type,subject,body FROM sms;"); //NON-NLS BlackboardArtifact bba; String address; // may be phone number, or other addresses @@ -96,11 +96,11 @@ class TextMessageAnalyzer { String subject;//message subject String body; //message body while (resultSet.next()) { - address = resultSet.getString("address"); //NOI18N - date = resultSet.getString("date"); //NOI18N - type = resultSet.getString("type"); //NOI18N - subject = resultSet.getString("subject"); //NOI18N - body = resultSet.getString("body"); //NOI18N + address = resultSet.getString("address"); //NON-NLS + date = resultSet.getString("date"); //NON-NLS + type = resultSet.getString("type"); //NON-NLS + subject = resultSet.getString("subject"); //NON-NLS + body = resultSet.getString("body"); //NON-NLS bba = f.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE); //create Message artifact and then add attributes from result set. @@ -122,18 +122,18 @@ class TextMessageAnalyzer { } } 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 { try { resultSet.close(); statement.close(); connection.close(); } catch (Exception e) { - logger.log(Level.SEVERE, "Error closing database", e); //NOI18N + logger.log(Level.SEVERE, "Error closing database", e); //NON-NLS } } } 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 } }