diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index b09ffbed54..617d0efa69 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -108,6 +108,7 @@ AddImageWizardIterator.stepXofN=Step {0} of {1} AddLocalFilesTask.localFileAdd.progress.text=Adding\: {0}/{1} Case.getCurCase.exception.noneOpen=Cannot get the current case; there is no case open\! Case.create.exception.msg=Error creating a case\: {0} in dir {1} +Case.databaseConnectionInfo.error.msg=Error accessing case database connection info Case.open.exception.blankCase.msg=Case name is blank. Case.open.msgDlg.updated.msg=Updated case database schema.\nA backup copy of the database with the following path has been made\:\n {0} Case.open.msgDlg.updated.title=Case Database Schema Update diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index f1cc6fd34a..7b9172a968 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -72,6 +72,7 @@ import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagDeletedEvent import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent; import org.sleuthkit.autopsy.core.RuntimeProperties; +import org.sleuthkit.autopsy.core.UserPreferencesException; import org.sleuthkit.datamodel.BlackboardArtifactTag; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.ContentTag; @@ -348,7 +349,7 @@ public class Case implements SleuthkitCase.ErrorObserver { } // start listening for TSK errors for the new case currentCase.tskErrorReporter = new IntervalErrorReportData(currentCase, MIN_SECONDS_BETWEEN_ERROR_REPORTS, - NbBundle.getMessage(Case.class, "IntervalErrorReport.ErrorText")); + NbBundle.getMessage(Case.class, "IntervalErrorReport.ErrorText")); doCaseChange(currentCase); SwingUtilities.invokeLater(() -> { RecentCases.getInstance().addRecentCase(currentCase.name, currentCase.configFilePath); // update the recent cases @@ -377,7 +378,7 @@ public class Case implements SleuthkitCase.ErrorObserver { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }); } - + @Override public void receiveError(String context, String errorMessage) { /* NOTE: We are accessing tskErrorReporter from two different threads. @@ -464,6 +465,10 @@ public class Case implements SleuthkitCase.ErrorObserver { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }); throw new CaseActionException(NbBundle.getMessage(Case.class, "CaseOpenException.DatabaseSettingsIssue") + " " + ex.getMessage()); //NON-NLS + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); } /** @@ -575,7 +580,13 @@ public class Case implements SleuthkitCase.ErrorObserver { if (!UserPreferences.getIsMultiUserModeEnabled()) { throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.multiUserCaseNotEnabled")); } + try { db = SleuthkitCase.openCase(metadata.getCaseDatabaseName(), UserPreferences.getDatabaseConnectionInfo(), caseDir); + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS + throw new CaseActionException( + NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); + } } /** @@ -693,7 +704,7 @@ public class Case implements SleuthkitCase.ErrorObserver { * * @deprecated As of release 4.0, replaced by {@link #notifyAddingDataSource(java.util.UUID) and * {@link #notifyDataSourceAdded(org.sleuthkit.datamodel.Content, java.util.UUID) and - * {@link #notifyFailedAddingDataSource(java.util.UUID)} + * {@link #notifyFailedAddingDataSource(java.util.UUID)} */ @Deprecated public Image addImage(String imgPath, long imgId, String timeZone) throws CaseActionException { @@ -708,13 +719,13 @@ public class Case implements SleuthkitCase.ErrorObserver { /** * Finishes adding new local data source to the case. Sends out event and - * reopens windows if needed. + * reopens windows if needed. * * @param newDataSource new data source added * * @deprecated As of release 4.0, replaced by {@link #notifyAddingDataSource(java.util.UUID) and * {@link #notifyDataSourceAdded(org.sleuthkit.datamodel.Content, java.util.UUID) and - * {@link #notifyFailedAddingDataSource(java.util.UUID)} + * {@link #notifyFailedAddingDataSource(java.util.UUID)} */ @Deprecated void addLocalDataSource(Content newDataSource) { diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseImporter.java b/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseImporter.java index 936eccab5b..b5498cc284 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseImporter.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseImporter.java @@ -47,7 +47,6 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.SwingUtilities; import org.apache.commons.io.FileUtils; -import org.openide.util.Exceptions; import org.openide.util.NbBundle; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.casemodule.Case.CaseType; @@ -1391,6 +1390,8 @@ public class SingleUserCaseImporter implements Runnable { JTextArea jta = new JTextArea(casesThatWillBeProcessed.toString() + SEP + casesThatWillNotBeProcessed.toString()); jta.setEditable(false); JScrollPane jsp = new JScrollPane(jta) { + private static final long serialVersionUID = 1L; + @Override public Dimension getPreferredSize() { return new Dimension(700, 480); diff --git a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties index 0f160df1db..913f6d8c82 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties @@ -20,5 +20,7 @@ ServicesMonitor.statusChange.notify.title=Service Status Update ServicesMonitor.statusChange.notify.msg=Status for {0} is {1} ServicesMonitor.nullServiceName.excepton.txt=Requested service name is null ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is unknown +TextConverter.convert.exception.txt=Unable to convert text {0} to hex text +TextConverter.convertFromHex.exception.txt=Unable to convert hex text to text ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service ServicesMonitor.InvalidPortNumber=Invalid port number. \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java b/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java index e53f1639b3..4c1fb92989 100644 --- a/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/core/ServicesMonitor.java @@ -239,7 +239,14 @@ public class ServicesMonitor { * Performs case database service availability status check. */ private void checkDatabaseConnectionStatus() { - CaseDbConnectionInfo info = UserPreferences.getDatabaseConnectionInfo(); + CaseDbConnectionInfo info; + try { + info = UserPreferences.getDatabaseConnectionInfo(); + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS + setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), "Error accessing case database connection info"); + return; + } try { SleuthkitCase.tryConnect(info); setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.UP.toString(), ""); @@ -277,7 +284,15 @@ public class ServicesMonitor { * Performs messaging service availability status check. */ private void checkMessagingServerConnectionStatus() { - MessageServiceConnectionInfo info = UserPreferences.getMessageServiceConnectionInfo(); + MessageServiceConnectionInfo info; + try { + info = UserPreferences.getMessageServiceConnectionInfo(); + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS + setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), "Error accessing messaging service connection info"); + return; + } + try { info.tryConnect(); setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.UP.toString(), ""); diff --git a/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java b/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java index 098c1ce0ad..a9909593b0 100755 --- a/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java +++ b/Core/src/org/sleuthkit/autopsy/core/UserPreferences.java @@ -18,10 +18,17 @@ */ package org.sleuthkit.autopsy.core; +import java.util.Base64; import java.util.prefs.BackingStoreException; import org.sleuthkit.autopsy.events.MessageServiceConnectionInfo; import java.util.prefs.PreferenceChangeListener; import java.util.prefs.Preferences; +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.PBEKeySpec; +import javax.crypto.spec.PBEParameterSpec; +import org.openide.util.NbBundle; import org.openide.util.NbPreferences; import org.sleuthkit.datamodel.CaseDbConnectionInfo; import org.sleuthkit.datamodel.TskData.DbType; @@ -130,7 +137,12 @@ public final class UserPreferences { preferences.putInt(NUMBER_OF_FILE_INGEST_THREADS, value); } - public static CaseDbConnectionInfo getDatabaseConnectionInfo() { + /** + * Reads persisted case database connection info. + * @return An object encapsulating the database connection info. + * @throws org.sleuthkit.autopsy.core.UserPreferencesException + */ + public static CaseDbConnectionInfo getDatabaseConnectionInfo() throws UserPreferencesException { DbType dbType; try { dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); @@ -141,15 +153,22 @@ public final class UserPreferences { preferences.get(EXTERNAL_DATABASE_HOSTNAME_OR_IP, ""), preferences.get(EXTERNAL_DATABASE_PORTNUMBER, "5432"), preferences.get(EXTERNAL_DATABASE_USER, ""), - preferences.get(EXTERNAL_DATABASE_PASSWORD, ""), + TextConverter.convertHexTextToText(preferences.get(EXTERNAL_DATABASE_PASSWORD, "")), dbType); } - public static void setDatabaseConnectionInfo(CaseDbConnectionInfo connectionInfo) { + /** + * Persists case database connection info. + * + * @param connectionInfo An object encapsulating the database connection + * info. + * @throws org.sleuthkit.autopsy.core.UserPreferencesException + */ + public static void setDatabaseConnectionInfo(CaseDbConnectionInfo connectionInfo) throws UserPreferencesException { preferences.put(EXTERNAL_DATABASE_HOSTNAME_OR_IP, connectionInfo.getHost()); preferences.put(EXTERNAL_DATABASE_PORTNUMBER, connectionInfo.getPort()); preferences.put(EXTERNAL_DATABASE_USER, connectionInfo.getUserName()); - preferences.put(EXTERNAL_DATABASE_PASSWORD, connectionInfo.getPassword()); + preferences.put(EXTERNAL_DATABASE_PASSWORD, TextConverter.convertTextToHexText(connectionInfo.getPassword())); preferences.put(EXTERNAL_DATABASE_TYPE, connectionInfo.getDbType().toString()); } @@ -181,20 +200,22 @@ public final class UserPreferences { * Persists message service connection info. * * @param info An object encapsulating the message service info. + * @throws org.sleuthkit.autopsy.core.UserPreferencesException */ - public static void setMessageServiceConnectionInfo(MessageServiceConnectionInfo info) { + public static void setMessageServiceConnectionInfo(MessageServiceConnectionInfo info) throws UserPreferencesException { preferences.put(MESSAGE_SERVICE_HOST, info.getHost()); preferences.put(MESSAGE_SERVICE_PORT, Integer.toString(info.getPort())); preferences.put(MESSAGE_SERVICE_USER, info.getUserName()); - preferences.put(MESSAGE_SERVICE_PASSWORD, info.getPassword()); + preferences.put(MESSAGE_SERVICE_PASSWORD, TextConverter.convertTextToHexText(info.getPassword())); } /** * Reads persisted message service connection info. * * @return An object encapsulating the message service info. + * @throws org.sleuthkit.autopsy.core.UserPreferencesException */ - public static MessageServiceConnectionInfo getMessageServiceConnectionInfo() { + public static MessageServiceConnectionInfo getMessageServiceConnectionInfo() throws UserPreferencesException { int port; try { port = Integer.parseInt(preferences.get(MESSAGE_SERVICE_PORT, DEFAULT_PORT_STRING)); @@ -207,7 +228,7 @@ public final class UserPreferences { preferences.get(MESSAGE_SERVICE_HOST, ""), port, preferences.get(MESSAGE_SERVICE_USER, ""), - preferences.get(MESSAGE_SERVICE_PASSWORD, "")); + TextConverter.convertHexTextToText(preferences.get(MESSAGE_SERVICE_PASSWORD, ""))); } /** @@ -257,4 +278,68 @@ public final class UserPreferences { public static void setIsTimeOutEnabled(boolean enabled) { preferences.putBoolean(PROCESS_TIME_OUT_ENABLED, enabled); } + + + /** + * Provides ability to convert text to hex text. + */ + static final class TextConverter { + + private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); + private static final byte[] SALT = { + (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12, + (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,}; + + /** + * Convert text to hex text. + * + * @param property Input text string. + * + * @return Converted hex string. + * + * @throws org.sleuthkit.autopsy.core.UserPreferencesException + */ + static String convertTextToHexText(String property) throws UserPreferencesException { + try { + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); + SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); + Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); + pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); + return base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8"))); + } catch (Exception ex) { + throw new UserPreferencesException( + NbBundle.getMessage(TextConverter.class, "TextConverter.convert.exception.txt")); + } + } + + private static String base64Encode(byte[] bytes) { + return Base64.getEncoder().encodeToString(bytes); + } + + /** + * Convert hex text back to text. + * + * @param property Input hex text string. + * + * @return Converted text string. + * + * @throws org.sleuthkit.autopsy.core.UserPreferencesException + */ + static String convertHexTextToText(String property) throws UserPreferencesException { + try { + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); + SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); + Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); + pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); + return new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8"); + } catch (Exception ex) { + throw new UserPreferencesException( + NbBundle.getMessage(TextConverter.class, "TextConverter.convertFromHex.exception.txt")); + } + } + + private static byte[] base64Decode(String property) { + return Base64.getDecoder().decode(property); + } + } } diff --git a/Core/src/org/sleuthkit/autopsy/core/UserPreferencesException.java b/Core/src/org/sleuthkit/autopsy/core/UserPreferencesException.java new file mode 100644 index 0000000000..7d9c22fe0b --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/core/UserPreferencesException.java @@ -0,0 +1,35 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2015 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.core; + +/** + * Exception thrown when text conversion (such as from text to hex text or vice versa) resulted in + * an error + */ +public class UserPreferencesException extends Exception { + private static final long serialVersionUID = 1L; + + public UserPreferencesException(String message) { + super(message); + } + + public UserPreferencesException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java index de0d948956..0a26244edc 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java @@ -22,6 +22,7 @@ import java.util.logging.Level; import javax.swing.ImageIcon; import org.openide.util.ImageUtilities; import org.openide.util.Lookup; +import org.sleuthkit.autopsy.core.UserPreferencesException; import org.sleuthkit.autopsy.events.MessageServiceException; import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService; import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchServiceException; @@ -560,17 +561,25 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel { lbTestSolrWarning.setText(""); lbTestMessageWarning.setText(""); - CaseDbConnectionInfo dbInfo = UserPreferences.getDatabaseConnectionInfo(); - tbDbHostname.setText(dbInfo.getHost().trim()); - tbDbPort.setText(dbInfo.getPort().trim()); - tbDbUsername.setText(dbInfo.getUserName().trim()); - tbDbPassword.setText(dbInfo.getPassword()); + try { + CaseDbConnectionInfo dbInfo = UserPreferences.getDatabaseConnectionInfo(); + tbDbHostname.setText(dbInfo.getHost().trim()); + tbDbPort.setText(dbInfo.getPort().trim()); + tbDbUsername.setText(dbInfo.getUserName().trim()); + tbDbPassword.setText(dbInfo.getPassword()); + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS + } - MessageServiceConnectionInfo msgServiceInfo = UserPreferences.getMessageServiceConnectionInfo(); - tbMsgHostname.setText(msgServiceInfo.getHost().trim()); - tbMsgPort.setText(Integer.toString(msgServiceInfo.getPort())); - tbMsgUsername.setText(msgServiceInfo.getUserName().trim()); - tbMsgPassword.setText(msgServiceInfo.getPassword()); + try { + MessageServiceConnectionInfo msgServiceInfo = UserPreferences.getMessageServiceConnectionInfo(); + tbMsgHostname.setText(msgServiceInfo.getHost().trim()); + tbMsgPort.setText(Integer.toString(msgServiceInfo.getPort())); + tbMsgUsername.setText(msgServiceInfo.getUserName().trim()); + tbMsgPassword.setText(msgServiceInfo.getPassword()); + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS + } String indexingServerHost = UserPreferences.getIndexingServerHost().trim(); if (!indexingServerHost.isEmpty()) { @@ -646,7 +655,11 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel { new String(tbDbPassword.getPassword()), dbType); - UserPreferences.setDatabaseConnectionInfo(info); + try { + UserPreferences.setDatabaseConnectionInfo(info); + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS + } int port = 0; try { @@ -661,7 +674,11 @@ public final class MultiUserSettingsPanel extends javax.swing.JPanel { tbMsgUsername.getText().trim(), new String(tbMsgPassword.getPassword())); - UserPreferences.setMessageServiceConnectionInfo(msgServiceInfo); + try { + UserPreferences.setMessageServiceConnectionInfo(msgServiceInfo); + } catch (UserPreferencesException ex) { + logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS + } UserPreferences.setIndexingServerHost(tbSolrHostname.getText().trim()); UserPreferences.setIndexingServerPort(Integer.parseInt(tbSolrPort.getText().trim())); diff --git a/Core/src/org/sleuthkit/autopsy/events/AutopsyEventPublisher.java b/Core/src/org/sleuthkit/autopsy/events/AutopsyEventPublisher.java index a23a203ee6..80c23d924f 100644 --- a/Core/src/org/sleuthkit/autopsy/events/AutopsyEventPublisher.java +++ b/Core/src/org/sleuthkit/autopsy/events/AutopsyEventPublisher.java @@ -23,6 +23,7 @@ import java.net.URISyntaxException; import java.util.Set; import java.util.logging.Level; import javax.jms.JMSException; +import org.sleuthkit.autopsy.core.UserPreferencesException; import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.coreutils.Logger; @@ -70,6 +71,10 @@ public final class AutopsyEventPublisher { String message = "Failed to open remote event channel"; //NON-NLS logger.log(Level.SEVERE, message, ex); throw new AutopsyEventException(message, ex); + } catch (UserPreferencesException ex) { + String message = "Error accessing messaging service connection info"; //NON-NLS + logger.log(Level.SEVERE, message, ex); + throw new AutopsyEventException(message, ex); } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index cbeb1a8438..62a15c1517 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -223,6 +223,7 @@ Server.connect.exception.msg=Failed to connect to Solr server\: Server.openCore.exception.msg=Core open requested, but server not yet running Server.openCore.exception.cantOpen.msg=Could not open Core Server.openCore.exception.cantOpen.msg2=Could not open Core +Server.openCore.exception.cantOpenForCase.msg=Could not create keyword search index for case {0} Server.request.exception.exception.msg=Could not issue Solr request Server.commit.exception.msg=Could not commit index Server.addDoc.exception.msg=Could not add document to index via update handler\: {0} diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java index 20e3f178ee..50d5e962bd 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java @@ -626,7 +626,12 @@ public class Server { Case currentCase = Case.getCurrentCase(); - currentCore = openCore(currentCase); + try { + currentCore = openCore(currentCase); + } catch (KeywordSearchModuleException ex) { + MessageNotifyUtil.Notify.error(NbBundle.getMessage(Server.class, "Server.openCore.exception.cantOpenForCase.msg", currentCase.getName()), ex.getCause().getMessage()); + throw ex; + } serverAction.putValue(CORE_EVT, CORE_EVT_STATES.STARTED); } diff --git a/docs/doxygen/modDevPython.dox b/docs/doxygen/modDevPython.dox index 9b1b74501f..272df945de 100755 --- a/docs/doxygen/modDevPython.dox +++ b/docs/doxygen/modDevPython.dox @@ -23,7 +23,20 @@ There are also a set of tutorials that Basis Technology published on their blog: \section mod_dev_py_setup Basic Setup -You don't really need anything to develop a python Autopsy module except for the standard Autopsy and your favorite text editor. We recommend pyCharm or the Python plug-in to NetBeans. +-You don't really need anything to develop a python Autopsy module except for the standard Autopsy and your favorite text editor. We recommend IntelliJ IDEA or the Jython plug-in to NetBeans. + +To install NetBeans' plug-in: +-# Download and install the Jython 2.7 installer (http://www.jython.org/downloads.html). +-# Download NetBeans Python plug-in zip file (http://plugins.netbeans.org/plugin/56795/python4netbeans802). +-# Unpack the content (.nbm files) of the zip file to the desired location. +-# In NetBeans go to Tools->Plugins. In Download tab, click on Add Plugins, then choose extracted .nbm files. +-# Setup Jython path from Tools->Python Platform, click on new, then choose Jython.exe (usually in C:/Program files/Jython2.7/bin/) + +To install IntelliJ IDEA + Python plug-in: +-# Download and install IDEA https://www.jetbrains.com/idea/download/ +-# In File->Settings->Plugins-> install Python Community Edition +-# In File->Project Structure->Project-> Project SDK-> choose IntelliJ IDEA Community Edition +-# In Libraries->add new libraries->choose desired autopsy modules (usually in C:\Program Files\Autopsy-3.1.3\autopsy\modules) \section mod_dev_py_create Creating a Basic Python Module