mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge pull request #5096 from sleuthkit/develop
Merge develop into elastic computing
This commit is contained in:
commit
b3d0df1a92
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
OpenIDE-Module: org.sleuthkit.autopsy.core/10
|
||||
OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/core/Bundle.properties
|
||||
OpenIDE-Module-Layer: org/sleuthkit/autopsy/core/layer.xml
|
||||
OpenIDE-Module-Implementation-Version: 27
|
||||
OpenIDE-Module-Implementation-Version: 28
|
||||
OpenIDE-Module-Requires: org.openide.windows.WindowManager
|
||||
AutoUpdate-Show-In-Client: true
|
||||
AutoUpdate-Essential-Module: true
|
||||
|
@ -122,5 +122,5 @@ nbm.homepage=http://www.sleuthkit.org/
|
||||
nbm.module.author=Brian Carrier
|
||||
nbm.needs.restart=true
|
||||
source.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8.0-sources.jar
|
||||
spec.version.base=10.15
|
||||
spec.version.base=10.16
|
||||
|
||||
|
@ -299,6 +299,10 @@ public class Installer extends ModuleInstall {
|
||||
* initialized later.
|
||||
*/
|
||||
private static void addGstreamerPathsToEnv() {
|
||||
if (System.getProperty("jna.nosys") == null) {
|
||||
System.setProperty("jna.nosys", "true");
|
||||
}
|
||||
|
||||
Path gstreamerPath = InstalledFileLocator.getDefault().locate("gstreamer", Installer.class.getPackage().getName(), false).toPath();
|
||||
|
||||
if (gstreamerPath == null) {
|
||||
|
@ -434,7 +434,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
}
|
||||
|
||||
setColumnWidths();
|
||||
|
||||
|
||||
/*
|
||||
* Load column sorting information from preferences file and apply it to
|
||||
* columns.
|
||||
@ -516,12 +516,22 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
protected void setColumnWidths() {
|
||||
if (rootNode.getChildren().getNodesCount() != 0) {
|
||||
final Graphics graphics = outlineView.getGraphics();
|
||||
|
||||
if (graphics != null) {
|
||||
// Current width of the outlineView
|
||||
double outlineViewWidth = outlineView.getSize().getWidth();
|
||||
// List of the column widths
|
||||
List<Integer> columnWidths = new ArrayList<>();
|
||||
final FontMetrics metrics = graphics.getFontMetrics();
|
||||
|
||||
int margin = 4;
|
||||
int padding = 8;
|
||||
|
||||
|
||||
int totalColumnWidth = 0;
|
||||
int cntMaxSizeColumns =0;
|
||||
|
||||
// Calulate the width for each column keeping track of the number
|
||||
// of columns that were set to columnwidthLimit.
|
||||
for (int column = 0; column < outline.getModel().getColumnCount(); column++) {
|
||||
int firstColumnPadding = (column == 0) ? 32 : 0;
|
||||
int columnWidthLimit = (column == 0) ? 350 : 300;
|
||||
@ -539,8 +549,43 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
|
||||
int columnWidth = Math.max(valuesWidth, headerWidth);
|
||||
columnWidth += 2 * margin + padding; // add margin and regular padding
|
||||
columnWidth = Math.min(columnWidth, columnWidthLimit);
|
||||
|
||||
columnWidth = Math.min(columnWidth, columnWidthLimit);
|
||||
columnWidths.add(columnWidth);
|
||||
|
||||
totalColumnWidth += columnWidth;
|
||||
|
||||
if( columnWidth == columnWidthLimit) {
|
||||
cntMaxSizeColumns++;
|
||||
}
|
||||
}
|
||||
|
||||
// Figure out how much extra, if any can be given to the columns
|
||||
// so that the table is as wide as outlineViewWidth. If cntMaxSizeColumns
|
||||
// is greater than 0 divide the extra space between the columns
|
||||
// that could use more space. Otherwise divide evenly amoung
|
||||
// all columns.
|
||||
int extraWidth = 0;
|
||||
|
||||
if (totalColumnWidth < outlineViewWidth) {
|
||||
if (cntMaxSizeColumns > 0) {
|
||||
extraWidth = (int) ((outlineViewWidth - totalColumnWidth)/cntMaxSizeColumns);
|
||||
} else {
|
||||
extraWidth = (int) ((outlineViewWidth - totalColumnWidth)/columnWidths.size());
|
||||
}
|
||||
}
|
||||
|
||||
for(int column = 0; column < columnWidths.size(); column++) {
|
||||
int columnWidth = columnWidths.get(column);
|
||||
|
||||
if(cntMaxSizeColumns > 0) {
|
||||
if(columnWidth >= ((column == 0) ? 350 : 300)) {
|
||||
columnWidth += extraWidth;
|
||||
}
|
||||
} else {
|
||||
columnWidth += extraWidth;
|
||||
}
|
||||
|
||||
outline.getColumnModel().getColumn(column).setPreferredWidth(columnWidth);
|
||||
}
|
||||
}
|
||||
|
8
Core/src/org/sleuthkit/autopsy/texttranslation/Bundle.properties
Executable file
8
Core/src/org/sleuthkit/autopsy/texttranslation/Bundle.properties
Executable file
@ -0,0 +1,8 @@
|
||||
OptionsCategory_Name_Machine_Translation=Machine Translation
|
||||
OptionsCategory_Keywords_Machine_Translation_Settings=Machine Translation Settings
|
||||
TranslationContentPanel.ocrLabel.text=OCR:
|
||||
TranslationOptionsPanelController.moduleErr=Module Error
|
||||
TranslationOptionsPanelController.moduleErr.msg=A module caused an error listening to TranslationSettingsPanelController updates. See log to determine which module. Some data could be incomplete.
|
||||
TranslationContentPanel.showLabel.text=Show:
|
||||
TranslationOptionsPanel.translationServiceLabel.text=Text translator:
|
||||
TranslationOptionsPanel.translationOptionsDescription.text=Configure a 3rd party text translation service to enable text and file name translation.
|
12
Core/src/org/sleuthkit/autopsy/texttranslation/Bundle.properties-MERGED
Executable file
12
Core/src/org/sleuthkit/autopsy/texttranslation/Bundle.properties-MERGED
Executable file
@ -0,0 +1,12 @@
|
||||
OptionsCategory_Name_Machine_Translation=Machine Translation
|
||||
OptionsCategory_Keywords_Machine_Translation_Settings=Machine Translation Settings
|
||||
TranslationContentPanel.ocrLabel.text=OCR:
|
||||
TranslationOptionsPanel.noTextTranslators.text=No text translators exist, translation is disabled.
|
||||
TranslationOptionsPanel.noTextTranslatorSelected.text=No text translator selected, translation is disabled.
|
||||
TranslationOptionsPanel.textTranslatorsUnavailable.text=Unable to get selected text translator, translation is disabled.
|
||||
TranslationOptionsPanel.translationDisabled.text=Translation disabled
|
||||
TranslationOptionsPanelController.moduleErr=Module Error
|
||||
TranslationOptionsPanelController.moduleErr.msg=A module caused an error listening to TranslationSettingsPanelController updates. See log to determine which module. Some data could be incomplete.
|
||||
TranslationContentPanel.showLabel.text=Show:
|
||||
TranslationOptionsPanel.translationServiceLabel.text=Text translator:
|
||||
TranslationOptionsPanel.translationOptionsDescription.text=Configure a 3rd party text translation service to enable text and file name translation.
|
@ -23,6 +23,7 @@ import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import javax.annotation.concurrent.GuardedBy;
|
||||
|
||||
/**
|
||||
* Performs a lookup for a TextTranslator service provider and if present, will
|
||||
@ -33,6 +34,7 @@ public final class TextTranslationService {
|
||||
private final static TextTranslationService tts = new TextTranslationService();
|
||||
|
||||
private final Collection<? extends TextTranslator> translators;
|
||||
@GuardedBy("this")
|
||||
private Optional<TextTranslator> selectedTranslator;
|
||||
|
||||
private TextTranslationService() {
|
||||
@ -50,7 +52,7 @@ public final class TextTranslationService {
|
||||
* Update the translator currently in use to match the one saved to the user
|
||||
* preferences
|
||||
*/
|
||||
public void updateSelectedTranslator() {
|
||||
synchronized void updateSelectedTranslator() {
|
||||
String translatorName = UserPreferences.getTextTranslatorName();
|
||||
for (TextTranslator translator : translators) {
|
||||
if (translator.getName().equals(translatorName)) {
|
||||
@ -75,7 +77,7 @@ public final class TextTranslationService {
|
||||
* when specific translation
|
||||
* implementations fail
|
||||
*/
|
||||
public String translate(String input) throws NoServiceProviderException, TranslationException {
|
||||
public synchronized String translate(String input) throws NoServiceProviderException, TranslationException {
|
||||
if (hasProvider()) {
|
||||
return selectedTranslator.get().translate(input);
|
||||
}
|
||||
@ -92,7 +94,7 @@ public final class TextTranslationService {
|
||||
*
|
||||
* @throws NoServiceProviderException
|
||||
*/
|
||||
public TextTranslator getTranslatorByName(String translatorName) throws NoServiceProviderException {
|
||||
TextTranslator getTranslatorByName(String translatorName) throws NoServiceProviderException {
|
||||
for (TextTranslator translator : translators) {
|
||||
if (translator.getName().equals(translatorName)) {
|
||||
return translator;
|
||||
@ -107,7 +109,7 @@ public final class TextTranslationService {
|
||||
*
|
||||
* @return an unmodifiable collection of TextTranslators
|
||||
*/
|
||||
public Collection<? extends TextTranslator> getTranslators() {
|
||||
Collection<? extends TextTranslator> getTranslators() {
|
||||
return Collections.unmodifiableCollection(translators);
|
||||
}
|
||||
|
||||
@ -117,16 +119,16 @@ public final class TextTranslationService {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean hasProvider() {
|
||||
public synchronized boolean hasProvider() {
|
||||
return selectedTranslator.isPresent();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the hard limit for translation request sizes.
|
||||
*
|
||||
* @return
|
||||
* Gets the maximum number of characters allowed in a translation request.
|
||||
*
|
||||
* @return The maximum character count.
|
||||
*/
|
||||
public int getMaxPayloadSize() {
|
||||
return selectedTranslator.get().getMaxPayloadSize();
|
||||
public synchronized int getMaxTextChars() {
|
||||
return selectedTranslator.get().getMaxTextChars();
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.texttranslation;
|
||||
|
||||
import java.awt.Component;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
* Interface for creating text translators. Implementing classes will be picked
|
||||
@ -45,22 +45,24 @@ public interface TextTranslator {
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Get the component to display on the settings options panel when this
|
||||
* Get the JPanel to display on the settings options panel when this
|
||||
* TextTranslator is selected
|
||||
*
|
||||
* @return the component which displays the settings options
|
||||
* @return the panel which displays the settings options
|
||||
*/
|
||||
Component getComponent();
|
||||
JPanel getSettingsPanel();
|
||||
|
||||
/**
|
||||
* Save the settings as they have been modified in the component.
|
||||
*/
|
||||
void saveSettings();
|
||||
|
||||
/**
|
||||
* Returns the hard limit for translation request sizes.
|
||||
* Saves the current state of the settings in the settings panel.
|
||||
*
|
||||
* @return
|
||||
* @throws TranslationConfigException
|
||||
*/
|
||||
int getMaxPayloadSize();
|
||||
void saveSettings() throws TranslationConfigException;
|
||||
|
||||
/**
|
||||
* Gets the maximum number of characters allowed in a translation request.
|
||||
*
|
||||
* @return The maximum character count.
|
||||
*/
|
||||
int getMaxTextChars();
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.texttranslation;
|
||||
|
||||
/**
|
||||
* Instances of this exception class are thrown when there is an error
|
||||
* configuring text translation.
|
||||
*/
|
||||
public class TranslationConfigException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Constructs a new exception with the specified message.
|
||||
*
|
||||
* @param message The message.
|
||||
*/
|
||||
public TranslationConfigException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new exception with the specified message and cause.
|
||||
*
|
||||
* @param message The message.
|
||||
* @param cause The cause.
|
||||
*/
|
||||
public TranslationConfigException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
}
|
@ -22,13 +22,8 @@ package org.sleuthkit.autopsy.texttranslation;
|
||||
* Provides a system exception for Text Translation errors
|
||||
*/
|
||||
public class TranslationException extends Exception {
|
||||
|
||||
/**
|
||||
* Constructs a new exception with null as its message.
|
||||
*/
|
||||
public TranslationException() {
|
||||
super();
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Constructs a new exception with the specified message.
|
||||
|
@ -61,7 +61,7 @@
|
||||
<Component class="javax.swing.JLabel" name="translationServiceLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/texttranslation/ui/Bundle.properties" key="TranslationOptionsPanel.translationServiceLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/texttranslation/Bundle.properties" key="TranslationOptionsPanel.translationServiceLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -72,7 +72,7 @@
|
||||
<Component class="javax.swing.JLabel" name="translationOptionsDescription">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/texttranslation/ui/Bundle.properties" key="TranslationOptionsPanel.translationOptionsDescription.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/texttranslation/Bundle.properties" key="TranslationOptionsPanel.translationOptionsDescription.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.texttranslation.ui;
|
||||
package org.sleuthkit.autopsy.texttranslation;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
@ -27,14 +27,12 @@ import java.util.logging.Level;
|
||||
import javax.swing.JLabel;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.texttranslation.NoServiceProviderException;
|
||||
import org.sleuthkit.autopsy.texttranslation.TextTranslationService;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* Options panel to display translation options
|
||||
*/
|
||||
public class TranslationOptionsPanel extends javax.swing.JPanel {
|
||||
final class TranslationOptionsPanel extends javax.swing.JPanel {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(TranslationOptionsPanel.class.getName());
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -45,7 +43,7 @@ public class TranslationOptionsPanel extends javax.swing.JPanel {
|
||||
* Creates new form TranslationOptionsPanel
|
||||
*/
|
||||
@Messages({"TranslationOptionsPanel.translationDisabled.text=Translation disabled"})
|
||||
public TranslationOptionsPanel(TranslationOptionsPanelController theController) {
|
||||
TranslationOptionsPanel(TranslationOptionsPanelController theController) {
|
||||
initComponents();
|
||||
controller = theController;
|
||||
translatorComboBox.addItem(Bundle.TranslationOptionsPanel_translationDisabled_text());
|
||||
@ -78,7 +76,7 @@ public class TranslationOptionsPanel extends javax.swing.JPanel {
|
||||
translationServicePanel.removeAll();
|
||||
if (translatorComboBox.getSelectedItem() != null && !translatorComboBox.getSelectedItem().toString().equals(Bundle.TranslationOptionsPanel_translationDisabled_text())) {
|
||||
try {
|
||||
Component panel = TextTranslationService.getInstance().getTranslatorByName(translatorComboBox.getSelectedItem().toString()).getComponent();
|
||||
Component panel = TextTranslationService.getInstance().getTranslatorByName(translatorComboBox.getSelectedItem().toString()).getSettingsPanel();
|
||||
panel.addPropertyChangeListener(new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
@ -126,7 +124,7 @@ public class TranslationOptionsPanel extends javax.swing.JPanel {
|
||||
if (currentSelection != null && !currentSelection.equals(Bundle.TranslationOptionsPanel_translationDisabled_text())) {
|
||||
try {
|
||||
TextTranslationService.getInstance().getTranslatorByName(currentSelection).saveSettings();
|
||||
} catch (NoServiceProviderException ex) {
|
||||
} catch (NoServiceProviderException | TranslationConfigException ex) {
|
||||
logger.log(Level.WARNING, "Unable to save settings for TextTranslator named: " + currentSelection, ex);
|
||||
}
|
||||
}
|
||||
@ -172,7 +170,7 @@ public class TranslationOptionsPanel extends javax.swing.JPanel {
|
||||
.addGap(10, 10, 10)
|
||||
.addComponent(translatorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addComponent(translationOptionsDescription, javax.swing.GroupLayout.DEFAULT_SIZE, 462, Short.MAX_VALUE))
|
||||
.addComponent(translationOptionsDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 462, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.texttranslation.ui;
|
||||
package org.sleuthkit.autopsy.texttranslation;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
@ -26,11 +26,12 @@ import com.squareup.okhttp.OkHttpClient;
|
||||
import com.squareup.okhttp.Request;
|
||||
import com.squareup.okhttp.RequestBody;
|
||||
import com.squareup.okhttp.Response;
|
||||
import java.awt.Component;
|
||||
import java.io.IOException;
|
||||
import javax.swing.JPanel;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.texttranslation.TextTranslator;
|
||||
import org.sleuthkit.autopsy.texttranslation.TranslationConfigException;
|
||||
import org.sleuthkit.autopsy.texttranslation.TranslationException;
|
||||
|
||||
/**
|
||||
@ -132,12 +133,12 @@ public class BingTranslator implements TextTranslator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
public JPanel getSettingsPanel() {
|
||||
return settingsPanel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSettings() {
|
||||
public void saveSettings() throws TranslationConfigException {
|
||||
settings.setAuthenticationKey(settingsPanel.getAuthenticationKey());
|
||||
settings.setTargetLanguageCode(settingsPanel.getTargetLanguageCode());
|
||||
settings.saveSettings();
|
||||
@ -173,7 +174,7 @@ public class BingTranslator implements TextTranslator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxPayloadSize() {
|
||||
public int getMaxTextChars() {
|
||||
return MAX_STRING_LENGTH;
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import com.google.auth.oauth2.ServiceAccountCredentials;
|
||||
import com.google.cloud.translate.Translate;
|
||||
import com.google.cloud.translate.TranslateOptions;
|
||||
import com.google.cloud.translate.Translation;
|
||||
import java.awt.Component;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
@ -31,12 +30,14 @@ import java.io.InputStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JPanel;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.coreutils.EscapeUtil;
|
||||
import org.sleuthkit.autopsy.texttranslation.TextTranslator;
|
||||
import org.sleuthkit.autopsy.texttranslation.TranslationConfigException;
|
||||
import org.sleuthkit.autopsy.texttranslation.TranslationException;
|
||||
|
||||
/**
|
||||
@ -133,7 +134,7 @@ public final class GoogleTranslator implements TextTranslator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getComponent() {
|
||||
public JPanel getSettingsPanel() {
|
||||
return settingsPanel;
|
||||
}
|
||||
|
||||
@ -172,7 +173,7 @@ public final class GoogleTranslator implements TextTranslator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSettings() {
|
||||
public void saveSettings() throws TranslationConfigException {
|
||||
settings.setTargetLanguageCode(settingsPanel.getTargetLanguageCode());
|
||||
settings.setCredentialPath(settingsPanel.getCredentialsPath());
|
||||
settings.saveSettings();
|
||||
@ -180,7 +181,7 @@ public final class GoogleTranslator implements TextTranslator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxPayloadSize() {
|
||||
public int getMaxTextChars() {
|
||||
return MAX_PAYLOAD_SIZE;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
OptionsCategory_Name_Machine_Translation=Machine Translation
|
||||
OptionsCategory_Keywords_Machine_Translation_Settings=Machine Translation Settings
|
||||
TranslationContentPanel.ocrLabel.text=OCR:
|
||||
TranslationOptionsPanel.translationServiceLabel.text=Text translator:
|
||||
TranslationOptionsPanelController.moduleErr=Module Error
|
||||
TranslationOptionsPanelController.moduleErr.msg=A module caused an error listening to TranslationSettingsPanelController updates. See log to determine which module. Some data could be incomplete.
|
||||
TranslationOptionsPanel.translationOptionsDescription.text=Configure a 3rd party text translation service to enable text and file name translation.
|
||||
TranslationContentPanel.showLabel.text=Show:
|
||||
|
@ -17,12 +17,6 @@ TranslatedTextViewer.title=Translation
|
||||
TranslatedTextViewer.toolTip=Displays translated file text.
|
||||
TranslationContentPanel.autoDetectOCR=Autodetect language
|
||||
TranslationContentPanel.ocrLabel.text=OCR:
|
||||
TranslationOptionsPanel.noTextTranslators.text=No text translators exist, translation is disabled.
|
||||
TranslationOptionsPanel.noTextTranslatorSelected.text=No text translator selected, translation is disabled.
|
||||
TranslationOptionsPanel.textTranslatorsUnavailable.text=Unable to get selected text translator, translation is disabled.
|
||||
TranslationOptionsPanel.translationDisabled.text=Translation disabled
|
||||
TranslationOptionsPanel.translationServiceLabel.text=Text translator:
|
||||
TranslationOptionsPanelController.moduleErr=Module Error
|
||||
TranslationOptionsPanelController.moduleErr.msg=A module caused an error listening to TranslationSettingsPanelController updates. See log to determine which module. Some data could be incomplete.
|
||||
TranslationOptionsPanel.translationOptionsDescription.text=Configure a 3rd party text translation service to enable text and file name translation.
|
||||
TranslationContentPanel.showLabel.text=Show:
|
||||
|
@ -96,7 +96,7 @@ public final class TranslatedTextViewer implements TextViewer {
|
||||
}
|
||||
}
|
||||
|
||||
int payloadMaxInKB = TextTranslationService.getInstance().getMaxPayloadSize() / 1000;
|
||||
int payloadMaxInKB = TextTranslationService.getInstance().getMaxTextChars() / 1000;
|
||||
panel.setWarningLabelMsg(String.format(Bundle.TranslatedTextViewer_maxPayloadSize(), payloadMaxInKB));
|
||||
|
||||
//Force a background task.
|
||||
|
@ -135,7 +135,7 @@
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>10</release-version>
|
||||
<specification-version>10.15</specification-version>
|
||||
<specification-version>10.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -127,7 +127,7 @@
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>10</release-version>
|
||||
<specification-version>10.15</specification-version>
|
||||
<specification-version>10.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -119,7 +119,7 @@
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>10</release-version>
|
||||
<specification-version>10.15</specification-version>
|
||||
<specification-version>10.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -64,11 +64,13 @@ import org.apache.solr.common.util.NamedList;
|
||||
import org.openide.modules.InstalledFileLocator;
|
||||
import org.openide.modules.Places;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.Case.CaseType;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseMetadata;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.healthmonitor.HealthMonitor;
|
||||
@ -492,7 +494,14 @@ public class Server {
|
||||
// If we get here the Solr server has not responded to connection
|
||||
// attempts in a timely fashion.
|
||||
logger.log(Level.WARNING, "Local Solr server failed to respond to status requests.");
|
||||
throw new KeywordSearchModuleException(Bundle.Server_status_failed_msg());
|
||||
WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MessageNotifyUtil.Notify.error(
|
||||
NbBundle.getMessage(this.getClass(), "Installer.errorInitKsmMsg"),
|
||||
Bundle.Server_status_failed_msg());
|
||||
}
|
||||
});
|
||||
} catch (SecurityException ex) {
|
||||
logger.log(Level.SEVERE, "Could not start Solr process!", ex); //NON-NLS
|
||||
throw new KeywordSearchModuleException(
|
||||
|
@ -60,7 +60,7 @@
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>10</release-version>
|
||||
<specification-version>10.15</specification-version>
|
||||
<specification-version>10.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -1,13 +1,11 @@
|
||||
/*! \page logs_and_output_page Logs, Output, and Progress
|
||||
There are several shortcuts for getting to the output folder, log folder, and progress shapshot shown below.
|
||||
<br><br>
|
||||
To open the Case output folder, use "Tools", "Open Output Folder" as shown below:
|
||||
/*! \page logs_and_output_page Viewing Case Logs and Output
|
||||
|
||||
There are several shortcuts for getting to the case and log folders.
|
||||
|
||||
- To open the Case output folder, use "Tools", "Open Output Folder" as shown below:
|
||||
\image html open_output_folder.PNG
|
||||
<br><br>
|
||||
To open the Case log folder, use "Help", "Open Log Folder" as shown below:
|
||||
|
||||
- To open the Case log folder, use "Help", "Open Log Folder" as shown below:
|
||||
\image html open_log_folder.PNG
|
||||
<br><br>
|
||||
While Ingest is running, one can use the "Ingest Progress Snapshot" tool to see what activity is going on at the moment. Click on "Help", "Get Ingest Progress Snapshot" to view the dialog shown in the screenshot below.
|
||||
\image html ingest_progress_snapshot.PNG
|
||||
To refresh the view, use the "Refresh" button.
|
||||
|
||||
*/
|
||||
|
@ -10,13 +10,23 @@ Help Topics
|
||||
-------
|
||||
The following topics are available here:
|
||||
|
||||
- \subpage installation_page
|
||||
- Installation
|
||||
- \subpage installation_page
|
||||
- \subpage performance_page
|
||||
- Multi-user Cluster
|
||||
- \subpage install_multiuser_page
|
||||
- \subpage multiuser_sec_page
|
||||
- \subpage multiuser_page
|
||||
|
||||
- \subpage quick_start_guide "Quick Start Guide"
|
||||
- \subpage workflow_page
|
||||
|
||||
- Cases and Adding Data Sources
|
||||
- \subpage workflow_page
|
||||
- \subpage cases_page
|
||||
- \subpage ds_page
|
||||
- \subpage uilayout_page
|
||||
- \subpage logs_and_output_page
|
||||
|
||||
|
||||
- Ingest Modules
|
||||
- \subpage ingest_page "Ingest Modules"
|
||||
- \subpage recent_activity_page
|
||||
@ -34,43 +44,55 @@ The following topics are available here:
|
||||
- \subpage cr_ingest_module
|
||||
- \subpage encryption_page
|
||||
- \subpage vm_extractor_page
|
||||
|
||||
- Reviewing the Results
|
||||
- \subpage uilayout_page
|
||||
- \subpage tree_viewer_page
|
||||
- \subpage result_viewer_page
|
||||
- \subpage content_viewer_page
|
||||
- \subpage machine_translation_page
|
||||
|
||||
- Searching
|
||||
- \subpage ui_quick_search
|
||||
- \subpage image_gallery_page
|
||||
- \subpage file_search_page
|
||||
- \subpage ad_hoc_keyword_search_page
|
||||
- \subpage timeline_page
|
||||
- \subpage stix_page
|
||||
- \subpage central_repo_page
|
||||
- \subpage communications_page
|
||||
- \subpage common_properties_page
|
||||
- \subpage search_all_cases_page
|
||||
- \subpage logs_and_output_page
|
||||
- \subpage machine_translation_page
|
||||
|
||||
- Specialized Viewers
|
||||
- \subpage image_gallery_page
|
||||
- \subpage timeline_page
|
||||
- \subpage communications_page
|
||||
|
||||
|
||||
- Reporting
|
||||
- \subpage tagging_page
|
||||
- \subpage reporting_page
|
||||
|
||||
- \subpage module_install_page
|
||||
- \subpage performance_page
|
||||
- Multi-user Cluster
|
||||
- \subpage install_multiuser_page
|
||||
- \subpage multiuser_sec_page
|
||||
- \subpage multiuser_page
|
||||
- Triage
|
||||
- \subpage triage_page
|
||||
- \subpage live_triage_page
|
||||
- \subpage central_repo_page
|
||||
|
||||
- Other Workflows
|
||||
- Triage
|
||||
- \subpage triage_page
|
||||
- \subpage live_triage_page
|
||||
- \subpage logical_imager_page
|
||||
- \subpage command_line_ingest_page
|
||||
|
||||
|
||||
- Experimental Module
|
||||
- \subpage experimental_page
|
||||
- \ref auto_ingest_page
|
||||
- \ref object_detection_page
|
||||
- \ref volatility_dsp_page
|
||||
- \subpage command_line_ingest_page
|
||||
- \subpage logical_imager_page
|
||||
- \subpage translations_page
|
||||
|
||||
If the topic you need is not listed, refer to the <a href="http://wiki.sleuthkit.org/index.php?title=Autopsy_User%27s_Guide">Autopsy Wiki</a> or join the <a href="https://lists.sourceforge.net/lists/listinfo/sleuthkit-users">SleuthKit User List</a> at SourceForge.
|
||||
- \subpage translations_page
|
||||
|
||||
|
||||
If the topic you need is not listed, then you can:
|
||||
- Refer to the <a href="http://wiki.sleuthkit.org/index.php?title=Autopsy_User%27s_Guide">Autopsy Wiki</a>
|
||||
- Ask a question on the <a href="http://forum.sleuthkit.org">Forum</a>
|
||||
- Ask a question on the <a href="https://lists.sourceforge.net/lists/listinfo/sleuthkit-users">Email List</a>.
|
||||
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>10</release-version>
|
||||
<specification-version>10.15</specification-version>
|
||||
<specification-version>10.16</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -58,6 +58,7 @@ import org.apache.tika.parser.txt.CharsetDetector;
|
||||
import org.apache.tika.parser.txt.CharsetMatch;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
import org.sleuthkit.datamodel.EncodedFileOutputStream;
|
||||
|
||||
@ -358,19 +359,7 @@ class MboxParser implements Iterator<EmailMessage> {
|
||||
logger.log(Level.SEVERE, Bundle.MboxParser_handleAttch_noOpenCase_errMsg(), ex); //NON-NLS
|
||||
return;
|
||||
}
|
||||
String filename = e.getFilename();
|
||||
|
||||
// sanitize name. Had an attachment with a Japanese encoded path that
|
||||
// invalid characters and attachment could not be saved.
|
||||
filename = filename.replaceAll("\\?", "_");
|
||||
filename = filename.replaceAll("<", "_");
|
||||
filename = filename.replaceAll(">", "_");
|
||||
filename = filename.replaceAll(":", "_");
|
||||
filename = filename.replaceAll("\"", "_");
|
||||
filename = filename.replaceAll("/", "_");
|
||||
filename = filename.replaceAll("\\\\", "_");
|
||||
filename = filename.replaceAll("|", "_");
|
||||
filename = filename.replaceAll("\\*", "_");
|
||||
String filename = FileUtil.escapeFileName(e.getFilename());
|
||||
|
||||
// also had some crazy long names, so make random one if we get those.
|
||||
// also from Japanese image that had encoded name
|
||||
|
@ -37,6 +37,7 @@ import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||
import org.sleuthkit.autopsy.ingest.IngestMonitor;
|
||||
import org.sleuthkit.autopsy.ingest.IngestServices;
|
||||
import static org.sleuthkit.autopsy.thunderbirdparser.ThunderbirdMboxFileIngestModule.getRelModuleOutputPath;
|
||||
@ -367,7 +368,7 @@ class PstParser {
|
||||
if (filename.isEmpty()) {
|
||||
filename = attach.getFilename();
|
||||
}
|
||||
String uniqueFilename = fileID + "-" + msg.getDescriptorNodeId() + "-" + attach.getContentId() + "-" + filename;
|
||||
String uniqueFilename = fileID + "-" + msg.getDescriptorNodeId() + "-" + attach.getContentId() + "-" + FileUtil.escapeFileName(filename);
|
||||
String outPath = outputDirPath + uniqueFilename;
|
||||
saveAttachmentToDisk(attach, outPath);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user