Merge branch '5010-Make-Logical-Imager-DSP-stub-with-config-panel' into 5011-Logical-Imager-DSP-adds-data

This commit is contained in:
Joe Ho 2019-05-10 16:55:06 -04:00
commit f113440b23
180 changed files with 46652 additions and 1622 deletions

View File

@ -45,6 +45,11 @@
<fileset dir="${thirdparty.dir}/gstreamer"/> <fileset dir="${thirdparty.dir}/gstreamer"/>
</copy> </copy>
<!--Copy 7-Zip to release-->
<copy todir="${basedir}/release/7-Zip" >
<fileset dir="${thirdparty.dir}/7-Zip"/>
</copy>
<!-- The 'libgstlibav.dll' file is too big to store on GitHub, so we <!-- The 'libgstlibav.dll' file is too big to store on GitHub, so we
have it stored in a ZIP file. We'll extract it in place and remove have it stored in a ZIP file. We'll extract it in place and remove
the ZIP file afterward. --> the ZIP file afterward. -->

View File

@ -240,8 +240,23 @@ OpenMultiUserCasePanel.openSelectedCaseButton.text=Open Selected Case
OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name
LogicalImagerPanel.jLabel1.text=Insert external drive LogicalImagerPanel.jLabel1.text=Insert external drive
LogicalImagerPanel.scanButton.text=Scan LogicalImagerPanel.scanButton.text=Scan
LogicalImagerPanel.jLabel6.text=Or, pick a folder LogicalImagerPanel.jLabel6.text=Or, pick a sparse_image.vhd file
LogicalImagerPanel.browseButton.text=Browse LogicalImagerPanel.browseButton.text=Browse
LogicalImagerPanel.topLabel.text=Import Autopsy Imager Results LogicalImagerPanel.topLabel.text=Import Autopsy Imager Results
LogicalImagerPanel.selectDriveLabel.text=Select Drive LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.messageLabel.text=Error/Status message LogicalImagerPanel.messageLabel.text=Error/Status message
UnpackagePortableCaseDialog.desc2Label.text=Portable Case Report Module.
UnpackagePortableCaseDialog.desc1Label.text=Unpackage a portable case so it can be opened in Autopsy. Portable cases are created through the
UnpackagePortableCaseDialog.exitButton.text=Exit
UnpackagePortableCaseDialog.unpackageButton.text=Unpackage
UnpackagePortableCaseDialog.caseSelectButton.text=Browse
UnpackagePortableCaseDialog.outputSelectButton.text=Browse
UnpackagePortableCaseDialog.caseTextField.text=
UnpackagePortableCaseDialog.outputTextField.text=
UnpackagePortableCaseDialog.caseErrorLabel.text=jLabel1
UnpackagePortableCaseDialog.outputErrorLabel.text=jLabel1
UnpackagePortableCaseProgressDialog.cancelButton.text=Cancel
UnpackagePortableCaseProgressDialog.okButton.text=OK
UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel
UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to:
UnpackagePortableCaseDialog.caseLabel.text=Portable Case:

View File

@ -118,6 +118,7 @@ CTL_CaseNewAction=New Case
CTL_CaseDetailsAction=Case Details CTL_CaseDetailsAction=Case Details
CTL_CaseDeleteAction=Delete Case CTL_CaseDeleteAction=Delete Case
CTL_CaseOpenAction=Open Case CTL_CaseOpenAction=Open Case
CTL_UnpackagePortableCaseAction=Unpackage Portable Case
EditOptionalCasePropertiesPanel.cancelButton.text=Cancel EditOptionalCasePropertiesPanel.cancelButton.text=Cancel
EditOptionalCasePropertiesPanel.saveButton.text=Save EditOptionalCasePropertiesPanel.saveButton.text=Save
GeneralFilter.encaseImageDesc.text=Encase Images (*.e01) GeneralFilter.encaseImageDesc.text=Encase Images (*.e01)
@ -171,7 +172,8 @@ LogicalImagerDSProcessor.dataSourceType=Autopsy Imager
LogicalImagerPanel.imageTable.columnModel.title0=Hostname LogicalImagerPanel.imageTable.columnModel.title0=Hostname
LogicalImagerPanel.imageTable.columnModel.title1=Extracted Date LogicalImagerPanel.imageTable.columnModel.title1=Extracted Date
LogicalImagerPanel.messageLabel.clickScanOrBrowse=Click SCAN or BROWSE button to find images LogicalImagerPanel.messageLabel.clickScanOrBrowse=Click SCAN or BROWSE button to find images
LogicalImagerPanel.messageLabel.noExternalDriveFound=No external drive found LogicalImagerPanel.messageLabel.driveHasNoImages=Drive has no images
LogicalImagerPanel.messageLabel.noExternalDriveFound=No drive found
LogicalImagerPanel.messageLabel.noImageSelected=No image selected LogicalImagerPanel.messageLabel.noImageSelected=No image selected
LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ... LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ...
LogicalImagerPanel.messageLabel.selectedImage=Selected image LogicalImagerPanel.messageLabel.selectedImage=Selected image
@ -337,6 +339,20 @@ RecentCases.getName.text=Clear Recent Cases
RecentItems.openRecentCase.msgDlg.text=Case {0} no longer exists. RecentItems.openRecentCase.msgDlg.text=Case {0} no longer exists.
SelectDataSourceProcessorPanel.name.text=Select Type of Data Source To Add SelectDataSourceProcessorPanel.name.text=Select Type of Data Source To Add
StartupWindow.title.text=Welcome StartupWindow.title.text=Welcome
UnpackagePortableCaseDialog.title.text=Unpackage Portable Case
UnpackagePortableCaseDialog.UnpackagePortableCaseDialog.extensions=Portable case package (.zip, .zip.001)
UnpackagePortableCaseDialog.validatePaths.badExtension=File extension must be .zip or .zip.001
# {0} - case folder
UnpackagePortableCaseDialog.validatePaths.caseFolderExists=Folder {0} already exists
UnpackagePortableCaseDialog.validatePaths.caseIsNotFile=Selected path is not a file
UnpackagePortableCaseDialog.validatePaths.caseNotFound=File does not exist
UnpackagePortableCaseDialog.validatePaths.folderNotFound=Folder does not exist
UnpackagePortableCaseDialog.validatePaths.notAFolder=Output location is not a directory
UnpackagePortableCaseProgressDialog.propertyChange.success=Successfully unpacked case
UnpackagePortableCaseProgressDialog.title.text=Unpackage Portable Case Progress
UnpackageWorker.doInBackground.canceled=Unpackaging canceled by user
UnpackageWorker.doInBackground.errorCompressingCase=Error unpackaging case
UnpackageWorker.doInBackground.errorFinding7zip=Could not locate 7-Zip executable
UpdateRecentCases.menuItem.clearRecentCases.text=Clear Recent Cases UpdateRecentCases.menuItem.clearRecentCases.text=Clear Recent Cases
UpdateRecentCases.menuItem.empty=-Empty- UpdateRecentCases.menuItem.empty=-Empty-
AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=Cancel AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=Cancel
@ -436,8 +452,23 @@ OpenMultiUserCasePanel.openSelectedCaseButton.text=Open Selected Case
OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name OpenMultiUserCasePanel.searchLabel.text=Select any case and start typing to search by case name
LogicalImagerPanel.jLabel1.text=Insert external drive LogicalImagerPanel.jLabel1.text=Insert external drive
LogicalImagerPanel.scanButton.text=Scan LogicalImagerPanel.scanButton.text=Scan
LogicalImagerPanel.jLabel6.text=Or, pick a folder LogicalImagerPanel.jLabel6.text=Or, pick a sparse_image.vhd file
LogicalImagerPanel.browseButton.text=Browse LogicalImagerPanel.browseButton.text=Browse
LogicalImagerPanel.topLabel.text=Import Autopsy Imager Results LogicalImagerPanel.topLabel.text=Import Autopsy Imager Results
LogicalImagerPanel.selectDriveLabel.text=Select Drive LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.messageLabel.text=Error/Status message LogicalImagerPanel.messageLabel.text=Error/Status message
UnpackagePortableCaseDialog.desc2Label.text=Portable Case Report Module.
UnpackagePortableCaseDialog.desc1Label.text=Unpackage a portable case so it can be opened in Autopsy. Portable cases are created through the
UnpackagePortableCaseDialog.exitButton.text=Exit
UnpackagePortableCaseDialog.unpackageButton.text=Unpackage
UnpackagePortableCaseDialog.caseSelectButton.text=Browse
UnpackagePortableCaseDialog.outputSelectButton.text=Browse
UnpackagePortableCaseDialog.caseTextField.text=
UnpackagePortableCaseDialog.outputTextField.text=
UnpackagePortableCaseDialog.caseErrorLabel.text=jLabel1
UnpackagePortableCaseDialog.outputErrorLabel.text=jLabel1
UnpackagePortableCaseProgressDialog.cancelButton.text=Cancel
UnpackagePortableCaseProgressDialog.okButton.text=OK
UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel
UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to:
UnpackagePortableCaseDialog.caseLabel.text=Portable Case:

View File

@ -22,23 +22,17 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.List;
import java.util.TimeZone;
import java.util.UUID; import java.util.UUID;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.openide.util.Exceptions;
import org.openide.util.NbBundle.Messages; import org.openide.util.NbBundle.Messages;
import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProvider;
import org.openide.util.lookup.ServiceProviders; import org.openide.util.lookup.ServiceProviders;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
import org.sleuthkit.autopsy.events.AutopsyEventException;
/** /**
* A Logical Imager data source processor that implements the DataSourceProcessor service * A Logical Imager data source processor that implements the DataSourceProcessor service
@ -54,8 +48,6 @@ public class LogicalImagerDSProcessor implements DataSourceProcessor {
private static final String LOGICAL_IMAGER_DIR = "LogicalImager"; //NON-NLS private static final String LOGICAL_IMAGER_DIR = "LogicalImager"; //NON-NLS
private final LogicalImagerPanel configPanel; private final LogicalImagerPanel configPanel;
private AddImageTask addImageTask;
/* /*
* Constructs a Logical Imager data source processor that implements the * Constructs a Logical Imager data source processor that implements the
* DataSourceProcessor service provider interface to allow integration with * DataSourceProcessor service provider interface to allow integration with
@ -200,7 +192,7 @@ public class LogicalImagerDSProcessor implements DataSourceProcessor {
* @param callback Callback to call when processing is done. * @param callback Callback to call when processing is done.
*/ */
private void run(String deviceId, String imagePath, int sectorSize, String timeZone, boolean ignoreFatOrphanFiles, String md5, String sha1, String sha256, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) { private void run(String deviceId, String imagePath, int sectorSize, String timeZone, boolean ignoreFatOrphanFiles, String md5, String sha1, String sha256, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
addImageTask = new AddImageTask(deviceId, imagePath, sectorSize, timeZone, ignoreFatOrphanFiles, md5, sha1, sha256, null, progressMonitor, callback); AddImageTask addImageTask = new AddImageTask(deviceId, imagePath, sectorSize, timeZone, ignoreFatOrphanFiles, md5, sha1, sha256, null, progressMonitor, callback);
new Thread(addImageTask).start(); new Thread(addImageTask).start();
} }

View File

@ -51,7 +51,7 @@
<Component id="browseButton" min="-2" max="-2" attributes="0"/> <Component id="browseButton" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="jScrollPane1" min="-2" pref="211" max="-2" attributes="0"/> <Component id="driveListScrollPane" min="-2" pref="211" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/> <EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="selectAcquisitionFromDriveLabel" min="-2" pref="305" max="-2" attributes="0"/> <Component id="selectAcquisitionFromDriveLabel" min="-2" pref="305" max="-2" attributes="0"/>
@ -68,7 +68,7 @@
</Group> </Group>
</Group> </Group>
</Group> </Group>
<EmptySpace pref="66" max="32767" attributes="0"/> <EmptySpace pref="53" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</Group> </Group>
@ -98,7 +98,7 @@
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0"> <Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="imageScrollPane" pref="0" max="32767" attributes="0"/> <Component id="imageScrollPane" pref="0" max="32767" attributes="0"/>
<Component id="jScrollPane1" pref="194" max="32767" attributes="0"/> <Component id="driveListScrollPane" pref="194" max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/> <EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
<Component id="messageLabel" min="-2" max="-2" attributes="0"/> <Component id="messageLabel" min="-2" max="-2" attributes="0"/>
@ -134,9 +134,6 @@
</Component> </Component>
<Component class="javax.swing.JLabel" name="messageLabel"> <Component class="javax.swing.JLabel" name="messageLabel">
<Properties> <Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.messageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LogicalImagerPanel.messageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
@ -149,7 +146,7 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> <Container class="javax.swing.JScrollPane" name="driveListScrollPane">
<AuxValues> <AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues> </AuxValues>
@ -198,6 +195,11 @@
</Events> </Events>
</Component> </Component>
<Container class="javax.swing.JScrollPane" name="imageScrollPane"> <Container class="javax.swing.JScrollPane" name="imageScrollPane">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[346, 402]"/>
</Property>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents> <SubComponents>

View File

@ -18,8 +18,12 @@
*/ */
package org.sleuthkit.autopsy.casemodule; package org.sleuthkit.autopsy.casemodule;
import java.awt.Color;
import java.util.Vector; import java.util.Vector;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.nio.file.FileStore;
import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ArrayList; import java.util.ArrayList;
@ -46,16 +50,17 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
@Messages({ @Messages({
"LogicalImagerPanel.messageLabel.selectedImage=Selected image", "LogicalImagerPanel.messageLabel.selectedImage=Selected image",
"LogicalImagerPanel.messageLabel.noImageSelected=No image selected", "LogicalImagerPanel.messageLabel.noImageSelected=No image selected",
"LogicalImagerPanel.selectAcquisitionFromDriveLabel.text=Select acquisition from Drive" "LogicalImagerPanel.messageLabel.driveHasNoImages=Drive has no images",
"LogicalImagerPanel.selectAcquisitionFromDriveLabel.text=Select acquisition from Drive",
}) })
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
public class LogicalImagerPanel extends JPanel implements DocumentListener { public class LogicalImagerPanel extends JPanel implements DocumentListener {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String SPARSE_IMAGE_VHD = "sparse_image.vhd"; //NON-NLS private static final String SPARSE_IMAGE_VHD = "sparse_image.vhd"; //NON-NLS
private static final String TSK_LOGICAL_IMAGER_EXE = "tsk_logical_imager.exe"; //NON-NLS private static final String SELECTED_IMAGE = Bundle.LogicalImagerPanel_messageLabel_selectedImage();
private static final String SELECTED_IMAGE_STR = Bundle.LogicalImagerPanel_messageLabel_selectedImage(); private static final String NO_IMAGE_SELECTED = Bundle.LogicalImagerPanel_messageLabel_noImageSelected();
private static final String NO_IMAGE_SELECTED_STR = Bundle.LogicalImagerPanel_messageLabel_noImageSelected(); private static final String DRIVE_HAS_NO_IMAGES = Bundle.LogicalImagerPanel_messageLabel_driveHasNoImages();
private static final String[] EMPTY_LIST_DATA = {}; private static final String[] EMPTY_LIST_DATA = {};
private static final FileFilter VHD_FILTER = new FileFilter() { private static final FileFilter VHD_FILTER = new FileFilter() {
@ -69,7 +74,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
@Override @Override
public String getDescription() { public String getDescription() {
return "sparse_image.vhd"; //NON-NLS return SPARSE_IMAGE_VHD; //NON-NLS
} }
}; };
@ -79,7 +84,6 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
private Path choosenImagePath; private Path choosenImagePath;
private TableModel imageTableModel; private TableModel imageTableModel;
/** /**
* Creates new form LogicalImagerPanel * Creates new form LogicalImagerPanel
* *
@ -89,6 +93,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
private LogicalImagerPanel(String context) { private LogicalImagerPanel(String context) {
this.contextName = context; this.contextName = context;
initComponents(); initComponents();
clearImageTable();
} }
/** /**
@ -122,7 +127,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
scanButton = new javax.swing.JButton(); scanButton = new javax.swing.JButton();
messageLabel = new javax.swing.JLabel(); messageLabel = new javax.swing.JLabel();
selectDriveLabel = new javax.swing.JLabel(); selectDriveLabel = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane(); driveListScrollPane = new javax.swing.JScrollPane();
driveList = new javax.swing.JList<>(); driveList = new javax.swing.JList<>();
selectAcquisitionFromDriveLabel = new javax.swing.JLabel(); selectAcquisitionFromDriveLabel = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel();
@ -145,7 +150,6 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
} }
}); });
messageLabel.setForeground(new java.awt.Color(255, 0, 0));
org.openide.awt.Mnemonics.setLocalizedText(messageLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.messageLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(messageLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.messageLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(selectDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectDriveLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(selectDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectDriveLabel.text")); // NOI18N
@ -161,7 +165,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
driveListKeyReleased(evt); driveListKeyReleased(evt);
} }
}); });
jScrollPane1.setViewportView(driveList); driveListScrollPane.setViewportView(driveList);
org.openide.awt.Mnemonics.setLocalizedText(selectAcquisitionFromDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectAcquisitionFromDriveLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(selectAcquisitionFromDriveLabel, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.selectAcquisitionFromDriveLabel.text")); // NOI18N
@ -174,6 +178,8 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
} }
}); });
imageScrollPane.setPreferredSize(new java.awt.Dimension(346, 402));
imageTable.setModel(new javax.swing.table.DefaultTableModel( imageTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] { new Object [][] {
@ -226,7 +232,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
.addGap(126, 126, 126))) .addGap(126, 126, 126)))
.addComponent(browseButton)) .addComponent(browseButton))
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(driveListScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28) .addGap(28, 28, 28)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(selectAcquisitionFromDriveLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 305, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(selectAcquisitionFromDriveLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 305, javax.swing.GroupLayout.PREFERRED_SIZE)
@ -237,7 +243,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGap(144, 144, 144) .addGap(144, 144, 144)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(66, Short.MAX_VALUE)))) .addContainerGap(53, Short.MAX_VALUE))))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -260,7 +266,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(imageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(imageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)) .addComponent(driveListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE))
.addGap(26, 26, 26) .addGap(26, 26, 26)
.addComponent(messageLabel) .addComponent(messageLabel)
.addGap(154, 154, 154)) .addGap(154, 154, 154))
@ -269,7 +275,9 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
public static String humanReadableByteCount(long bytes, boolean si) { public static String humanReadableByteCount(long bytes, boolean si) {
int unit = si ? 1000 : 1024; int unit = si ? 1000 : 1024;
if (bytes < unit) return bytes + " B"; //NON-NLS if (bytes < unit) {
return bytes + " B"; //NON-NLS
}
int exp = (int) (Math.log(bytes) / Math.log(unit)); int exp = (int) (Math.log(bytes) / Math.log(unit));
String pre = (si ? "kMGTPE" : "KMGTPE").charAt(exp-1) + (si ? "" : "i"); //NON-NLS String pre = (si ? "kMGTPE" : "KMGTPE").charAt(exp-1) + (si ? "" : "i"); //NON-NLS
return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre); //NON-NLS return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre); //NON-NLS
@ -277,42 +285,54 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
@Messages({ @Messages({
"LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ...", "LogicalImagerPanel.messageLabel.scanningExternalDrives=Scanning external drives for sparse_image.vhd ...",
"LogicalImagerPanel.messageLabel.noExternalDriveFound=No external drive found" "LogicalImagerPanel.messageLabel.noExternalDriveFound=No drive found"
}) })
private void scanButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scanButtonActionPerformed private void scanButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scanButtonActionPerformed
// Scan external drives for sparse_image.vhd // Scan external drives for sparse_image.vhd
clearImageTable(); clearImageTable();
messageLabel.setText(Bundle.LogicalImagerPanel_messageLabel_scanningExternalDrives()); setNormalMessage(Bundle.LogicalImagerPanel_messageLabel_scanningExternalDrives());
Vector<String> listData = new Vector<>(); Vector<String> listData = new Vector<>();
File[] paths = File.listRoots(); File[] roots = File.listRoots();
// for each pathname in pathname array int firstRemovableDrive = -1;
for (File path : paths) { int i = 0;
String description = FileSystemView.getFileSystemView().getSystemTypeDescription(path); for (File root : roots) {
Path tskLogicalImagerExe = Paths.get(path.toString(), TSK_LOGICAL_IMAGER_EXE); String description = FileSystemView.getFileSystemView().getSystemTypeDescription(root);
File f = tskLogicalImagerExe.toFile(); long spaceInBytes = root.getTotalSpace();
if (f.exists() && f.isFile() && f.canExecute()) { String sizeWithUnit = humanReadableByteCount(spaceInBytes, false);
long spaceInBytes = path.getTotalSpace(); listData.add(root + " (" + description + ") (" + sizeWithUnit + ")");
String sizeWithUnit = humanReadableByteCount(spaceInBytes, false); if (firstRemovableDrive == -1) {
listData.add(path + " (" + description + ") (" + sizeWithUnit + ")"); try {
FileStore fileStore = Files.getFileStore(root.toPath());
if ((boolean) fileStore.getAttribute("volume:isRemovable")) { //NON-NLS
firstRemovableDrive = i;
}
} catch (IOException ex) {
; // skip
}
} }
i++;
} }
driveList.setListData(listData); driveList.setListData(listData);
if (listData.size() > 0) { if (!listData.isEmpty()) {
// auto-select the first drive // auto-select the first external drive, if any
driveList.setSelectedIndex(0); driveList.setSelectedIndex(firstRemovableDrive == -1 ? 0 : firstRemovableDrive);
driveListMouseClicked(null); driveListMouseClicked(null);
driveList.requestFocusInWindow();
} else { } else {
messageLabel.setText(Bundle.LogicalImagerPanel_messageLabel_noExternalDriveFound()); setErrorMessage(Bundle.LogicalImagerPanel_messageLabel_noExternalDriveFound());
} }
}//GEN-LAST:event_scanButtonActionPerformed }//GEN-LAST:event_scanButtonActionPerformed
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
imageTable.clearSelection();
choosenImagePath = null;
setErrorMessage(NO_IMAGE_SELECTED);
fileChooser.setFileFilter(VHD_FILTER); fileChooser.setFileFilter(VHD_FILTER);
int retval = fileChooser.showOpenDialog(this); int retval = fileChooser.showOpenDialog(this);
if (retval == JFileChooser.APPROVE_OPTION) { if (retval == JFileChooser.APPROVE_OPTION) {
String path = fileChooser.getSelectedFile().getPath(); String path = fileChooser.getSelectedFile().getPath();
choosenImagePath = Paths.get(path); choosenImagePath = Paths.get(path);
messageLabel.setText(SELECTED_IMAGE_STR + " " + path); setNormalMessage(SELECTED_IMAGE + " " + path);
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true); firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
} else { } else {
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false); firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
@ -323,10 +343,11 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
int index = imageTable.getSelectedRow(); int index = imageTable.getSelectedRow();
if (index != -1) { if (index != -1) {
choosenImagePath = Paths.get((String) imageTableModel.getValueAt(index, 2)); choosenImagePath = Paths.get((String) imageTableModel.getValueAt(index, 2));
messageLabel.setText(SELECTED_IMAGE_STR + " " + choosenImagePath.toString()); setNormalMessage(SELECTED_IMAGE + " " + choosenImagePath.toString());
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true); firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
} else { } else {
messageLabel.setText(NO_IMAGE_SELECTED_STR); choosenImagePath = null;
setErrorMessage(NO_IMAGE_SELECTED);
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false); firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
} }
} }
@ -376,19 +397,38 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
+ " " + driveLetter); + " " + driveLetter);
imageTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); imageTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
imageTable.setModel(imageTableModel); imageTable.setModel(imageTableModel);
// If there are any images, let's select the first one fixImageTableColumnWidth();
// If there are any images, select the first one
if (imageTable.getRowCount() > 0) { if (imageTable.getRowCount() > 0) {
imageTable.setRowSelectionInterval(0, 0); imageTable.setRowSelectionInterval(0, 0);
imageTableSelect(); imageTableSelect();
} else { } else {
messageLabel.setText(NO_IMAGE_SELECTED_STR); choosenImagePath = null;
setErrorMessage(DRIVE_HAS_NO_IMAGES);
} }
} }
} }
private void fixImageTableColumnWidth() {
int width = imageScrollPane.getPreferredSize().width - 2;
imageTable.getColumnModel().getColumn(0).setPreferredWidth((int) (.60 * width));
imageTable.getColumnModel().getColumn(1).setPreferredWidth((int) (.40 * width));
}
private void setErrorMessage(String msg) {
messageLabel.setForeground(Color.red);
messageLabel.setText(msg);
}
private void setNormalMessage(String msg) {
messageLabel.setForeground(Color.black);
messageLabel.setText(msg);
}
private void clearImageTable() { private void clearImageTable() {
imageTableModel = new ImageTableModel(); imageTableModel = new ImageTableModel();
imageTable.setModel(imageTableModel); imageTable.setModel(imageTableModel);
fixImageTableColumnWidth();
} }
private void driveListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_driveListMouseClicked private void driveListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_driveListMouseClicked
@ -406,11 +446,11 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton browseButton; private javax.swing.JButton browseButton;
private javax.swing.JList<String> driveList; private javax.swing.JList<String> driveList;
private javax.swing.JScrollPane driveListScrollPane;
private javax.swing.JScrollPane imageScrollPane; private javax.swing.JScrollPane imageScrollPane;
private javax.swing.JTable imageTable; private javax.swing.JTable imageTable;
private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel6;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator1;
private javax.swing.JLabel messageLabel; private javax.swing.JLabel messageLabel;
private javax.swing.JButton scanButton; private javax.swing.JButton scanButton;
@ -424,7 +464,7 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
choosenImagePath = null; choosenImagePath = null;
driveList.setListData(EMPTY_LIST_DATA); driveList.setListData(EMPTY_LIST_DATA);
clearImageTable(); clearImageTable();
messageLabel.setText(Bundle.LogicalImagerPanel_messageLabel_clickScanOrBrowse()); setNormalMessage(Bundle.LogicalImagerPanel_messageLabel_clickScanOrBrowse());
} }
/** /**
@ -436,15 +476,6 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
return choosenImagePath != null && choosenImagePath.toFile().exists(); return choosenImagePath != null && choosenImagePath.toFile().exists();
} }
public void storeSettings() {
}
public void readSettings() {
}
public void select() {
}
Path getImagePath() { Path getImagePath() {
return choosenImagePath; return choosenImagePath;
} }
@ -465,6 +496,9 @@ public class LogicalImagerPanel extends JPanel implements DocumentListener {
public void changedUpdate(DocumentEvent e) { public void changedUpdate(DocumentEvent e) {
} }
void storeSettings() {
}
private class ImageTableModel extends AbstractTableModel { private class ImageTableModel extends AbstractTableModel {
private final List<String> hostnames = new ArrayList<>(); private final List<String> hostnames = new ArrayList<>();
private final List<String> extractDates = new ArrayList<>(); private final List<String> extractDates = new ArrayList<>();

View File

@ -0,0 +1,69 @@
/*
* 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.casemodule;
import javax.swing.Action;
import javax.swing.JFrame;
import org.openide.awt.ActionID;
import org.openide.awt.ActionRegistration;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle.Messages;
import org.openide.util.actions.CallableSystemAction;
import org.openide.windows.WindowManager;
@ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseAction")
@ActionRegistration(displayName = "#CTL_UnpackagePortableCaseAction", lazy = false)
@Messages({"CTL_UnpackagePortableCaseAction=Unpackage Portable Case"})
/**
* Unpackage Portable Case action for the Case menu to allow the user to
* decompress a portable case.
*/
public class UnpackagePortableCaseAction extends CallableSystemAction {
private static final long serialVersionUID = 1L;
UnpackagePortableCaseAction() {
putValue(Action.NAME, Bundle.CTL_UnpackagePortableCaseAction());
this.setEnabled(true);
}
@Override
public void performAction() {
JFrame parentFrame = (JFrame) WindowManager.getDefault().getMainWindow();
UnpackagePortableCaseDialog dialog = new UnpackagePortableCaseDialog(parentFrame);
dialog.setLocationRelativeTo(parentFrame);
dialog.setVisible(true);
}
@Override
public String getName() {
return Bundle.CTL_UnpackagePortableCaseAction();
}
@Override
public HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
}
@Override
public boolean asynchronous() {
return false;
}
}

View File

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="2"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="caseTextField" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="caseSelectButton" min="-2" pref="106" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="caseLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="caseErrorLabel" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="desc1Label" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="desc2Label" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="extractLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="outputErrorLabel" min="-2" pref="361" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="outputTextField" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="outputSelectButton" min="-2" pref="106" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Component id="unpackageButton" min="-2" pref="106" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="exitButton" min="-2" pref="106" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="desc1Label" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Component id="desc2Label" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="caseLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="caseErrorLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="caseTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="caseSelectButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="extractLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="outputErrorLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="outputTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="outputSelectButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="exitButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="unpackageButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="desc1Label">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.desc1Label.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="desc2Label">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.desc2Label.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="caseLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.caseLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="caseTextField">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.caseTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="extractLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.extractLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="outputTextField">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.outputTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="outputSelectButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.outputSelectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="outputSelectButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="caseSelectButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.caseSelectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="caseSelectButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="unpackageButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.unpackageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="unpackageButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="exitButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.exitButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="exitButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="caseErrorLabel">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.caseErrorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="outputErrorLabel">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseDialog.outputErrorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Form>

View File

@ -0,0 +1,372 @@
/*
* 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.casemodule;
import java.io.File;
import java.nio.file.Paths;
import javax.swing.JFileChooser;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.openide.util.NbBundle;
/**
* Dialog for unpackaging a portable case
*/
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
class UnpackagePortableCaseDialog extends javax.swing.JDialog {
private final String[] PORTABLE_CASE_EXTENSIONS = new String[]{"zip", "001"}; //NON-NLS
private final JFileChooser caseFileChooser;
private final JFileChooser outputFolderChooser;
/**
* Creates new form UnpackagePortableCaseDialog
*/
@NbBundle.Messages({
"UnpackagePortableCaseDialog.UnpackagePortableCaseDialog.extensions=Portable case package (.zip, .zip.001)",
"UnpackagePortableCaseDialog.title.text=Unpackage Portable Case",
})
UnpackagePortableCaseDialog(java.awt.Frame parent) {
super(parent, Bundle.UnpackagePortableCaseDialog_title_text(), true);
initComponents();
FileNameExtensionFilter pkgFilter = new FileNameExtensionFilter(
Bundle.UnpackagePortableCaseDialog_UnpackagePortableCaseDialog_extensions(), PORTABLE_CASE_EXTENSIONS);
caseFileChooser = new JFileChooser();
caseFileChooser.setFileFilter(pkgFilter);
outputFolderChooser = new JFileChooser();
outputFolderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
caseErrorLabel.setText(""); // NON-NLS
outputErrorLabel.setText(""); // NON-NLS
unpackageButton.setEnabled(false);
/*
* Create listenerer for the file paths
*/
caseTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) {
validatePaths();
}
@Override
public void insertUpdate(DocumentEvent e) {
validatePaths();
}
@Override
public void removeUpdate(DocumentEvent e) {
validatePaths();
}
});
outputTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) {
validatePaths();
}
@Override
public void insertUpdate(DocumentEvent e) {
validatePaths();
}
@Override
public void removeUpdate(DocumentEvent e) {
validatePaths();
}
});
}
/**
* Check whether the input and output paths are valid.
*/
@NbBundle.Messages({
"UnpackagePortableCaseDialog.validatePaths.caseNotFound=File does not exist",
"UnpackagePortableCaseDialog.validatePaths.caseIsNotFile=Selected path is not a file",
"UnpackagePortableCaseDialog.validatePaths.folderNotFound=Folder does not exist",
"UnpackagePortableCaseDialog.validatePaths.notAFolder=Output location is not a directory",
"# {0} - case folder",
"UnpackagePortableCaseDialog.validatePaths.caseFolderExists=Folder {0} already exists",
"UnpackagePortableCaseDialog.validatePaths.badExtension=File extension must be .zip or .zip.001",
})
private void validatePaths() {
boolean isValid = true;
File portableCasePackage = new File(caseTextField.getText());
File outputDir = new File(outputTextField.getText());
// First test the case package
if (caseTextField.getText().isEmpty()) {
caseErrorLabel.setText(""); // NON-NLS
isValid = false;
} else {
if (! portableCasePackage.exists()) {
caseErrorLabel.setText(Bundle.UnpackagePortableCaseDialog_validatePaths_caseNotFound());
isValid = false;
} else if (! portableCasePackage.isFile()) {
caseErrorLabel.setText(Bundle.UnpackagePortableCaseDialog_validatePaths_caseIsNotFile());
isValid = false;
}else {
// Do a final check that if the exension is ".001" it is preceeded by ".zip"
if (portableCasePackage.getAbsolutePath().endsWith(".001")) { // NON-NLS
if (portableCasePackage.getAbsolutePath().endsWith(".zip.001")) {
caseErrorLabel.setText(""); // NON-NLS
} else {
caseErrorLabel.setText(Bundle.UnpackagePortableCaseDialog_validatePaths_badExtension());
isValid = false;
}
} else {
caseErrorLabel.setText(""); // NON-NLS
}
}
}
// Now test the output folder
if (outputTextField.getText().isEmpty()) {
outputErrorLabel.setText(""); // NON-NLS
isValid = false;
} else {
if (! outputDir.exists()) {
outputErrorLabel.setText(Bundle.UnpackagePortableCaseDialog_validatePaths_folderNotFound());
isValid = false;
} else if (! outputDir.isDirectory()) {
outputErrorLabel.setText(Bundle.UnpackagePortableCaseDialog_validatePaths_notAFolder());
isValid = false;
} else {
// Check if the expected output folder exists if we are in a potentially valid state
if (isValid) {
String caseFolderName = portableCasePackage.getName();
if (caseFolderName.endsWith(".zip.001")) { // NON-NLS
caseFolderName = caseFolderName.substring(0, caseFolderName.length() - 8);
} else if (caseFolderName.endsWith(".zip")) { // NON-NLS
caseFolderName = caseFolderName.substring(0, caseFolderName.length() - 4);
}
File expectedCaseFolder = Paths.get(outputDir.toString(), caseFolderName).toFile();
if (expectedCaseFolder.exists()) {
String pathToDisplay = expectedCaseFolder.toString();
if (pathToDisplay.length() > 40) {
pathToDisplay = "\"..." + pathToDisplay.substring(pathToDisplay.length() - 38) + "\""; // NON-NLS
}
outputErrorLabel.setText(Bundle.UnpackagePortableCaseDialog_validatePaths_caseFolderExists(pathToDisplay));
isValid = false;
} else {
outputErrorLabel.setText(""); // NON-NLS
}
}
}
}
unpackageButton.setEnabled(isValid);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
desc1Label = new javax.swing.JLabel();
desc2Label = new javax.swing.JLabel();
caseLabel = new javax.swing.JLabel();
caseTextField = new javax.swing.JTextField();
extractLabel = new javax.swing.JLabel();
outputTextField = new javax.swing.JTextField();
outputSelectButton = new javax.swing.JButton();
caseSelectButton = new javax.swing.JButton();
unpackageButton = new javax.swing.JButton();
exitButton = new javax.swing.JButton();
caseErrorLabel = new javax.swing.JLabel();
outputErrorLabel = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
org.openide.awt.Mnemonics.setLocalizedText(desc1Label, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.desc1Label.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(desc2Label, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.desc2Label.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(caseLabel, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.caseLabel.text")); // NOI18N
caseTextField.setText(org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.caseTextField.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(extractLabel, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.extractLabel.text")); // NOI18N
outputTextField.setText(org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.outputTextField.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(outputSelectButton, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.outputSelectButton.text")); // NOI18N
outputSelectButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
outputSelectButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(caseSelectButton, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.caseSelectButton.text")); // NOI18N
caseSelectButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
caseSelectButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(unpackageButton, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.unpackageButton.text")); // NOI18N
unpackageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
unpackageButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(exitButton, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.exitButton.text")); // NOI18N
exitButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitButtonActionPerformed(evt);
}
});
caseErrorLabel.setForeground(new java.awt.Color(255, 0, 0));
org.openide.awt.Mnemonics.setLocalizedText(caseErrorLabel, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.caseErrorLabel.text")); // NOI18N
outputErrorLabel.setForeground(new java.awt.Color(255, 0, 0));
org.openide.awt.Mnemonics.setLocalizedText(outputErrorLabel, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseDialog.class, "UnpackagePortableCaseDialog.outputErrorLabel.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(caseTextField)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(caseSelectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(caseLabel)
.addGap(18, 18, 18)
.addComponent(caseErrorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(desc1Label)
.addComponent(desc2Label)
.addGroup(layout.createSequentialGroup()
.addComponent(extractLabel)
.addGap(18, 18, 18)
.addComponent(outputErrorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 361, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(outputTextField)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(outputSelectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(unpackageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(desc1Label)
.addGap(4, 4, 4)
.addComponent(desc2Label)
.addGap(13, 13, 13)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(caseLabel)
.addComponent(caseErrorLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(caseTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(caseSelectButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(extractLabel)
.addComponent(outputErrorLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(outputTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(outputSelectButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(exitButton)
.addComponent(unpackageButton))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void outputSelectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_outputSelectButtonActionPerformed
if (! outputTextField.getText().isEmpty()) {
outputFolderChooser.setCurrentDirectory(new File(outputTextField.getText()));
}
int returnVal = outputFolderChooser.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
outputTextField.setText(outputFolderChooser.getSelectedFile().getAbsolutePath());
}
}//GEN-LAST:event_outputSelectButtonActionPerformed
private void caseSelectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_caseSelectButtonActionPerformed
if (! caseTextField.getText().isEmpty()) {
caseFileChooser.setCurrentDirectory(new File(caseTextField.getText()));
}
int returnVal = caseFileChooser.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
caseTextField.setText(caseFileChooser.getSelectedFile().getAbsolutePath());
// Auto-fill the output field with the case folder
File tempCase = new File(caseTextField.getText());
if (tempCase.exists()) {
outputTextField.setText(tempCase.getParent());
}
}
}//GEN-LAST:event_caseSelectButtonActionPerformed
private void exitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitButtonActionPerformed
dispose();
}//GEN-LAST:event_exitButtonActionPerformed
private void unpackageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unpackageButtonActionPerformed
UnpackagePortableCaseProgressDialog dialog = new UnpackagePortableCaseProgressDialog();
dialog.unpackageCase(caseTextField.getText(), outputTextField.getText());
validatePaths(); // The output folder now exists so we need to disable the unpackage button
}//GEN-LAST:event_unpackageButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel caseErrorLabel;
private javax.swing.JLabel caseLabel;
private javax.swing.JButton caseSelectButton;
private javax.swing.JTextField caseTextField;
private javax.swing.JLabel desc1Label;
private javax.swing.JLabel desc2Label;
private javax.swing.JButton exitButton;
private javax.swing.JLabel extractLabel;
private javax.swing.JLabel outputErrorLabel;
private javax.swing.JButton outputSelectButton;
private javax.swing.JTextField outputTextField;
private javax.swing.JButton unpackageButton;
// End of variables declaration//GEN-END:variables
}

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="2"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="progressBar" pref="409" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="resultLabel" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="okButton" min="-2" pref="65" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="cancelButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="progressBar" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="cancelButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="okButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="resultLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JProgressBar" name="progressBar">
</Component>
<Component class="javax.swing.JButton" name="cancelButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseProgressDialog.cancelButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="okButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseProgressDialog.okButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="resultLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="UnpackagePortableCaseProgressDialog.resultLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Form>

View File

@ -0,0 +1,322 @@
/*
* 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.casemodule;
import java.awt.Color;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Paths;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Level;
import javax.swing.JFrame;
import javax.swing.SwingWorker;
import org.openide.modules.InstalledFileLocator;
import org.openide.util.NbBundle;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.datamodel.TskCoreException;
/**
* Dialog to display the unpackaging progress and allow cancellation.
*/
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
class UnpackagePortableCaseProgressDialog extends javax.swing.JDialog implements PropertyChangeListener {
private UnpackageWorker worker;
/**
* Creates new form UnpackagePortableCaseProgressDialog
*/
@NbBundle.Messages({"UnpackagePortableCaseProgressDialog.title.text=Unpackage Portable Case Progress",})
UnpackagePortableCaseProgressDialog() {
super((JFrame) WindowManager.getDefault().getMainWindow(),
Bundle.UnpackagePortableCaseProgressDialog_title_text(),
true);
initComponents();
customizeComponents();
}
private void customizeComponents() {
cancelButton.setEnabled(true);
okButton.setEnabled(false);
progressBar.setIndeterminate(true);
resultLabel.setText(""); // NON-NLS
}
/**
* Unpackage the case
*
* @param packagedCase The compressed case
* @param outputFolder The output folder
*/
void unpackageCase(String packagedCase, String outputFolder) {
worker = new UnpackageWorker(packagedCase, outputFolder);
worker.addPropertyChangeListener(this);
worker.execute();
setLocationRelativeTo((JFrame) WindowManager.getDefault().getMainWindow());
this.setVisible(true);
}
@NbBundle.Messages({"UnpackagePortableCaseProgressDialog.propertyChange.success=Successfully unpacked case",})
@Override
public void propertyChange(PropertyChangeEvent evt) {
if ("state".equals(evt.getPropertyName())
&& (SwingWorker.StateValue.DONE.equals(evt.getNewValue()))) { // NON-NLS
// The worker is done processing
// Disable cancel button and enable ok
cancelButton.setEnabled(false);
okButton.setEnabled(true);
if (worker.isSuccess()) {
progressBar.setIndeterminate(false);
progressBar.setValue(progressBar.getMaximum());
resultLabel.setText(Bundle.UnpackagePortableCaseProgressDialog_propertyChange_success());
} else {
// If there was an error, reset the progress bar and display an error message
progressBar.setIndeterminate(false);
progressBar.setValue(0);
resultLabel.setForeground(Color.red);
resultLabel.setText(worker.getDisplayError());
}
}
}
/**
* Swing worker to do the decompression.
*/
private class UnpackageWorker extends SwingWorker<Void, Void> {
private final String packagedCase;
private final String outputFolder;
private final AtomicBoolean success = new AtomicBoolean();
private String lastError = "";
UnpackageWorker(String packagedCase, String outputFolder) {
this.packagedCase = packagedCase;
this.outputFolder = outputFolder;
this.success.set(false);
}
@NbBundle.Messages({
"UnpackageWorker.doInBackground.errorFinding7zip=Could not locate 7-Zip executable",
"UnpackageWorker.doInBackground.errorCompressingCase=Error unpackaging case",
"UnpackageWorker.doInBackground.canceled=Unpackaging canceled by user",
})
@Override
protected Void doInBackground() throws Exception {
// Find 7-Zip
File sevenZipExe = locate7ZipExecutable();
if (sevenZipExe == null) {
setDisplayError(Bundle.UnpackageWorker_doInBackground_errorFinding7zip());
throw new TskCoreException("Error finding 7-Zip executable"); // NON-NLS
}
String outputFolderSwitch = "-o" + outputFolder; // NON-NLS
ProcessBuilder procBuilder = new ProcessBuilder();
procBuilder.command(
sevenZipExe.getAbsolutePath(),
"x", // Extract
packagedCase,
outputFolderSwitch
);
try {
Process process = procBuilder.start();
while (process.isAlive()) {
if (this.isCancelled()) {
setDisplayError(Bundle.UnpackageWorker_doInBackground_canceled());
return null;
}
Thread.sleep(200);
}
int exitCode = process.exitValue();
if (exitCode != 0) {
// Save any errors so they can be logged
StringBuilder sb = new StringBuilder();
try (BufferedReader br = new BufferedReader(new InputStreamReader(process.getErrorStream()))) {
String line;
while ((line = br.readLine()) != null) {
sb.append(line).append(System.getProperty("line.separator")); // NON-NLS
}
}
setDisplayError(Bundle.UnpackageWorker_doInBackground_errorCompressingCase());
throw new TskCoreException("Error unpackaging case. 7-Zip output: " + sb.toString()); // NON-NLS
}
} catch (IOException | InterruptedException ex) {
setDisplayError(Bundle.UnpackageWorker_doInBackground_errorCompressingCase());
throw new TskCoreException("Error unpackaging case", ex); // NON-NLS
}
success.set(true);
return null;
}
@Override
synchronized protected void done() {
if (this.isCancelled()) {
return;
}
try {
get();
} catch (Exception ex) {
Logger.getLogger(UnpackagePortableCaseProgressDialog.class.getName()).log(Level.SEVERE, "Error unpackaging portable case", ex); // NON-NLS
}
}
/**
* Save the error that should be displayed to the user
*
* @param errorStr Error to be displayed in the UI
*/
private synchronized void setDisplayError(String errorStr) {
lastError = errorStr;
}
/**
* Gets the error to display to the user
* @return Error to be displayed in the UI
*/
private synchronized String getDisplayError() {
return lastError;
}
private boolean isSuccess() {
return success.get();
}
/**
* Locate the 7-Zip executable from the release folder.
*
* @return 7-Zip executable
*/
private File locate7ZipExecutable() {
if (!PlatformUtil.isWindowsOS()) {
return null;
}
String executableToFindName = Paths.get("7-Zip", "7z.exe").toString(); // NON-NLS
File exeFile = InstalledFileLocator.getDefault().locate(executableToFindName, UnpackagePortableCaseProgressDialog.class.getPackage().getName(), false);
if (null == exeFile) {
return null;
}
if (!exeFile.canExecute()) {
return null;
}
return exeFile;
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
progressBar = new javax.swing.JProgressBar();
cancelButton = new javax.swing.JButton();
okButton = new javax.swing.JButton();
resultLabel = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseProgressDialog.class, "UnpackagePortableCaseProgressDialog.cancelButton.text")); // NOI18N
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cancelButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(okButton, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseProgressDialog.class, "UnpackagePortableCaseProgressDialog.okButton.text")); // NOI18N
okButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
okButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(resultLabel, org.openide.util.NbBundle.getMessage(UnpackagePortableCaseProgressDialog.class, "UnpackagePortableCaseProgressDialog.resultLabel.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(resultLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cancelButton)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cancelButton)
.addComponent(okButton)
.addComponent(resultLabel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
worker.cancel(true);
dispose();
}//GEN-LAST:event_cancelButtonActionPerformed
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
dispose();
}//GEN-LAST:event_okButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton cancelButton;
private javax.swing.JButton okButton;
private javax.swing.JProgressBar progressBar;
private javax.swing.JLabel resultLabel;
// End of variables declaration//GEN-END:variables
}

View File

@ -50,6 +50,9 @@ final class DataSourceBrowser extends javax.swing.JPanel implements ExplorerMana
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final Logger logger = Logger.getLogger(DataSourceBrowser.class.getName()); private static final Logger logger = Logger.getLogger(DataSourceBrowser.class.getName());
private static final int COUNT_COLUMN_WIDTH = 25;
private static final int USAGE_COLUMN_WIDTH = 120;
private static final int DATA_SOURCE_COLUMN_WIDTH = 325;
private final Outline outline; private final Outline outline;
private final org.openide.explorer.view.OutlineView outlineView; private final org.openide.explorer.view.OutlineView outlineView;
private final ExplorerManager explorerManager; private final ExplorerManager explorerManager;
@ -84,6 +87,11 @@ final class DataSourceBrowser extends javax.swing.JPanel implements ExplorerMana
|| column.getHeaderValue().toString().equals(Bundle.DataSourceSummaryNode_column_results_header()) || column.getHeaderValue().toString().equals(Bundle.DataSourceSummaryNode_column_results_header())
|| column.getHeaderValue().toString().equals(Bundle.DataSourceSummaryNode_column_tags_header())) { || column.getHeaderValue().toString().equals(Bundle.DataSourceSummaryNode_column_tags_header())) {
column.setCellRenderer(rightAlignedRenderer); column.setCellRenderer(rightAlignedRenderer);
column.setPreferredWidth(COUNT_COLUMN_WIDTH);
} else if (column.getHeaderValue().toString().equals(Bundle.DataSourceSummaryNode_column_type_header())) {
column.setPreferredWidth(USAGE_COLUMN_WIDTH);
} else {
column.setPreferredWidth(DATA_SOURCE_COLUMN_WIDTH);
} }
} }
this.setVisible(true); this.setVisible(true);
@ -168,7 +176,7 @@ final class DataSourceBrowser extends javax.swing.JPanel implements ExplorerMana
*/ */
DataSource getSelectedDataSource() { DataSource getSelectedDataSource() {
Node selectedNode[] = explorerManager.getSelectedNodes(); Node selectedNode[] = explorerManager.getSelectedNodes();
if (selectedNode.length == 1 && selectedNode[0] instanceof DataSourceSummaryEntryNode) { if (selectedNode.length == 1 && selectedNode[0] instanceof DataSourceSummaryEntryNode) {
return ((DataSourceSummaryEntryNode) selectedNode[0]).getDataSource(); return ((DataSourceSummaryEntryNode) selectedNode[0]).getDataSource();
} }
return null; return null;

View File

@ -58,7 +58,7 @@ final class DataSourceSummaryNode extends AbstractNode {
* DataSources which are this nodes children * DataSources which are this nodes children
*/ */
DataSourceSummaryNode(List<DataSourceSummary> dataSourceList) { DataSourceSummaryNode(List<DataSourceSummary> dataSourceList) {
super(Children.create(new DataSourceSummaryChildren(dataSourceList), true)); super(Children.create(new DataSourceSummaryChildren(dataSourceList), false));
} }
/** /**

View File

@ -68,7 +68,7 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="tableContainerPanel" alignment="0" max="32767" attributes="0"/> <Component id="tableContainerPanel" alignment="0" pref="775" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
@ -101,7 +101,7 @@
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Component id="foundInLabel" max="32767" attributes="0"/> <Component id="foundInLabel" max="32767" attributes="0"/>
</Group> </Group>
<Component id="tablesViewerSplitPane" pref="590" max="32767" attributes="0"/> <Component id="tablesViewerSplitPane" pref="765" max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
</Group> </Group>
@ -153,7 +153,7 @@
<Container class="javax.swing.JSplitPane" name="tablesViewerSplitPane"> <Container class="javax.swing.JSplitPane" name="tablesViewerSplitPane">
<Properties> <Properties>
<Property name="dividerLocation" type="int" value="450"/> <Property name="dividerLocation" type="int" value="450"/>
<Property name="resizeWeight" type="double" value="0.5"/> <Property name="resizeWeight" type="double" value="0.75"/>
</Properties> </Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
@ -161,7 +161,7 @@
<Container class="javax.swing.JSplitPane" name="caseDatasourceFileSplitPane"> <Container class="javax.swing.JSplitPane" name="caseDatasourceFileSplitPane">
<Properties> <Properties>
<Property name="dividerLocation" type="int" value="300"/> <Property name="dividerLocation" type="int" value="300"/>
<Property name="resizeWeight" type="double" value="0.6"/> <Property name="resizeWeight" type="double" value="0.66"/>
<Property name="toolTipText" type="java.lang.String" value=""/> <Property name="toolTipText" type="java.lang.String" value=""/>
</Properties> </Properties>
<Constraints> <Constraints>
@ -188,7 +188,7 @@
<Container class="javax.swing.JScrollPane" name="caseScrollPane"> <Container class="javax.swing.JScrollPane" name="caseScrollPane">
<Properties> <Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[140, 30]"/> <Dimension value="[150, 30]"/>
</Property> </Property>
</Properties> </Properties>
<AuxValues> <AuxValues>
@ -215,7 +215,7 @@
<Container class="javax.swing.JScrollPane" name="dataSourceScrollPane"> <Container class="javax.swing.JScrollPane" name="dataSourceScrollPane">
<Properties> <Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[140, 30]"/> <Dimension value="[150, 30]"/>
</Property> </Property>
</Properties> </Properties>
<AuxValues> <AuxValues>
@ -244,7 +244,7 @@
<Container class="javax.swing.JScrollPane" name="filesTableScrollPane"> <Container class="javax.swing.JScrollPane" name="filesTableScrollPane">
<Properties> <Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[140, 30]"/> <Dimension value="[150, 30]"/>
</Property> </Property>
</Properties> </Properties>
<Constraints> <Constraints>
@ -286,7 +286,7 @@
<Properties> <Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/> <Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[200, 100]"/> <Dimension value="[300, 100]"/>
</Property> </Property>
</Properties> </Properties>
<Constraints> <Constraints>

View File

@ -1008,16 +1008,16 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
org.openide.awt.Mnemonics.setLocalizedText(foundInLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.foundInLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(foundInLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.foundInLabel.text")); // NOI18N
tablesViewerSplitPane.setDividerLocation(450); tablesViewerSplitPane.setDividerLocation(450);
tablesViewerSplitPane.setResizeWeight(0.5); tablesViewerSplitPane.setResizeWeight(0.75);
caseDatasourceFileSplitPane.setDividerLocation(300); caseDatasourceFileSplitPane.setDividerLocation(300);
caseDatasourceFileSplitPane.setResizeWeight(0.6); caseDatasourceFileSplitPane.setResizeWeight(0.66);
caseDatasourceFileSplitPane.setToolTipText(""); caseDatasourceFileSplitPane.setToolTipText("");
caseDatasourceSplitPane.setDividerLocation(150); caseDatasourceSplitPane.setDividerLocation(150);
caseDatasourceSplitPane.setResizeWeight(0.5); caseDatasourceSplitPane.setResizeWeight(0.5);
caseScrollPane.setPreferredSize(new java.awt.Dimension(140, 30)); caseScrollPane.setPreferredSize(new java.awt.Dimension(150, 30));
casesTable.setAutoCreateRowSorter(true); casesTable.setAutoCreateRowSorter(true);
casesTable.setModel(casesTableModel); casesTable.setModel(casesTableModel);
@ -1025,7 +1025,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
caseDatasourceSplitPane.setLeftComponent(caseScrollPane); caseDatasourceSplitPane.setLeftComponent(caseScrollPane);
dataSourceScrollPane.setPreferredSize(new java.awt.Dimension(140, 30)); dataSourceScrollPane.setPreferredSize(new java.awt.Dimension(150, 30));
dataSourcesTable.setAutoCreateRowSorter(true); dataSourcesTable.setAutoCreateRowSorter(true);
dataSourcesTable.setModel(dataSourcesTableModel); dataSourcesTable.setModel(dataSourcesTableModel);
@ -1035,7 +1035,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
caseDatasourceFileSplitPane.setLeftComponent(caseDatasourceSplitPane); caseDatasourceFileSplitPane.setLeftComponent(caseDatasourceSplitPane);
filesTableScrollPane.setPreferredSize(new java.awt.Dimension(140, 30)); filesTableScrollPane.setPreferredSize(new java.awt.Dimension(150, 30));
filesTable.setAutoCreateRowSorter(true); filesTable.setAutoCreateRowSorter(true);
filesTable.setModel(filesTableModel); filesTable.setModel(filesTableModel);
@ -1049,7 +1049,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
tablesViewerSplitPane.setLeftComponent(caseDatasourceFileSplitPane); tablesViewerSplitPane.setLeftComponent(caseDatasourceFileSplitPane);
detailsPanelScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); detailsPanelScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
detailsPanelScrollPane.setPreferredSize(new java.awt.Dimension(200, 100)); detailsPanelScrollPane.setPreferredSize(new java.awt.Dimension(300, 100));
tablesViewerSplitPane.setRightComponent(detailsPanelScrollPane); tablesViewerSplitPane.setRightComponent(detailsPanelScrollPane);
javax.swing.GroupLayout tableContainerPanelLayout = new javax.swing.GroupLayout(tableContainerPanel); javax.swing.GroupLayout tableContainerPanelLayout = new javax.swing.GroupLayout(tableContainerPanel);
@ -1064,7 +1064,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
.addComponent(earliestCaseDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(earliestCaseDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(foundInLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(foundInLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 590, Short.MAX_VALUE)) .addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 765, Short.MAX_VALUE))
.addContainerGap()) .addContainerGap())
); );
tableContainerPanelLayout.setVerticalGroup( tableContainerPanelLayout.setVerticalGroup(
@ -1085,7 +1085,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 775, Short.MAX_VALUE)
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

View File

@ -0,0 +1,20 @@
StringsTextViewer.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0}
StringsTextViewer.goToPageTextField.err=Invalid page number
StringsTextViewer.setDataView.errorText=(offset {0}-{1} could not be read)
StringsTextViewer.setDataView.errorNoText=(offset {0}-{1} contains no text)
StringsTextViewer.title=Strings
StringsTextViewer.toolTip=Displays ASCII and Unicode strings extracted from the file.
StringsContentPanel.selectAllMenuItem.text=Select All
StringsContentPanel.currentPageLabel.text_1=1
StringsContentPanel.copyMenuItem.text=Copy
StringsContentPanel.ofLabel.text_1=of
StringsContentPanel.totalPageLabel.text_1=100
StringsContentPanel.languageLabel.toolTipText=
StringsContentPanel.languageLabel.text=Script:
StringsContentPanel.languageCombo.toolTipText=Language to attempt when interpreting (extracting and decoding) strings from binary data
StringsContentPanel.goToPageTextField.text=
StringsContentPanel.goToPageLabel.text=Go to Page:
StringsContentPanel.prevPageButton.text=
StringsContentPanel.pageLabel2.text=Page
StringsContentPanel.nextPageButton.text=
StringsContentPanel.pageLabel.text_1=Page:

View File

@ -0,0 +1,23 @@
StringsTextViewer.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0}
StringsTextViewer.goToPageTextField.err=Invalid page number
StringsTextViewer.setDataView.errorText=(offset {0}-{1} could not be read)
StringsTextViewer.setDataView.errorNoText=(offset {0}-{1} contains no text)
StringsTextViewer.title=Strings
StringsTextViewer.toolTip=Displays ASCII and Unicode strings extracted from the file.
StringsContentPanel.selectAllMenuItem.text=Select All
StringsContentPanel.currentPageLabel.text_1=1
StringsContentPanel.copyMenuItem.text=Copy
StringsContentPanel.ofLabel.text_1=of
StringsContentPanel.totalPageLabel.text_1=100
StringsContentPanel.languageLabel.toolTipText=
StringsContentPanel.languageLabel.text=Script:
StringsContentPanel.languageCombo.toolTipText=Language to attempt when interpreting (extracting and decoding) strings from binary data
StringsContentPanel.goToPageTextField.text=
StringsContentPanel.goToPageLabel.text=Go to Page:
StringsContentPanel.prevPageButton.text=
StringsContentPanel.pageLabel2.text=Page
StringsContentPanel.nextPageButton.text=
StringsContentPanel.pageLabel.text_1=Page:
TextContentViewer.title=Text
TextContentViewer.tooltip=Displays text associated with the selected item
TextContentViewerPanel.defaultName=Text

View File

@ -0,0 +1,15 @@
StringsTextViewer.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u9593\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u6570\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044
StringsTextViewer.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570
StringsTextViewer.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09
StringsTextViewer.title=\u30b9\u30c8\u30ea\u30f3\u30b0
StringsTextViewer.toolTip=\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u62bd\u51fa\u3055\u308c\u305fASCII\u304a\u3088\u3073\u30e6\u30cb\u30b3\u30fc\u30c9\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
StringsContentPanel.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
StringsContentPanel.currentPageLabel.text_1=1
StringsContentPanel.copyMenuItem.text=\u30b3\u30d4\u30fc
StringsContentPanel.ofLabel.text_1=of
StringsContentPanel.totalPageLabel.text_1=100
StringsContentPanel.languageLabel.text=\u30b9\u30af\u30ea\u30d7\u30c8\uff1a
StringsContentPanel.languageCombo.toolTipText=\u30d0\u30a4\u30ca\u30ea\u30b9\u30c8\u30ea\u30f3\u30b0\u306e\u51e6\u7406\uff08\u62bd\u51fa\u304a\u3088\u3073\u30c7\u30b3\u30fc\u30c9\uff09\u306b\u4f7f\u7528\u3059\u308b\u8a00\u8a9e
StringsContentPanel.goToPageLabel.text=\u6b21\u306e\u30da\u30fc\u30b8\u3078\u79fb\u52d5\uff1a
StringsContentPanel.pageLabel2.text=\u30da\u30fc\u30b8
StringsContentPanel.pageLabel.text_1=\u30da\u30fc\u30b8\uff1a

View File

@ -11,14 +11,14 @@
<MenuItem class="javax.swing.JMenuItem" name="copyMenuItem"> <MenuItem class="javax.swing.JMenuItem" name="copyMenuItem">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.copyMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.copyMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</MenuItem> </MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="selectAllMenuItem"> <MenuItem class="javax.swing.JMenuItem" name="selectAllMenuItem">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.selectAllMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.selectAllMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</MenuItem> </MenuItem>
@ -30,7 +30,7 @@
<Dimension value="[5, 5]"/> <Dimension value="[5, 5]"/>
</Property> </Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 144]"/> <Dimension value="[100, 58]"/>
</Property> </Property>
</Properties> </Properties>
<AuxValues> <AuxValues>
@ -48,22 +48,22 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane2" pref="0" max="32767" attributes="0"/> <Component id="outputScrollPane" pref="0" max="32767" attributes="0"/>
<Component id="jScrollPane1" pref="100" max="32767" attributes="0"/> <Component id="controlScrollPane" pref="100" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="jScrollPane2" min="-2" max="-2" attributes="0"/> <Component id="controlScrollPane" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="25" max="32767" attributes="0"/> <Component id="outputScrollPane" pref="26" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> <Container class="javax.swing.JScrollPane" name="outputScrollPane">
<Properties> <Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[640, 402]"/> <Dimension value="[640, 402]"/>
@ -79,13 +79,13 @@
<Font name="Courier New" size="11" style="0"/> <Font name="Courier New" size="11" style="0"/>
</Property> </Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[638, 400]"/> <Dimension value="[100, 40]"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane2"> <Container class="javax.swing.JScrollPane" name="controlScrollPane">
<Properties> <Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/> <Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="verticalScrollBarPolicy" type="int" value="21"/> <Property name="verticalScrollBarPolicy" type="int" value="21"/>
@ -93,7 +93,7 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents> <SubComponents>
<Container class="javax.swing.JPanel" name="jPanel2"> <Container class="javax.swing.JPanel" name="controlPanel">
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
@ -117,30 +117,35 @@
<Component id="goToPageLabel" min="-2" max="-2" attributes="0"/> <Component id="goToPageLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="goToPageTextField" min="-2" pref="79" max="-2" attributes="0"/> <Component id="goToPageTextField" min="-2" pref="79" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="33" max="-2" attributes="0"/>
<Component id="languageLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="languageCombo" min="-2" pref="155" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Component id="languageLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="languageCombo" min="-2" pref="155" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="103" alignment="0" groupAlignment="3" attributes="0"> <Group type="102" attributes="0">
<Component id="pageLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0">
<Component id="currentPageLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Group type="103" alignment="0" groupAlignment="3" attributes="0">
<Component id="ofLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="pageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="totalPageLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="currentPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> <Component id="ofLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="pageLabel2" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="totalPageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="nextPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/> </Group>
<Component id="prevPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/> <Component id="pageLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="goToPageLabel" min="-2" max="-2" attributes="0"/> <Component id="nextPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
<Group type="103" alignment="0" groupAlignment="3" attributes="0"> <Component id="prevPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/>
<Component id="goToPageTextField" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="goToPageLabel" min="-2" max="-2" attributes="0"/>
<Component id="languageCombo" alignment="3" min="-2" max="-2" attributes="0"/> <Group type="103" alignment="0" groupAlignment="3" attributes="0">
<Component id="languageLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="goToPageTextField" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="languageCombo" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="languageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -149,21 +154,21 @@
<Component class="javax.swing.JLabel" name="totalPageLabel"> <Component class="javax.swing.JLabel" name="totalPageLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.totalPageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.totalPageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="ofLabel"> <Component class="javax.swing.JLabel" name="ofLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.ofLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.ofLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="currentPageLabel"> <Component class="javax.swing.JLabel" name="currentPageLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.currentPageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.currentPageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[18, 14]"/> <Dimension value="[18, 14]"/>
@ -176,7 +181,7 @@
<Component class="javax.swing.JLabel" name="pageLabel"> <Component class="javax.swing.JLabel" name="pageLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.pageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.pageLabel.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[33, 14]"/> <Dimension value="[33, 14]"/>
@ -192,7 +197,7 @@
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/> <Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.nextPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.nextPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="borderPainted" type="boolean" value="false"/> <Property name="borderPainted" type="boolean" value="false"/>
<Property name="contentAreaFilled" type="boolean" value="false"/> <Property name="contentAreaFilled" type="boolean" value="false"/>
@ -216,7 +221,7 @@
<Component class="javax.swing.JLabel" name="pageLabel2"> <Component class="javax.swing.JLabel" name="pageLabel2">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.pageLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.pageLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[29, 14]"/> <Dimension value="[29, 14]"/>
@ -232,7 +237,7 @@
<Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/> <Image iconType="3" name="/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.prevPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.prevPageButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="borderPainted" type="boolean" value="false"/> <Property name="borderPainted" type="boolean" value="false"/>
<Property name="contentAreaFilled" type="boolean" value="false"/> <Property name="contentAreaFilled" type="boolean" value="false"/>
@ -256,14 +261,14 @@
<Component class="javax.swing.JLabel" name="goToPageLabel"> <Component class="javax.swing.JLabel" name="goToPageLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.goToPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.goToPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JTextField" name="goToPageTextField"> <Component class="javax.swing.JTextField" name="goToPageTextField">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.goToPageTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.goToPageTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
<Events> <Events>
@ -276,7 +281,7 @@
<StringArray count="0"/> <StringArray count="0"/>
</Property> </Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.languageCombo.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.languageCombo.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
<Events> <Events>
@ -290,10 +295,10 @@
<Component class="javax.swing.JLabel" name="languageLabel"> <Component class="javax.swing.JLabel" name="languageLabel">
<Properties> <Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.languageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.languageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerString.languageLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/contentviewers/textcontentviewer/Bundle.properties" key="StringsContentPanel.languageLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>

View File

@ -16,9 +16,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.sleuthkit.autopsy.corecomponents; package org.sleuthkit.autopsy.contentviewers.textcontentviewer;
import java.awt.Component;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -28,9 +27,7 @@ import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import org.openide.nodes.Node; import org.apache.commons.lang3.StringUtils;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
import org.sleuthkit.autopsy.coreutils.StringExtract; import org.sleuthkit.autopsy.coreutils.StringExtract;
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractResult; import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractResult;
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT; import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT;
@ -41,52 +38,61 @@ import org.sleuthkit.datamodel.TskCoreException;
/** /**
* Viewer displays strings extracted from contents. * Viewer displays strings extracted from contents.
*/ */
@ServiceProvider(service = DataContentViewer.class, position = 2)
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
public class DataContentViewerString extends javax.swing.JPanel implements DataContentViewer { public class StringsContentPanel extends javax.swing.JPanel {
private static long currentOffset = 0; private static long currentOffset = 0;
private static final long PAGE_LENGTH = 16384; private static final long PAGE_LENGTH = 16384;
private static final long serialVersionUID = 1L;
private final byte[] data = new byte[(int) PAGE_LENGTH]; private final byte[] data = new byte[(int) PAGE_LENGTH];
private static int currentPage = 1; private static int currentPage = 1;
private Content dataSource; private Content dataSource;
//string extract utility //string extract utility
private final StringExtract stringExtract = new StringExtract(); private final StringExtract stringExtract = new StringExtract();
private static final Logger logger = Logger.getLogger(DataContentViewerString.class.getName()); private static final Logger logger = Logger.getLogger(StringsContentPanel.class.getName());
/** /**
* Creates new form DataContentViewerString * Creates new form StringsTextViewer
*/ */
public DataContentViewerString() { public StringsContentPanel() {
initComponents(); initComponents();
customizeComponents(); customizeComponents();
this.resetComponent(); this.resetDisplay();
logger.log(Level.INFO, "Created StringView instance: {0}", this); //NON-NLS
} }
private void customizeComponents() { private void customizeComponents() {
outputViewPane.setComponentPopupMenu(rightClickMenu); outputViewPane.setComponentPopupMenu(rightClickMenu);
ActionListener actList = new ActionListener() { ActionListener actList = (ActionEvent e) -> {
@Override JMenuItem jmi = (JMenuItem) e.getSource();
public void actionPerformed(ActionEvent e) { if (jmi.equals(copyMenuItem)) {
JMenuItem jmi = (JMenuItem) e.getSource(); outputViewPane.copy();
if (jmi.equals(copyMenuItem)) { } else if (jmi.equals(selectAllMenuItem)) {
outputViewPane.copy(); outputViewPane.selectAll();
} else if (jmi.equals(selectAllMenuItem)) {
outputViewPane.selectAll();
}
} }
}; };
copyMenuItem.addActionListener(actList); copyMenuItem.addActionListener(actList);
selectAllMenuItem.addActionListener(actList); selectAllMenuItem.addActionListener(actList);
List<SCRIPT> supportedScripts = StringExtract.getSupportedScripts(); List<SCRIPT> supportedScripts = StringExtract.getSupportedScripts();
for (SCRIPT s : supportedScripts) { supportedScripts.forEach((s) -> {
languageCombo.addItem(s); languageCombo.addItem(s);
} });
} }
final void resetDisplay() {
// clear / reset the fields
currentPage = 1;
currentOffset = 0;
this.dataSource = null;
currentPageLabel.setText("");
totalPageLabel.setText("");
prevPageButton.setEnabled(false);
nextPageButton.setEnabled(false);
outputViewPane.setText(""); // reset the output view
setComponentsVisibility(false); // hides the components that not needed
}
/** /**
* This method is called from within the constructor to initialize the form. * This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always * WARNING: Do NOT modify this code. The content of this method is always
@ -99,10 +105,10 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
rightClickMenu = new javax.swing.JPopupMenu(); rightClickMenu = new javax.swing.JPopupMenu();
copyMenuItem = new javax.swing.JMenuItem(); copyMenuItem = new javax.swing.JMenuItem();
selectAllMenuItem = new javax.swing.JMenuItem(); selectAllMenuItem = new javax.swing.JMenuItem();
jScrollPane1 = new javax.swing.JScrollPane(); outputScrollPane = new javax.swing.JScrollPane();
outputViewPane = new javax.swing.JTextPane(); outputViewPane = new javax.swing.JTextPane();
jScrollPane2 = new javax.swing.JScrollPane(); controlScrollPane = new javax.swing.JScrollPane();
jPanel2 = new javax.swing.JPanel(); controlPanel = new javax.swing.JPanel();
totalPageLabel = new javax.swing.JLabel(); totalPageLabel = new javax.swing.JLabel();
ofLabel = new javax.swing.JLabel(); ofLabel = new javax.swing.JLabel();
currentPageLabel = new javax.swing.JLabel(); currentPageLabel = new javax.swing.JLabel();
@ -115,39 +121,39 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
languageCombo = new javax.swing.JComboBox<>(); languageCombo = new javax.swing.JComboBox<>();
languageLabel = new javax.swing.JLabel(); languageLabel = new javax.swing.JLabel();
copyMenuItem.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.copyMenuItem.text")); // NOI18N copyMenuItem.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.copyMenuItem.text")); // NOI18N
rightClickMenu.add(copyMenuItem); rightClickMenu.add(copyMenuItem);
selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.selectAllMenuItem.text")); // NOI18N selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.selectAllMenuItem.text")); // NOI18N
rightClickMenu.add(selectAllMenuItem); rightClickMenu.add(selectAllMenuItem);
setMinimumSize(new java.awt.Dimension(5, 5)); setMinimumSize(new java.awt.Dimension(5, 5));
setPreferredSize(new java.awt.Dimension(100, 144)); setPreferredSize(new java.awt.Dimension(100, 58));
jScrollPane1.setPreferredSize(new java.awt.Dimension(640, 402)); outputScrollPane.setPreferredSize(new java.awt.Dimension(640, 402));
outputViewPane.setEditable(false); outputViewPane.setEditable(false);
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
outputViewPane.setPreferredSize(new java.awt.Dimension(638, 400)); outputViewPane.setPreferredSize(new java.awt.Dimension(100, 40));
jScrollPane1.setViewportView(outputViewPane); outputScrollPane.setViewportView(outputViewPane);
jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); controlScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); controlScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
totalPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.totalPageLabel.text_1")); // NOI18N totalPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.totalPageLabel.text_1")); // NOI18N
ofLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.ofLabel.text_1")); // NOI18N ofLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.ofLabel.text_1")); // NOI18N
currentPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.currentPageLabel.text_1")); // NOI18N currentPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.currentPageLabel.text_1")); // NOI18N
currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14)); currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14));
currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14)); currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14));
pageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.pageLabel.text_1")); // NOI18N pageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel.text_1")); // NOI18N
pageLabel.setMaximumSize(new java.awt.Dimension(33, 14)); pageLabel.setMaximumSize(new java.awt.Dimension(33, 14));
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14)); pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.nextPageButton.text")); // NOI18N nextPageButton.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.nextPageButton.text")); // NOI18N
nextPageButton.setBorderPainted(false); nextPageButton.setBorderPainted(false);
nextPageButton.setContentAreaFilled(false); nextPageButton.setContentAreaFilled(false);
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
@ -160,12 +166,12 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
} }
}); });
pageLabel2.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.pageLabel2.text")); // NOI18N pageLabel2.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel2.text")); // NOI18N
pageLabel2.setMaximumSize(new java.awt.Dimension(29, 14)); pageLabel2.setMaximumSize(new java.awt.Dimension(29, 14));
pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14)); pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14));
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.prevPageButton.text")); // NOI18N prevPageButton.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.prevPageButton.text")); // NOI18N
prevPageButton.setBorderPainted(false); prevPageButton.setBorderPainted(false);
prevPageButton.setContentAreaFilled(false); prevPageButton.setContentAreaFilled(false);
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
@ -178,30 +184,30 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
} }
}); });
goToPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.goToPageLabel.text")); // NOI18N goToPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.goToPageLabel.text")); // NOI18N
goToPageTextField.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.goToPageTextField.text")); // NOI18N goToPageTextField.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.goToPageTextField.text")); // NOI18N
goToPageTextField.addActionListener(new java.awt.event.ActionListener() { goToPageTextField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
goToPageTextFieldActionPerformed(evt); goToPageTextFieldActionPerformed(evt);
} }
}); });
languageCombo.setToolTipText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.languageCombo.toolTipText")); // NOI18N languageCombo.setToolTipText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageCombo.toolTipText")); // NOI18N
languageCombo.addActionListener(new java.awt.event.ActionListener() { languageCombo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
languageComboActionPerformed(evt); languageComboActionPerformed(evt);
} }
}); });
languageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.languageLabel.text")); // NOI18N languageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageLabel.text")); // NOI18N
languageLabel.setToolTipText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.languageLabel.toolTipText")); // NOI18N languageLabel.setToolTipText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageLabel.toolTipText")); // NOI18N
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); javax.swing.GroupLayout controlPanelLayout = new javax.swing.GroupLayout(controlPanel);
jPanel2.setLayout(jPanel2Layout); controlPanel.setLayout(controlPanelLayout);
jPanel2Layout.setHorizontalGroup( controlPanelLayout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup() .addGroup(controlPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(pageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(pageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18) .addGap(18, 18, 18)
@ -220,47 +226,81 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
.addComponent(goToPageLabel) .addComponent(goToPageLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(goToPageTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(goToPageTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(33, 33, 33) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(languageLabel) .addComponent(languageLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(languageCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(languageCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())
); );
jPanel2Layout.setVerticalGroup( controlPanelLayout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(controlPanelLayout.createSequentialGroup()
.addComponent(pageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(ofLabel) .addComponent(pageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(totalPageLabel)) .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ofLabel)
.addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(totalPageLabel))
.addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(goToPageLabel) .addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(goToPageTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(goToPageLabel)
.addComponent(languageCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(languageLabel)) .addComponent(goToPageTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(languageCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(languageLabel)))
.addGap(0, 0, 0))
); );
jScrollPane2.setViewportView(jPanel2); controlScrollPane.setViewportView(controlPanel);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(outputScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE) .addComponent(controlScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(controlScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGap(7, 7, 7)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)) .addComponent(outputScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void languageComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_languageComboActionPerformed
if (dataSource != null) {
setDataView(dataSource, currentOffset);
}
}//GEN-LAST:event_languageComboActionPerformed
private void goToPageTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_goToPageTextFieldActionPerformed
String pageNumberStr = goToPageTextField.getText();
int pageNumber;
int maxPage = Math.round((dataSource.getSize() - 1) / PAGE_LENGTH) + 1;
try {
pageNumber = Integer.parseInt(pageNumberStr);
} catch (NumberFormatException ex) {
pageNumber = maxPage + 1;
}
if (pageNumber > maxPage || pageNumber < 1) {
JOptionPane.showMessageDialog(this,
NbBundle.getMessage(this.getClass(),
"StringsTextViewer.goToPageTextField.msgDlg",
maxPage),
NbBundle.getMessage(this.getClass(),
"StringsTextViewer.goToPageTextField.err"),
JOptionPane.WARNING_MESSAGE);
return;
}
currentOffset = (pageNumber - 1) * PAGE_LENGTH;
currentPage = pageNumber;
currentPageLabel.setText(Integer.toString(currentPage));
setDataView(dataSource, currentOffset);
}//GEN-LAST:event_goToPageTextFieldActionPerformed
private void prevPageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prevPageButtonActionPerformed private void prevPageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prevPageButtonActionPerformed
//@@@ this is part of the code dealing with the data viewer. could be copied/removed to implement the scrollbar //@@@ this is part of the code dealing with the data viewer. could be copied/removed to implement the scrollbar
currentOffset -= PAGE_LENGTH; currentOffset -= PAGE_LENGTH;
@ -277,50 +317,18 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
setDataView(dataSource, currentOffset); setDataView(dataSource, currentOffset);
}//GEN-LAST:event_nextPageButtonActionPerformed }//GEN-LAST:event_nextPageButtonActionPerformed
private void goToPageTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_goToPageTextFieldActionPerformed
String pageNumberStr = goToPageTextField.getText();
int pageNumber;
int maxPage = Math.round((dataSource.getSize() - 1) / PAGE_LENGTH) + 1;
try {
pageNumber = Integer.parseInt(pageNumberStr);
} catch (NumberFormatException ex) {
pageNumber = maxPage + 1;
}
if (pageNumber > maxPage || pageNumber < 1) {
JOptionPane.showMessageDialog(this,
NbBundle.getMessage(this.getClass(),
"DataContentViewerString.goToPageTextField.msgDlg",
maxPage),
NbBundle.getMessage(this.getClass(),
"DataContentViewerString.goToPageTextField.err"),
JOptionPane.WARNING_MESSAGE);
return;
}
currentOffset = (pageNumber - 1) * PAGE_LENGTH;
currentPage = pageNumber;
currentPageLabel.setText(Integer.toString(currentPage));
setDataView(dataSource, currentOffset);
}//GEN-LAST:event_goToPageTextFieldActionPerformed
private void languageComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_languageComboActionPerformed
if (dataSource != null) {
setDataView(dataSource, currentOffset);
}
}//GEN-LAST:event_languageComboActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel controlPanel;
private javax.swing.JScrollPane controlScrollPane;
private javax.swing.JMenuItem copyMenuItem; private javax.swing.JMenuItem copyMenuItem;
private javax.swing.JLabel currentPageLabel; private javax.swing.JLabel currentPageLabel;
private javax.swing.JLabel goToPageLabel; private javax.swing.JLabel goToPageLabel;
private javax.swing.JTextField goToPageTextField; private javax.swing.JTextField goToPageTextField;
private javax.swing.JPanel jPanel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JComboBox<SCRIPT> languageCombo; private javax.swing.JComboBox<SCRIPT> languageCombo;
private javax.swing.JLabel languageLabel; private javax.swing.JLabel languageLabel;
private javax.swing.JButton nextPageButton; private javax.swing.JButton nextPageButton;
private javax.swing.JLabel ofLabel; private javax.swing.JLabel ofLabel;
private javax.swing.JScrollPane outputScrollPane;
private javax.swing.JTextPane outputViewPane; private javax.swing.JTextPane outputViewPane;
private javax.swing.JLabel pageLabel; private javax.swing.JLabel pageLabel;
private javax.swing.JLabel pageLabel2; private javax.swing.JLabel pageLabel2;
@ -336,16 +344,13 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
* @param dataSource the content that want to be shown * @param dataSource the content that want to be shown
* @param offset the starting offset * @param offset the starting offset
*/ */
private void setDataView(Content dataSource, long offset) { void setDataView(Content dataSource, long offset) {
if (dataSource == null) { if (dataSource == null) {
return; return;
} }
// change the cursor to "waiting cursor" for this operation // change the cursor to "waiting cursor" for this operation
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
this.dataSource = dataSource; this.dataSource = dataSource;
int bytesRead = 0; int bytesRead = 0;
// set the data on the bottom and show it // set the data on the bottom and show it
@ -363,13 +368,13 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
stringExtract.setEnabledScript(selScript); stringExtract.setEnabledScript(selScript);
StringExtractResult res = stringExtract.extract(data, bytesRead, 0); StringExtractResult res = stringExtract.extract(data, bytesRead, 0);
text = res.getText(); text = res.getText();
if (text.trim().isEmpty()) { if (StringUtils.isBlank(text)) {
text = NbBundle.getMessage(this.getClass(), text = NbBundle.getMessage(this.getClass(),
"DataContentViewerString.setDataView.errorNoText", currentOffset, "StringsTextViewer.setDataView.errorNoText", currentOffset,
currentOffset + PAGE_LENGTH); currentOffset + PAGE_LENGTH);
} }
} else { } else {
text = NbBundle.getMessage(this.getClass(), "DataContentViewerString.setDataView.errorText", currentOffset, text = NbBundle.getMessage(this.getClass(), "StringsTextViewer.setDataView.errorText", currentOffset,
currentOffset + PAGE_LENGTH); currentOffset + PAGE_LENGTH);
} }
@ -397,16 +402,14 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
this.setCursor(null); this.setCursor(null);
} }
private void setDataView(StringContent dataSource) { void setDataView(StringContent dataSource) {
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try { try {
this.dataSource = null; this.dataSource = null;
// set the data on the bottom and show it // set the data on the bottom and show it
String text = dataSource.getString(); String text = dataSource.getString();
nextPageButton.setEnabled(false); nextPageButton.setEnabled(false);
prevPageButton.setEnabled(false); prevPageButton.setEnabled(false);
currentPage = 1; currentPage = 1;
@ -440,72 +443,4 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
languageLabel.setVisible(isVisible); languageLabel.setVisible(isVisible);
} }
@Override
public void setNode(Node selectedNode) {
if ((selectedNode == null) || (!isSupported(selectedNode))) {
resetComponent();
return;
}
Content content = DataContentViewerUtility.getDefaultContent(selectedNode);
if (content != null) {
this.setDataView(content, 0);
return;
} else {
StringContent scontent = selectedNode.getLookup().lookup(StringContent.class);
if (scontent != null) {
this.setDataView(scontent);
return;
}
}
resetComponent();
}
@Override
public String getTitle() {
return NbBundle.getMessage(this.getClass(), "DataContentViewerString.title");
}
@Override
public String getToolTip() {
return NbBundle.getMessage(this.getClass(), "DataContentViewerString.toolTip");
}
@Override
public DataContentViewer createInstance() {
return new DataContentViewerString();
}
@Override
public void resetComponent() {
// clear / reset the fields
currentPage = 1;
currentOffset = 0;
this.dataSource = null;
currentPageLabel.setText("");
totalPageLabel.setText("");
prevPageButton.setEnabled(false);
nextPageButton.setEnabled(false);
outputViewPane.setText(""); // reset the output view
setComponentsVisibility(false); // hides the components that not needed
}
@Override
public boolean isSupported(Node node) {
if (node == null) {
return false;
}
Content content = DataContentViewerUtility.getDefaultContent(node);
return (content != null && content.getSize() > 0);
}
@Override
public int isPreferred(Node node) {
return 1;
}
@Override
public Component getComponent() {
return this;
}
} }

View File

@ -0,0 +1,100 @@
/*
* 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.contentviewers.textcontentviewer;
import java.awt.Component;
import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.corecomponentinterfaces.TextViewer;
import org.sleuthkit.autopsy.corecomponents.DataContentViewerUtility;
import org.sleuthkit.autopsy.datamodel.StringContent;
import org.sleuthkit.datamodel.Content;
/**
* A text viewer that displays the strings extracted from contents.
*/
@ServiceProvider(service = TextViewer.class, position = 1)
public class StringsTextViewer implements TextViewer {
private StringsContentPanel panel;
@Override
public void setNode(Node selectedNode) {
if ((selectedNode == null) || (!isSupported(selectedNode))) {
resetComponent();
return;
}
Content content = DataContentViewerUtility.getDefaultContent(selectedNode);
if (content != null) {
panel.setDataView(content, 0);
return;
} else {
StringContent scontent = selectedNode.getLookup().lookup(StringContent.class);
if (scontent != null) {
panel.setDataView(scontent);
return;
}
}
resetComponent();
}
@Override
public String getTitle() {
return NbBundle.getMessage(this.getClass(), "StringsTextViewer.title");
}
@Override
public String getToolTip() {
return NbBundle.getMessage(this.getClass(), "StringsTextViewer.toolTip");
}
@Override
public TextViewer createInstance() {
return new StringsTextViewer();
}
@Override
public void resetComponent() {
panel.resetDisplay();
}
@Override
public boolean isSupported(Node node) {
if (node == null) {
return false;
}
Content content = DataContentViewerUtility.getDefaultContent(node);
return (content != null && content.getSize() > 0);
}
@Override
public int isPreferred(Node node) {
return 1;
}
@Override
public Component getComponent() {
if (panel == null) {
panel = new StringsContentPanel();
}
return panel;
}
}

View File

@ -0,0 +1,102 @@
/*
* 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.contentviewers.textcontentviewer;
import java.awt.Component;
import org.openide.nodes.Node;
import org.openide.util.NbBundle.Messages;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
/**
* A DataContentViewer that displays text with the TextViewers available.
*/
@ServiceProvider(service = DataContentViewer.class, position = 2)
public class TextContentViewer implements DataContentViewer {
private final TextContentViewerPanel panel;
private volatile Node currentNode = null;
/**
* No arg constructor for creating the main instance of this Content Viewer.
*/
public TextContentViewer() {
this(true);
}
/**
* Private constructor for creating instances of this content viewer.
*
* @param isMain
*/
private TextContentViewer(boolean isMain) {
panel = new TextContentViewerPanel(isMain);
}
@Override
public void setNode(Node selectedNode) {
currentNode = selectedNode;
panel.setNode(currentNode);
}
@Messages({"TextContentViewer.title=Text"})
@Override
public String getTitle() {
return Bundle.TextContentViewer_title();
}
@Messages({"TextContentViewer.tooltip=Displays text associated with the selected item"})
@Override
public String getToolTip() {
return Bundle.TextContentViewer_tooltip();
}
@Override
public DataContentViewer createInstance() {
return new TextContentViewer(false);
}
@Override
public Component getComponent() {
return panel;
}
@Override
public void resetComponent() {
currentNode = null;
panel.setupTabs(currentNode);
}
@Override
public boolean isSupported(Node node) {
//if any of the subvewiers are supported then this is supported
if (node == null) {
return false;
}
return panel.isSupported(node);
}
@Override
public int isPreferred(Node node) {
//return max of supported TextViewers isPreferred methods
return panel.isPreffered(node);
}
}

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="50" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Component id="textViewerTabbedPane" alignment="0" pref="50" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="27" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Component id="textViewerTabbedPane" alignment="0" pref="27" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JTabbedPane" name="textViewerTabbedPane">
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
</Container>
</SubComponents>
</Form>

View File

@ -0,0 +1,297 @@
/*
* 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.contentviewers.textcontentviewer;
import java.awt.Cursor;
import java.beans.PropertyChangeEvent;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import javax.swing.JTabbedPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.openide.nodes.Node;
import org.openide.util.Lookup;
import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent;
import org.sleuthkit.autopsy.corecomponentinterfaces.TextViewer;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.Content;
/**
* A TextContentViewerPanel which displays the content of the TextContentViewer
* and its TextViewers
*/
public class TextContentViewerPanel extends javax.swing.JPanel implements DataContent, ChangeListener {
private static final Logger logger = Logger.getLogger(TextContentViewerPanel.class.getName());
private static final long serialVersionUID = 1L;
private final List<UpdateWrapper> textViewers = new ArrayList<>();
private Node currentNode;
private boolean listeningToTabbedPane = false;
/**
* Creates new form TextContentViewerPanel
*/
public TextContentViewerPanel(boolean isMain) {
initComponents();
// add all implementors of DataContentViewer and put them in the tabbed pane
Collection<? extends TextViewer> dcvs = Lookup.getDefault().lookupAll(TextViewer.class);
for (TextViewer factory : dcvs) {
TextViewer dcv;
if (isMain) {
//use the instance from Lookup for the main viewer
dcv = factory;
} else {
dcv = factory.createInstance();
}
textViewers.add(new UpdateWrapper(dcv));
javax.swing.JScrollPane scrollTab = new javax.swing.JScrollPane(dcv.getComponent());
scrollTab.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_NEVER);
textViewerTabbedPane.addTab(dcv.getTitle(), null,
scrollTab, dcv.getToolTip());
}
// disable the tabs
int numTabs = textViewerTabbedPane.getTabCount();
for (int tab = 0; tab < numTabs; ++tab) {
textViewerTabbedPane.setEnabledAt(tab, false);
}
}
/**
* Deterime wether the content viewer which displays this panel isSupported.
* This panel is supported if any of the TextViewer's displayed in it are
* supported.
*
* @param node
*
* @return true if any of the TextViewers are supported, false otherwise
*/
boolean isSupported(Node node) {
for (UpdateWrapper textViewer : textViewers) {
if (textViewer.isSupported(node)) {
return true;
}
}
return false;
}
/**
* Determine the isPreffered score for the content viewer which is
* displaying this panel. Score is depenedent on the score of the supported
* TextViewers which exist.
*
* @param node
*
* @return the greatest isPreffered value of the supported TextViewers
*/
int isPreffered(Node node) {
int max = 1;
for (UpdateWrapper textViewer : textViewers) {
if (textViewer.isSupported(node)) {
max = Integer.max(max, textViewer.isPreferred(node));
}
}
return max;
}
@Messages({"TextContentViewerPanel.defaultName=Text"})
@Override
public void setNode(Node selectedNode) {
// change the cursor to "waiting cursor" for this operation
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
String defaultName = Bundle.TextContentViewerPanel_defaultName();
// set the file path
if (selectedNode == null) {
setName(defaultName);
} else {
Content content = selectedNode.getLookup().lookup(Content.class);
if (content != null) {
String path = defaultName;
try {
path = content.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for " + content.toString(), ex); //NON-NLS
}
setName(path);
} else {
setName(defaultName);
}
}
currentNode = selectedNode;
setupTabs(selectedNode);
} finally {
this.setCursor(null);
}
}
/**
* Resets the tabs based on the selected Node. If the selected node is null
* or not supported, disable that tab as well.
*
* @param selectedNode the selected content Node
*/
public void setupTabs(Node selectedNode) {
// Deferring becoming a listener to the tabbed pane until this point
// eliminates handling a superfluous stateChanged event during construction.
if (listeningToTabbedPane == false) {
textViewerTabbedPane.addChangeListener(this);
listeningToTabbedPane = true;
}
int currTabIndex = textViewerTabbedPane.getSelectedIndex();
int totalTabs = textViewerTabbedPane.getTabCount();
int maxPreferred = 0;
int preferredViewerIndex = 0;
for (int i = 0; i < totalTabs; ++i) {
UpdateWrapper dcv = textViewers.get(i);
dcv.resetComponent();
// disable an unsupported tab (ex: picture viewer)
if ((selectedNode == null) || (dcv.isSupported(selectedNode) == false)) {
textViewerTabbedPane.setEnabledAt(i, false);
} else {
textViewerTabbedPane.setEnabledAt(i, true);
// remember the viewer with the highest preference value
int currentPreferred = dcv.isPreferred(selectedNode);
if (currentPreferred > maxPreferred) {
preferredViewerIndex = i;
maxPreferred = currentPreferred;
}
}
}
// let the user decide if we should stay with the current viewer
int tabIndex = UserPreferences.keepPreferredContentViewer() ? currTabIndex : preferredViewerIndex;
UpdateWrapper dcv = textViewers.get(tabIndex);
// this is really only needed if no tabs were enabled
if (textViewerTabbedPane.isEnabledAt(tabIndex) == false) {
dcv.resetComponent();
} else {
dcv.setNode(selectedNode);
}
// set the tab to the one the user wants, then set that viewer's node.
textViewerTabbedPane.setSelectedIndex(tabIndex);
textViewerTabbedPane.getSelectedComponent().repaint();
}
@Override
public void propertyChange(PropertyChangeEvent evt) {
//does nothing
}
@Override
public void stateChanged(ChangeEvent evt) {
JTabbedPane pane = (JTabbedPane) evt.getSource();
// Get and set current selected tab
int currentTab = pane.getSelectedIndex();
if (currentTab != -1) {
UpdateWrapper dcv = textViewers.get(currentTab);
if (dcv.isOutdated()) {
// change the cursor to "waiting cursor" for this operation
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
dcv.setNode(currentNode);
} finally {
this.setCursor(null);
}
}
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
textViewerTabbedPane = new javax.swing.JTabbedPane();
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 50, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(textViewerTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 27, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(textViewerTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTabbedPane textViewerTabbedPane;
// End of variables declaration//GEN-END:variables
/**
* Class to assist in keeping track of which TextViewers need to be updated
*/
private static class UpdateWrapper {
private final TextViewer wrapped;
private boolean outdated;
UpdateWrapper(TextViewer wrapped) {
this.wrapped = wrapped;
this.outdated = true;
}
void setNode(Node selectedNode) {
this.wrapped.setNode(selectedNode);
this.outdated = false;
}
void resetComponent() {
this.wrapped.resetComponent();
this.outdated = true;
}
boolean isOutdated() {
return this.outdated;
}
boolean isSupported(Node node) {
return this.wrapped.isSupported(node);
}
int isPreferred(Node node) {
return this.wrapped.isPreferred(node);
}
}
}

View File

@ -60,6 +60,7 @@ public final class UserPreferences {
private static final String MESSAGE_SERVICE_USER = "MessageServiceUser"; //NON-NLS private static final String MESSAGE_SERVICE_USER = "MessageServiceUser"; //NON-NLS
private static final String MESSAGE_SERVICE_HOST = "MessageServiceHost"; //NON-NLS private static final String MESSAGE_SERVICE_HOST = "MessageServiceHost"; //NON-NLS
private static final String MESSAGE_SERVICE_PORT = "MessageServicePort"; //NON-NLS private static final String MESSAGE_SERVICE_PORT = "MessageServicePort"; //NON-NLS
private static final String TEXT_TRANSLATOR_NAME = "TextTranslatorName";
public static final String PROCESS_TIME_OUT_ENABLED = "ProcessTimeOutEnabled"; //NON-NLS public static final String PROCESS_TIME_OUT_ENABLED = "ProcessTimeOutEnabled"; //NON-NLS
public static final String PROCESS_TIME_OUT_HOURS = "ProcessTimeOutHours"; //NON-NLS public static final String PROCESS_TIME_OUT_HOURS = "ProcessTimeOutHours"; //NON-NLS
private static final int DEFAULT_PROCESS_TIMEOUT_HR = 60; private static final int DEFAULT_PROCESS_TIMEOUT_HR = 60;
@ -335,6 +336,14 @@ public final class UserPreferences {
preferences.putInt(INDEXING_SERVER_PORT, port); preferences.putInt(INDEXING_SERVER_PORT, port);
} }
public static void setTextTranslatorName(String textTranslatorName){
preferences.put(TEXT_TRANSLATOR_NAME, textTranslatorName);
}
public static String getTextTranslatorName(){
return preferences.get(TEXT_TRANSLATOR_NAME, null);
}
/** /**
* Persists message service connection info. * Persists message service connection info.
* *

View File

@ -50,6 +50,7 @@
<file name="org-sleuthkit-autopsy-casemodule-CaseDetailsAction.instance"/> <file name="org-sleuthkit-autopsy-casemodule-CaseDetailsAction.instance"/>
<file name="org-sleuthkit-autopsy-casemodule-datasourcesummary-DataSourceSummaryAction.instance"/> <file name="org-sleuthkit-autopsy-casemodule-datasourcesummary-DataSourceSummaryAction.instance"/>
<file name="org-sleuthkit-autopsy-casemodule-CaseDeleteAction.instance"/> <file name="org-sleuthkit-autopsy-casemodule-CaseDeleteAction.instance"/>
<file name="org-sleuthkit-autopsy-casemodule-UnpackagePortableCaseAction.instance"/>
<file name="org-sleuthkit-autopsy-casemodule-CaseSaveAction.instance"> <file name="org-sleuthkit-autopsy-casemodule-CaseSaveAction.instance">
<attr name="delegate" newvalue="org.sleuthkit.autopsy.casemodule.CaseSaveAction"/> <attr name="delegate" newvalue="org.sleuthkit.autopsy.casemodule.CaseSaveAction"/>
<attr name="displayName" bundlevalue="org.sleuthkit.autopsy.casemodule.Bundle#CTL_SaveCaseAction"/> <attr name="displayName" bundlevalue="org.sleuthkit.autopsy.casemodule.Bundle#CTL_SaveCaseAction"/>
@ -109,12 +110,6 @@
<attr name="displayName" bundlevalue="org.sleuthkit.autopsy.filebrowser.Bundle#CTL_FileBrowserAction"/> <attr name="displayName" bundlevalue="org.sleuthkit.autopsy.filebrowser.Bundle#CTL_FileBrowserAction"/>
<attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/> <attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
</file> </file>
<file name="org-sleuthkit-autopsy-filebrowser-ChangeViewAction.instance">
<attr name="delegate" newvalue="org.sleuthkit.autopsy.filebrowser.ChangeViewAction"/>
<attr name="displayName" bundlevalue="org.sleuthkit.autopsy.filebrowser.Bundle#CTL_ChangeViewAction"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
<attr name="noIconInMenu" boolvalue="false"/>
</file>
<file name="org-sleuthkit-autopsy-filebrowser-DetailWindowAction.instance"> <file name="org-sleuthkit-autopsy-filebrowser-DetailWindowAction.instance">
<attr name="component" methodvalue="org.sleuthkit.autopsy.filebrowser.DetailWindowTopComponent.findInstance"/> <attr name="component" methodvalue="org.sleuthkit.autopsy.filebrowser.DetailWindowTopComponent.findInstance"/>
<attr name="displayName" bundlevalue="org.sleuthkit.autopsy.filebrowser.Bundle#CTL_DetailWindowAction"/> <attr name="displayName" bundlevalue="org.sleuthkit.autopsy.filebrowser.Bundle#CTL_DetailWindowAction"/>
@ -163,6 +158,10 @@
<attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-CaseDeleteAction.instance"/> <attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-CaseDeleteAction.instance"/>
<attr name="position" intvalue="104"/> <attr name="position" intvalue="104"/>
</file> </file>
<file name="org-sleuthkit-autopsy-casemodule-UnpackagePortableCaseAction.shadow">
<attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-UnpackagePortableCaseAction.instance"/>
<attr name="position" intvalue="105"/>
</file>
<file name="org-sleuthkit-autopsy-casemodule-AddImage-separatorBefore.instance"> <file name="org-sleuthkit-autopsy-casemodule-AddImage-separatorBefore.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/> <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="200"/> <attr name="position" intvalue="200"/>

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2011 Basis Technology Corp. * Copyright 2011-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -28,9 +28,9 @@ import org.openide.nodes.Node;
* a "JPanel Form" class and then have it implement DataContentViewer. This * a "JPanel Form" class and then have it implement DataContentViewer. This
* allows you to easily use the UI builder for the layout. * allows you to easily use the UI builder for the layout.
* *
* DataContentViewer panels should handle their own vertical scrolling, the horizontal * DataContentViewer panels should handle their own vertical scrolling, the
* scrolling when under their panel's preferred size will be handled by the DataContentPanel * horizontal scrolling when under their panel's preferred size will be handled
* which contains them. * by the DataContentPanel which contains them.
*/ */
public interface DataContentViewer { public interface DataContentViewer {
@ -38,17 +38,25 @@ public interface DataContentViewer {
* Autopsy will call this when this panel is focused with the file that * Autopsy will call this when this panel is focused with the file that
* should be analyzed. When called with null, must clear all references to * should be analyzed. When called with null, must clear all references to
* previous nodes. * previous nodes.
*
* @param selectedNode the node which is used to determine what is displayed
* in this viewer
*/ */
public void setNode(Node selectedNode); public void setNode(Node selectedNode);
/** /**
* Returns the title of this viewer to display in the tab. * Returns the title of this viewer to display in the tab.
*
* @return the title of DataContentViewer
*
*/ */
public String getTitle(); public String getTitle();
/** /**
* Returns a short description of this viewer to use as a tool tip for its * Returns a short description of this viewer to use as a tool tip for its
* tab. * tab.
*
* @return the tooltip for this TextViewer
*/ */
public String getToolTip(); public String getToolTip();
@ -58,7 +66,7 @@ public interface DataContentViewer {
* Lookup and the type will only be DataContentViewer. This method is used * Lookup and the type will only be DataContentViewer. This method is used
* to get an instance of your specific type. * to get an instance of your specific type.
* *
* @returns A new instance of the viewer * @return A new instance of the viewer
*/ */
public DataContentViewer createInstance(); public DataContentViewer createInstance();
@ -66,6 +74,8 @@ public interface DataContentViewer {
* Return the Swing Component to display. Implementations of this method * Return the Swing Component to display. Implementations of this method
* that extend JPanel and do a 'return this;'. Otherwise return an internal * that extend JPanel and do a 'return this;'. Otherwise return an internal
* instance of the JPanel. * instance of the JPanel.
*
* @return the component which is displayed for this viewer
*/ */
public Component getComponent(); public Component getComponent();
@ -85,49 +95,51 @@ public interface DataContentViewer {
public boolean isSupported(Node node); public boolean isSupported(Node node);
/** /**
* Checks whether the given viewer is preferred for the Node. This is a bit * Checks whether the given viewer is preferred for the Node. This is a bit
* subjective, but the idea is that Autopsy wants to display the most * subjective, but the idea is that Autopsy wants to display the most
* relevant tab. The more generic the viewer, the lower the return value * relevant tab. The more generic the viewer, the lower the return value
* should be. This will only be called on viewers that support the given * should be. This will only be called on viewers that support the given
* node (i.e., isSupported() has already returned true). * node (i.e., isSupported() has already returned true).
* *
* The following are some examples of the current levels in use. If the selected * The following are some examples of the current levels in use. If the
* node is an artifact, the level may be determined by both the artifact and its * selected node is an artifact, the level may be determined by both the
* associated file. * artifact and its associated file.
* *
* Level 7 - Based on the artifact, if any, in the selected node and specific * Level 7 - Based on the artifact, if any, in the selected node and
* to an artifact type or types. Current content viewers that can return level 7 are * specific to an artifact type or types. Current content viewers that can
* the Messages tab (only supported for email and SMS) and the Indexed Text tab * return level 7 are the Messages tab (only supported for email and SMS)
* when the selected node is a Keyword Search hit. * and the Text tab when the selected node is a Keyword Search hit.
* *
* Level 6 - Based on the artifact, if any, in the selected node but not * Level 6 - Based on the artifact, if any, in the selected node but not
* restricted to particular types. The current content viewer that can return level 6 * restricted to particular types. The current content viewer that can
* is the Results tab. It returns this level for most artifact types, * return level 6 is the Results tab. It returns this level for most
* unless the associated file is assumed to be of greater interest (for example, * artifact types, unless the associated file is assumed to be of greater
* a Hash Set Hit will not be level 6 because the file itself is of greater interest). * interest (for example, a Hash Set Hit will not be level 6 because the
* * file itself is of greater interest).
* Level 5 - Based on the file in the selected node and very specific to the file type. The current *
* content viewer that will return level 5 is * Level 5 - Based on the file in the selected node and very specific to the
* the Application tab, which supports media files (such as images) and * file type. The current content viewer that will return level 5 is the
* certain types of databases. * Application tab, which supports media files (such as images) and certain
* * types of databases.
* Level 4 - Based on the file in the selected node but fairly general. *
* Currently this is the level returned by the Indexed Text tab if Keyword Search * Level 4 - Based on the file in the selected node but fairly general.
* has been run (unless the node is a Keyword Search hit or a Credit Card account). * Currently this is the level returned by the Text tab if Keyword Search
* This is the default tab for most files. * has been run (unless the node is a Keyword Search hit or a Credit Card
* * account). This is the default tab for most files.
* Level 3 - Based on the artifact, if any, in the selected node where the *
* artifact is thought to be of less interest than the associated file. This * Level 3 - Based on the artifact, if any, in the selected node where the
* level is returned by the Results tab for artifacts like Hash Set Hits. * artifact is thought to be of less interest than the associated file. This
* * level is returned by the Results tab for artifacts like Hash Set Hits.
* Level 1 - Very general and should always be available. The Hex, Strings, and Metadata tabs *
* are all this level * Level 1 - Very general and should always be available. The Hex, Text, and
* * Metadata tabs are all this level
* Level 0 - For cases where the content viewer should never be displayed by default. *
* * Level 0 - For cases where the content viewer should never be displayed by
* @param node Node to check for preference * default.
* *
* @return an int (0-10) higher return means the viewer has higher priority * @param node Node to check for preference
*/ *
* @return an int (0-10) higher return means the viewer has higher priority
*/
public int isPreferred(Node node); public int isPreferred(Node node);
} }

View File

@ -0,0 +1,135 @@
/*
* 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.corecomponentinterfaces;
import java.awt.Component;
import org.openide.nodes.Node;
/**
* Interface that TextViewers for the TextContentViewer must implement. These
* modules analyze an individual file that the user has selected and display
* results in some form of JPanel.
*
* TextViewer panels should handle their own vertical scrolling, the horizontal
* scrolling when under their panel's preferred size will be handled by the
* TextContentViewerPanel which contains them.
*/
public interface TextViewer {
/**
* Autopsy will call this when this panel is focused with the file that
* should be analyzed. When called with null, must clear all references to
* previous nodes.
*
* @param selectedNode the node which is used to determine what is displayed
* in this viewer
*/
public void setNode(Node selectedNode);
/**
* Returns the title of this viewer to display in the tab.
*
* @return the title of TextViewer
*/
public String getTitle();
/**
* Returns a short description of this viewer to use as a tool tip for its
* tab.
*
* @return the tooltip for this TextViewer
*/
public String getToolTip();
/**
* Create and return a new instance of your viewer. The reason that this is
* needed is because the specific viewer modules will be found via NetBeans
* Lookup and the type will only be TextViewer. This method is used to get
* an instance of your specific type.
*
* @return A new instance of the viewer
*/
public TextViewer createInstance();
/**
* Return the Swing Component to display. Implementations of this method
* that extend JPanel and do a 'return this;'. Otherwise return an internal
* instance of the JPanel.
*
* @return the component which is displayed for this viewer
*/
public Component getComponent();
/**
* Resets the contents of the viewer / component.
*/
public void resetComponent();
/**
* Checks whether the given node is supported by the viewer. This will be
* used to enable or disable the tab for the viewer.
*
* @param node Node to check for support
*
* @return True if the node can be displayed / processed, else false
*/
public boolean isSupported(Node node);
/**
* Checks whether the given viewer is preferred for the Node. This is a bit
* subjective, but the idea is that Autopsy wants to display the most
* relevant tab. The more generic the viewer, the lower the return value
* should be. This will only be called on viewers that support the given
* node (i.e., isSupported() has already returned true).
*
* The following are some examples of the current levels in use. If the
* selected node is an artifact, the level may be determined by both the
* artifact and its associated file.
*
* Level 7 - Based on the artifact, if any, in the selected node and
* specific to an artifact type or types. The current text viewer that can
* return level 7 is the Indexed Text tab when the selected node is a
* Keyword Search hit.
*
* Level 6 - Based on the artifact, if any, in the selected node but not
* restricted to particular types.
*
* Level 5 - Based on the file in the selected node and very specific to the
* file type.
*
* Level 4 - Based on the file in the selected node but fairly general.
* Currently this is the level returned by the Indexed Text tab if Keyword
* Search has been run (unless the node is a Keyword Search hit or a Credit
* Card account). This is the default tab for most files.
*
* Level 3 - Based on the artifact, if any, in the selected node where the
* artifact is thought to be of less interest than the associated file.
*
* Level 1 - Very general and should always be available. The Strings tabs
* is this this level
*
* Level 0 - For cases where the text viewer should never be displayed by
* default.
*
* @param node Node to check for preference
*
* @return an int (0-10) higher return means the viewer has higher priority
*/
public int isPreferred(Node node);
}

View File

@ -8,18 +8,11 @@ HINT_NodeTableTopComponent=This is a DataResult window
OpenIDE-Module-Name=CoreComponents OpenIDE-Module-Name=CoreComponents
DataContentViewerHex.prevPageButton.text= DataContentViewerHex.prevPageButton.text=
DataContentViewerHex.nextPageButton.text= DataContentViewerHex.nextPageButton.text=
DataContentViewerString.prevPageButton.text=
DataContentViewerString.nextPageButton.text=
DataContentViewerHex.pageLabel.text_1=Page: DataContentViewerHex.pageLabel.text_1=Page:
DataContentViewerHex.currentPageLabel.text_1=1 DataContentViewerHex.currentPageLabel.text_1=1
DataContentViewerHex.ofLabel.text_1=of DataContentViewerHex.ofLabel.text_1=of
DataContentViewerHex.totalPageLabel.text_1=100 DataContentViewerHex.totalPageLabel.text_1=100
DataContentViewerString.pageLabel.text_1=Page:
DataContentViewerString.currentPageLabel.text_1=1
DataContentViewerString.ofLabel.text_1=of
DataContentViewerString.totalPageLabel.text_1=100
DataContentViewerHex.pageLabel2.text=Page DataContentViewerHex.pageLabel2.text=Page
DataContentViewerString.pageLabel2.text=Page
# Product Information panel # Product Information panel
LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div> LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div>
@ -29,9 +22,7 @@ URL_ON_IMG=http://www.sleuthkit.org/
FILE_FOR_LOCAL_HELP=file:/// FILE_FOR_LOCAL_HELP=file:///
INDEX_FOR_LOCAL_HELP=/docs/index.html INDEX_FOR_LOCAL_HELP=/docs/index.html
LBL_Close=Close LBL_Close=Close
DataContentViewerString.copyMenuItem.text=Copy
DataContentViewerHex.copyMenuItem.text=Copy DataContentViewerHex.copyMenuItem.text=Copy
DataContentViewerString.selectAllMenuItem.text=Select All
DataContentViewerHex.selectAllMenuItem.text=Select All DataContentViewerHex.selectAllMenuItem.text=Select All
DataContentViewerArtifact.totalPageLabel.text=100 DataContentViewerArtifact.totalPageLabel.text=100
DataContentViewerArtifact.prevPageButton.text= DataContentViewerArtifact.prevPageButton.text=
@ -43,13 +34,8 @@ DataContentViewerArtifact.copyMenuItem.text=Copy
DataContentViewerArtifact.selectAllMenuItem.text=Select All DataContentViewerArtifact.selectAllMenuItem.text=Select All
DataContentViewerArtifact.pageLabel.text=Result: DataContentViewerArtifact.pageLabel.text=Result:
AdvancedConfigurationDialog.applyButton.text=OK AdvancedConfigurationDialog.applyButton.text=OK
DataContentViewerString.goToPageLabel.text=Go to Page:
DataContentViewerString.goToPageTextField.text=
DataContentViewerHex.goToPageTextField.text= DataContentViewerHex.goToPageTextField.text=
DataContentViewerHex.goToPageLabel.text=Go to Page: DataContentViewerHex.goToPageLabel.text=Go to Page:
DataContentViewerString.languageLabel.toolTipText=
DataContentViewerString.languageLabel.text=Script:
DataContentViewerString.languageCombo.toolTipText=Language to attempt when interpreting (extracting and decoding) strings from binary data
DataResultViewerThumbnail.pageLabel.text=Page: DataResultViewerThumbnail.pageLabel.text=Page:
DataResultViewerThumbnail.pagesLabel.text=Pages: DataResultViewerThumbnail.pagesLabel.text=Pages:
DataResultViewerThumbnail.pagePrevButton.text= DataResultViewerThumbnail.pagePrevButton.text=
@ -70,12 +56,6 @@ DataContentViewerHex.goToPageTextField.err=Invalid page number
DataContentViewerHex.setDataView.errorText=(offset {0}-{1} could not be read) DataContentViewerHex.setDataView.errorText=(offset {0}-{1} could not be read)
DataContentViewerHex.title=Hex DataContentViewerHex.title=Hex
DataContentViewerHex.toolTip=Displays the binary contents of a file as hexidecimal, with bytes that are displayable as ASCII characters on the right. DataContentViewerHex.toolTip=Displays the binary contents of a file as hexidecimal, with bytes that are displayable as ASCII characters on the right.
DataContentViewerString.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0}
DataContentViewerString.goToPageTextField.err=Invalid page number
DataContentViewerString.setDataView.errorText=(offset {0}-{1} could not be read)
DataContentViewerString.setDataView.errorNoText=(offset {0}-{1} contains no text)
DataContentViewerString.title=Strings
DataContentViewerString.toolTip=Displays ASCII and Unicode strings extracted from the file.
DataResultPanel.pleasewaitNodeDisplayName=Please Wait... DataResultPanel.pleasewaitNodeDisplayName=Please Wait...
DataResultViewerTable.illegalArgExc.noChildFromParent=Could not get a child Node from the given parent. DataResultViewerTable.illegalArgExc.noChildFromParent=Could not get a child Node from the given parent.
DataResultViewerTable.illegalArgExc.childWithoutPropertySet=Child Node does not have the regular PropertySet. DataResultViewerTable.illegalArgExc.childWithoutPropertySet=Child Node does not have the regular PropertySet.

View File

@ -49,18 +49,11 @@ HINT_NodeTableTopComponent=This is a DataResult window
OpenIDE-Module-Name=CoreComponents OpenIDE-Module-Name=CoreComponents
DataContentViewerHex.prevPageButton.text= DataContentViewerHex.prevPageButton.text=
DataContentViewerHex.nextPageButton.text= DataContentViewerHex.nextPageButton.text=
DataContentViewerString.prevPageButton.text=
DataContentViewerString.nextPageButton.text=
DataContentViewerHex.pageLabel.text_1=Page: DataContentViewerHex.pageLabel.text_1=Page:
DataContentViewerHex.currentPageLabel.text_1=1 DataContentViewerHex.currentPageLabel.text_1=1
DataContentViewerHex.ofLabel.text_1=of DataContentViewerHex.ofLabel.text_1=of
DataContentViewerHex.totalPageLabel.text_1=100 DataContentViewerHex.totalPageLabel.text_1=100
DataContentViewerString.pageLabel.text_1=Page:
DataContentViewerString.currentPageLabel.text_1=1
DataContentViewerString.ofLabel.text_1=of
DataContentViewerString.totalPageLabel.text_1=100
DataContentViewerHex.pageLabel2.text=Page DataContentViewerHex.pageLabel2.text=Page
DataContentViewerString.pageLabel2.text=Page
# Product Information panel # Product Information panel
LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div> LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div>
@ -74,9 +67,7 @@ URL_ON_IMG=http://www.sleuthkit.org/
FILE_FOR_LOCAL_HELP=file:/// FILE_FOR_LOCAL_HELP=file:///
INDEX_FOR_LOCAL_HELP=/docs/index.html INDEX_FOR_LOCAL_HELP=/docs/index.html
LBL_Close=Close LBL_Close=Close
DataContentViewerString.copyMenuItem.text=Copy
DataContentViewerHex.copyMenuItem.text=Copy DataContentViewerHex.copyMenuItem.text=Copy
DataContentViewerString.selectAllMenuItem.text=Select All
DataContentViewerHex.selectAllMenuItem.text=Select All DataContentViewerHex.selectAllMenuItem.text=Select All
DataContentViewerArtifact.totalPageLabel.text=100 DataContentViewerArtifact.totalPageLabel.text=100
DataContentViewerArtifact.prevPageButton.text= DataContentViewerArtifact.prevPageButton.text=
@ -88,13 +79,8 @@ DataContentViewerArtifact.copyMenuItem.text=Copy
DataContentViewerArtifact.selectAllMenuItem.text=Select All DataContentViewerArtifact.selectAllMenuItem.text=Select All
DataContentViewerArtifact.pageLabel.text=Result: DataContentViewerArtifact.pageLabel.text=Result:
AdvancedConfigurationDialog.applyButton.text=OK AdvancedConfigurationDialog.applyButton.text=OK
DataContentViewerString.goToPageLabel.text=Go to Page:
DataContentViewerString.goToPageTextField.text=
DataContentViewerHex.goToPageTextField.text= DataContentViewerHex.goToPageTextField.text=
DataContentViewerHex.goToPageLabel.text=Go to Page: DataContentViewerHex.goToPageLabel.text=Go to Page:
DataContentViewerString.languageLabel.toolTipText=
DataContentViewerString.languageLabel.text=Script:
DataContentViewerString.languageCombo.toolTipText=Language to attempt when interpreting (extracting and decoding) strings from binary data
DataResultViewerThumbnail.pageLabel.text=Page: DataResultViewerThumbnail.pageLabel.text=Page:
DataResultViewerThumbnail.pagesLabel.text=Pages: DataResultViewerThumbnail.pagesLabel.text=Pages:
DataResultViewerThumbnail.pagePrevButton.text= DataResultViewerThumbnail.pagePrevButton.text=
@ -115,12 +101,6 @@ DataContentViewerHex.goToPageTextField.err=Invalid page number
DataContentViewerHex.setDataView.errorText=(offset {0}-{1} could not be read) DataContentViewerHex.setDataView.errorText=(offset {0}-{1} could not be read)
DataContentViewerHex.title=Hex DataContentViewerHex.title=Hex
DataContentViewerHex.toolTip=Displays the binary contents of a file as hexidecimal, with bytes that are displayable as ASCII characters on the right. DataContentViewerHex.toolTip=Displays the binary contents of a file as hexidecimal, with bytes that are displayable as ASCII characters on the right.
DataContentViewerString.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0}
DataContentViewerString.goToPageTextField.err=Invalid page number
DataContentViewerString.setDataView.errorText=(offset {0}-{1} could not be read)
DataContentViewerString.setDataView.errorNoText=(offset {0}-{1} contains no text)
DataContentViewerString.title=Strings
DataContentViewerString.toolTip=Displays ASCII and Unicode strings extracted from the file.
DataResultPanel.pleasewaitNodeDisplayName=Please Wait... DataResultPanel.pleasewaitNodeDisplayName=Please Wait...
DataResultViewerTable.illegalArgExc.noChildFromParent=Could not get a child Node from the given parent. DataResultViewerTable.illegalArgExc.noChildFromParent=Could not get a child Node from the given parent.
DataResultViewerTable.illegalArgExc.childWithoutPropertySet=Child Node does not have the regular PropertySet. DataResultViewerTable.illegalArgExc.childWithoutPropertySet=Child Node does not have the regular PropertySet.

View File

@ -8,16 +8,10 @@ OpenIDE-Module-Name=\u4e3b\u8981\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8
DataContentViewerHex.pageLabel.text_1=\u30da\u30fc\u30b8\uff1a DataContentViewerHex.pageLabel.text_1=\u30da\u30fc\u30b8\uff1a
DataContentViewerHex.currentPageLabel.text_1=1 DataContentViewerHex.currentPageLabel.text_1=1
DataContentViewerHex.totalPageLabel.text_1=100 DataContentViewerHex.totalPageLabel.text_1=100
DataContentViewerString.pageLabel.text_1=\u30da\u30fc\u30b8\uff1a
DataContentViewerString.currentPageLabel.text_1=1
DataContentViewerString.totalPageLabel.text_1=100
DataContentViewerHex.pageLabel2.text=\u30da\u30fc\u30b8 DataContentViewerHex.pageLabel2.text=\u30da\u30fc\u30b8
DataContentViewerString.pageLabel2.text=\u30da\u30fc\u30b8
Format_OperatingSystem_Value={0} \u30d0\u30fc\u30b8\u30e7\u30f3 {1} \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 {2} Format_OperatingSystem_Value={0} \u30d0\u30fc\u30b8\u30e7\u30f3 {1} \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 {2}
LBL_Close=\u9589\u3058\u308b LBL_Close=\u9589\u3058\u308b
DataContentViewerString.copyMenuItem.text=\u30b3\u30d4\u30fc
DataContentViewerHex.copyMenuItem.text=\u30b3\u30d4\u30fc DataContentViewerHex.copyMenuItem.text=\u30b3\u30d4\u30fc
DataContentViewerString.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e
DataContentViewerHex.selectAllMenuItem.text=\u5168\u3066\u9078\u629e DataContentViewerHex.selectAllMenuItem.text=\u5168\u3066\u9078\u629e
DataContentViewerArtifact.totalPageLabel.text=100 DataContentViewerArtifact.totalPageLabel.text=100
DataContentViewerArtifact.pageLabel2.text=\u7d50\u679c DataContentViewerArtifact.pageLabel2.text=\u7d50\u679c
@ -26,10 +20,7 @@ DataContentViewerArtifact.copyMenuItem.text=\u30b3\u30d4\u30fc
DataContentViewerArtifact.selectAllMenuItem.text=\u5168\u3066\u9078\u629e DataContentViewerArtifact.selectAllMenuItem.text=\u5168\u3066\u9078\u629e
DataContentViewerArtifact.pageLabel.text=\u7d50\u679c\uff1a DataContentViewerArtifact.pageLabel.text=\u7d50\u679c\uff1a
AdvancedConfigurationDialog.applyButton.text=OK AdvancedConfigurationDialog.applyButton.text=OK
DataContentViewerString.goToPageLabel.text=\u6b21\u306e\u30da\u30fc\u30b8\u3078\u79fb\u52d5\uff1a
DataContentViewerHex.goToPageLabel.text=\u6b21\u306e\u30da\u30fc\u30b8\u3078\u79fb\u52d5\uff1a DataContentViewerHex.goToPageLabel.text=\u6b21\u306e\u30da\u30fc\u30b8\u3078\u79fb\u52d5\uff1a
DataContentViewerString.languageLabel.text=\u30b9\u30af\u30ea\u30d7\u30c8\uff1a
DataContentViewerString.languageCombo.toolTipText=\u30d0\u30a4\u30ca\u30ea\u30b9\u30c8\u30ea\u30f3\u30b0\u306e\u51e6\u7406\uff08\u62bd\u51fa\u304a\u3088\u3073\u30c7\u30b3\u30fc\u30c9\uff09\u306b\u4f7f\u7528\u3059\u308b\u8a00\u8a9e
DataResultViewerThumbnail.pageLabel.text=\u30da\u30fc\u30b8\uff1a DataResultViewerThumbnail.pageLabel.text=\u30da\u30fc\u30b8\uff1a
DataResultViewerThumbnail.pagesLabel.text=\u30da\u30fc\u30b8\uff1a DataResultViewerThumbnail.pagesLabel.text=\u30da\u30fc\u30b8\uff1a
DataResultViewerThumbnail.imagesLabel.text=\u30a4\u30e1\u30fc\u30b8\uff1a DataResultViewerThumbnail.imagesLabel.text=\u30a4\u30e1\u30fc\u30b8\uff1a
@ -46,11 +37,6 @@ DataContentViewerHex.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\
DataContentViewerHex.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09 DataContentViewerHex.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09
DataContentViewerHex.title=HEX DataContentViewerHex.title=HEX
DataContentViewerHex.toolTip=\u30d0\u30a4\u30ca\u30ea\u30b3\u30f3\u30c6\u30f3\u30c4\u3092HEX\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8868\u793a\u3057\u3001ASCII\u3068\u3057\u3066\u8868\u793a\u3067\u304d\u308b\u30d0\u30a4\u30c8\u306f\u53f3\u5074\u306b\u8868\u793a\u3057\u307e\u3059\u3002 DataContentViewerHex.toolTip=\u30d0\u30a4\u30ca\u30ea\u30b3\u30f3\u30c6\u30f3\u30c4\u3092HEX\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8868\u793a\u3057\u3001ASCII\u3068\u3057\u3066\u8868\u793a\u3067\u304d\u308b\u30d0\u30a4\u30c8\u306f\u53f3\u5074\u306b\u8868\u793a\u3057\u307e\u3059\u3002
DataContentViewerString.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u9593\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u6570\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044
DataContentViewerString.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570
DataContentViewerString.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09
DataContentViewerString.title=\u30b9\u30c8\u30ea\u30f3\u30b0
DataContentViewerString.toolTip=\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u62bd\u51fa\u3055\u308c\u305fASCII\u304a\u3088\u3073\u30e6\u30cb\u30b3\u30fc\u30c9\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002
DataResultPanel.pleasewaitNodeDisplayName=\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u2026 DataResultPanel.pleasewaitNodeDisplayName=\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u2026
DataResultViewerTable.firstColLbl=\u540d\u524d DataResultViewerTable.firstColLbl=\u540d\u524d
DataResultViewerTable.illegalArgExc.noChildFromParent=\u6307\u5b9a\u3055\u308c\u305f\u30da\u30a2\u30ec\u30f3\u30c8\u304b\u3089\u30c1\u30e3\u30a4\u30eb\u30c9\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 DataResultViewerTable.illegalArgExc.noChildFromParent=\u6307\u5b9a\u3055\u308c\u305f\u30da\u30a2\u30ec\u30f3\u30c8\u304b\u3089\u30c1\u30e3\u30a4\u30eb\u30c9\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
@ -71,7 +57,6 @@ ProductInformationPanel.propertyUnknown.text=\u4e0d\u660e
ProductInformationPanel.getVMValue.text={0} {1} ProductInformationPanel.getVMValue.text={0} {1}
TableFilterNode.displayName.text=\u540d\u524d TableFilterNode.displayName.text=\u540d\u524d
DataContentViewerHex.ofLabel.text_1=of DataContentViewerHex.ofLabel.text_1=of
DataContentViewerString.ofLabel.text_1=of
DataContentViewerArtifact.ofLabel.text=of DataContentViewerArtifact.ofLabel.text=of
DataContentViewerString.setDataView.errorNoText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306b\u306f\u30c6\u30ad\u30b9\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\uff09 DataContentViewerString.setDataView.errorNoText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306b\u306f\u30c6\u30ad\u30b9\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\uff09
DataResultViewerThumbnail.comboBox.smallThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u5c0f\uff09 DataResultViewerThumbnail.comboBox.smallThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u5c0f\uff09

View File

@ -45,7 +45,6 @@ public class DataContentPanel extends javax.swing.JPanel implements DataContent,
private static Logger logger = Logger.getLogger(DataContentPanel.class.getName()); private static Logger logger = Logger.getLogger(DataContentPanel.class.getName());
private final List<UpdateWrapper> viewers = new ArrayList<>(); private final List<UpdateWrapper> viewers = new ArrayList<>();
;
private Node currentNode; private Node currentNode;
private final boolean isMain; private final boolean isMain;
private boolean listeningToTabbedPane = false; private boolean listeningToTabbedPane = false;

View File

@ -46,9 +46,6 @@ ImageDetailsPanel.imgTotalSizeValue.text=...
ImageDetailsPanel.imgTotalSizeLabel.text=Total Size: ImageDetailsPanel.imgTotalSizeLabel.text=Total Size:
ImageDetailsPanel.imgHashValue.text=... ImageDetailsPanel.imgHashValue.text=...
ImageDetailsPanel.imgHashLabel.text=Hash Value: ImageDetailsPanel.imgHashLabel.text=Hash Value:
ChangeViewAction.menuItem.view=View
ChangeViewAction.menuItem.view.hex=Hex
ChangeViewAction.menuItem.view.string=String
DataResultFilterNode.action.viewFileInDir.text=View File in Directory DataResultFilterNode.action.viewFileInDir.text=View File in Directory
DataResultFilterNode.action.viewSrcFileInDir.text=View Source File in Directory DataResultFilterNode.action.viewSrcFileInDir.text=View Source File in Directory
DataResultFilterNode.action.viewInNewWin.text=View in New Window DataResultFilterNode.action.viewInNewWin.text=View in New Window

View File

@ -78,9 +78,6 @@ ImageDetailsPanel.imgTotalSizeValue.text=...
ImageDetailsPanel.imgTotalSizeLabel.text=Total Size: ImageDetailsPanel.imgTotalSizeLabel.text=Total Size:
ImageDetailsPanel.imgHashValue.text=... ImageDetailsPanel.imgHashValue.text=...
ImageDetailsPanel.imgHashLabel.text=Hash Value: ImageDetailsPanel.imgHashLabel.text=Hash Value:
ChangeViewAction.menuItem.view=View
ChangeViewAction.menuItem.view.hex=Hex
ChangeViewAction.menuItem.view.string=String
DataResultFilterNode.action.viewFileInDir.text=View File in Directory DataResultFilterNode.action.viewFileInDir.text=View File in Directory
DataResultFilterNode.action.viewSrcFileInDir.text=View Source File in Directory DataResultFilterNode.action.viewSrcFileInDir.text=View Source File in Directory
DataResultFilterNode.action.viewInNewWin.text=View in New Window DataResultFilterNode.action.viewInNewWin.text=View in New Window

View File

@ -44,9 +44,6 @@ ImageDetailsPanel.imgTotalSizeValue.text=...
ImageDetailsPanel.imgTotalSizeLabel.text=\u5408\u8a08\u30b5\u30a4\u30ba\uff1a ImageDetailsPanel.imgTotalSizeLabel.text=\u5408\u8a08\u30b5\u30a4\u30ba\uff1a
ImageDetailsPanel.imgHashValue.text=... ImageDetailsPanel.imgHashValue.text=...
ImageDetailsPanel.imgHashLabel.text=\u30cf\u30c3\u30b7\u30e5\u5024\uff1a ImageDetailsPanel.imgHashLabel.text=\u30cf\u30c3\u30b7\u30e5\u5024\uff1a
ChangeViewAction.menuItem.view=\u30d3\u30e5\u30fc
ChangeViewAction.menuItem.view.hex=HEX
ChangeViewAction.menuItem.view.string=\u30b9\u30c8\u30ea\u30f3\u30b0
DataResultFilterNode.action.viewFileInDir.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a DataResultFilterNode.action.viewFileInDir.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a
DataResultFilterNode.action.viewSrcFileInDir.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a DataResultFilterNode.action.viewSrcFileInDir.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a
DataResultFilterNode.action.viewInNewWin.text=\u65b0\u898f\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8868\u793a DataResultFilterNode.action.viewInNewWin.text=\u65b0\u898f\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8868\u793a

View File

@ -1,103 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2014 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.directorytree;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.util.actions.Presenter;
import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent;
import org.sleuthkit.autopsy.corecomponents.DataContentViewerHex;
import org.sleuthkit.autopsy.corecomponents.DataContentViewerString;
/**
* The actions to change between the "Hex View" and "String View".
*
* @author jantonius
*/
class ChangeViewAction extends AbstractAction implements Presenter.Popup {
private int type; // type 1 = hex view, 2 = string view
private Node node;
/**
* the constructor
*/
public ChangeViewAction(String title, int viewType, Node node) {
super(title);
this.type = viewType;
this.node = node;
}
/**
* The action that this class performs. The action is divided into 2 type.
* First if the the type is 1, it will change the active output top
* component to "Hex View". Another one is if the type is 2, it will change
* the active top component to "String View."
*
* @param e the action event
*/
@Override
public void actionPerformed(ActionEvent e) {
DataContentTopComponent dctc = DataContentTopComponent.findInstance();
int totalTabs = dctc.getTabPanels().getTabCount();
// change the output view to hex view
if (type == 1) {
// find the hex view top component
// TopComponent hexWin = WindowManager.getDefault().findTopComponent("HexViewTopComponent"); // Note: HexViewTopComponent = the preffered ID of that top component
// hexWin.requestActive(); // set it to become the active top component
for (int i = 0; i < totalTabs; i++) {
if (dctc.getTabPanels().getComponentAt(i) instanceof DataContentViewerHex) {
dctc.getTabPanels().setSelectedIndex(i);
}
}
}
// change the output view to string view
if (type == 2) {
// find the string view top component
// TopComponent stringWin = WindowManager.getDefault().findTopComponent("StringViewTopComponent"); // Note: StringViewTopComponent = the preffered ID of that top component
// stringWin.requestActive(); // set it to become the active top component
for (int i = 0; i < totalTabs; i++) {
if (dctc.getTabPanels().getComponentAt(i) instanceof DataContentViewerString) {
dctc.getTabPanels().setSelectedIndex(i);
}
}
}
// else do nothing
}
/**
* To create the sub-menu for "Hex View" and "String View".
*
* @return menuItem the menu items
*/
@Override
public JMenuItem getPopupPresenter() {
JMenu item = new JMenu(NbBundle.getMessage(this.getClass(), "ChangeViewAction.menuItem.view"));
item.add(new ChangeViewAction(NbBundle.getMessage(this.getClass(), "ChangeViewAction.menuItem.view.hex"), 1, node));
item.add(new ChangeViewAction(NbBundle.getMessage(this.getClass(), "ChangeViewAction.menuItem.view.string"), 2, node));
return item;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -258,5 +258,16 @@ CreatePortableCasePanel.outputFolderTextField.text=jTextField1
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
CreatePortableCasePanel.jLabel1.text=Export files tagged as: CreatePortableCasePanel.jLabel1.text=Export files tagged as:
CreatePortableCasePanel.jLabel2.text=Select output folder: CreatePortableCasePanel.jLabel2.text=Select output folder:
CreatePortableCasePanel.compressCheckbox.text=Compress case
CreatePortableCasePanel.chunkSizeLabel.text=Split into chunks of size:
CreatePortableCasePanel.errorLabel.text_1=Windows only
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into chunks of size:
PortableCaseTagsListPanel.deselectButton.text=Deselect All
PortableCaseTagsListPanel.selectButton.text=Select All
PortableCaseInterestingItemsListPanel.selectButton.text=Select All
PortableCaseInterestingItemsListPanel.deselectButton.text=Deselect All
ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
PortableCaseTagsListPanel.descLabel.text=Include the following tags:
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:

View File

@ -1,38 +1,50 @@
# {0} - File name
CreatePortableCaseModule.copyContentToPortableCase.copyingFile=Copying file {0}
# {0} - case folder
CreatePortableCaseModule.createCase.caseDirExists=Case folder {0} already exists
CreatePortableCaseModule.createCase.errorCreatingCase=Error creating case
# {0} - folder
CreatePortableCaseModule.createCase.errorCreatingFolder=Error creating folder {0}
CreatePortableCaseModule.createCase.errorStoringMaxIds=Error storing maximum database IDs
CreatePortableCaseModule.generateReport.caseClosed=Current case has been closed
# {0} - tag name
CreatePortableCaseModule.generateReport.copyingArtifacts=Copying artifacts tagged as {0}...
# {0} - tag name
CreatePortableCaseModule.generateReport.copyingFiles=Copying files tagged as {0}...
CreatePortableCaseModule.generateReport.copyingTags=Copying tags...
CreatePortableCaseModule.generateReport.creatingCase=Creating portable case database...
CreatePortableCaseModule.generateReport.errorCopyingArtifacts=Error copying tagged artifacts
CreatePortableCaseModule.generateReport.errorCopyingFiles=Error copying tagged files
CreatePortableCaseModule.generateReport.errorCopyingTags=Error copying tags
# {0} - attribute type name
CreatePortableCaseModule.generateReport.errorLookingUpAttrType=Error looking up attribute type {0}
CreatePortableCaseModule.generateReport.noTagsSelected=No tags selected for export.
# {0} - output folder
CreatePortableCaseModule.generateReport.outputDirDoesNotExist=Output folder {0} does not exist
# {0} - output folder
CreatePortableCaseModule.generateReport.outputDirIsNotDir=Output folder {0} is not a folder
CreatePortableCaseModule.generateReport.verifying=Verifying selected parameters...
CreatePortableCaseModule.getDescription.description=Copies selected tagged items to a new single-user case that will work anywhere
CreatePortableCaseModule.getName.name=Portable Case
CreatePortableCasePanel.error.errorLoadingTags=Error loading tags
CreatePortableCasePanel.error.errorTitle=Error getting tag names for case
CreatePortableCasePanel.error.noOpenCase=There is no case open
OpenIDE-Module-Name=Report OpenIDE-Module-Name=Report
CTL_ReportWizardAction=Run Report CTL_ReportWizardAction=Run Report
ArtifactSelectionDialog.titleLabel.text=Select which artifacts you would like to report on: ArtifactSelectionDialog.titleLabel.text=Select which artifacts you would like to report on:
ArtifactSelectionDialog.okButton.text=OK ArtifactSelectionDialog.okButton.text=OK
PortableCaseInterestingItemsListPanel.error.errorLoadingTags=Error loading interesting item set names
PortableCaseInterestingItemsListPanel.error.errorTitle=Error getting intesting item set names for case
PortableCaseInterestingItemsListPanel.error.noOpenCase=There is no case open
PortableCaseReportModule.compressCase.canceled=Compression canceled by user
PortableCaseReportModule.compressCase.errorCompressingCase=Error compressing case
# {0} - Temp folder path
PortableCaseReportModule.compressCase.errorCreatingTempFolder=Could not create temporary folder {0}
PortableCaseReportModule.compressCase.errorFinding7zip=Could not locate 7-Zip executable
# {0} - File name
PortableCaseReportModule.copyContentToPortableCase.copyingFile=Copying file {0}
# {0} - case folder
PortableCaseReportModule.createCase.caseDirExists=Case folder {0} already exists
PortableCaseReportModule.createCase.errorCreatingCase=Error creating case
# {0} - folder
PortableCaseReportModule.createCase.errorCreatingFolder=Error creating folder {0}
PortableCaseReportModule.createCase.errorStoringMaxIds=Error storing maximum database IDs
PortableCaseReportModule.generateReport.caseClosed=Current case has been closed
PortableCaseReportModule.generateReport.compressingCase=Compressing case...
# {0} - tag name
PortableCaseReportModule.generateReport.copyingArtifacts=Copying artifacts tagged as {0}...
# {0} - tag name
PortableCaseReportModule.generateReport.copyingFiles=Copying files tagged as {0}...
PortableCaseReportModule.generateReport.copyingTags=Copying tags...
PortableCaseReportModule.generateReport.creatingCase=Creating portable case database...
PortableCaseReportModule.generateReport.errorCopyingArtifacts=Error copying tagged artifacts
PortableCaseReportModule.generateReport.errorCopyingFiles=Error copying tagged files
PortableCaseReportModule.generateReport.errorCopyingInterestingFiles=Error copying interesting files
PortableCaseReportModule.generateReport.errorCopyingInterestingResults=Error copying interesting results
PortableCaseReportModule.generateReport.errorCopyingTags=Error copying tags
# {0} - attribute type name
PortableCaseReportModule.generateReport.errorLookingUpAttrType=Error looking up attribute type {0}
PortableCaseReportModule.generateReport.interestingItemError=Error loading intersting items
PortableCaseReportModule.generateReport.noContentToCopy=No interesting files, results, or tagged items to copy
# {0} - output folder
PortableCaseReportModule.generateReport.outputDirDoesNotExist=Output folder {0} does not exist
# {0} - output folder
PortableCaseReportModule.generateReport.outputDirIsNotDir=Output folder {0} is not a folder
PortableCaseReportModule.generateReport.verifying=Verifying selected parameters...
PortableCaseReportModule.getDescription.description=Copies selected items to a new single-user case that can be easily shared
PortableCaseReportModule.getName.name=Portable Case
PortableCaseTagsListPanel.error.errorLoadingTags=Error loading tags
PortableCaseTagsListPanel.error.errorTitle=Error getting tag names for case
PortableCaseTagsListPanel.error.noOpenCase=There is no case open
ReportExcel.exceptionMessage.dataTooLarge=Value is too long to fit into an Excel cell. ReportExcel.exceptionMessage.dataTooLarge=Value is too long to fit into an Excel cell.
ReportExcel.exceptionMessage.errorText=Error showing data into an Excel cell. ReportExcel.exceptionMessage.errorText=Error showing data into an Excel cell.
ReportExcel.writeSummary.caseName=Case Name: ReportExcel.writeSummary.caseName=Case Name:
@ -306,6 +318,18 @@ CreatePortableCasePanel.outputFolderTextField.text=jTextField1
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
CreatePortableCasePanel.jLabel1.text=Export files tagged as: CreatePortableCasePanel.jLabel1.text=Export files tagged as:
CreatePortableCasePanel.jLabel2.text=Select output folder: CreatePortableCasePanel.jLabel2.text=Select output folder:
CreatePortableCasePanel.compressCheckbox.text=Compress case
CreatePortableCasePanel.chunkSizeLabel.text=Split into chunks of size:
CreatePortableCasePanel.errorLabel.text_1=Windows only
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into chunks of size:
PortableCaseTagsListPanel.deselectButton.text=Deselect All
PortableCaseTagsListPanel.selectButton.text=Select All
PortableCaseInterestingItemsListPanel.selectButton.text=Select All
PortableCaseInterestingItemsListPanel.deselectButton.text=Deselect All
ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
PortableCaseTagsListPanel.descLabel.text=Include the following tags:
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:
ReportWizardPortableCaseOptionsVisualPanel.getName.title=Choose Portable Case settings
TableReportGenerator.StatusColumn.Header=Review Status TableReportGenerator.StatusColumn.Header=Review Status

View File

@ -1,159 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Component id="jScrollPane1" max="32767" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="deselectAllButton" linkSize="1" max="32767" attributes="0"/>
<Component id="selectAllButton" linkSize="1" max="32767" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="outputFolderTextField" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="chooseOutputFolderButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="selectAllButton" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="deselectAllButton" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jScrollPane1" pref="132" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="outputFolderTextField" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="chooseOutputFolderButton" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="selectAllButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="CreatePortableCasePanel.selectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[99, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[99, 23]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[99, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectAllButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="deselectAllButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="CreatePortableCasePanel.deselectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deselectAllButtonActionPerformed"/>
</Events>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JList" name="tagNamesListBox">
<Properties>
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JTextField" name="outputFolderTextField">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="CreatePortableCasePanel.outputFolderTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="chooseOutputFolderButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="CreatePortableCasePanel.chooseOutputFolderButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chooseOutputFolderButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="CreatePortableCasePanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="CreatePortableCasePanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Form>

View File

@ -1,329 +0,0 @@
/*
* 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.report;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.ListCellRenderer;
import javax.swing.ListModel;
import javax.swing.event.ListDataListener;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.TagName;
import org.sleuthkit.datamodel.TskCoreException;
/**
*
*/
@NbBundle.Messages({
"CreatePortableCasePanel.error.errorTitle=Error getting tag names for case",
"CreatePortableCasePanel.error.noOpenCase=There is no case open",
"CreatePortableCasePanel.error.errorLoadingTags=Error loading tags",
})
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
class CreatePortableCasePanel extends javax.swing.JPanel {
private static final long serialVersionUID = 1L;
private List<TagName> tagNames;
private final Map<String, Boolean> tagNameSelections = new LinkedHashMap<>();
private final TagNamesListModel tagsNamesListModel = new TagNamesListModel();
private final TagsNamesListCellRenderer tagsNamesRenderer = new TagsNamesListCellRenderer();
/**
* Creates new form CreatePortableCasePanel
*/
public CreatePortableCasePanel() {
initComponents();
customizeComponents();
}
private void customizeComponents() {
populateTagNameComponents();
try {
outputFolderTextField.setText(Case.getCurrentCaseThrows().getReportDirectory());
} catch (NoCurrentCaseException ex) {
Logger.getLogger(CreatePortableCasePanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex);
JOptionPane.showMessageDialog(this, Bundle.CreatePortableCasePanel_error_noOpenCase(), Bundle.CreatePortableCasePanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
}
}
private void populateTagNameComponents() {
// Get the tag names in use for the current case.
try {
tagNames = Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
} catch (TskCoreException ex) {
Logger.getLogger(CreatePortableCasePanel.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex);
JOptionPane.showMessageDialog(this, Bundle.CreatePortableCasePanel_error_errorLoadingTags(), Bundle.CreatePortableCasePanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
} catch (NoCurrentCaseException ex) {
Logger.getLogger(CreatePortableCasePanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex);
JOptionPane.showMessageDialog(this, Bundle.CreatePortableCasePanel_error_noOpenCase(), Bundle.CreatePortableCasePanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
}
// Mark the tag names as unselected. Note that tagNameSelections is a
// LinkedHashMap so that order is preserved and the tagNames and tagNameSelections
// containers are "parallel" containers.
for (TagName tagName : tagNames) {
tagNameSelections.put(tagName.getDisplayName(), Boolean.FALSE);
}
// Set up the tag names JList component to be a collection of check boxes
// for selecting tag names. The mouse click listener updates tagNameSelections
// to reflect user choices.
tagNamesListBox.setModel(tagsNamesListModel);
tagNamesListBox.setCellRenderer(tagsNamesRenderer);
tagNamesListBox.setVisibleRowCount(-1);
tagNamesListBox.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent evt) {
JList<?> list = (JList) evt.getSource();
int index = list.locationToIndex(evt.getPoint());
if (index > -1) {
String value = tagsNamesListModel.getElementAt(index);
tagNameSelections.put(value, !tagNameSelections.get(value));
list.repaint();
}
}
});
}
/**
* Gets the subset of the tag names in use selected by the user.
*
* @return A list, possibly empty, of TagName data transfer objects (DTOs).
*/
List<TagName> getSelectedTagNames() {
List<TagName> selectedTagNames = new ArrayList<>();
for (TagName tagName : tagNames) {
if (tagNameSelections.get(tagName.getDisplayName())) {
selectedTagNames.add(tagName);
}
}
return selectedTagNames;
}
/**
* Get the output folder
*
* @return The output folder for the portable case
*/
String getOutputFolder() {
return outputFolderTextField.getText();
}
// This class is a list model for the tag names JList component.
private class TagNamesListModel implements ListModel<String> {
@Override
public int getSize() {
return tagNames.size();
}
@Override
public String getElementAt(int index) {
return tagNames.get(index).getDisplayName();
}
@Override
public void addListDataListener(ListDataListener l) {
}
@Override
public void removeListDataListener(ListDataListener l) {
}
}
// This class renders the items in the tag names JList component as JCheckbox components.
private class TagsNamesListCellRenderer extends JCheckBox implements ListCellRenderer<String> {
private static final long serialVersionUID = 1L;
@Override
public Component getListCellRendererComponent(JList<? extends String> list, String value, int index, boolean isSelected, boolean cellHasFocus) {
if (value != null) {
setEnabled(list.isEnabled());
setSelected(tagNameSelections.get(value));
setFont(list.getFont());
setBackground(list.getBackground());
setForeground(list.getForeground());
setText(value);
return this;
}
return new JLabel();
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
selectAllButton = new javax.swing.JButton();
deselectAllButton = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
tagNamesListBox = new javax.swing.JList<>();
outputFolderTextField = new javax.swing.JTextField();
chooseOutputFolderButton = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
org.openide.awt.Mnemonics.setLocalizedText(selectAllButton, org.openide.util.NbBundle.getMessage(CreatePortableCasePanel.class, "CreatePortableCasePanel.selectAllButton.text")); // NOI18N
selectAllButton.setMaximumSize(new java.awt.Dimension(99, 23));
selectAllButton.setMinimumSize(new java.awt.Dimension(99, 23));
selectAllButton.setPreferredSize(new java.awt.Dimension(99, 23));
selectAllButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
selectAllButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(deselectAllButton, org.openide.util.NbBundle.getMessage(CreatePortableCasePanel.class, "CreatePortableCasePanel.deselectAllButton.text")); // NOI18N
deselectAllButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deselectAllButtonActionPerformed(evt);
}
});
jScrollPane1.setViewportView(tagNamesListBox);
outputFolderTextField.setText(org.openide.util.NbBundle.getMessage(CreatePortableCasePanel.class, "CreatePortableCasePanel.outputFolderTextField.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(chooseOutputFolderButton, org.openide.util.NbBundle.getMessage(CreatePortableCasePanel.class, "CreatePortableCasePanel.chooseOutputFolderButton.text")); // NOI18N
chooseOutputFolderButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chooseOutputFolderButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CreatePortableCasePanel.class, "CreatePortableCasePanel.jLabel1.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CreatePortableCasePanel.class, "CreatePortableCasePanel.jLabel2.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jScrollPane1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(deselectAllButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(selectAllButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(layout.createSequentialGroup()
.addComponent(outputFolderTextField)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chooseOutputFolderButton)))
.addContainerGap())
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deselectAllButton, selectAllButton});
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(selectAllButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(deselectAllButton))
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(outputFolderTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(chooseOutputFolderButton))
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
private void selectAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectAllButtonActionPerformed
for (TagName tagName : tagNames) {
tagNameSelections.put(tagName.getDisplayName(), Boolean.TRUE);
}
tagNamesListBox.repaint();
}//GEN-LAST:event_selectAllButtonActionPerformed
private void deselectAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deselectAllButtonActionPerformed
for (TagName tagName : tagNames) {
tagNameSelections.put(tagName.getDisplayName(), Boolean.FALSE);
}
tagNamesListBox.repaint();
}//GEN-LAST:event_deselectAllButtonActionPerformed
private void chooseOutputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chooseOutputFolderButtonActionPerformed
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
File currentSelection = new File(outputFolderTextField.getText());
if (currentSelection.exists()) {
fileChooser.setCurrentDirectory(currentSelection);
}
int result = fileChooser.showOpenDialog(this);
if (result == JFileChooser.APPROVE_OPTION) {
String outputDir = fileChooser.getSelectedFile().getAbsolutePath();
outputFolderTextField.setText(outputDir);
}
}//GEN-LAST:event_chooseOutputFolderButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton chooseOutputFolderButton;
private javax.swing.JButton deselectAllButton;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextField outputFolderTextField;
private javax.swing.JButton selectAllButton;
private javax.swing.JList<String> tagNamesListBox;
// End of variables declaration//GEN-END:variables
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" pref="0" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="selectButton" min="-2" pref="96" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="deselectButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="8" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="179" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="selectButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="deselectButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JList" name="setNamesListBox">
<Properties>
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="descLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseInterestingItemsListPanel.descLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="selectButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseInterestingItemsListPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[87, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[87, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="deselectButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseInterestingItemsListPanel.deselectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deselectButtonActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@ -0,0 +1,345 @@
/*
* 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.report;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.ListCellRenderer;
import javax.swing.ListModel;
import javax.swing.event.ListDataListener;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.CaseDbAccessManager;
import org.sleuthkit.datamodel.TskCoreException;
/**
* The subpanel showing the interesting item sets
*/
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
private List<String> setNames;
private final Map<String, Boolean> setNameSelections = new LinkedHashMap<>();
private final SetNamesListModel setNamesListModel = new SetNamesListModel();
private final SetNamesListCellRenderer setNamesRenderer = new SetNamesListCellRenderer();
private Map<String, Long> setCounts;
private final ReportWizardPortableCaseOptionsPanel wizPanel;
private final PortableCaseReportModule.PortableCaseOptions options;
/**
* Creates new form PortableCaseListPanel
*/
PortableCaseInterestingItemsListPanel(ReportWizardPortableCaseOptionsPanel wizPanel, PortableCaseReportModule.PortableCaseOptions options) {
this.wizPanel = wizPanel;
this.options = options;
initComponents();
customizeComponents();
}
@NbBundle.Messages({
"PortableCaseInterestingItemsListPanel.error.errorTitle=Error getting intesting item set names for case",
"PortableCaseInterestingItemsListPanel.error.noOpenCase=There is no case open",
"PortableCaseInterestingItemsListPanel.error.errorLoadingTags=Error loading interesting item set names",
})
private void customizeComponents() {
// Get the set names in use for the current case.
setNames = new ArrayList<>();
try {
// Get all SET_NAMEs from interesting item artifacts
String innerSelect = "SELECT (value_text) AS set_name FROM blackboard_attributes WHERE (artifact_type_id = '" +
BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID() + "' OR artifact_type_id = '" +
BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID() + "') AND attribute_type_id = '" +
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID() + "'"; // NON-NLS
// Get the count of each SET_NAME
String query = "set_name, count(1) AS set_count FROM (" + innerSelect + ") set_names GROUP BY set_name"; // NON-NLS
GetInterestingItemSetNamesCallback callback = new GetInterestingItemSetNamesCallback();
Case.getCurrentCaseThrows().getSleuthkitCase().getCaseDbAccessManager().select(query, callback);
setCounts = callback.getSetCountMap();
setNames.addAll(setCounts.keySet());
} catch (TskCoreException ex) {
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Failed to get interesting item set names", ex); // NON-NLS
JOptionPane.showMessageDialog(this, Bundle.PortableCaseInterestingItemsListPanel_error_errorLoadingTags(), Bundle.PortableCaseInterestingItemsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
} catch (NoCurrentCaseException ex) {
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
JOptionPane.showMessageDialog(this, Bundle.PortableCaseInterestingItemsListPanel_error_noOpenCase(), Bundle.PortableCaseInterestingItemsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
}
Collections.sort(setNames);
// Mark the set names as unselected. Note that setNameSelections is a
// LinkedHashMap so that order is preserved and the setNames and setNameSelections
// containers are "parallel" containers.
for (String setName : setNames) {
setNameSelections.put(setName, Boolean.FALSE);
}
// Set up the tag names JList component to be a collection of check boxes
// for selecting tag names. The mouse click listener updates setNameSelections
// to reflect user choices.
setNamesListBox.setModel(setNamesListModel);
setNamesListBox.setCellRenderer(setNamesRenderer);
setNamesListBox.setVisibleRowCount(-1);
setNamesListBox.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent evt) {
JList<?> list = (JList) evt.getSource();
int index = list.locationToIndex(evt.getPoint());
if (index > -1) {
String value = setNamesListModel.getElementAt(index);
setNameSelections.put(value, !setNameSelections.get(value));
list.repaint();
updateSetNameList();
}
}
});
}
/**
* Save the current selections and enabled/disable the finish button as needed.
*/
private void updateSetNameList() {
options.updateSetNames(getSelectedSetNames());
wizPanel.setFinish(options.isValid());
}
/**
* This class is a list model for the set names JList component.
*/
private class SetNamesListModel implements ListModel<String> {
@Override
public int getSize() {
return setNames.size();
}
@Override
public String getElementAt(int index) {
return setNames.get(index);
}
@Override
public void addListDataListener(ListDataListener l) {
// Nothing to do
}
@Override
public void removeListDataListener(ListDataListener l) {
// Nothing to do
}
}
/**
* This class renders the items in the set names JList component as JCheckbox components.
*/
private class SetNamesListCellRenderer extends JCheckBox implements ListCellRenderer<String> {
private static final long serialVersionUID = 1L;
@Override
public Component getListCellRendererComponent(JList<? extends String> list, String value, int index, boolean isSelected, boolean cellHasFocus) {
if (value != null) {
setEnabled(list.isEnabled());
setSelected(setNameSelections.get(value));
setFont(list.getFont());
setBackground(list.getBackground());
setForeground(list.getForeground());
setText(value + " (" + setCounts.get(value) + ")"); // NON-NLS
return this;
}
return new JLabel();
}
}
/**
* Gets the subset of the interesting item set names in use selected by the user.
*
* @return A list, possibly empty, of String data transfer objects (DTOs).
*/
private List<String> getSelectedSetNames() {
List<String> selectedSetNames = new ArrayList<>();
for (String setName : setNames) {
if (setNameSelections.get(setName)) {
selectedSetNames.add(setName);
}
}
return selectedSetNames;
}
/**
* Processes the result sets from the interesting item set name query.
*/
private static class GetInterestingItemSetNamesCallback implements CaseDbAccessManager.CaseDbAccessQueryCallback {
private static final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(GetInterestingItemSetNamesCallback.class.getName());
private final Map<String, Long> setCounts = new HashMap<>();
@Override
public void process(ResultSet rs) {
try {
while (rs.next()) {
try {
Long setCount = rs.getLong("set_count"); // NON-NLS
String setName = rs.getString("set_name"); // NON-NLS
setCounts.put(setName, setCount);
} catch (SQLException ex) {
logger.log(Level.WARNING, "Unable to get data_source_obj_id or value from result set", ex); // NON-NLS
}
}
} catch (SQLException ex) {
logger.log(Level.WARNING, "Failed to get next result for values by datasource", ex); // NON-NLS
}
}
/**
* Gets the counts for each interesting items set
*
* @return A map from each set name to the number of items in it
*/
Map<String, Long> getSetCountMap() {
return setCounts;
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
setNamesListBox = new javax.swing.JList<>();
descLabel = new javax.swing.JLabel();
selectButton = new javax.swing.JButton();
deselectButton = new javax.swing.JButton();
jScrollPane1.setViewportView(setNamesListBox);
org.openide.awt.Mnemonics.setLocalizedText(descLabel, org.openide.util.NbBundle.getMessage(PortableCaseInterestingItemsListPanel.class, "PortableCaseInterestingItemsListPanel.descLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(selectButton, org.openide.util.NbBundle.getMessage(PortableCaseInterestingItemsListPanel.class, "PortableCaseInterestingItemsListPanel.selectButton.text")); // NOI18N
selectButton.setMaximumSize(new java.awt.Dimension(87, 23));
selectButton.setMinimumSize(new java.awt.Dimension(87, 23));
selectButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
selectButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(deselectButton, org.openide.util.NbBundle.getMessage(PortableCaseInterestingItemsListPanel.class, "PortableCaseInterestingItemsListPanel.deselectButton.text")); // NOI18N
deselectButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deselectButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(descLabel)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(deselectButton)))
.addGap(0, 8, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(descLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(deselectButton)))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
private void deselectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deselectButtonActionPerformed
for (String setName : setNames) {
setNameSelections.put(setName, Boolean.FALSE);
}
updateSetNameList();
setNamesListBox.repaint();
}//GEN-LAST:event_deselectButtonActionPerformed
private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
for (String setName : setNames) {
setNameSelections.put(setName, Boolean.TRUE);
}
updateSetNameList();
setNamesListBox.repaint();
}//GEN-LAST:event_selectButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel descLabel;
private javax.swing.JButton deselectButton;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JButton selectButton;
private javax.swing.JList<String> setNamesListBox;
// End of variables declaration//GEN-END:variables
}

View File

@ -18,10 +18,10 @@
*/ */
package org.sleuthkit.autopsy.report; package org.sleuthkit.autopsy.report;
import org.openide.util.lookup.ServiceProvider;
import javax.swing.JPanel;
import java.util.logging.Level; import java.util.logging.Level;
import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.InputStreamReader;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -31,12 +31,15 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.openide.modules.InstalledFileLocator;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.FileUtil; import org.sleuthkit.autopsy.coreutils.FileUtil;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.datamodel.ContentUtils; import org.sleuthkit.autopsy.datamodel.ContentUtils;
import org.sleuthkit.autopsy.datamodel.utils.FileTypeUtils.FileTypeCategory; import org.sleuthkit.autopsy.datamodel.utils.FileTypeUtils.FileTypeCategory;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
@ -61,13 +64,12 @@ import org.sleuthkit.datamodel.VolumeSystem;
/** /**
* Creates a portable case from tagged files * Creates a portable case from tagged files
*/ */
@ServiceProvider(service = GeneralReportModule.class) class PortableCaseReportModule implements ReportModule {
public class CreatePortableCaseModule implements GeneralReportModule { private static final Logger logger = Logger.getLogger(PortableCaseReportModule.class.getName());
private static final Logger logger = Logger.getLogger(CreatePortableCaseModule.class.getName()); private static final String FILE_FOLDER_NAME = "PortableCaseFiles"; // NON-NLS
private static final String FILE_FOLDER_NAME = "PortableCaseFiles"; private static final String UNKNOWN_FILE_TYPE_FOLDER = "Other"; // NON-NLS
private static final String UNKNOWN_FILE_TYPE_FOLDER = "Other"; private static final String MAX_ID_TABLE_NAME = "portable_case_max_ids"; // NON-NLS
private static final String MAX_ID_TABLE_NAME = "portable_case_max_ids"; private PortableCaseOptions options;
private CreatePortableCasePanel configPanel;
// These are the types for the exported file subfolders // These are the types for the exported file subfolders
private static final List<FileTypeCategory> FILE_TYPE_CATEGORIES = Arrays.asList(FileTypeCategory.AUDIO, FileTypeCategory.DOCUMENTS, private static final List<FileTypeCategory> FILE_TYPE_CATEGORIES = Arrays.asList(FileTypeCategory.AUDIO, FileTypeCategory.DOCUMENTS,
@ -75,6 +77,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
private Case currentCase = null; private Case currentCase = null;
private SleuthkitCase portableSkCase = null; private SleuthkitCase portableSkCase = null;
private final String caseName;
private File caseFolder = null; private File caseFolder = null;
private File copiedFilesFolder = null; private File copiedFilesFolder = null;
@ -96,29 +99,41 @@ public class CreatePortableCaseModule implements GeneralReportModule {
// Map of old artifact ID to new artifact // Map of old artifact ID to new artifact
private final Map<Long, BlackboardArtifact> oldArtifactIdToNewArtifact = new HashMap<>(); private final Map<Long, BlackboardArtifact> oldArtifactIdToNewArtifact = new HashMap<>();
public CreatePortableCaseModule() { PortableCaseReportModule() {
// Nothing to do here caseName = Case.getCurrentCase().getDisplayName() + " (Portable)"; // NON-NLS
} }
@NbBundle.Messages({ @NbBundle.Messages({
"CreatePortableCaseModule.getName.name=Portable Case" "PortableCaseReportModule.getName.name=Portable Case"
}) })
@Override @Override
public String getName() { public String getName() {
return Bundle.CreatePortableCaseModule_getName_name(); return Bundle.PortableCaseReportModule_getName_name();
} }
@NbBundle.Messages({ @NbBundle.Messages({
"CreatePortableCaseModule.getDescription.description=Copies selected tagged items to a new single-user case that will work anywhere" "PortableCaseReportModule.getDescription.description=Copies selected items to a new single-user case that can be easily shared"
}) })
@Override @Override
public String getDescription() { public String getDescription() {
return Bundle.CreatePortableCaseModule_getDescription_description(); return Bundle.PortableCaseReportModule_getDescription_description();
} }
@Override @Override
public String getRelativeFilePath() { public String getRelativeFilePath() {
return ""; return caseName;
}
/**
* Convenience method for handling cancellation
*
* @param progressPanel The report progress panel
*/
private void handleCancellation(ReportProgressPanel progressPanel) {
logger.log(Level.INFO, "Portable case creation canceled by user"); // NON-NLS
progressPanel.setIndeterminate(false);
progressPanel.complete(ReportProgressPanel.ReportStatus.CANCELED);
cleanup();
} }
/** /**
@ -144,52 +159,50 @@ public class CreatePortableCaseModule implements GeneralReportModule {
} }
@NbBundle.Messages({ @NbBundle.Messages({
"CreatePortableCaseModule.generateReport.verifying=Verifying selected parameters...", "PortableCaseReportModule.generateReport.verifying=Verifying selected parameters...",
"CreatePortableCaseModule.generateReport.creatingCase=Creating portable case database...", "PortableCaseReportModule.generateReport.creatingCase=Creating portable case database...",
"CreatePortableCaseModule.generateReport.copyingTags=Copying tags...", "PortableCaseReportModule.generateReport.copyingTags=Copying tags...",
"# {0} - tag name", "# {0} - tag name",
"CreatePortableCaseModule.generateReport.copyingFiles=Copying files tagged as {0}...", "PortableCaseReportModule.generateReport.copyingFiles=Copying files tagged as {0}...",
"# {0} - tag name", "# {0} - tag name",
"CreatePortableCaseModule.generateReport.copyingArtifacts=Copying artifacts tagged as {0}...", "PortableCaseReportModule.generateReport.copyingArtifacts=Copying artifacts tagged as {0}...",
"# {0} - output folder", "# {0} - output folder",
"CreatePortableCaseModule.generateReport.outputDirDoesNotExist=Output folder {0} does not exist", "PortableCaseReportModule.generateReport.outputDirDoesNotExist=Output folder {0} does not exist",
"# {0} - output folder", "# {0} - output folder",
"CreatePortableCaseModule.generateReport.outputDirIsNotDir=Output folder {0} is not a folder", "PortableCaseReportModule.generateReport.outputDirIsNotDir=Output folder {0} is not a folder",
"CreatePortableCaseModule.generateReport.noTagsSelected=No tags selected for export.", "PortableCaseReportModule.generateReport.caseClosed=Current case has been closed",
"CreatePortableCaseModule.generateReport.caseClosed=Current case has been closed", "PortableCaseReportModule.generateReport.interestingItemError=Error loading intersting items",
"CreatePortableCaseModule.generateReport.errorCopyingTags=Error copying tags", "PortableCaseReportModule.generateReport.noContentToCopy=No interesting files, results, or tagged items to copy",
"CreatePortableCaseModule.generateReport.errorCopyingFiles=Error copying tagged files", "PortableCaseReportModule.generateReport.errorCopyingTags=Error copying tags",
"CreatePortableCaseModule.generateReport.errorCopyingArtifacts=Error copying tagged artifacts", "PortableCaseReportModule.generateReport.errorCopyingFiles=Error copying tagged files",
"PortableCaseReportModule.generateReport.errorCopyingArtifacts=Error copying tagged artifacts",
"PortableCaseReportModule.generateReport.errorCopyingInterestingFiles=Error copying interesting files",
"PortableCaseReportModule.generateReport.errorCopyingInterestingResults=Error copying interesting results",
"# {0} - attribute type name", "# {0} - attribute type name",
"CreatePortableCaseModule.generateReport.errorLookingUpAttrType=Error looking up attribute type {0}", "PortableCaseReportModule.generateReport.errorLookingUpAttrType=Error looking up attribute type {0}",
"PortableCaseReportModule.generateReport.compressingCase=Compressing case...",
}) })
@Override
public void generateReport(String reportPath, ReportProgressPanel progressPanel) { void generateReport(String reportPath, PortableCaseOptions options, ReportProgressPanel progressPanel) {
this.options = options;
progressPanel.setIndeterminate(true); progressPanel.setIndeterminate(true);
progressPanel.start(); progressPanel.start();
progressPanel.updateStatusLabel(Bundle.CreatePortableCaseModule_generateReport_verifying()); progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_verifying());
// Clear out any old values // Clear out any old values
cleanup(); cleanup();
// Validate the input parameters // Validate the input parameters
File outputDir = new File(configPanel.getOutputFolder()); File outputDir = new File(reportPath);
if (! outputDir.exists()) { if (! outputDir.exists()) {
handleError("Output folder " + outputDir.toString() + " does not exist", handleError("Output folder " + outputDir.toString() + " does not exist",
Bundle.CreatePortableCaseModule_generateReport_outputDirDoesNotExist(outputDir.toString()), null, progressPanel); Bundle.PortableCaseReportModule_generateReport_outputDirDoesNotExist(outputDir.toString()), null, progressPanel); // NON-NLS
return; return;
} }
if (! outputDir.isDirectory()) { if (! outputDir.isDirectory()) {
handleError("Output folder " + outputDir.toString() + " is not a folder", handleError("Output folder " + outputDir.toString() + " is not a folder",
Bundle.CreatePortableCaseModule_generateReport_outputDirIsNotDir(outputDir.toString()), null, progressPanel); Bundle.PortableCaseReportModule_generateReport_outputDirIsNotDir(outputDir.toString()), null, progressPanel); // NON-NLS
return;
}
List<TagName> tagNames = configPanel.getSelectedTagNames();
if (tagNames.isEmpty()) {
handleError("No tags selected for export",
Bundle.CreatePortableCaseModule_generateReport_noTagsSelected(), null, progressPanel);
return; return;
} }
@ -198,14 +211,22 @@ public class CreatePortableCaseModule implements GeneralReportModule {
currentCase = Case.getCurrentCaseThrows(); currentCase = Case.getCurrentCaseThrows();
} catch (NoCurrentCaseException ex) { } catch (NoCurrentCaseException ex) {
handleError("Current case has been closed", handleError("Current case has been closed",
Bundle.CreatePortableCaseModule_generateReport_caseClosed(), null, progressPanel); Bundle.PortableCaseReportModule_generateReport_caseClosed(), null, progressPanel); // NON-NLS
return; return;
} }
// Check that there will be something to copy
List<TagName> tagNames = options.getSelectedTagNames();
List<String> setNames = options.getSelectedSetNames();
if (tagNames.isEmpty() && setNames.isEmpty()) {
handleError("No content to copy",
Bundle.PortableCaseReportModule_generateReport_noContentToCopy(), null, progressPanel); // NON-NLS
return;
}
// Create the case. // Create the case.
// portableSkCase and caseFolder will be set here. // portableSkCase and caseFolder will be set here.
progressPanel.updateStatusLabel(Bundle.CreatePortableCaseModule_generateReport_creatingCase()); progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_creatingCase());
createCase(outputDir, progressPanel); createCase(outputDir, progressPanel);
if (portableSkCase == null) { if (portableSkCase == null) {
// The error has already been handled // The error has already been handled
@ -214,19 +235,19 @@ public class CreatePortableCaseModule implements GeneralReportModule {
// Check for cancellation // Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) { if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
cleanup(); handleCancellation(progressPanel);
return; return;
} }
// Copy the selected tags // Copy the selected tags
progressPanel.updateStatusLabel(Bundle.CreatePortableCaseModule_generateReport_copyingTags()); progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_copyingTags());
try { try {
for(TagName tagName:tagNames) { for(TagName tagName:tagNames) {
TagName newTagName = portableSkCase.addOrUpdateTagName(tagName.getDisplayName(), tagName.getDescription(), tagName.getColor(), tagName.getKnownStatus()); TagName newTagName = portableSkCase.addOrUpdateTagName(tagName.getDisplayName(), tagName.getDescription(), tagName.getColor(), tagName.getKnownStatus());
oldTagNameToNewTagName.put(tagName, newTagName); oldTagNameToNewTagName.put(tagName, newTagName);
} }
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
handleError("Error copying tags", Bundle.CreatePortableCaseModule_generateReport_errorCopyingTags(), ex, progressPanel); handleError("Error copying tags", Bundle.PortableCaseReportModule_generateReport_errorCopyingTags(), ex, progressPanel); // NON-NLS
return; return;
} }
@ -239,8 +260,8 @@ public class CreatePortableCaseModule implements GeneralReportModule {
oldAttrTypeIdToNewAttrType.put(type.getTypeID(), portableSkCase.getAttributeType(type.getLabel())); oldAttrTypeIdToNewAttrType.put(type.getTypeID(), portableSkCase.getAttributeType(type.getLabel()));
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
handleError("Error looking up attribute name " + type.getLabel(), handleError("Error looking up attribute name " + type.getLabel(),
Bundle.CreatePortableCaseModule_generateReport_errorLookingUpAttrType(type.getLabel()), Bundle.PortableCaseReportModule_generateReport_errorLookingUpAttrType(type.getLabel()),
ex, progressPanel); ex, progressPanel); // NON-NLS
} }
} }
@ -249,13 +270,20 @@ public class CreatePortableCaseModule implements GeneralReportModule {
for(TagName tagName:tagNames) { for(TagName tagName:tagNames) {
// Check for cancellation // Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) { if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return; return;
} }
progressPanel.updateStatusLabel(Bundle.CreatePortableCaseModule_generateReport_copyingFiles(tagName.getDisplayName())); progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_copyingFiles(tagName.getDisplayName()));
addFilesToPortableCase(tagName, progressPanel); addFilesToPortableCase(tagName, progressPanel);
// Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return;
}
} }
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
handleError("Error copying tagged files", Bundle.CreatePortableCaseModule_generateReport_errorCopyingFiles(), ex, progressPanel); handleError("Error copying tagged files", Bundle.PortableCaseReportModule_generateReport_errorCopyingFiles(), ex, progressPanel); // NON-NLS
return; return;
} }
@ -264,16 +292,87 @@ public class CreatePortableCaseModule implements GeneralReportModule {
for(TagName tagName:tagNames) { for(TagName tagName:tagNames) {
// Check for cancellation // Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) { if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return; return;
} }
progressPanel.updateStatusLabel(Bundle.CreatePortableCaseModule_generateReport_copyingArtifacts(tagName.getDisplayName())); progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_copyingArtifacts(tagName.getDisplayName()));
addArtifactsToPortableCase(tagName, progressPanel); addArtifactsToPortableCase(tagName, progressPanel);
// Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return;
}
} }
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
handleError("Error copying tagged artifacts", Bundle.CreatePortableCaseModule_generateReport_errorCopyingArtifacts(), ex, progressPanel); handleError("Error copying tagged artifacts", Bundle.PortableCaseReportModule_generateReport_errorCopyingArtifacts(), ex, progressPanel); // NON-NLS
return; return;
} }
// Copy interesting files and results
if (! setNames.isEmpty()) {
try {
List<BlackboardArtifact> interestingFiles = currentCase.getSleuthkitCase().getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT);
for (BlackboardArtifact art:interestingFiles) {
// Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return;
}
BlackboardAttribute setAttr = art.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME));
if (setNames.contains(setAttr.getValueString())) {
copyContentToPortableCase(art, progressPanel);
}
}
} catch (TskCoreException ex) {
handleError("Error copying interesting files", Bundle.PortableCaseReportModule_generateReport_errorCopyingInterestingFiles(), ex, progressPanel); // NON-NLS
return;
}
try {
List<BlackboardArtifact> interestingResults = currentCase.getSleuthkitCase().getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT);
for (BlackboardArtifact art:interestingResults) {
// Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return;
}
BlackboardAttribute setAttr = art.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME));
if (setNames.contains(setAttr.getValueString())) {
copyContentToPortableCase(art, progressPanel);
}
}
} catch (TskCoreException ex) {
handleError("Error copying interesting results", Bundle.PortableCaseReportModule_generateReport_errorCopyingInterestingResults(), ex, progressPanel); // NON-NLS
return;
}
}
// Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return;
}
// Compress the case (if desired)
if (options.shouldCompress()) {
progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_compressingCase());
boolean success = compressCase(progressPanel);
// Check for cancellation
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
handleCancellation(progressPanel);
return;
}
if (! success) {
// Errors have been handled already
return;
}
}
// Close the case connections and clear out the maps // Close the case connections and clear out the maps
cleanup(); cleanup();
@ -290,21 +389,20 @@ public class CreatePortableCaseModule implements GeneralReportModule {
*/ */
@NbBundle.Messages({ @NbBundle.Messages({
"# {0} - case folder", "# {0} - case folder",
"CreatePortableCaseModule.createCase.caseDirExists=Case folder {0} already exists", "PortableCaseReportModule.createCase.caseDirExists=Case folder {0} already exists",
"CreatePortableCaseModule.createCase.errorCreatingCase=Error creating case", "PortableCaseReportModule.createCase.errorCreatingCase=Error creating case",
"# {0} - folder", "# {0} - folder",
"CreatePortableCaseModule.createCase.errorCreatingFolder=Error creating folder {0}", "PortableCaseReportModule.createCase.errorCreatingFolder=Error creating folder {0}",
"CreatePortableCaseModule.createCase.errorStoringMaxIds=Error storing maximum database IDs", "PortableCaseReportModule.createCase.errorStoringMaxIds=Error storing maximum database IDs",
}) })
private void createCase(File outputDir, ReportProgressPanel progressPanel) { private void createCase(File outputDir, ReportProgressPanel progressPanel) {
// Create the case folder // Create the case folder
String caseName = currentCase.getDisplayName() + " (Portable)";
caseFolder = Paths.get(outputDir.toString(), caseName).toFile(); caseFolder = Paths.get(outputDir.toString(), caseName).toFile();
if (caseFolder.exists()) { if (caseFolder.exists()) {
handleError("Case folder " + caseFolder.toString() + " already exists", handleError("Case folder " + caseFolder.toString() + " already exists",
Bundle.CreatePortableCaseModule_createCase_caseDirExists(caseFolder.toString()), null, progressPanel); Bundle.PortableCaseReportModule_createCase_caseDirExists(caseFolder.toString()), null, progressPanel); // NON-NLS
return; return;
} }
@ -313,7 +411,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
portableSkCase = currentCase.createPortableCase(caseName, caseFolder); portableSkCase = currentCase.createPortableCase(caseName, caseFolder);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
handleError("Error creating case " + caseName + " in folder " + caseFolder.toString(), handleError("Error creating case " + caseName + " in folder " + caseFolder.toString(),
Bundle.CreatePortableCaseModule_createCase_errorCreatingCase(), ex, progressPanel); Bundle.PortableCaseReportModule_createCase_errorCreatingCase(), ex, progressPanel); // NON-NLS
return; return;
} }
@ -322,7 +420,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
saveHighestIds(); saveHighestIds();
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
handleError("Error storing maximum database IDs", handleError("Error storing maximum database IDs",
Bundle.CreatePortableCaseModule_createCase_errorStoringMaxIds(), ex, progressPanel); Bundle.PortableCaseReportModule_createCase_errorStoringMaxIds(), ex, progressPanel); // NON-NLS
return; return;
} }
@ -330,7 +428,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
copiedFilesFolder = Paths.get(caseFolder.toString(), FILE_FOLDER_NAME).toFile(); copiedFilesFolder = Paths.get(caseFolder.toString(), FILE_FOLDER_NAME).toFile();
if (! copiedFilesFolder.mkdir()) { if (! copiedFilesFolder.mkdir()) {
handleError("Error creating folder " + copiedFilesFolder.toString(), handleError("Error creating folder " + copiedFilesFolder.toString(),
Bundle.CreatePortableCaseModule_createCase_errorCreatingFolder(copiedFilesFolder.toString()), null, progressPanel); Bundle.PortableCaseReportModule_createCase_errorCreatingFolder(copiedFilesFolder.toString()), null, progressPanel); // NON-NLS
return; return;
} }
@ -339,14 +437,14 @@ public class CreatePortableCaseModule implements GeneralReportModule {
File subFolder = Paths.get(copiedFilesFolder.toString(), cat.getDisplayName()).toFile(); File subFolder = Paths.get(copiedFilesFolder.toString(), cat.getDisplayName()).toFile();
if (! subFolder.mkdir()) { if (! subFolder.mkdir()) {
handleError("Error creating folder " + subFolder.toString(), handleError("Error creating folder " + subFolder.toString(),
Bundle.CreatePortableCaseModule_createCase_errorCreatingFolder(subFolder.toString()), null, progressPanel); Bundle.PortableCaseReportModule_createCase_errorCreatingFolder(subFolder.toString()), null, progressPanel); // NON-NLS
return; return;
} }
} }
File unknownTypeFolder = Paths.get(copiedFilesFolder.toString(), UNKNOWN_FILE_TYPE_FOLDER).toFile(); File unknownTypeFolder = Paths.get(copiedFilesFolder.toString(), UNKNOWN_FILE_TYPE_FOLDER).toFile();
if (! unknownTypeFolder.mkdir()) { if (! unknownTypeFolder.mkdir()) {
handleError("Error creating folder " + unknownTypeFolder.toString(), handleError("Error creating folder " + unknownTypeFolder.toString(),
Bundle.CreatePortableCaseModule_createCase_errorCreatingFolder(unknownTypeFolder.toString()), null, progressPanel); Bundle.PortableCaseReportModule_createCase_errorCreatingFolder(unknownTypeFolder.toString()), null, progressPanel); // NON-NLS
return; return;
} }
@ -362,14 +460,14 @@ public class CreatePortableCaseModule implements GeneralReportModule {
CaseDbAccessManager currentCaseDbManager = currentCase.getSleuthkitCase().getCaseDbAccessManager(); CaseDbAccessManager currentCaseDbManager = currentCase.getSleuthkitCase().getCaseDbAccessManager();
String tableSchema = "( table_name TEXT PRIMARY KEY, " String tableSchema = "( table_name TEXT PRIMARY KEY, "
+ " max_id TEXT)"; + " max_id TEXT)"; // NON-NLS
portableSkCase.getCaseDbAccessManager().createTable(MAX_ID_TABLE_NAME, tableSchema); portableSkCase.getCaseDbAccessManager().createTable(MAX_ID_TABLE_NAME, tableSchema);
currentCaseDbManager.select("max(obj_id) as max_id from tsk_objects", new StoreMaxIdCallback("tsk_objects")); currentCaseDbManager.select("max(obj_id) as max_id from tsk_objects", new StoreMaxIdCallback("tsk_objects")); // NON-NLS
currentCaseDbManager.select("max(tag_id) as max_id from content_tags", new StoreMaxIdCallback("content_tags")); currentCaseDbManager.select("max(tag_id) as max_id from content_tags", new StoreMaxIdCallback("content_tags")); // NON-NLS
currentCaseDbManager.select("max(tag_id) as max_id from blackboard_artifact_tags", new StoreMaxIdCallback("blackboard_artifact_tags")); currentCaseDbManager.select("max(tag_id) as max_id from blackboard_artifact_tags", new StoreMaxIdCallback("blackboard_artifact_tags")); // NON-NLS
currentCaseDbManager.select("max(examiner_id) as max_id from tsk_examiners", new StoreMaxIdCallback("tsk_examiners")); currentCaseDbManager.select("max(examiner_id) as max_id from tsk_examiners", new StoreMaxIdCallback("tsk_examiners")); // NON-NLS
} }
/** /**
@ -399,7 +497,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
// Tag the file // Tag the file
if (! oldTagNameToNewTagName.containsKey(tag.getName())) { if (! oldTagNameToNewTagName.containsKey(tag.getName())) {
throw new TskCoreException("TagName map is missing entry for ID " + tag.getName().getId() + " with display name " + tag.getName().getDisplayName()); throw new TskCoreException("TagName map is missing entry for ID " + tag.getName().getId() + " with display name " + tag.getName().getDisplayName()); // NON-NLS
} }
portableSkCase.addContentTag(newIdToContent.get(newFileId), oldTagNameToNewTagName.get(tag.getName()), tag.getComment(), tag.getBeginByteOffset(), tag.getEndByteOffset()); portableSkCase.addContentTag(newIdToContent.get(newFileId), oldTagNameToNewTagName.get(tag.getName()), tag.getComment(), tag.getBeginByteOffset(), tag.getEndByteOffset());
} }
@ -435,7 +533,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
// Tag the artfiact // Tag the artfiact
if (! oldTagNameToNewTagName.containsKey(tag.getName())) { if (! oldTagNameToNewTagName.containsKey(tag.getName())) {
throw new TskCoreException("TagName map is missing entry for ID " + tag.getName().getId() + " with display name " + tag.getName().getDisplayName()); throw new TskCoreException("TagName map is missing entry for ID " + tag.getName().getId() + " with display name " + tag.getName().getDisplayName()); // NON-NLS
} }
portableSkCase.addBlackboardArtifactTag(newArtifact, oldTagNameToNewTagName.get(tag.getName()), tag.getComment()); portableSkCase.addBlackboardArtifactTag(newArtifact, oldTagNameToNewTagName.get(tag.getName()), tag.getComment());
} }
@ -504,7 +602,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
oldAttr.getValueString())); oldAttr.getValueString()));
break; break;
default: default:
throw new TskCoreException("Unexpected attribute value type found: " + oldAttr.getValueType().getLabel()); throw new TskCoreException("Unexpected attribute value type found: " + oldAttr.getValueType().getLabel()); // NON-NLS
} }
} }
@ -533,7 +631,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
oldArtTypeIdToNewArtTypeId.put(oldArtifact.getArtifactTypeID(), newCustomType.getTypeID()); oldArtTypeIdToNewArtTypeId.put(oldArtifact.getArtifactTypeID(), newCustomType.getTypeID());
return newCustomType.getTypeID(); return newCustomType.getTypeID();
} catch (TskDataException ex) { } catch (TskDataException ex) {
throw new TskCoreException("Error creating new artifact type " + oldCustomType.getTypeName(), ex); throw new TskCoreException("Error creating new artifact type " + oldCustomType.getTypeName(), ex); // NON-NLS
} }
} }
@ -557,7 +655,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
oldAttrTypeIdToNewAttrType.put(oldAttribute.getAttributeType().getTypeID(), newCustomType); oldAttrTypeIdToNewAttrType.put(oldAttribute.getAttributeType().getTypeID(), newCustomType);
return newCustomType; return newCustomType;
} catch (TskDataException ex) { } catch (TskDataException ex) {
throw new TskCoreException("Error creating new attribute type " + oldAttrType.getTypeName(), ex); throw new TskCoreException("Error creating new attribute type " + oldAttrType.getTypeName(), ex); // NON-NLS
} }
} }
@ -573,10 +671,10 @@ public class CreatePortableCaseModule implements GeneralReportModule {
*/ */
@NbBundle.Messages({ @NbBundle.Messages({
"# {0} - File name", "# {0} - File name",
"CreatePortableCaseModule.copyContentToPortableCase.copyingFile=Copying file {0}", "PortableCaseReportModule.copyContentToPortableCase.copyingFile=Copying file {0}",
}) })
private long copyContentToPortableCase(Content content, ReportProgressPanel progressPanel) throws TskCoreException { private long copyContentToPortableCase(Content content, ReportProgressPanel progressPanel) throws TskCoreException {
progressPanel.updateStatusLabel(Bundle.CreatePortableCaseModule_copyContentToPortableCase_copyingFile(content.getUniquePath())); progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_copyContentToPortableCase_copyingFile(content.getUniquePath()));
return copyContent(content); return copyContent(content);
} }
@ -651,7 +749,7 @@ public class CreatePortableCaseModule implements GeneralReportModule {
// Get the new parent object in the portable case database // Get the new parent object in the portable case database
Content oldParent = abstractFile.getParent(); Content oldParent = abstractFile.getParent();
if (! oldIdToNewContent.containsKey(oldParent.getId())) { if (! oldIdToNewContent.containsKey(oldParent.getId())) {
throw new TskCoreException("Parent of file with ID " + abstractFile.getId() + " has not been created"); throw new TskCoreException("Parent of file with ID " + abstractFile.getId() + " has not been created"); // NON-NLS
} }
Content newParent = oldIdToNewContent.get(oldParent.getId()); Content newParent = oldIdToNewContent.get(oldParent.getId());
@ -665,12 +763,12 @@ public class CreatePortableCaseModule implements GeneralReportModule {
newParent, trans); newParent, trans);
} catch (IOException ex) { } catch (IOException ex) {
throw new TskCoreException("Error copying file " + abstractFile.getName() + " with original obj ID " throw new TskCoreException("Error copying file " + abstractFile.getName() + " with original obj ID "
+ abstractFile.getId(), ex); + abstractFile.getId(), ex); // NON-NLS
} }
} }
} }
} else { } else {
throw new TskCoreException("Trying to copy unexpected Content type " + content.getClass().getName()); throw new TskCoreException("Trying to copy unexpected Content type " + content.getClass().getName()); // NON-NLS
} }
trans.commit(); trans.commit();
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
@ -716,20 +814,28 @@ public class CreatePortableCaseModule implements GeneralReportModule {
oldAttrTypeIdToNewAttrType.clear(); oldAttrTypeIdToNewAttrType.clear();
oldArtifactIdToNewArtifact.clear(); oldArtifactIdToNewArtifact.clear();
closePortableCaseDatabase();
currentCase = null; currentCase = null;
if (portableSkCase != null) {
portableSkCase.close();
portableSkCase = null;
}
caseFolder = null; caseFolder = null;
copiedFilesFolder = null; copiedFilesFolder = null;
} }
@Override /**
* Close the portable case
*/
private void closePortableCaseDatabase() {
if (portableSkCase != null) {
portableSkCase.close();
portableSkCase = null;
}
}
/*@Override
public JPanel getConfigurationPanel() { public JPanel getConfigurationPanel() {
configPanel = new CreatePortableCasePanel(); configPanel = new CreatePortableCasePanel();
return configPanel; return configPanel;
} } */
private class StoreMaxIdCallback implements CaseDbAccessManager.CaseDbAccessQueryCallback { private class StoreMaxIdCallback implements CaseDbAccessManager.CaseDbAccessQueryCallback {
@ -745,20 +851,224 @@ public class CreatePortableCaseModule implements GeneralReportModule {
try { try {
while (rs.next()) { while (rs.next()) {
try { try {
Long maxId = rs.getLong("max_id"); Long maxId = rs.getLong("max_id"); // NON-NLS
String query = " (table_name, max_id) VALUES ('" + tableName + "', '" + maxId + "')"; String query = " (table_name, max_id) VALUES ('" + tableName + "', '" + maxId + "')"; // NON-NLS
portableSkCase.getCaseDbAccessManager().insert(MAX_ID_TABLE_NAME, query); portableSkCase.getCaseDbAccessManager().insert(MAX_ID_TABLE_NAME, query);
} catch (SQLException ex) { } catch (SQLException ex) {
logger.log(Level.WARNING, "Unable to get maximum ID from result set", ex); logger.log(Level.WARNING, "Unable to get maximum ID from result set", ex); // NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.WARNING, "Unable to save maximum ID from result set", ex); logger.log(Level.WARNING, "Unable to save maximum ID from result set", ex); // NON-NLS
} }
} }
} catch (SQLException ex) { } catch (SQLException ex) {
logger.log(Level.WARNING, "Failed to get maximum ID from result set", ex); logger.log(Level.WARNING, "Failed to get maximum ID from result set", ex); // NON-NLS
} }
} }
} }
@NbBundle.Messages({
"PortableCaseReportModule.compressCase.errorFinding7zip=Could not locate 7-Zip executable",
"# {0} - Temp folder path",
"PortableCaseReportModule.compressCase.errorCreatingTempFolder=Could not create temporary folder {0}",
"PortableCaseReportModule.compressCase.errorCompressingCase=Error compressing case",
"PortableCaseReportModule.compressCase.canceled=Compression canceled by user",
})
private boolean compressCase(ReportProgressPanel progressPanel) {
// Close the portable case database (we still need some of the variables that would be cleared by cleanup())
closePortableCaseDatabase();
// Make a temporary folder for the compressed case
File tempZipFolder = Paths.get(currentCase.getTempDirectory(), "portableCase" + System.currentTimeMillis()).toFile(); // NON-NLS
if (! tempZipFolder.mkdir()) {
handleError("Error creating temporary folder " + tempZipFolder.toString(),
Bundle.PortableCaseReportModule_compressCase_errorCreatingTempFolder(tempZipFolder.toString()), null, progressPanel); // NON-NLS
return false;
}
// Find 7-Zip
File sevenZipExe = locate7ZipExecutable();
if (sevenZipExe == null) {
handleError("Error finding 7-Zip exectuable", Bundle.PortableCaseReportModule_compressCase_errorFinding7zip(), null, progressPanel); // NON-NLS
return false;
}
// Create the chunk option
String chunkOption = "";
if (options.getChunkSize() != ChunkSize.NONE) {
chunkOption = "-v" + options.getChunkSize().getSevenZipParam();
}
File zipFile = Paths.get(tempZipFolder.getAbsolutePath(), caseName + ".zip").toFile(); // NON-NLS
ProcessBuilder procBuilder = new ProcessBuilder();
procBuilder.command(
sevenZipExe.getAbsolutePath(),
"a", // Add to archive
zipFile.getAbsolutePath(),
caseFolder.getAbsolutePath(),
chunkOption
);
try {
Process process = procBuilder.start();
while (process.isAlive()) {
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
process.destroy();
return false;
}
Thread.sleep(200);
}
int exitCode = process.exitValue();
if (exitCode != 0) {
// Save any errors so they can be logged
StringBuilder sb = new StringBuilder();
try (BufferedReader br = new BufferedReader(new InputStreamReader(process.getErrorStream()))) {
String line;
while ((line = br.readLine()) != null) {
sb.append(line).append(System.getProperty("line.separator")); // NON-NLS
}
}
handleError("Error compressing case\n7-Zip output: " + sb.toString(), Bundle.PortableCaseReportModule_compressCase_errorCompressingCase(), null, progressPanel); // NON-NLS
return false;
}
} catch (IOException | InterruptedException ex) {
handleError("Error compressing case", Bundle.PortableCaseReportModule_compressCase_errorCompressingCase(), ex, progressPanel); // NON-NLS
return false;
}
// Delete everything in the case folder then copy over the compressed file(s)
try {
FileUtils.cleanDirectory(caseFolder);
FileUtils.copyDirectory(tempZipFolder, caseFolder);
FileUtils.deleteDirectory(tempZipFolder);
} catch (IOException ex) {
handleError("Error compressing case", Bundle.PortableCaseReportModule_compressCase_errorCompressingCase(), ex, progressPanel); // NON-NLS
return false;
}
return true;
}
/**
* Locate the 7-Zip executable from the release folder.
*
* @return 7-Zip executable
*/
private static File locate7ZipExecutable() {
if (!PlatformUtil.isWindowsOS()) {
return null;
}
String executableToFindName = Paths.get("7-Zip", "7z.exe").toString(); // NON-NLS
File exeFile = InstalledFileLocator.getDefault().locate(executableToFindName, PortableCaseReportModule.class.getPackage().getName(), false);
if (null == exeFile) {
return null;
}
if (!exeFile.canExecute()) {
return null;
}
return exeFile;
}
/**
* Enum for storing the display name for each chunk type and the
* parameter needed for 7-Zip.
*/
enum ChunkSize {
NONE("Do not split", ""), // NON-NLS
DVD("4.5 GB (DVD)", "4500m"); // NON-NLS
private final String displayName;
private final String sevenZipParam;
/**
* Create a chunk size object.
*
* @param displayName
* @param sevenZipParam
*/
private ChunkSize(String displayName, String sevenZipParam) {
this.displayName = displayName;
this.sevenZipParam = sevenZipParam;
}
String getDisplayName() {
return displayName;
}
String getSevenZipParam() {
return sevenZipParam;
}
@Override
public String toString() {
return displayName;
}
}
/**
* Convenience class to hold the options from the config panel.
*/
static class PortableCaseOptions {
private final List<TagName> tagNames = new ArrayList<>();
private final List<String> setNames = new ArrayList<>();
private boolean compress;
private ChunkSize chunkSize;
PortableCaseOptions(List<String> setNames, List<TagName> tagNames,
boolean compress, ChunkSize chunkSize) {
this.setNames.addAll(setNames);
this.tagNames.addAll(tagNames);
this.compress = compress;
this.chunkSize = chunkSize;
}
PortableCaseOptions() {
this.compress = false;
this.chunkSize = ChunkSize.NONE;
}
void updateSetNames(List<String> setNames) {
this.setNames.clear();
this.setNames.addAll(setNames);
}
void updateTagNames(List<TagName> tagNames) {
this.tagNames.clear();
this.tagNames.addAll(tagNames);
}
void updateCompression(boolean compress, ChunkSize chunkSize) {
this.compress = compress;
this.chunkSize = chunkSize;
}
boolean isValid() {
return (( !setNames.isEmpty()) || ( ! tagNames.isEmpty()));
}
List<String> getSelectedSetNames() {
return new ArrayList<>(setNames);
}
List<TagName> getSelectedTagNames() {
return new ArrayList<>(tagNames);
}
boolean shouldCompress() {
return compress;
}
ChunkSize getChunkSize() {
return chunkSize;
}
}
} }

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" pref="215" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="selectButton" min="-2" pref="96" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="deselectButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="178" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="selectButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="deselectButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JList" name="tagNamesListBox">
<Properties>
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="descLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseTagsListPanel.descLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="selectButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseTagsListPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[87, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[87, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="deselectButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseTagsListPanel.deselectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deselectButtonActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@ -0,0 +1,344 @@
/*
* 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.report;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.ListCellRenderer;
import javax.swing.ListModel;
import javax.swing.event.ListDataListener;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.CaseDbAccessManager;
import org.sleuthkit.datamodel.TagName;
import org.sleuthkit.datamodel.TskCoreException;
/**
* The subpanel showing the tags in use.
*/
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
class PortableCaseTagsListPanel extends javax.swing.JPanel {
private List<TagName> tagNames;
private final Map<String, Boolean> tagNameSelections = new LinkedHashMap<>();
private final TagNamesListModel tagsNamesListModel = new TagNamesListModel();
private final TagsNamesListCellRenderer tagsNamesRenderer = new TagsNamesListCellRenderer();
private final Map<String, Long> tagCounts = new HashMap<>();
private final ReportWizardPortableCaseOptionsPanel wizPanel;
private final PortableCaseReportModule.PortableCaseOptions options;
/**
* Creates new form PortableCaseListPanel
*/
PortableCaseTagsListPanel(ReportWizardPortableCaseOptionsPanel wizPanel, PortableCaseReportModule.PortableCaseOptions options) {
this.wizPanel = wizPanel;
this.options = options;
initComponents();
customizeComponents();
}
@NbBundle.Messages({
"PortableCaseTagsListPanel.error.errorTitle=Error getting tag names for case",
"PortableCaseTagsListPanel.error.noOpenCase=There is no case open",
"PortableCaseTagsListPanel.error.errorLoadingTags=Error loading tags",
})
private void customizeComponents() {
// Get the tag names in use for the current case.
try {
tagNames = Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
// Get the counts for each tag ID
String query = "tag_name_id, count(1) AS tag_count " +
"FROM (" +
"SELECT tag_name_id FROM content_tags UNION ALL SELECT tag_name_id FROM blackboard_artifact_tags" +
") tag_ids GROUP BY tag_name_id"; // NON-NLS
GetTagCountsCallback callback = new GetTagCountsCallback();
Case.getCurrentCaseThrows().getSleuthkitCase().getCaseDbAccessManager().select(query, callback);
Map<Long, Long> tagCountsByID = callback.getTagCountMap();
// Mark the tag names as unselected. Note that tagNameSelections is a
// LinkedHashMap so that order is preserved and the tagNames and tagNameSelections
// containers are "parallel" containers.
for (TagName tagName : tagNames) {
tagNameSelections.put(tagName.getDisplayName(), Boolean.FALSE);
if (tagCountsByID.containsKey(tagName.getId())) {
tagCounts.put(tagName.getDisplayName(), tagCountsByID.get(tagName.getId()));
} else {
tagCounts.put(tagName.getDisplayName(), 0L);
}
}
} catch (TskCoreException ex) {
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); // NON-NLS
JOptionPane.showMessageDialog(this, Bundle.PortableCaseTagsListPanel_error_errorLoadingTags(), Bundle.PortableCaseTagsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
return;
} catch (NoCurrentCaseException ex) {
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
JOptionPane.showMessageDialog(this, Bundle.PortableCaseTagsListPanel_error_noOpenCase(), Bundle.PortableCaseTagsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
return;
}
// Set up the tag names JList component to be a collection of check boxes
// for selecting tag names. The mouse click listener updates tagNameSelections
// to reflect user choices.
tagNamesListBox.setModel(tagsNamesListModel);
tagNamesListBox.setCellRenderer(tagsNamesRenderer);
tagNamesListBox.setVisibleRowCount(-1);
tagNamesListBox.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent evt) {
JList<?> list = (JList) evt.getSource();
int index = list.locationToIndex(evt.getPoint());
if (index > -1) {
String value = tagsNamesListModel.getElementAt(index);
tagNameSelections.put(value, !tagNameSelections.get(value));
list.repaint();
updateTagList();
}
}
});
}
/**
* Save the current selections and enabled/disable the finish button as needed.
*/
private void updateTagList() {
options.updateTagNames(getSelectedTagNames());
wizPanel.setFinish(options.isValid());
}
/**
* This class is a list model for the tag names JList component.
*/
private class TagNamesListModel implements ListModel<String> {
@Override
public int getSize() {
return tagNames.size();
}
@Override
public String getElementAt(int index) {
return tagNames.get(index).getDisplayName();
}
@Override
public void addListDataListener(ListDataListener l) {
// Nothing to do
}
@Override
public void removeListDataListener(ListDataListener l) {
// Nothing to do
}
}
/**
* This class renders the items in the tag names JList component as JCheckbox components.
*/
private class TagsNamesListCellRenderer extends JCheckBox implements ListCellRenderer<String> {
private static final long serialVersionUID = 1L;
@Override
public Component getListCellRendererComponent(JList<? extends String> list, String value, int index, boolean isSelected, boolean cellHasFocus) {
if (value != null) {
setEnabled(list.isEnabled());
setSelected(tagNameSelections.get(value));
setFont(list.getFont());
setBackground(list.getBackground());
setForeground(list.getForeground());
setText(value + " (" + tagCounts.get(value) + ")"); // NON-NLS
return this;
}
return new JLabel();
}
}
/**
* Gets the subset of the tag names in use selected by the user.
*
* @return A list, possibly empty, of TagName data transfer objects (DTOs).
*/
private List<TagName> getSelectedTagNames() {
List<TagName> selectedTagNames = new ArrayList<>();
for (TagName tagName : tagNames) {
if (tagNameSelections.get(tagName.getDisplayName())) {
selectedTagNames.add(tagName);
}
}
return selectedTagNames;
}
/**
* Processes the result sets from the tag count query.
*/
static class GetTagCountsCallback implements CaseDbAccessManager.CaseDbAccessQueryCallback {
private static final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(GetTagCountsCallback.class.getName());
private final Map<Long, Long> tagCounts = new HashMap<>();
@Override
public void process(ResultSet rs) {
try {
while (rs.next()) {
try {
Long tagCount = rs.getLong("tag_count"); // NON-NLS
Long tagID = rs.getLong("tag_name_id"); // NON-NLS
tagCounts.put(tagID, tagCount);
} catch (SQLException ex) {
logger.log(Level.WARNING, "Unable to get data_source_obj_id or value from result set", ex); // NON-NLS
}
}
} catch (SQLException ex) {
logger.log(Level.WARNING, "Failed to get next result for values by datasource", ex); // NON-NLS
}
}
/**
* Get a map of the tag name IDs to the number of usages.
*
* @return Map of tag name ID to number of items tagged with it
*/
Map<Long, Long> getTagCountMap() {
return tagCounts;
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
tagNamesListBox = new javax.swing.JList<>();
descLabel = new javax.swing.JLabel();
selectButton = new javax.swing.JButton();
deselectButton = new javax.swing.JButton();
jScrollPane1.setViewportView(tagNamesListBox);
org.openide.awt.Mnemonics.setLocalizedText(descLabel, org.openide.util.NbBundle.getMessage(PortableCaseTagsListPanel.class, "PortableCaseTagsListPanel.descLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(selectButton, org.openide.util.NbBundle.getMessage(PortableCaseTagsListPanel.class, "PortableCaseTagsListPanel.selectButton.text")); // NOI18N
selectButton.setMaximumSize(new java.awt.Dimension(87, 23));
selectButton.setMinimumSize(new java.awt.Dimension(87, 23));
selectButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
selectButtonActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(deselectButton, org.openide.util.NbBundle.getMessage(PortableCaseTagsListPanel.class, "PortableCaseTagsListPanel.deselectButton.text")); // NOI18N
deselectButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deselectButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(descLabel)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(deselectButton)))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(descLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(deselectButton)))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
private void deselectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deselectButtonActionPerformed
for (TagName tagName : tagNames) {
tagNameSelections.put(tagName.getDisplayName(), Boolean.FALSE);
}
updateTagList();
tagNamesListBox.repaint();
}//GEN-LAST:event_deselectButtonActionPerformed
private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
for (TagName tagName : tagNames) {
tagNameSelections.put(tagName.getDisplayName(), Boolean.TRUE);
}
updateTagList();
tagNamesListBox.repaint();
}//GEN-LAST:event_selectButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel descLabel;
private javax.swing.JButton deselectButton;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JButton selectButton;
private javax.swing.JList<String> tagNamesListBox;
// End of variables declaration//GEN-END:variables
}

View File

@ -220,6 +220,21 @@ class ReportGenerator {
} }
} }
/**
* Run the Portable Case Report Module
*/
void generatePortableCaseReport(PortableCaseReportModule portableCaseReportModule, PortableCaseReportModule.PortableCaseOptions options) throws IOException {
if (portableCaseReportModule != null) {
String reportDir = createReportDirectory(portableCaseReportModule);
setupProgressPanel(portableCaseReportModule, reportDir);
ReportWorker worker = new ReportWorker(() -> {
portableCaseReportModule.generateReport(reportDir, options, progressPanel);
});
worker.execute();
displayProgressPanel();
}
}
/** /**
* Get all files in the image. * Get all files in the image.
* *

View File

@ -52,6 +52,7 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
private final List<GeneralReportModule> generalModules = new ArrayList<>(); private final List<GeneralReportModule> generalModules = new ArrayList<>();
private final List<TableReportModule> tableModules = new ArrayList<>(); private final List<TableReportModule> tableModules = new ArrayList<>();
private final List<FileReportModule> fileModules = new ArrayList<>(); private final List<FileReportModule> fileModules = new ArrayList<>();
private PortableCaseReportModule portableCaseModule;
private Integer selectedIndex; private Integer selectedIndex;
/** /**
@ -103,6 +104,13 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
} }
} }
portableCaseModule = new PortableCaseReportModule();
if (moduleIsValid(portableCaseModule)) {
modules.add(portableCaseModule);
} else {
popupWarning(portableCaseModule);
}
Collections.sort(modules, new Comparator<ReportModule>() { Collections.sort(modules, new Comparator<ReportModule>() {
@Override @Override
public int compare(ReportModule rm1, ReportModule rm2) { public int compare(ReportModule rm1, ReportModule rm2) {
@ -199,6 +207,19 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
return null; return null;
} }
/**
* Get the selection status of the Portable Case report module.
*
* @return
*/
PortableCaseReportModule getPortableCaseModule() {
ReportModule mod = getSelectedModule();
if (portableCaseModule.equals(mod)) {
return (PortableCaseReportModule) mod;
}
return null;
}
/** /**
* This method is called from within the constructor to initialize the form. * This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always * WARNING: Do NOT modify this code. The content of this method is always

View File

@ -72,6 +72,7 @@ public final class ReportWizardAction extends CallableSystemAction implements Pr
TableReportModule tableReport = (TableReportModule) wiz.getProperty("tableModule"); TableReportModule tableReport = (TableReportModule) wiz.getProperty("tableModule");
GeneralReportModule generalReport = (GeneralReportModule) wiz.getProperty("generalModule"); GeneralReportModule generalReport = (GeneralReportModule) wiz.getProperty("generalModule");
FileReportModule fileReport = (FileReportModule) wiz.getProperty("fileModule"); FileReportModule fileReport = (FileReportModule) wiz.getProperty("fileModule");
PortableCaseReportModule portableCaseReport = (PortableCaseReportModule) wiz.getProperty("portableCaseModule"); // NON-NLS
try { try {
if (tableReport != null) { if (tableReport != null) {
generator.generateTableReport(tableReport, (Map<BlackboardArtifact.Type, Boolean>) wiz.getProperty("artifactStates"), (Map<String, Boolean>) wiz.getProperty("tagStates")); //NON-NLS generator.generateTableReport(tableReport, (Map<BlackboardArtifact.Type, Boolean>) wiz.getProperty("artifactStates"), (Map<String, Boolean>) wiz.getProperty("tagStates")); //NON-NLS
@ -79,6 +80,8 @@ public final class ReportWizardAction extends CallableSystemAction implements Pr
generator.generateGeneralReport(generalReport); generator.generateGeneralReport(generalReport);
} else if (fileReport != null) { } else if (fileReport != null) {
generator.generateFileListReport(fileReport, (Map<FileReportDataTypes, Boolean>) wiz.getProperty("fileReportOptions")); //NON-NLS generator.generateFileListReport(fileReport, (Map<FileReportDataTypes, Boolean>) wiz.getProperty("fileReportOptions")); //NON-NLS
} else if (portableCaseReport != null) {
generator.generatePortableCaseReport(portableCaseReport, (PortableCaseReportModule.PortableCaseOptions) wiz.getProperty("portableCaseReportOptions"));
} }
} catch (IOException e) { } catch (IOException e) {
NotifyDescriptor descriptor = new NotifyDescriptor.Message(e.getMessage(), NotifyDescriptor.ERROR_MESSAGE); NotifyDescriptor descriptor = new NotifyDescriptor.Message(e.getMessage(), NotifyDescriptor.ERROR_MESSAGE);

View File

@ -31,34 +31,40 @@ final class ReportWizardIterator implements WizardDescriptor.Iterator<WizardDesc
private int index; private int index;
private ReportWizardPanel1 firstPanel; private final ReportWizardPanel1 firstPanel;
private ReportWizardPanel2 tableConfigPanel; private final ReportWizardPanel2 tableConfigPanel;
private ReportWizardFileOptionsPanel fileConfigPanel; private final ReportWizardFileOptionsPanel fileConfigPanel;
private final ReportWizardPortableCaseOptionsPanel portableCaseConfigPanel;
private List<WizardDescriptor.Panel<WizardDescriptor>> panels; private List<WizardDescriptor.Panel<WizardDescriptor>> panels;
// Panels that should be shown if both Table and File report modules should // Panels that should be shown if both Table and File report modules should
// be configured. // be configured.
private WizardDescriptor.Panel<WizardDescriptor>[] allConfigPanels; private final WizardDescriptor.Panel<WizardDescriptor>[] allConfigPanels;
private String[] allConfigIndex;
// Panels that should be shown if only Table report modules should // Panels that should be shown if only Table report modules should
// be configured. // be configured.
private WizardDescriptor.Panel<WizardDescriptor>[] tableConfigPanels; private final WizardDescriptor.Panel<WizardDescriptor>[] tableConfigPanels;
private String[] tableConfigIndex;
// Panels that should be shown if only File report modules should // Panels that should be shown if only File report modules should
// be configured. // be configured.
private WizardDescriptor.Panel<WizardDescriptor>[] fileConfigPanels; private final WizardDescriptor.Panel<WizardDescriptor>[] fileConfigPanels;
private String[] fileConfigIndex;
// Panels that should be shown if only Portable Case report modules should
// be configured.
private final WizardDescriptor.Panel<WizardDescriptor>[] portableCaseConfigPanels;
@SuppressWarnings({"rawtypes", "unchecked"}) @SuppressWarnings({"rawtypes", "unchecked"})
ReportWizardIterator() { ReportWizardIterator() {
firstPanel = new ReportWizardPanel1(); firstPanel = new ReportWizardPanel1();
tableConfigPanel = new ReportWizardPanel2(); tableConfigPanel = new ReportWizardPanel2();
fileConfigPanel = new ReportWizardFileOptionsPanel(); fileConfigPanel = new ReportWizardFileOptionsPanel();
portableCaseConfigPanel = new ReportWizardPortableCaseOptionsPanel();
allConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel, fileConfigPanel}; allConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel, fileConfigPanel, portableCaseConfigPanel};
tableConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel}; tableConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel};
fileConfigPanels = new WizardDescriptor.Panel[]{firstPanel, fileConfigPanel}; fileConfigPanels = new WizardDescriptor.Panel[]{firstPanel, fileConfigPanel};
portableCaseConfigPanels = new WizardDescriptor.Panel[]{firstPanel, portableCaseConfigPanel};
} }
private List<WizardDescriptor.Panel<WizardDescriptor>> getPanels() { private List<WizardDescriptor.Panel<WizardDescriptor>> getPanels() {
@ -78,10 +84,6 @@ final class ReportWizardIterator implements WizardDescriptor.Iterator<WizardDesc
jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, true); jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, true);
} }
} }
allConfigIndex = steps;
tableConfigIndex = new String[]{steps[0], steps[1]};
fileConfigIndex = new String[]{steps[0], steps[2]};
} }
return panels; return panels;
} }
@ -93,13 +95,17 @@ final class ReportWizardIterator implements WizardDescriptor.Iterator<WizardDesc
* @param moreConfig true if a GeneralReportModule was selected * @param moreConfig true if a GeneralReportModule was selected
* @param tableConfig true if a TReportModule was selected * @param tableConfig true if a TReportModule was selected
*/ */
private void enableConfigPanels(boolean generalModule, boolean tableModule) { private void enableConfigPanels(boolean generalModule, boolean tableModule, boolean portableCaseModule) {
if (generalModule) { if (generalModule) {
// General Module selected, no additional panels // General Module selected, no additional panels
} else if (tableModule) { } else if (tableModule) {
// Table Module selected, need Artifact Configuration Panel // Table Module selected, need Artifact Configuration Panel
// (ReportWizardPanel2) // (ReportWizardPanel2)
panels = Arrays.asList(tableConfigPanels); panels = Arrays.asList(tableConfigPanels);
} else if (portableCaseModule) {
// Portable Case Module selected, need Portable Case Configuration Panel
// (ReportWizardPortableCaseOptionsPanel)
panels = Arrays.asList(portableCaseConfigPanels);
} else { } else {
// File Module selected, need File Report Configuration Panel // File Module selected, need File Report Configuration Panel
// (ReportWizardFileOptionsPanel) // (ReportWizardFileOptionsPanel)
@ -135,11 +141,12 @@ final class ReportWizardIterator implements WizardDescriptor.Iterator<WizardDesc
if (index == 0) { if (index == 0) {
// Update path through configuration panels // Update path through configuration panels
boolean generalModule, tableModule; boolean generalModule, tableModule, portableModule;
// These preferences are set in ReportWizardPanel1.storeSettings() // These preferences are set in ReportWizardPanel1.storeSettings()
generalModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("generalModule", true); //NON-NLS generalModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("generalModule", true); //NON-NLS
tableModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("tableModule", true); //NON-NLS tableModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("tableModule", true); //NON-NLS
enableConfigPanels(generalModule, tableModule); portableModule = NbPreferences.forModule(ReportWizardPanel1.class).getBoolean("portableCaseModule", true); //NON-NLS
enableConfigPanels(generalModule, tableModule, portableModule);
} }
index++; index++;

View File

@ -109,15 +109,18 @@ class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<WizardDescr
public void storeSettings(WizardDescriptor wiz) { public void storeSettings(WizardDescriptor wiz) {
TableReportModule module = getComponent().getTableModule(); TableReportModule module = getComponent().getTableModule();
GeneralReportModule general = getComponent().getGeneralModule(); GeneralReportModule general = getComponent().getGeneralModule();
PortableCaseReportModule portable = getComponent().getPortableCaseModule();
wiz.putProperty("tableModule", module); //NON-NLS wiz.putProperty("tableModule", module); //NON-NLS
wiz.putProperty("generalModule", general); //NON-NLS wiz.putProperty("generalModule", general); //NON-NLS
wiz.putProperty("fileModule", getComponent().getFileModule()); //NON-NLS wiz.putProperty("fileModule", getComponent().getFileModule()); //NON-NLS
wiz.putProperty("portableCaseModule", portable); //NON-NLS
// Store preferences that WizardIterator will use to determine what // Store preferences that WizardIterator will use to determine what
// panels need to be shown // panels need to be shown
Preferences prefs = NbPreferences.forModule(ReportWizardPanel1.class); Preferences prefs = NbPreferences.forModule(ReportWizardPanel1.class);
prefs.putBoolean("tableModule", module != null); //NON-NLS prefs.putBoolean("tableModule", module != null); //NON-NLS
prefs.putBoolean("generalModule", general != null); //NON-NLS prefs.putBoolean("generalModule", general != null); //NON-NLS
prefs.putBoolean("portableCaseModule", portable != null); //NON-NLS
} }
/** /**

View File

@ -0,0 +1,106 @@
/*
* 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.report;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.event.ChangeListener;
import org.openide.WizardDescriptor;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
/**
* Wizard panel that allows configuration of Portable Case options.
*
*/
class ReportWizardPortableCaseOptionsPanel implements WizardDescriptor.FinishablePanel<WizardDescriptor> {
private WizardDescriptor wiz;
private ReportWizardPortableCaseOptionsVisualPanel component;
private final JButton finishButton;
ReportWizardPortableCaseOptionsPanel() {
finishButton = new JButton(
NbBundle.getMessage(this.getClass(), "ReportWizardFileOptionsPanel.finishButton.text"));
finishButton.setEnabled(false);
finishButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
wiz.doFinishClick();
}
});
}
/**
* Set whether the finish button is enabled
*
* @param enable true if the finish button should be enabled
*/
void setFinish(boolean enable) {
finishButton.setEnabled(enable);
}
@Override
public boolean isFinishPanel() {
return true;
}
@Override
public ReportWizardPortableCaseOptionsVisualPanel getComponent() {
if (component == null) {
component = new ReportWizardPortableCaseOptionsVisualPanel(this);
}
return component;
}
@Override
public HelpCtx getHelp() {
return HelpCtx.DEFAULT_HELP;
}
@Override
public void readSettings(WizardDescriptor data) {
this.wiz = data;
wiz.setOptions(new Object[]{WizardDescriptor.PREVIOUS_OPTION, WizardDescriptor.NEXT_OPTION, finishButton, WizardDescriptor.CANCEL_OPTION});
}
@Override
public void storeSettings(WizardDescriptor data) {
data.putProperty("portableCaseReportOptions", getComponent().getPortableCaseReportOptions()); //NON-NLS
}
@Override
public boolean isValid() {
return true;
}
@Override
public void addChangeListener(ChangeListener cl) {
// Nothing to do
}
@Override
public void removeChangeListener(ChangeListener cl) {
// Nothing to do
}
}

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="463" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="259" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="compressCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="chunkSizeComboBox" min="-2" pref="99" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="97" max="32767" attributes="0"/>
</Group>
<Component id="listPanel" alignment="1" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="listPanel" max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="compressCheckbox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="chunkSizeComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="errorLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JComboBox" name="chunkSizeComboBox">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chunkSizeComboBoxActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;ChunkSize&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JCheckBox" name="compressCheckbox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="compressCheckboxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="errorLabel">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JPanel" name="listPanel">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="217" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@ -0,0 +1,201 @@
/*
* 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.report;
import java.awt.GridLayout;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.report.PortableCaseReportModule.ChunkSize;
import org.sleuthkit.autopsy.report.PortableCaseReportModule.PortableCaseOptions;
/**
* The UI portion of the Portable Case config panel
*/
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
class ReportWizardPortableCaseOptionsVisualPanel extends javax.swing.JPanel {
private final ReportWizardPortableCaseOptionsPanel wizPanel;
private final PortableCaseOptions options = new PortableCaseOptions();
/**
* Creates new form ReportWizardPortableCaseOptionsVisualPanel
*/
ReportWizardPortableCaseOptionsVisualPanel(ReportWizardPortableCaseOptionsPanel wizPanel) {
this.wizPanel = wizPanel;
initComponents();
customizeComponents();
}
private void customizeComponents() {
if ( ! PlatformUtil.isWindowsOS()) {
errorLabel.setVisible(true);
compressCheckbox.setEnabled(false);
} else {
errorLabel.setVisible(false);
}
for (ChunkSize chunkSize:ChunkSize.values()) {
chunkSizeComboBox.addItem(chunkSize);
}
chunkSizeComboBox.setSelectedItem(ChunkSize.NONE);
chunkSizeComboBox.setEnabled(false);
options.updateCompression(false, ChunkSize.NONE);
listPanel.setLayout(new GridLayout(1,2));
listPanel.add(new PortableCaseTagsListPanel(wizPanel, options));
listPanel.add(new PortableCaseInterestingItemsListPanel(wizPanel, options));
}
@NbBundle.Messages({
"ReportWizardPortableCaseOptionsVisualPanel.getName.title=Choose Portable Case settings",
})
@Override
public String getName() {
return Bundle.ReportWizardPortableCaseOptionsVisualPanel_getName_title();
}
/**
* Get the selected chunk size
*
* @return the chunk size that was selected
*/
private ChunkSize getChunkSize() {
return (ChunkSize) chunkSizeComboBox.getSelectedItem();
}
/**
* Update the selected compression options and enable/disable the finish button
*/
private void updateCompression() {
options.updateCompression(compressCheckbox.isSelected(), getChunkSize());
wizPanel.setFinish(options.isValid());
}
/**
* Get the user-selected settings.
*
* @return the current settings
*/
PortableCaseOptions getPortableCaseReportOptions() {
return options;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
chunkSizeComboBox = new javax.swing.JComboBox<>();
compressCheckbox = new javax.swing.JCheckBox();
errorLabel = new javax.swing.JLabel();
listPanel = new javax.swing.JPanel();
chunkSizeComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chunkSizeComboBoxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(compressCheckbox, org.openide.util.NbBundle.getMessage(ReportWizardPortableCaseOptionsVisualPanel.class, "ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text")); // NOI18N
compressCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
compressCheckboxActionPerformed(evt);
}
});
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(ReportWizardPortableCaseOptionsVisualPanel.class, "ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text")); // NOI18N
javax.swing.GroupLayout listPanelLayout = new javax.swing.GroupLayout(listPanel);
listPanel.setLayout(listPanelLayout);
listPanelLayout.setHorizontalGroup(
listPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
listPanelLayout.setVerticalGroup(
listPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 217, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(compressCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chunkSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(errorLabel)
.addContainerGap(97, Short.MAX_VALUE))
.addComponent(listPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(listPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(compressCheckbox)
.addComponent(chunkSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(errorLabel))
.addContainerGap())
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 463, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 259, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
private void chunkSizeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chunkSizeComboBoxActionPerformed
updateCompression();
}//GEN-LAST:event_chunkSizeComboBoxActionPerformed
private void compressCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_compressCheckboxActionPerformed
chunkSizeComboBox.setEnabled(compressCheckbox.isSelected());
updateCompression();
}//GEN-LAST:event_compressCheckboxActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JComboBox<ChunkSize> chunkSizeComboBox;
private javax.swing.JCheckBox compressCheckbox;
private javax.swing.JLabel errorLabel;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel listPanel;
// End of variables declaration//GEN-END:variables
}

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2018-2018 Basis Technology Corp. * Copyright 2018-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -18,25 +18,28 @@
*/ */
package org.sleuthkit.autopsy.texttranslation; package org.sleuthkit.autopsy.texttranslation;
import java.util.Collection;
import java.util.Collections;
import java.util.Optional; import java.util.Optional;
import org.openide.util.Lookup; import org.openide.util.Lookup;
import org.sleuthkit.autopsy.core.UserPreferences;
/** /**
* Performs a lookup for a TextTranslator service provider and if present, * Performs a lookup for a TextTranslator service provider and if present, will
* will use this provider to run translation on the input. * use this provider to run translation on the input.
*/ */
public final class TextTranslationService { public final class TextTranslationService {
private final static TextTranslationService tts = new TextTranslationService(); private final static TextTranslationService tts = new TextTranslationService();
private final Optional<TextTranslator> translator; private final Collection<? extends TextTranslator> translators;
private Optional<TextTranslator> selectedTranslator;
private TextTranslationService(){ private TextTranslationService() {
//Perform look up for Text Translation implementations ONLY ONCE during //Perform look up for Text Translation implementations ONLY ONCE during
//class loading. //class loading.
translator = Optional.ofNullable(Lookup.getDefault() translators = Lookup.getDefault().lookupAll(TextTranslator.class);
.lookup(TextTranslator.class)); updateSelectedTranslator();
} }
public static TextTranslationService getInstance() { public static TextTranslationService getInstance() {
@ -44,8 +47,23 @@ public final class TextTranslationService {
} }
/** /**
* Translates the input string using whichever TextTranslator Service Provider * Update the translator currently in use to match the one saved to the user
* was found during lookup. * preferences
*/
public void updateSelectedTranslator() {
String translatorName = UserPreferences.getTextTranslatorName();
for (TextTranslator translator : translators) {
if (translator.getName().equals(translatorName)) {
selectedTranslator = Optional.ofNullable(translator);
return;
}
}
selectedTranslator = Optional.empty();
}
/**
* Translates the input string using whichever TextTranslator Service
* Provider was found during lookup.
* *
* @param input Input string to be translated * @param input Input string to be translated
* *
@ -58,13 +76,41 @@ public final class TextTranslationService {
* implementations fail * implementations fail
*/ */
public String translate(String input) throws NoServiceProviderException, TranslationException { public String translate(String input) throws NoServiceProviderException, TranslationException {
if (translator.isPresent()) { if (hasProvider()) {
return translator.get().translate(input); return selectedTranslator.get().translate(input);
} }
throw new NoServiceProviderException( throw new NoServiceProviderException(
"Could not find a TextTranslator service provider"); "Could not find a TextTranslator service provider");
} }
/**
* Get a specific translator by name
*
* @param translatorName the name of the translator to get
*
* @return the translator which matches the name specified
*
* @throws NoServiceProviderException
*/
public TextTranslator getTranslatorByName(String translatorName) throws NoServiceProviderException {
for (TextTranslator translator : translators) {
if (translator.getName().equals(translatorName)) {
return translator;
}
}
throw new NoServiceProviderException(
"Could not find the specified TextTranslator service provider: " + translatorName);
}
/**
* Get all the TextTranslator implementations which were found to exist
*
* @return an unmodifiable collection of TextTranslators
*/
public Collection<? extends TextTranslator> getTranslators() {
return Collections.unmodifiableCollection(translators);
}
/** /**
* Returns if a TextTranslator lookup successfully found an implementing * Returns if a TextTranslator lookup successfully found an implementing
* class. * class.
@ -72,6 +118,6 @@ public final class TextTranslationService {
* @return * @return
*/ */
public boolean hasProvider() { public boolean hasProvider() {
return translator.isPresent(); return selectedTranslator.isPresent();
} }
} }

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2018-2018 Basis Technology Corp. * Copyright 2018-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -18,12 +18,42 @@
*/ */
package org.sleuthkit.autopsy.texttranslation; package org.sleuthkit.autopsy.texttranslation;
import java.awt.Component;
/** /**
* Interface for creating text translators. Implementing classes will be picked * Interface for creating text translators. Implementing classes will be picked
* up and run by the Text Translation Service. * up and run by the Text Translation Service.
*/ */
public interface TextTranslator { public interface TextTranslator {
/**
* Translates a provided string
*
* @param input the String to translate
*
* @return the translated String
*
* @throws TranslationException
*/
String translate(String input) throws TranslationException; String translate(String input) throws TranslationException;
/**
* Get the name of the TextTranslator implementation
*
* @return the name of the TextTranslator
*/
String getName();
/**
* Get the component to display on the settings options panel when this
* TextTranslator is selected
*
* @return the component which displays the settings options
*/
Component getComponent();
/**
* Save the settings as they have been modified in the component.
*/
void saveSettings();
} }

View File

@ -0,0 +1,8 @@
OptionsCategory_Name_Machine_Translation=Machine Translation
OptionsCategory_Keywords_Machine_Translation_Settings=Machine Translation Settings
TranslationContentPanel.ShowLabel.text=Show:
TranslationContentPanel.warningLabel2MB.text=Only the first 1MB of text will be displayed
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.

View File

@ -0,0 +1,27 @@
OptionsCategory_Name_Machine_Translation=Machine Translation
OptionsCategory_Keywords_Machine_Translation_Settings=Machine Translation Settings
TranslatedContentPanel.comboBoxOption.originalText=Original Text
TranslatedContentPanel.comboBoxOption.translatedText=Translated Text
TranslatedContentViewer.emptyTranslation=The resulting translation was empty.
TranslatedContentViewer.errorExtractingText=Could not extract text from file.
TranslatedContentViewer.errorMsg=Error encountered while getting file text.
TranslatedContentViewer.extractingFileText=Extracting text from file, please wait...
TranslatedContentViewer.extractingImageText=Extracting text from image, please wait...
TranslatedContentViewer.noIndexedTextMsg=Run the Keyword Search Ingest Module to get text for translation.
TranslatedContentViewer.noServiceProvider=Machine Translation software was not found.
TranslatedContentViewer.textAlreadyIndexed=Please view the original text in the Indexed Text viewer.
TranslatedContentViewer.translatingText=Translating text, please wait...
TranslatedContentViewer.translationException=Error encountered while attempting translation.
TranslatedTextViewer.title=Translation
TranslatedTextViewer.toolTip=Displays translated file text.
TranslationContentPanel.autoDetectOCR=Autodetect language
TranslationContentPanel.ShowLabel.text=Show:
TranslationContentPanel.warningLabel2MB.text=Only the first 1MB of text will be displayed
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.

View File

@ -0,0 +1,428 @@
/*
* 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.ui;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.awt.Component;
import java.awt.ComponentOrientation;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.Reader;
import java.util.Arrays;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import org.openide.nodes.Node;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.corecomponentinterfaces.TextViewer;
import org.sleuthkit.datamodel.AbstractFile;
import javax.swing.SwingWorker;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.corecomponents.DataContentViewerUtility;
import org.sleuthkit.autopsy.coreutils.ExecUtil.ProcessTerminator;
import org.sleuthkit.autopsy.coreutils.TextUtil;
import org.sleuthkit.autopsy.textextractors.TextExtractor;
import org.sleuthkit.autopsy.textextractors.TextExtractorFactory;
import org.sleuthkit.autopsy.textextractors.configs.ImageConfig;
import org.sleuthkit.autopsy.texttranslation.TextTranslationService;
import org.sleuthkit.autopsy.texttranslation.NoServiceProviderException;
import org.sleuthkit.autopsy.texttranslation.TranslationException;
import org.sleuthkit.datamodel.Content;
import java.util.List;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.texttranslation.ui.TranslationContentPanel.DisplayDropdownOptions;
/**
* A TextViewer that displays machine translation of text.
*/
@ServiceProvider(service = TextViewer.class, position = 4)
public final class TranslatedTextViewer implements TextViewer {
private static final boolean OCR_ENABLED = true;
private static final boolean OCR_DISABLED = false;
private static final int MAX_SIZE_1MB = 1024000;
private static final List<String> INSTALLED_LANGUAGE_PACKS = PlatformUtil.getOcrLanguagePacks();
private final TranslationContentPanel panel = new TranslationContentPanel();
private volatile Node node;
private volatile BackgroundTranslationTask updateTask;
private final ThreadFactory translationThreadFactory
= new ThreadFactoryBuilder().setNameFormat("translation-content-viewer-%d").build();
private final ExecutorService executorService = Executors.newSingleThreadExecutor(translationThreadFactory);
@Override
public void setNode(final Node node) {
this.node = node;
SelectionChangeListener displayDropDownListener = new DisplayDropDownChangeListener();
panel.addDisplayTextActionListener(displayDropDownListener);
panel.addOcrDropDownActionListener(new OCRDropdownChangeListener());
Content source = DataContentViewerUtility.getDefaultContent(node);
if (source instanceof AbstractFile) {
boolean isImage = ((AbstractFile) source).getMIMEType().toLowerCase().startsWith("image/");
if (isImage) {
panel.enableOCRSelection(OCR_ENABLED);
panel.addLanguagePackNames(INSTALLED_LANGUAGE_PACKS);
}
}
//Force a background task.
displayDropDownListener.actionPerformed(null);
}
@NbBundle.Messages({"TranslatedTextViewer.title=Translation"})
@Override
public String getTitle() {
return Bundle.TranslatedTextViewer_title();
}
@NbBundle.Messages({"TranslatedTextViewer.toolTip=Displays translated file text."})
@Override
public String getToolTip() {
return Bundle.TranslatedTextViewer_toolTip();
}
@Override
public TextViewer createInstance() {
return new TranslatedTextViewer();
}
@Override
public Component getComponent() {
return panel;
}
@Override
public void resetComponent() {
panel.reset();
this.node = null;
if (updateTask != null) {
updateTask.cancel(true);
}
updateTask = null;
}
@Override
public boolean isSupported(Node node) {
if (null == node) {
return false;
}
if (!TextTranslationService.getInstance().hasProvider()) {
return false;
}
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
return file != null;
}
@Override
public int isPreferred(Node node) {
// Returning zero makes it unlikely this object will be the preferred content viewer,
// i.e., the active tab, when the content viewers are first displayed.
return 0;
}
/**
* Fetches file text and performs translation.
*/
private class BackgroundTranslationTask extends SwingWorker<String, Void> {
@NbBundle.Messages({
"TranslatedContentViewer.noIndexedTextMsg=Run the Keyword Search Ingest Module to get text for translation.",
"TranslatedContentViewer.textAlreadyIndexed=Please view the original text in the Indexed Text viewer.",
"TranslatedContentViewer.errorMsg=Error encountered while getting file text.",
"TranslatedContentViewer.errorExtractingText=Could not extract text from file.",
"TranslatedContentViewer.translatingText=Translating text, please wait..."
})
@Override
public String doInBackground() throws InterruptedException {
if (this.isCancelled()) {
throw new InterruptedException();
}
String dropdownSelection = panel.getDisplayDropDownSelection();
if (dropdownSelection.equals(DisplayDropdownOptions.ORIGINAL_TEXT.toString())) {
try {
return getFileText(node);
} catch (IOException ex) {
return Bundle.TranslatedContentViewer_errorMsg();
} catch (TextExtractor.InitReaderException ex) {
return Bundle.TranslatedContentViewer_errorExtractingText();
}
} else {
try {
return translate(getFileText(node));
} catch (IOException ex) {
return Bundle.TranslatedContentViewer_errorMsg();
} catch (TextExtractor.InitReaderException ex) {
return Bundle.TranslatedContentViewer_errorExtractingText();
}
}
}
/**
* Update the extraction loading message depending on the file type.
*
* @param isImage Boolean indicating if the selecting node is an image
*/
@NbBundle.Messages({"TranslatedContentViewer.extractingImageText=Extracting text from image, please wait...",
"TranslatedContentViewer.extractingFileText=Extracting text from file, please wait...",})
private void updateExtractionLoadingMessage(boolean isImage) {
if (isImage) {
panel.display(Bundle.TranslatedContentViewer_extractingImageText(),
ComponentOrientation.LEFT_TO_RIGHT, Font.ITALIC);
} else {
panel.display(Bundle.TranslatedContentViewer_extractingFileText(),
ComponentOrientation.LEFT_TO_RIGHT, Font.ITALIC);
}
}
@Override
public void done() {
try {
String result = get();
if (this.isCancelled()) {
throw new InterruptedException();
}
int len = result.length();
int maxOrientChars = Math.min(len, 1024);
String orientDetectSubstring = result.substring(0, maxOrientChars);
ComponentOrientation orientation = TextUtil.getTextDirection(orientDetectSubstring);
panel.display(result, orientation, Font.PLAIN);
} catch (InterruptedException | ExecutionException | CancellationException ignored) {
//InterruptedException & CancellationException - User cancelled, no error.
}
}
/**
* Pass the translation off to the Translation service provider.
*
* @param input Text to be translated
*
* @return Translated text or error message
*/
@NbBundle.Messages({
"TranslatedContentViewer.emptyTranslation=The resulting translation was empty.",
"TranslatedContentViewer.noServiceProvider=Machine Translation software was not found.",
"TranslatedContentViewer.translationException=Error encountered while attempting translation."})
private String translate(String input) throws InterruptedException {
if (this.isCancelled()) {
throw new InterruptedException();
}
panel.display(Bundle.TranslatedContentViewer_translatingText(),
ComponentOrientation.LEFT_TO_RIGHT, Font.ITALIC);
try {
TextTranslationService translatorInstance = TextTranslationService.getInstance();
String translatedResult = translatorInstance.translate(input);
if (translatedResult.isEmpty()) {
return Bundle.TranslatedContentViewer_emptyTranslation();
}
return translatedResult;
} catch (NoServiceProviderException ex) {
return Bundle.TranslatedContentViewer_noServiceProvider();
} catch (TranslationException ex) {
return Bundle.TranslatedContentViewer_translationException();
}
}
/**
* Extracts text from the given node
*
* @param node Selected node in UI
*
* @return Extracted text
*
* @throws IOException
* @throws InterruptedException
* @throws
* org.sleuthkit.autopsy.textextractors.TextExtractor.InitReaderException
* @throws NoOpenCoreException
* @throws KeywordSearchModuleException
*/
private String getFileText(Node node) throws IOException,
InterruptedException, TextExtractor.InitReaderException {
AbstractFile source = (AbstractFile) DataContentViewerUtility.getDefaultContent(node);
boolean isImage = false;
if (source != null) {
isImage = source.getMIMEType().toLowerCase().startsWith("image/");
}
updateExtractionLoadingMessage(isImage);
String result;
if (isImage) {
result = extractText(source, OCR_ENABLED);
} else {
result = extractText(source, OCR_DISABLED);
}
//Correct for UTF-8
byte[] resultInUTF8Bytes = result.getBytes("UTF8");
byte[] trimTo1MB = Arrays.copyOfRange(resultInUTF8Bytes, 0, MAX_SIZE_1MB / 1000);
return new String(trimTo1MB, "UTF-8");
}
/**
* Fetches text from a file.
*
* @param source the AbstractFile source to get a Reader for
* @param ocrEnabled true if OCR is enabled false otherwise
*
* @return Extracted Text
*
* @throws IOException
* @throws InterruptedException
* @throws
* org.sleuthkit.autopsy.textextractors.TextExtractor.InitReaderException
*/
private String extractText(AbstractFile source, boolean ocrEnabled) throws IOException, InterruptedException, TextExtractor.InitReaderException {
Reader textExtractor = getTextExtractor(source, ocrEnabled);
char[] cbuf = new char[8096];
StringBuilder textBuilder = new StringBuilder();
//bytesRead can be an int so long as the max file size
//is sufficiently small
int bytesRead = 0;
int read;
while ((read = textExtractor.read(cbuf)) != -1) {
if (this.isCancelled()) {
throw new InterruptedException();
}
//Short-circuit the read if its greater than our max
//translatable size
int bytesLeft = MAX_SIZE_1MB - bytesRead;
if (bytesLeft < read) {
textBuilder.append(cbuf, 0, bytesLeft);
return textBuilder.toString();
}
textBuilder.append(cbuf, 0, read);
bytesRead += read;
}
return textBuilder.toString();
}
/**
* Fetches the appropriate reader for the given file mimetype and
* configures it to use OCR.
*
* @param file File to be read
* @param ocrEnabled Determines if the extractor should be configured
* for OCR
*
* @return Reader containing Content text
*
* @throws IOException
* @throws NoTextReaderFound
*/
private Reader getTextExtractor(AbstractFile file, boolean ocrEnabled) throws IOException,
TextExtractor.InitReaderException {
Lookup context = null;
if (ocrEnabled) {
ImageConfig imageConfig = new ImageConfig();
imageConfig.setOCREnabled(true);
String ocrSelection = panel.getSelectedOcrLanguagePack();
if (!ocrSelection.isEmpty()) {
imageConfig.setOCRLanguages(Lists.newArrayList(ocrSelection));
}
//Terminate any OS process running in the extractor if this
//SwingWorker has been cancelled.
ProcessTerminator terminator = () -> isCancelled();
context = Lookups.fixed(imageConfig, terminator);
}
try {
return TextExtractorFactory.getExtractor(file, context).getReader();
} catch (TextExtractorFactory.NoTextExtractorFound ex) {
//Fall-back onto the strings extractor
return TextExtractorFactory.getStringsExtractor(file, context).getReader();
}
}
}
/**
* Listens for drop-down selection changes and pushes processing off of the
* EDT and into a SwingWorker.
*/
private abstract class SelectionChangeListener implements ActionListener {
public String currentSelection = null;
public abstract String getSelection();
@Override
public final void actionPerformed(ActionEvent e) {
String selection = getSelection();
if (!selection.equals(currentSelection)) {
currentSelection = selection;
if (updateTask != null && !updateTask.isDone()) {
updateTask.cancel(true);
}
updateTask = new BackgroundTranslationTask();
//Pass the background task to a single threaded pool to keep
//the number of jobs running to one.
executorService.execute(updateTask);
}
}
}
/**
* Fetches the display drop down selection from the panel.
*/
private class DisplayDropDownChangeListener extends SelectionChangeListener {
@Override
public String getSelection() {
return panel.getDisplayDropDownSelection();
}
}
/**
* Fetches the OCR drop down selection from the panel.
*/
private class OCRDropdownChangeListener extends SelectionChangeListener {
@Override
public String getSelection() {
return panel.getSelectedOcrLanguagePack();
}
}
}

View File

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="1" pref="628" max="32767" attributes="0"/>
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="jPanel1" min="-2" pref="46" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="66" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
<EtchetBorder/>
</Border>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[600, 81]"/>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="warningLabel2MB" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="ShowLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="displayTextComboBox" min="-2" pref="128" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="ocrLabel" min="-2" pref="26" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="ocrDropdown" min="-2" pref="180" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="279" max="-2" attributes="0"/>
<Component id="jSeparator2" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="204" max="-2" attributes="0"/>
<Component id="jSeparator1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="242" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="9" pref="9" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="103" alignment="1" groupAlignment="3" attributes="0">
<Component id="displayTextComboBox" alignment="3" pref="26" max="32767" attributes="0"/>
<Component id="ShowLabel" alignment="3" max="32767" attributes="0"/>
<Component id="ocrLabel" alignment="3" max="32767" attributes="0"/>
<Component id="warningLabel2MB" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="ocrDropdown" alignment="1" max="32767" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
</Group>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jSeparator1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jSeparator2" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="35" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="ShowLabel">
<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="TranslationContentPanel.ShowLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JSeparator" name="jSeparator1">
<Properties>
<Property name="orientation" type="int" value="1"/>
</Properties>
</Component>
<Component class="javax.swing.JSeparator" name="jSeparator2">
<Properties>
<Property name="orientation" type="int" value="1"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="displayTextComboBox">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="0"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[150, 20]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[150, 20]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JComboBox" name="ocrDropdown">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="1">
<StringItem index="0" value="N/A"/>
</StringArray>
</Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JLabel" name="ocrLabel">
<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="TranslationContentPanel.ocrLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="warningLabel2MB">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/images/warning16.png"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/texttranslation/ui/Bundle.properties" key="TranslationContentPanel.warningLabel2MB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="displayTextArea">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="columns" type="int" value="20"/>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Tahoma" size="11" style="0"/>
</Property>
<Property name="lineWrap" type="boolean" value="true"/>
<Property name="rows" type="int" value="5"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[2000, 2000]"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@ -0,0 +1,389 @@
/*
* 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.ui;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableBiMap;
import java.awt.ComponentOrientation;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JComboBox;
import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
/**
* A JPanel used by TranslatedContentViewer to display machine translation of
* text.
*/
public class TranslationContentPanel extends javax.swing.JPanel {
private static final ImmutableBiMap<String, String> LANGUAGE_NAMES;
private static final long serialVersionUID = 1L;
private int lastSelectedIndex = 0;
/**
* Creates new form TranslatedContentPanel
*/
public TranslationContentPanel() {
initComponents();
reset();
}
final void removeDisplayTextOptions(String option) {
displayTextComboBox.removeItem(option);
}
public void display(String text, ComponentOrientation direction, int font) {
displayTextArea.setComponentOrientation(direction);
displayTextArea.setText(text);
displayTextArea.setFont(new Font(displayTextArea.getFont().getName(),
font, displayTextArea.getFont().getSize()));
displayTextArea.setCaretPosition(0);
}
void addDisplayTextActionListener(ActionListener listener) {
displayTextComboBox.addActionListener(listener);
}
final void addOcrDropDownActionListener(ActionListener listener) {
ocrDropdown.addActionListener(listener);
}
String getDisplayDropDownSelection() {
return (String) displayTextComboBox.getSelectedItem();
}
String getSelectedOcrLanguagePack() {
String selection = (String) ocrDropdown.getSelectedItem();
return Strings.nullToEmpty(LANGUAGE_NAMES.inverse().get(selection));
}
/**
* Remove all action listeners from a JComboBox.
*
* @param dropDown Src ComboBox to remove listeners from
*/
private void removeAllActionListeners(JComboBox<String> dropDown) {
for (ActionListener listener : dropDown.getActionListeners()) {
dropDown.removeActionListener(listener);
}
}
@NbBundle.Messages({"TranslationContentPanel.autoDetectOCR=Autodetect language"})
final void reset() {
display("", ComponentOrientation.LEFT_TO_RIGHT, Font.PLAIN);
removeAllActionListeners(displayTextComboBox);
displayTextComboBox.removeAllItems();
displayTextComboBox.addItem(DisplayDropdownOptions.TRANSLATED_TEXT.toString());
displayTextComboBox.addItem(DisplayDropdownOptions.ORIGINAL_TEXT.toString());
enableOCRSelection(false);
removeAllActionListeners(ocrDropdown);
ocrDropdown.removeAllItems();
}
final void enableOCRSelection(boolean enabled) {
ocrLabel.setEnabled(enabled);
ocrDropdown.setEnabled(enabled);
}
/**
* Populates the OCR drop-down menu with installed language packs.
*
* @param languagePackAbbreviations
*/
void addLanguagePackNames(List<String> languagePackAbbreviations) {
//Put the default at the top of the list.
ocrDropdown.addItem(Bundle.TranslationContentPanel_autoDetectOCR());
//Create a shallow copy of the input list for sorting
List<String> localCopy = new ArrayList<>(languagePackAbbreviations);
localCopy.stream().sorted().forEach((abbrev) -> {
if (LANGUAGE_NAMES.get(abbrev) != null) {
ocrDropdown.addItem(LANGUAGE_NAMES.get(abbrev));
}
});
ocrDropdown.setSelectedIndex(lastSelectedIndex);
addOcrDropDownActionListener((ActionEvent e) -> {
lastSelectedIndex = ocrDropdown.getSelectedIndex();
});
}
private static ImmutableBiMap<String, String> createLanguageBiMap() {
return ImmutableBiMap.<String, String>builder()
.put("afr", "Afrikaans")
.put("amh", "Amharic")
.put("ara", "Arabic")
.put("asm", "Assamese")
.put("aze", "Azerbaijani")
.put("aze_cyrl", "Azerbaijani - Cyrillic")
.put("bel", "Belarusian")
.put("ben", "Bengali")
.put("bod", "Tibetan")
.put("bos", "Bosnian")
.put("bul", "Bulgarian")
.put("cat", "Catalan; Valencian")
.put("ceb", "Cebuano")
.put("ces", "Czech")
.put("chi_sim", "Chinese - Simplified")
.put("chi_tra", "Chinese - Traditional")
.put("chr", "Cherokee")
.put("cym", "Welsh")
.put("dan", "Danish")
.put("deu", "German")
.put("dzo", "Dzongkha")
.put("ell", "Greek, Modern (1453-)")
.put("eng", "English")
.put("enm", "English, Middle (1100-1500)")
.put("epo", "Esperanto")
.put("est", "Estonian")
.put("eus", "Basque")
.put("fas", "Persian")
.put("fin", "Finnish")
.put("fra", "French")
.put("frk", "Frankish")
.put("frm", "French, Middle (ca. 1400-1600)")
.put("gle", "Irish")
.put("glg", "Galician")
.put("grc", "Greek, Ancient (-1453)")
.put("guj", "Gujarati")
.put("hat", "Haitian; Haitian Creole")
.put("heb", "Hebrew")
.put("hin", "Hindi")
.put("hrv", "Croatian")
.put("hun", "Hungarian")
.put("iku", "Inuktitut")
.put("ind", "Indonesian")
.put("isl", "Icelandic")
.put("ita", "Italian")
.put("ita_old", "Italian - Old")
.put("jav", "Javanese")
.put("jpn", "Japanese")
.put("kan", "Kannada")
.put("kat", "Georgian")
.put("kat_old", "Georgian - Old")
.put("kaz", "Kazakh")
.put("khm", "Central Khmer")
.put("kir", "Kirghiz; Kyrgyz")
.put("kor", "Korean")
.put("kur", "Kurdish")
.put("lao", "Lao")
.put("lat", "Latin")
.put("lav", "Latvian")
.put("lit", "Lithuanian")
.put("mal", "Malayalam")
.put("mar", "Marathi")
.put("mkd", "Macedonian")
.put("mlt", "Maltese")
.put("msa", "Malay")
.put("mya", "Burmese")
.put("nep", "Nepali")
.put("nld", "Dutch; Flemish")
.put("nor", "Norwegian")
.put("ori", "Oriya")
.put("pan", "Panjabi; Punjabi")
.put("pol", "Polish")
.put("por", "Portuguese")
.put("pus", "Pushto; Pashto")
.put("ron", "Romanian; Moldavian; Moldovan")
.put("rus", "Russian")
.put("san", "Sanskrit")
.put("sin", "Sinhala; Sinhalese")
.put("slk", "Slovak")
.put("slv", "Slovenian")
.put("spa", "Spanish; Castilian")
.put("spa_old", "Spanish; Castilian - Old")
.put("sqi", "Albanian")
.put("srp", "Serbian")
.put("srp_latn", "Serbian - Latin")
.put("swa", "Swahili")
.put("swe", "Swedish")
.put("syr", "Syriac")
.put("tam", "Tamil")
.put("tel", "Telugu")
.put("tgk", "Tajik")
.put("tgl", "Tagalog")
.put("tha", "Thai")
.put("tir", "Tigrinya")
.put("tur", "Turkish")
.put("uig", "Uighur; Uyghur")
.put("ukr", "Ukrainian")
.put("urd", "Urdu")
.put("uzb", "Uzbek")
.put("uzb_cyrl", "Uzbek - Cyrillic")
.put("vie", "Vietnamese")
.put("yid", "Yiddish")
.build();
}
static {
//https://github.com/tesseract-ocr/tesseract/wiki/Data-Files
LANGUAGE_NAMES = createLanguageBiMap();
}
/**
* Selection choices to be displayed in the combobox dropdown.
*/
@Messages({"TranslatedContentPanel.comboBoxOption.originalText=Original Text",
"TranslatedContentPanel.comboBoxOption.translatedText=Translated Text"})
static enum DisplayDropdownOptions {
ORIGINAL_TEXT(Bundle.TranslatedContentPanel_comboBoxOption_originalText()),
TRANSLATED_TEXT(Bundle.TranslatedContentPanel_comboBoxOption_translatedText());
private final String displayString;
DisplayDropdownOptions(String displayString) {
this.displayString = displayString;
}
@Override
public String toString() {
return displayString;
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
ShowLabel = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jSeparator2 = new javax.swing.JSeparator();
displayTextComboBox = new javax.swing.JComboBox<>();
ocrDropdown = new javax.swing.JComboBox<>();
ocrLabel = new javax.swing.JLabel();
warningLabel2MB = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
displayTextArea = new javax.swing.JTextArea();
jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
jPanel1.setPreferredSize(new java.awt.Dimension(600, 81));
org.openide.awt.Mnemonics.setLocalizedText(ShowLabel, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.ShowLabel.text")); // NOI18N
jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
displayTextComboBox.setMinimumSize(new java.awt.Dimension(150, 20));
displayTextComboBox.setPreferredSize(new java.awt.Dimension(150, 20));
ocrDropdown.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "N/A" }));
ocrDropdown.setEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(ocrLabel, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.ocrLabel.text")); // NOI18N
ocrLabel.setEnabled(false);
warningLabel2MB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/warning16.png"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(warningLabel2MB, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.warningLabel2MB.text")); // NOI18N
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(warningLabel2MB)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(ShowLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(displayTextComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ocrLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ocrDropdown, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(279, 279, 279)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(204, 204, 204)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(242, Short.MAX_VALUE)))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGap(9, 9, 9)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(displayTextComboBox, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE)
.addComponent(ShowLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(ocrLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(warningLabel2MB))
.addComponent(ocrDropdown))
.addGap(7, 7, 7))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(35, Short.MAX_VALUE)))
);
displayTextArea.setEditable(false);
displayTextArea.setColumns(20);
displayTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
displayTextArea.setLineWrap(true);
displayTextArea.setRows(5);
displayTextArea.setMaximumSize(new java.awt.Dimension(2000, 2000));
jScrollPane1.setViewportView(displayTextArea);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 628, Short.MAX_VALUE)
.addComponent(jScrollPane1)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel ShowLabel;
private javax.swing.JTextArea displayTextArea;
private javax.swing.JComboBox<String> displayTextComboBox;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
private javax.swing.JComboBox<String> ocrDropdown;
private javax.swing.JLabel ocrLabel;
private javax.swing.JLabel warningLabel2MB;
// End of variables declaration//GEN-END:variables
}

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="translationServiceLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="translatorComboBox" min="-2" pref="214" max="-2" attributes="0"/>
<EmptySpace min="0" pref="162" max="32767" attributes="0"/>
</Group>
<Component id="translationServicePanel" alignment="1" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="translatorComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="translationServiceLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="translationServicePanel" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JComboBox" name="translatorComboBox">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="translatorComboBoxActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<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, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JPanel" name="translationServicePanel">
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
</Container>
</SubComponents>
</Form>

View File

@ -0,0 +1,198 @@
/*
* 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.ui;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
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 {
private final static Logger logger = Logger.getLogger(TranslationOptionsPanel.class.getName());
private static final long serialVersionUID = 1L;
private final TranslationOptionsPanelController controller;
private String currentSelection = "";
/**
* Creates new form TranslationOptionsPanel
*/
@Messages({"TranslationOptionsPanel.translationDisabled.text=Translation disabled"})
public TranslationOptionsPanel(TranslationOptionsPanelController theController) {
initComponents();
controller = theController;
translatorComboBox.addItem(Bundle.TranslationOptionsPanel_translationDisabled_text());
TextTranslationService.getInstance().getTranslators().forEach((translator) -> {
translatorComboBox.addItem(translator.getName());
});
translatorComboBox.setEnabled(translatorComboBox.getItemCount() > 1);
load();
}
/**
* Private helper method to update the panel if the selected TextTranslator
* has changed
*/
private void updatePanel() {
if (!currentSelection.equals(translatorComboBox.getSelectedItem().toString())) {
currentSelection = translatorComboBox.getSelectedItem().toString();
loadSelectedPanelSettings();
controller.changed();
}
}
/**
* Load the settings for the selected TextTranslator's panel
*/
@Messages({"TranslationOptionsPanel.textTranslatorsUnavailable.text=Unable to get selected text translator, translation is disabled.",
"TranslationOptionsPanel.noTextTranslatorSelected.text=No text translator selected, translation is disabled.",
"TranslationOptionsPanel.noTextTranslators.text=No text translators exist, translation is disabled."})
private void loadSelectedPanelSettings() {
translationServicePanel.removeAll();
if (translatorComboBox.getSelectedItem() != null && !translatorComboBox.getSelectedItem().toString().equals(Bundle.TranslationOptionsPanel_translationDisabled_text())) {
try {
Component panel = TextTranslationService.getInstance().getTranslatorByName(translatorComboBox.getSelectedItem().toString()).getComponent();
panel.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
controller.changed();
}
});
translationServicePanel.add(panel, BorderLayout.PAGE_START);
} catch (NoServiceProviderException ex) {
logger.log(Level.WARNING, "Unable to get TextExtractor named: " + translatorComboBox.getSelectedItem().toString(), ex);
JLabel label = new JLabel(Bundle.TranslationOptionsPanel_textTranslatorsUnavailable_text());
label.setForeground(Color.RED);
translationServicePanel.add(label, BorderLayout.PAGE_START);
}
} else {
if (translatorComboBox.getItemCount() < 2) {
translationServicePanel.add(new JLabel(Bundle.TranslationOptionsPanel_noTextTranslators_text()), BorderLayout.PAGE_START);
} else {
translationServicePanel.add(new JLabel(Bundle.TranslationOptionsPanel_noTextTranslatorSelected_text()), BorderLayout.PAGE_START);
}
}
revalidate();
repaint();
}
/**
* Load settings from user preferences and update the UI
*/
final void load() {
currentSelection = UserPreferences.getTextTranslatorName();
if (currentSelection == null) {
currentSelection = Bundle.TranslationOptionsPanel_translationDisabled_text();
}
translatorComboBox.setSelectedItem(currentSelection);
loadSelectedPanelSettings();
}
/**
* Save the current settings
*/
void store() {
//The current text translator name is saved to user preferences
UserPreferences.setTextTranslatorName(currentSelection);
//The TextTranslationService updates the TextTranslator in use from user preferences
TextTranslationService.getInstance().updateSelectedTranslator();
if (currentSelection != null && !currentSelection.equals(Bundle.TranslationOptionsPanel_translationDisabled_text())) {
try {
TextTranslationService.getInstance().getTranslatorByName(currentSelection).saveSettings();
} catch (NoServiceProviderException ex) {
logger.log(Level.WARNING, "Unable to save settings for TextTranslator named: " + currentSelection, ex);
}
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
translatorComboBox = new javax.swing.JComboBox<>();
translationServiceLabel = new javax.swing.JLabel();
translationServicePanel = new javax.swing.JPanel();
translatorComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
translatorComboBoxActionPerformed(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(translationServiceLabel, org.openide.util.NbBundle.getMessage(TranslationOptionsPanel.class, "TranslationOptionsPanel.translationServiceLabel.text")); // NOI18N
translationServicePanel.setLayout(new java.awt.BorderLayout());
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(translationServiceLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(translatorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 162, Short.MAX_VALUE))
.addComponent(translationServicePanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(translatorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(translationServiceLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(translationServicePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
}// </editor-fold>//GEN-END:initComponents
private void translatorComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_translatorComboBoxActionPerformed
updatePanel();
}//GEN-LAST:event_translatorComboBoxActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel translationServiceLabel;
private javax.swing.JPanel translationServicePanel;
private javax.swing.JComboBox<String> translatorComboBox;
// End of variables declaration//GEN-END:variables
}

View File

@ -0,0 +1,141 @@
/*
* 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.ui;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import javax.swing.JComponent;
import org.netbeans.spi.options.OptionsPanelController;
import org.openide.util.HelpCtx;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import java.util.logging.Level;
import org.sleuthkit.autopsy.coreutils.Logger;
/**
* Controller for the TranslationOptionsPanel
*/
@OptionsPanelController.TopLevelRegistration(categoryName = "#OptionsCategory_Name_Machine_Translation",
iconBase = "org/sleuthkit/autopsy/images/translate32.png",
position = 7,
keywords = "#OptionsCategory_Keywords_Machine_Translation_Settings",
keywordsCategory = "Machine Translation")
public class TranslationOptionsPanelController extends OptionsPanelController {
private static final Logger logger = Logger.getLogger(TranslationOptionsPanelController.class.getName());
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
private boolean changed;
private TranslationOptionsPanel panel;
@Override
public void update() {
getPanel().load();
changed = false;
}
@Override
public void applyChanges() {
getPanel().store();
changed = false;
}
@Override
public void cancel() {
}
@Override
public boolean isValid() {
return true;
}
@Override
public boolean isChanged() {
return changed;
}
@Override
public HelpCtx getHelpCtx() {
return null;
}
@Override
public JComponent getComponent(Lookup masterLookup) {
return getPanel();
}
@Override
public void addPropertyChangeListener(PropertyChangeListener l) {
if (pcs.getPropertyChangeListeners().length == 0) {
pcs.addPropertyChangeListener(l);
}
}
@Override
public void removePropertyChangeListener(PropertyChangeListener l) {
/**
* Note the NetBeans Framework does not appear to call this at all. We
* are using NetBeans 7.3.1 Build 201306052037. Perhaps in a future
* version of the Framework this will be resolved, but for now, simply
* don't unregister anything and add one time only in the
* addPropertyChangeListener() method above.
*/
}
/**
* Get the translation options panel
*
* @return
*/
private TranslationOptionsPanel getPanel() {
if (panel == null) {
panel = new TranslationOptionsPanel(this);
}
return panel;
}
/**
* Indicate that a setting has been changed in the options panel
*/
void changed() {
if (!changed) {
changed = true;
try {
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
} catch (Exception e) {
logger.log(Level.SEVERE, "TranslationOptionsPanelController listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "TranslationOptionsPanelController.moduleErr"),
NbBundle.getMessage(this.getClass(), "TranslationOptionsPanelController.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}
try {
pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
} catch (Exception e) {
logger.log(Level.SEVERE, "TranslationOptionsPanelController listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "TranslationOptionsPanelController.moduleErr"),
NbBundle.getMessage(this.getClass(), "TranslationOptionsPanelController.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}
}

View File

@ -70,7 +70,9 @@
<dependency conf="autopsy_core->default" org="com.twelvemonkeys.imageio" name="imageio-thumbsdb" rev="3.2" /> <dependency conf="autopsy_core->default" org="com.twelvemonkeys.imageio" name="imageio-thumbsdb" rev="3.2" />
<dependency conf="autopsy_core->default" org="com.twelvemonkeys.imageio" name="imageio-core" rev="3.2" /> <dependency conf="autopsy_core->default" org="com.twelvemonkeys.imageio" name="imageio-core" rev="3.2" />
<dependency conf="autopsy_core->default" org="com.twelvemonkeys.imageio" name="imageio-metadata" rev="3.2" /> <dependency conf="autopsy_core->default" org="com.twelvemonkeys.imageio" name="imageio-metadata" rev="3.2" />
<dependency conf="autopsy_core->default" org="com.googlecode.plist" name="dd-plist" rev="1.20"/> <dependency conf="autopsy_core->default" org="com.googlecode.plist" name="dd-plist" rev="1.20"/>
<exclude org="*" ext="*" type="javadoc"/>
<!-- conflict resolutions for multiple JAR versions --> <!-- conflict resolutions for multiple JAR versions -->
<conflict org="net.java.dev.jna" module="jna" rev="3.4.0"/> <conflict org="net.java.dev.jna" module="jna" rev="3.4.0"/>
<conflict org="net.java.dev.jna" module="platform" rev="3.4.0"/> <conflict org="net.java.dev.jna" module="platform" rev="3.4.0"/>

View File

@ -13,17 +13,13 @@ file.reference.commons-csv-1.4.jar=release/modules/ext/commons-csv-1.4.jar
file.reference.commons-io-2.4.jar=release/modules/ext/commons-io-2.4.jar file.reference.commons-io-2.4.jar=release/modules/ext/commons-io-2.4.jar
file.reference.commons-io-2.5.jar=release/modules/ext/commons-io-2.5.jar file.reference.commons-io-2.5.jar=release/modules/ext/commons-io-2.5.jar
file.reference.commons-lang-2.6.jar=release/modules/ext/commons-lang-2.6.jar file.reference.commons-lang-2.6.jar=release/modules/ext/commons-lang-2.6.jar
file.reference.commons-lang3-3.0-javadoc.jar=release/modules/ext/commons-lang3-3.0-javadoc.jar
file.reference.commons-lang3-3.0-sources.jar=release/modules/ext/commons-lang3-3.0-sources.jar
file.reference.commons-lang3-3.0.jar=release/modules/ext/commons-lang3-3.0.jar file.reference.commons-lang3-3.0.jar=release/modules/ext/commons-lang3-3.0.jar
file.reference.commons-logging-1.1.2-javadoc.jar=release/modules/ext/commons-logging-1.1.2-javadoc.jar
file.reference.commons-logging-1.1.2-sources.jar=release/modules/ext/commons-logging-1.1.2-sources.jar
file.reference.commons-logging-1.1.2.jar=release/modules/ext/commons-logging-1.1.2.jar file.reference.commons-logging-1.1.2.jar=release/modules/ext/commons-logging-1.1.2.jar
file.reference.compiler-0.9.1.jar=release/modules/ext/compiler-0.9.1.jar file.reference.compiler-0.9.1.jar=release/modules/ext/compiler-0.9.1.jar
file.reference.controlsfx-8.40.11.jar=release/modules/ext/controlsfx-8.40.11.jar file.reference.controlsfx-8.40.11.jar=release/modules/ext/controlsfx-8.40.11.jar
file.reference.dom4j-1.6.1.jar=release/modules/ext/dom4j-1.6.1.jar file.reference.dom4j-1.6.1.jar=release/modules/ext/dom4j-1.6.1.jar
file.reference.geronimo-jms_1.1_spec-1.0.jar=release/modules/ext/geronimo-jms_1.1_spec-1.0.jar file.reference.geronimo-jms_1.1_spec-1.0.jar=release/modules/ext/geronimo-jms_1.1_spec-1.0.jar
file.reference.gson-2.8.5.jar=release\\modules\\ext\\gson-2.8.5.jar file.reference.gson-2.8.5.jar=release/modules/ext/gson-2.8.5.jar
file.reference.gst1-java-core-1.0.0.jar=release\\modules\\ext\\gst1-java-core-1.0.0.jar file.reference.gst1-java-core-1.0.0.jar=release\\modules\\ext\\gst1-java-core-1.0.0.jar
file.reference.jna-3.4.0.jar=release/modules/ext/jna-3.4.0.jar file.reference.jna-3.4.0.jar=release/modules/ext/jna-3.4.0.jar
file.reference.guava-19.0.jar=release/modules/ext/guava-19.0.jar file.reference.guava-19.0.jar=release/modules/ext/guava-19.0.jar
@ -41,8 +37,6 @@ file.reference.imageio-sgi-3.2.jar=release/modules/ext/imageio-sgi-3.2.jar
file.reference.imageio-tga-3.2.jar=release/modules/ext/imageio-tga-3.2.jar file.reference.imageio-tga-3.2.jar=release/modules/ext/imageio-tga-3.2.jar
file.reference.imageio-thumbsdb-3.2.jar=release/modules/ext/imageio-thumbsdb-3.2.jar file.reference.imageio-thumbsdb-3.2.jar=release/modules/ext/imageio-thumbsdb-3.2.jar
file.reference.imageio-tiff-3.2.jar=release/modules/ext/imageio-tiff-3.2.jar file.reference.imageio-tiff-3.2.jar=release/modules/ext/imageio-tiff-3.2.jar
file.reference.imgscalr-lib-4.2-javadoc.jar=release/modules/ext/imgscalr-lib-4.2-javadoc.jar
file.reference.imgscalr-lib-4.2-sources.jar=release/modules/ext/imgscalr-lib-4.2-sources.jar
file.reference.imgscalr-lib-4.2.jar=release/modules/ext/imgscalr-lib-4.2.jar file.reference.imgscalr-lib-4.2.jar=release/modules/ext/imgscalr-lib-4.2.jar
file.reference.javaee-api-5.0-2.jar=release/modules/ext/javaee-api-5.0-2.jar file.reference.javaee-api-5.0-2.jar=release/modules/ext/javaee-api-5.0-2.jar
file.reference.javassist-3.12.1.GA.jar=release/modules/ext/javassist-3.12.1.GA.jar file.reference.javassist-3.12.1.GA.jar=release/modules/ext/javassist-3.12.1.GA.jar
@ -50,8 +44,6 @@ file.reference.jfxtras-common-8.0-r4.jar=release/modules/ext/jfxtras-common-8.0-
file.reference.jfxtras-controls-8.0-r4.jar=release/modules/ext/jfxtras-controls-8.0-r4.jar file.reference.jfxtras-controls-8.0-r4.jar=release/modules/ext/jfxtras-controls-8.0-r4.jar
file.reference.jfxtras-fxml-8.0-r4.jar=release/modules/ext/jfxtras-fxml-8.0-r4.jar file.reference.jfxtras-fxml-8.0-r4.jar=release/modules/ext/jfxtras-fxml-8.0-r4.jar
file.reference.jna-3.4.0.jar=release/modules/ext/jna-3.4.0.jar file.reference.jna-3.4.0.jar=release/modules/ext/jna-3.4.0.jar
file.reference.joda-time-2.4-javadoc.jar=release/modules/ext/joda-time-2.4-javadoc.jar
file.reference.joda-time-2.4-sources.jar=release/modules/ext/joda-time-2.4-sources.jar
file.reference.joda-time-2.4.jar=release/modules/ext/joda-time-2.4.jar file.reference.joda-time-2.4.jar=release/modules/ext/joda-time-2.4.jar
file.reference.jsr305-1.3.9.jar=release/modules/ext/jsr305-1.3.9.jar file.reference.jsr305-1.3.9.jar=release/modules/ext/jsr305-1.3.9.jar
file.reference.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1.jar file.reference.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1.jar
@ -68,7 +60,6 @@ file.reference.poi-ooxml-schemas-4.0.1.jar=release\\modules\\ext\\poi-ooxml-sche
file.reference.poi-scratchpad-4.0.1.jar=release\\modules\\ext\\poi-scratchpad-4.0.1.jar file.reference.poi-scratchpad-4.0.1.jar=release\\modules\\ext\\poi-scratchpad-4.0.1.jar
file.reference.reflections-0.9.8.jar=release/modules/ext/reflections-0.9.8.jar file.reference.reflections-0.9.8.jar=release/modules/ext/reflections-0.9.8.jar
file.reference.servlet-api-2.5.jar=release/modules/ext/servlet-api-2.5.jar file.reference.servlet-api-2.5.jar=release/modules/ext/servlet-api-2.5.jar
file.reference.sigar-1.6.4-sources.jar=release/modules/ext/sigar-1.6.4-sources.jar
file.reference.sigar-1.6.4.jar=release/modules/ext/sigar-1.6.4.jar file.reference.sigar-1.6.4.jar=release/modules/ext/sigar-1.6.4.jar
file.reference.slf4j-api-1.6.1.jar=release/modules/ext/slf4j-api-1.6.1.jar file.reference.slf4j-api-1.6.1.jar=release/modules/ext/slf4j-api-1.6.1.jar
file.reference.slf4j-simple-1.6.1.jar=release/modules/ext/slf4j-simple-1.6.1.jar file.reference.slf4j-simple-1.6.1.jar=release/modules/ext/slf4j-simple-1.6.1.jar

View File

@ -762,10 +762,6 @@
<package>schemaorg_apache_xmlbeans.system.sXMLSCHEMA</package> <package>schemaorg_apache_xmlbeans.system.sXMLSCHEMA</package>
<package>schemaorg_apache_xmlbeans.system.sXMLTOOLS</package> <package>schemaorg_apache_xmlbeans.system.sXMLTOOLS</package>
</public-packages> </public-packages>
<class-path-extension>
<runtime-relative-path>ext/commons-logging-1.1.2-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-logging-1.1.2-sources.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/imageio-thumbsdb-3.2.jar</runtime-relative-path> <runtime-relative-path>ext/imageio-thumbsdb-3.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/imageio-thumbsdb-3.2.jar</binary-origin> <binary-origin>release/modules/ext/imageio-thumbsdb-3.2.jar</binary-origin>
@ -802,10 +798,6 @@
<runtime-relative-path>ext/imageio-icns-3.2.jar</runtime-relative-path> <runtime-relative-path>ext/imageio-icns-3.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/imageio-icns-3.2.jar</binary-origin> <binary-origin>release/modules/ext/imageio-icns-3.2.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/imgscalr-lib-4.2-javadoc.jar</runtime-relative-path>
<binary-origin>release/modules/ext/imgscalr-lib-4.2-javadoc.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/AppleJavaExtensions-1.4.jar</runtime-relative-path> <runtime-relative-path>ext/AppleJavaExtensions-1.4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/AppleJavaExtensions-1.4.jar</binary-origin> <binary-origin>release/modules/ext/AppleJavaExtensions-1.4.jar</binary-origin>
@ -818,6 +810,10 @@
<runtime-relative-path>ext/jna-3.4.0.jar</runtime-relative-path> <runtime-relative-path>ext/jna-3.4.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jna-3.4.0.jar</binary-origin> <binary-origin>release/modules/ext/jna-3.4.0.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/gson-2.8.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/gson-2.8.5.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/jfxtras-common-8.0-r4.jar</runtime-relative-path> <runtime-relative-path>ext/jfxtras-common-8.0-r4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-common-8.0-r4.jar</binary-origin> <binary-origin>release/modules/ext/jfxtras-common-8.0-r4.jar</binary-origin>
@ -842,10 +838,6 @@
<runtime-relative-path>ext/xmlbeans-3.0.2.jar</runtime-relative-path> <runtime-relative-path>ext/xmlbeans-3.0.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/xmlbeans-3.0.2.jar</binary-origin> <binary-origin>release/modules/ext/xmlbeans-3.0.2.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-lang3-3.0-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-lang3-3.0-sources.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/mail-1.4.3.jar</runtime-relative-path> <runtime-relative-path>ext/mail-1.4.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/mail-1.4.3.jar</binary-origin> <binary-origin>release/modules/ext/mail-1.4.3.jar</binary-origin>
@ -866,10 +858,6 @@
<runtime-relative-path>ext/activation-1.1.jar</runtime-relative-path> <runtime-relative-path>ext/activation-1.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/activation-1.1.jar</binary-origin> <binary-origin>release/modules/ext/activation-1.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/joda-time-2.4-javadoc.jar</runtime-relative-path>
<binary-origin>release/modules/ext/joda-time-2.4-javadoc.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/poi-scratchpad-4.0.1.jar</runtime-relative-path> <runtime-relative-path>ext/poi-scratchpad-4.0.1.jar</runtime-relative-path>
<binary-origin>release\modules\ext\poi-scratchpad-4.0.1.jar</binary-origin> <binary-origin>release\modules\ext\poi-scratchpad-4.0.1.jar</binary-origin>
@ -898,10 +886,6 @@
<runtime-relative-path>ext/log4j-1.2.17.jar</runtime-relative-path> <runtime-relative-path>ext/log4j-1.2.17.jar</runtime-relative-path>
<binary-origin>release/modules/ext/log4j-1.2.17.jar</binary-origin> <binary-origin>release/modules/ext/log4j-1.2.17.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/sigar-1.6.4-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sigar-1.6.4-sources.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/avalon-framework-4.1.5.jar</runtime-relative-path> <runtime-relative-path>ext/avalon-framework-4.1.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/avalon-framework-4.1.5.jar</binary-origin> <binary-origin>release/modules/ext/avalon-framework-4.1.5.jar</binary-origin>
@ -926,10 +910,6 @@
<runtime-relative-path>ext/geronimo-jms_1.1_spec-1.0.jar</runtime-relative-path> <runtime-relative-path>ext/geronimo-jms_1.1_spec-1.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/geronimo-jms_1.1_spec-1.0.jar</binary-origin> <binary-origin>release/modules/ext/geronimo-jms_1.1_spec-1.0.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/joda-time-2.4-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/joda-time-2.4-sources.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/jfxtras-fxml-8.0-r4.jar</runtime-relative-path> <runtime-relative-path>ext/jfxtras-fxml-8.0-r4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-fxml-8.0-r4.jar</binary-origin> <binary-origin>release/modules/ext/jfxtras-fxml-8.0-r4.jar</binary-origin>
@ -942,18 +922,6 @@
<runtime-relative-path>ext/commons-compress-1.18.jar</runtime-relative-path> <runtime-relative-path>ext/commons-compress-1.18.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-compress-1.18.jar</binary-origin> <binary-origin>release/modules/ext/commons-compress-1.18.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-logging-1.1.2-javadoc.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-logging-1.1.2-javadoc.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/opencv-248.jar</runtime-relative-path>
<binary-origin>release/modules/ext/opencv-248.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/gson-2.8.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/gson-2.8.5.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/opencv-248.jar</runtime-relative-path> <runtime-relative-path>ext/opencv-248.jar</runtime-relative-path>
<binary-origin>release/modules/ext/opencv-248.jar</binary-origin> <binary-origin>release/modules/ext/opencv-248.jar</binary-origin>
@ -978,10 +946,6 @@
<runtime-relative-path>ext/imageio-bmp-3.2.jar</runtime-relative-path> <runtime-relative-path>ext/imageio-bmp-3.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/imageio-bmp-3.2.jar</binary-origin> <binary-origin>release/modules/ext/imageio-bmp-3.2.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-lang3-3.0-javadoc.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-lang3-3.0-javadoc.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/platform-3.4.0.jar</runtime-relative-path> <runtime-relative-path>ext/platform-3.4.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/platform-3.4.0.jar</binary-origin> <binary-origin>release/modules/ext/platform-3.4.0.jar</binary-origin>
@ -1058,10 +1022,6 @@
<runtime-relative-path>ext/imageio-metadata-3.2.jar</runtime-relative-path> <runtime-relative-path>ext/imageio-metadata-3.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/imageio-metadata-3.2.jar</binary-origin> <binary-origin>release/modules/ext/imageio-metadata-3.2.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/imgscalr-lib-4.2-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/imgscalr-lib-4.2-sources.jar</binary-origin>
</class-path-extension>
</data> </data>
</configuration> </configuration>
</project> </project>

View File

@ -208,13 +208,15 @@ DeleteOrphanCaseNodesAction.progressDisplayName=Cleanup Case Znodes
DeleteOrphanCaseNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service DeleteOrphanCaseNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service
# {0} - node path # {0} - node path
DeleteOrphanCaseNodesTask.progress.deletingOrphanedCaseNode=Deleting orphaned case znode {0} DeleteOrphanCaseNodesTask.progress.deletingOrphanedCaseNode=Deleting orphaned case znode {0}
DeleteOrphanCaseNodesTask.progress.gettingCaseNodesListing=Querying coordination service for case znodes DeleteOrphanCaseNodesTask.progress.gettingCaseZnodes=Querying the coordination service for case znodes
DeleteOrphanCaseNodesTask.progress.lookingForOrphanedCaseZnodes=Looking for orphaned case znodes
DeleteOrphanCaseNodesTask.progress.startMessage=Starting orphaned case znode cleanup DeleteOrphanCaseNodesTask.progress.startMessage=Starting orphaned case znode cleanup
DeleteOrphanManifestNodesAction.progressDisplayName=Cleanup Manifest File Znodes DeleteOrphanManifestNodesAction.progressDisplayName=Cleanup Manifest File Znodes
DeleteOrphanManifestNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service DeleteOrphanManifestNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service
# {0} - node path # {0} - node path
DeleteOrphanManifestNodesTask.progress.deletingOrphanedManifestNode=Deleting orphaned manifest file znode {0} DeleteOrphanManifestNodesTask.progress.deletingOrphanedManifestNode=Deleting orphaned manifest file znode {0}
DeleteOrphanManifestNodesTask.progress.gettingManifestNodes=Querying the coordination service for manifest file znodes DeleteOrphanManifestNodesTask.progress.gettingManifestNodes=Querying the coordination service for manifest file znodes
DeleteOrphanManifestNodesTask.progress.lookingForOrphanedManifestFileZnodes=Looking for orphaned manifest file znodes
DeleteOrphanManifestNodesTask.progress.startMessage=Starting orphaned manifest file znode cleanup DeleteOrphanManifestNodesTask.progress.startMessage=Starting orphaned manifest file znode cleanup
HINT_CasesDashboardTopComponent=This is an adminstrative dashboard for multi-user cases HINT_CasesDashboardTopComponent=This is an adminstrative dashboard for multi-user cases
OpenAutoIngestLogAction.deletedLogErrorMsg=The case auto ingest log has been deleted. OpenAutoIngestLogAction.deletedLogErrorMsg=The case auto ingest log has been deleted.

View File

@ -20,12 +20,14 @@ package org.sleuthkit.autopsy.experimental.autoingest;
import java.io.File; import java.io.File;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData;
import org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeDataCollector;
import org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils; import org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils;
import static org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils.isCaseAutoIngestLogNodePath;
import static org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils.isCaseNameNodePath;
import static org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils.isCaseResourcesNodePath;
import org.sleuthkit.autopsy.coordinationservice.CoordinationService; import org.sleuthkit.autopsy.coordinationservice.CoordinationService;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.progress.ProgressIndicator; import org.sleuthkit.autopsy.progress.ProgressIndicator;
@ -38,6 +40,8 @@ final class DeleteOrphanCaseNodesTask implements Runnable {
private static final Logger logger = AutoIngestDashboardLogger.getLogger(); private static final Logger logger = AutoIngestDashboardLogger.getLogger();
private final ProgressIndicator progress; private final ProgressIndicator progress;
private int nodesCount;
private int casesCount;
/** /**
* Constucts an instance of a task for deleting case coordination service * Constucts an instance of a task for deleting case coordination service
@ -53,7 +57,8 @@ final class DeleteOrphanCaseNodesTask implements Runnable {
@NbBundle.Messages({ @NbBundle.Messages({
"DeleteOrphanCaseNodesTask.progress.startMessage=Starting orphaned case znode cleanup", "DeleteOrphanCaseNodesTask.progress.startMessage=Starting orphaned case znode cleanup",
"DeleteOrphanCaseNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service", "DeleteOrphanCaseNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service",
"DeleteOrphanCaseNodesTask.progress.gettingCaseNodesListing=Querying coordination service for case znodes" "DeleteOrphanCaseNodesTask.progress.gettingCaseZnodes=Querying the coordination service for case znodes",
"DeleteOrphanCaseNodesTask.progress.lookingForOrphanedCaseZnodes=Looking for orphaned case znodes"
}) })
public void run() { public void run() {
progress.start(Bundle.DeleteOrphanCaseNodesTask_progress_startMessage()); progress.start(Bundle.DeleteOrphanCaseNodesTask_progress_startMessage());
@ -68,24 +73,30 @@ final class DeleteOrphanCaseNodesTask implements Runnable {
return; return;
} }
progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseNodesListing()); progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes());
logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseNodesListing()); logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes());
List<CaseNodeData> nodeDataList; List<String> nodePaths;
try { try {
nodeDataList = CaseNodeDataCollector.getNodeData(); nodePaths = coordinationService.getNodeList(CoordinationService.CategoryNode.CASES);
} catch (CoordinationService.CoordinationServiceException ex) { } catch (CoordinationService.CoordinationServiceException ex) {
logger.log(Level.SEVERE, "Error collecting case node data", ex); //NON-NLS logger.log(Level.SEVERE, "Error getting case znode list", ex); //NON-NLS
return; return;
} catch (InterruptedException unused) { } catch (InterruptedException unused) {
logger.log(Level.WARNING, "Task cancelled while collecting case node data"); //NON-NLS logger.log(Level.WARNING, "Task cancelled while getting case znode list"); //NON-NLS
return; return;
} }
for (CaseNodeData nodeData : nodeDataList) { progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes());
final Path caseDirectoryPath = nodeData.getDirectory(); logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes());
for (String caseNodePath : nodePaths) {
if (isCaseNameNodePath(caseNodePath) || isCaseResourcesNodePath(caseNodePath) || isCaseAutoIngestLogNodePath(caseNodePath)) {
continue;
}
final Path caseDirectoryPath = Paths.get(caseNodePath);
final File caseDirectory = caseDirectoryPath.toFile(); final File caseDirectory = caseDirectoryPath.toFile();
if (!caseDirectory.exists()) { if (!caseDirectory.exists()) {
String caseName = nodeData.getDisplayName(); String caseName = CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath);
String nodePath = ""; // NON-NLS String nodePath = ""; // NON-NLS
try { try {
nodePath = CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath); nodePath = CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath);
@ -100,12 +111,21 @@ final class DeleteOrphanCaseNodesTask implements Runnable {
nodePath = CoordinationServiceUtils.getCaseDirectoryNodePath(caseDirectoryPath); nodePath = CoordinationServiceUtils.getCaseDirectoryNodePath(caseDirectoryPath);
deleteNode(coordinationService, caseName, nodePath); deleteNode(coordinationService, caseName, nodePath);
++casesCount;
/*
* Back to looking for orphans...
*/
progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes());
logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes());
} catch (InterruptedException unused) { } catch (InterruptedException unused) {
logger.log(Level.WARNING, String.format("Task cancelled while deleting orphaned znode %s for %s", nodePath, caseName)); //NON-NLS logger.log(Level.WARNING, String.format("Task cancelled while deleting orphaned znode %s for %s", nodePath, caseName)); //NON-NLS
return; return;
} }
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
/* /*
* This is an unexpected runtime exceptions firewall. It is here * This is an unexpected runtime exceptions firewall. It is here
@ -117,6 +137,7 @@ final class DeleteOrphanCaseNodesTask implements Runnable {
throw ex; throw ex;
} finally { } finally {
logger.log(Level.INFO, String.format("Deleted %d orphaned case znodes for %d cases", nodesCount, casesCount));
progress.finish(); progress.finish();
} }
} }
@ -137,11 +158,12 @@ final class DeleteOrphanCaseNodesTask implements Runnable {
private void deleteNode(CoordinationService coordinationService, String caseName, String nodePath) throws InterruptedException { private void deleteNode(CoordinationService coordinationService, String caseName, String nodePath) throws InterruptedException {
try { try {
progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_deletingOrphanedCaseNode(nodePath)); progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_deletingOrphanedCaseNode(nodePath));
logger.log(Level.INFO, String.format("Deleting orphaned case node %s for %s", nodePath, caseName)); //NON-NLS logger.log(Level.INFO, String.format("Deleting orphaned case node %s for case %s", nodePath, caseName)); //NON-NLS
coordinationService.deleteNode(CoordinationService.CategoryNode.CASES, nodePath); coordinationService.deleteNode(CoordinationService.CategoryNode.CASES, nodePath);
++nodesCount;
} catch (CoordinationService.CoordinationServiceException ex) { } catch (CoordinationService.CoordinationServiceException ex) {
if (!DeleteCaseUtils.isNoNodeException(ex)) { if (!DeleteCaseUtils.isNoNodeException(ex)) {
logger.log(Level.SEVERE, String.format("Error deleting orphaned case node %s for %s", nodePath, caseName), ex); //NON-NLS logger.log(Level.SEVERE, String.format("Error deleting orphaned case node %s for case %s", nodePath, caseName), ex); //NON-NLS
} }
} }
} }

View File

@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.experimental.autoingest;
import java.io.File; import java.io.File;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
@ -33,7 +34,7 @@ import org.sleuthkit.autopsy.progress.ProgressIndicator;
*/ */
final class DeleteOrphanManifestNodesTask implements Runnable { final class DeleteOrphanManifestNodesTask implements Runnable {
private static final Logger logger = Logger.getLogger(DeleteOrphanManifestNodesTask.class.getName()); private static final Logger logger = AutoIngestDashboardLogger.getLogger();
private final ProgressIndicator progress; private final ProgressIndicator progress;
/** /**
@ -51,10 +52,12 @@ final class DeleteOrphanManifestNodesTask implements Runnable {
"DeleteOrphanManifestNodesTask.progress.startMessage=Starting orphaned manifest file znode cleanup", "DeleteOrphanManifestNodesTask.progress.startMessage=Starting orphaned manifest file znode cleanup",
"DeleteOrphanManifestNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service", "DeleteOrphanManifestNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service",
"DeleteOrphanManifestNodesTask.progress.gettingManifestNodes=Querying the coordination service for manifest file znodes", "DeleteOrphanManifestNodesTask.progress.gettingManifestNodes=Querying the coordination service for manifest file znodes",
"DeleteOrphanManifestNodesTask.progress.lookingForOrphanedManifestFileZnodes=Looking for orphaned manifest file znodes",
"# {0} - node path", "DeleteOrphanManifestNodesTask.progress.deletingOrphanedManifestNode=Deleting orphaned manifest file znode {0}" "# {0} - node path", "DeleteOrphanManifestNodesTask.progress.deletingOrphanedManifestNode=Deleting orphaned manifest file znode {0}"
}) })
public void run() { public void run() {
progress.start(Bundle.DeleteOrphanManifestNodesTask_progress_startMessage()); progress.start(Bundle.DeleteOrphanManifestNodesTask_progress_startMessage());
int nodesCount = 0;
try { try {
progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_connectingToCoordSvc()); progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_connectingToCoordSvc());
logger.log(Level.INFO, Bundle.DeleteOrphanManifestNodesTask_progress_connectingToCoordSvc()); logger.log(Level.INFO, Bundle.DeleteOrphanManifestNodesTask_progress_connectingToCoordSvc());
@ -68,36 +71,45 @@ final class DeleteOrphanManifestNodesTask implements Runnable {
progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_gettingManifestNodes()); progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_gettingManifestNodes());
logger.log(Level.INFO, Bundle.DeleteOrphanManifestNodesTask_progress_gettingManifestNodes()); logger.log(Level.INFO, Bundle.DeleteOrphanManifestNodesTask_progress_gettingManifestNodes());
List<AutoIngestJobNodeData> nodeDataList; List<String> nodePaths;
try { try {
nodeDataList = AutoIngestJobNodeDataCollector.getNodeData(); nodePaths = coordinationService.getNodeList(CoordinationService.CategoryNode.MANIFESTS);
} catch (CoordinationService.CoordinationServiceException ex) { } catch (CoordinationService.CoordinationServiceException ex) {
logger.log(Level.SEVERE, "Error collecting auto ingest job node data", ex); // NON-NLS logger.log(Level.SEVERE, "Error getting manifest file znode list", ex); // NON-NLS
return; return;
} catch (InterruptedException unused) { } catch (InterruptedException unused) {
logger.log(Level.WARNING, "Task cancelled while collecting auto ingest job node data"); // NON-NLS logger.log(Level.WARNING, "Task cancelled while getting manifest file znode list"); // NON-NLS
return; return;
} }
for (AutoIngestJobNodeData nodeData : nodeDataList) { progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_lookingForOrphanedManifestFileZnodes());
final String caseName = nodeData.getCaseName(); logger.log(Level.INFO, Bundle.DeleteOrphanManifestNodesTask_progress_lookingForOrphanedManifestFileZnodes());
final Path manifestFilePath = nodeData.getManifestFilePath(); for (String nodePath : nodePaths) {
final Path manifestFilePath = Paths.get(nodePath);
final File manifestFile = manifestFilePath.toFile(); final File manifestFile = manifestFilePath.toFile();
if (!manifestFile.exists()) { if (!manifestFile.exists()) {
try { try {
progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_deletingOrphanedManifestNode(manifestFilePath)); progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_deletingOrphanedManifestNode(manifestFilePath));
logger.log(Level.INFO, String.format("Deleting orphaned manifest file znode %s for %s", manifestFilePath, caseName)); logger.log(Level.INFO, String.format("Deleting orphaned manifest file znode %s", manifestFilePath));
coordinationService.deleteNode(CoordinationService.CategoryNode.MANIFESTS, manifestFilePath.toString()); coordinationService.deleteNode(CoordinationService.CategoryNode.MANIFESTS, manifestFilePath.toString());
++nodesCount;
} catch (CoordinationService.CoordinationServiceException ex) { } catch (CoordinationService.CoordinationServiceException ex) {
if (!DeleteCaseUtils.isNoNodeException(ex)) { if (!DeleteCaseUtils.isNoNodeException(ex)) {
logger.log(Level.SEVERE, String.format("Error deleting %s znode for %s", manifestFilePath, caseName), ex); // NON-NLS logger.log(Level.SEVERE, String.format("Error deleting orphaned manifest file %s", manifestFilePath), ex); // NON-NLS
} }
} catch (InterruptedException unused) { } catch (InterruptedException unused) {
logger.log(Level.WARNING, String.format("Task cancelled while deleting %s znode for %s", manifestFilePath, caseName)); // NON-NLS logger.log(Level.WARNING, String.format("Task cancelled while deleting orphaned manifest file %s", manifestFilePath)); // NON-NLS
return; return;
} }
/*
* Back to looking for orphans...
*/
progress.progress(Bundle.DeleteOrphanManifestNodesTask_progress_lookingForOrphanedManifestFileZnodes());
logger.log(Level.INFO, Bundle.DeleteOrphanManifestNodesTask_progress_lookingForOrphanedManifestFileZnodes());
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
/* /*
* This is an unexpected runtime exceptions firewall. It is here * This is an unexpected runtime exceptions firewall. It is here
@ -109,6 +121,7 @@ final class DeleteOrphanManifestNodesTask implements Runnable {
throw ex; throw ex;
} finally { } finally {
logger.log(Level.INFO, String.format("Deleted %d orphaned manifest file znodes", nodesCount));
progress.finish(); progress.finish();
} }
} }

View File

@ -44,5 +44,8 @@
<dependency conf="slf4j-libs->default" org="org.slf4j" name="slf4j-log4j12" rev="1.7.10"/> <dependency conf="slf4j-libs->default" org="org.slf4j" name="slf4j-log4j12" rev="1.7.10"/>
<dependency conf="slf4j-libs->default" org="org.slf4j" name="jcl-over-slf4j" rev="1.7.10"/> <dependency conf="slf4j-libs->default" org="org.slf4j" name="jcl-over-slf4j" rev="1.7.10"/>
<dependency conf="slf4j-libs->default" org="org.slf4j" name="jul-to-slf4j" rev="1.7.10"/> <dependency conf="slf4j-libs->default" org="org.slf4j" name="jul-to-slf4j" rev="1.7.10"/>
<exclude org="*" ext="*" type="javadoc"/>
<override org="org.cleartk" module="cleartk-util" rev="2.0.0"/>
</dependencies> </dependencies>
</ivy-module> </ivy-module>

View File

@ -4,38 +4,36 @@ file.reference.c3p0-0.9.1.1.jar=release/modules/ext/c3p0-0.9.1.1.jar
file.reference.cdm-4.5.5.jar=release/modules/ext/cdm-4.5.5.jar file.reference.cdm-4.5.5.jar=release/modules/ext/cdm-4.5.5.jar
file.reference.cleartk-util-2.0.0.jar=release/modules/ext/cleartk-util-2.0.0.jar file.reference.cleartk-util-2.0.0.jar=release/modules/ext/cleartk-util-2.0.0.jar
file.reference.commons-beanutils-1.9.2.jar=release/modules/ext/commons-beanutils-1.9.2.jar file.reference.commons-beanutils-1.9.2.jar=release/modules/ext/commons-beanutils-1.9.2.jar
file.reference.commons-codec-1.11.jar=release\\modules\\ext\\commons-codec-1.11.jar
file.reference.commons-collections-3.2.2.jar=release/modules/ext/commons-collections-3.2.2.jar file.reference.commons-collections-3.2.2.jar=release/modules/ext/commons-collections-3.2.2.jar
file.reference.commons-digester-1.8.1.jar=release/modules/ext/commons-digester-1.8.1.jar file.reference.commons-digester-1.8.1.jar=release/modules/ext/commons-digester-1.8.1.jar
file.reference.commons-exec-1.3.jar=release/modules/ext/commons-exec-1.3.jar file.reference.commons-exec-1.3.jar=release/modules/ext/commons-exec-1.3.jar
file.reference.commons-io-2.3.jar=release\\modules\\ext\\commons-io-2.3.jar
file.reference.commons-lang-2.6.jar=release/modules/ext/commons-lang-2.6.jar file.reference.commons-lang-2.6.jar=release/modules/ext/commons-lang-2.6.jar
file.reference.commons-logging-1.2.jar=release/modules/ext/commons-logging-1.2.jar file.reference.commons-logging-1.2.jar=release/modules/ext/commons-logging-1.2.jar
file.reference.commons-logging-api-1.1.jar=release/modules/ext/commons-logging-api-1.1.jar file.reference.commons-logging-api-1.1.jar=release/modules/ext/commons-logging-api-1.1.jar
file.reference.commons-validator-1.5.1-javadoc.jar=release/modules/ext/commons-validator-1.5.1-javadoc.jar
file.reference.commons-validator-1.5.1-sources.jar=release/modules/ext/commons-validator-1.5.1-sources.jar
file.reference.commons-validator-1.5.1.jar=release/modules/ext/commons-validator-1.5.1.jar file.reference.commons-validator-1.5.1.jar=release/modules/ext/commons-validator-1.5.1.jar
file.reference.ehcache-core-2.6.2.jar=release/modules/ext/ehcache-core-2.6.2.jar file.reference.ehcache-core-2.6.2.jar=release/modules/ext/ehcache-core-2.6.2.jar
file.reference.findstructapi-0.0.1.jar=release/modules/ext/findstructapi-0.0.1.jar file.reference.findstructapi-0.0.1.jar=release/modules/ext/findstructapi-0.0.1.jar
file.reference.grib-4.5.5.jar=release/modules/ext/grib-4.5.5.jar file.reference.grib-4.5.5.jar=release/modules/ext/grib-4.5.5.jar
file.reference.guava-17.0.jar=release/modules/ext/guava-17.0.jar file.reference.guava-17.0.jar=release/modules/ext/guava-17.0.jar
file.reference.hamcrest-core-1.3.jar=release/modules/ext/hamcrest-core-1.3.jar file.reference.hamcrest-core-1.3.jar=release/modules/ext/hamcrest-core-1.3.jar
file.reference.httpclient-4.3.1.jar=release\\modules\\ext\\httpclient-4.5.6.jar file.reference.httpclient-4.5.6.jar=release\\modules\\ext\\httpclient-4.5.6.jar
file.reference.httpcore-4.4.1.jar=release/modules/ext/httpcore-4.4.10.jar file.reference.httpcore-4.4.10.jar=release/modules/ext/httpcore-4.4.10.jar
file.reference.httpmime-4.3.1.jar=release\\modules\\ext\\httpmime-4.5.6.jar file.reference.httpmime-4.5.6.jar=release\\modules\\ext\\httpmime-4.5.6.jar
file.reference.httpservices-4.5.5.jar=release/modules/ext/httpservices-4.5.5.jar file.reference.httpservices-4.5.5.jar=release/modules/ext/httpservices-4.5.5.jar
file.reference.icu4j-3.8.jar=release/modules/ext/icu4j-3.8.jar
file.reference.java-libpst-0.8.1.jar=release/modules/ext/java-libpst-0.8.1.jar file.reference.java-libpst-0.8.1.jar=release/modules/ext/java-libpst-0.8.1.jar
file.reference.jcip-annotations-1.0.jar=release/modules/ext/jcip-annotations-1.0.jar file.reference.jcip-annotations-1.0.jar=release/modules/ext/jcip-annotations-1.0.jar
file.reference.jcommander-1.35.jar=release/modules/ext/jcommander-1.35.jar file.reference.jcommander-1.35.jar=release/modules/ext/jcommander-1.35.jar
file.reference.jdom-1.0.jar=release/modules/ext/jdom-1.0.jar file.reference.jdom-1.0.jar=release/modules/ext/jdom-1.0.jar
file.reference.jericho-html-3.3-javadoc.jar=release/modules/ext/jericho-html-3.3-javadoc.jar
file.reference.jericho-html-3.3-sources.jar=release/modules/ext/jericho-html-3.3-sources.jar
file.reference.jericho-html-3.3.jar=release/modules/ext/jericho-html-3.3.jar file.reference.jericho-html-3.3.jar=release/modules/ext/jericho-html-3.3.jar
file.reference.joda-time-2.2.jar=release/modules/ext/joda-time-2.2.jar file.reference.joda-time-2.2.jar=release/modules/ext/joda-time-2.2.jar
file.reference.json-simple-1.1.1.jar=release/modules/ext/json-simple-1.1.1.jar file.reference.json-simple-1.1.1.jar=release/modules/ext/json-simple-1.1.1.jar
file.reference.juniversalchardet-1.0.3.jar=release/modules/ext/juniversalchardet-1.0.3.jar file.reference.juniversalchardet-1.0.3.jar=release/modules/ext/juniversalchardet-1.0.3.jar
file.reference.libsvm-3.1.jar=release/modules/ext/libsvm-3.1.jar file.reference.libsvm-3.1.jar=release/modules/ext/libsvm-3.1.jar
file.reference.log4j-1.2.17.jar=release/modules/ext/log4j-1.2.17.jar file.reference.log4j-1.2.17.jar=release/modules/ext/log4j-1.2.17.jar
file.reference.lucene-core-4.0.0.jar=release/modules/ext/lucene-core-4.0.0.jar
file.reference.lucene-queries-4.0.0.jar=release/modules/ext/lucene-queries-4.0.0.jar
file.reference.lucene-sandbox-4.0.0.jar=release/modules/ext/lucene-sandbox-4.0.0.jar
file.reference.netcdf4-4.5.5.jar=release/modules/ext/netcdf4-4.5.5.jar file.reference.netcdf4-4.5.5.jar=release/modules/ext/netcdf4-4.5.5.jar
file.reference.noggit-0.5.jar=release/modules/ext/noggit-0.5.jar file.reference.noggit-0.5.jar=release/modules/ext/noggit-0.5.jar
file.reference.openaifsm-0.0.1.jar=release/modules/ext/openaifsm-0.0.1.jar file.reference.openaifsm-0.0.1.jar=release/modules/ext/openaifsm-0.0.1.jar
@ -46,8 +44,6 @@ file.reference.poi-ooxml-schemas-4.0.1.jar=release/modules/ext/poi-ooxml-schemas
file.reference.poi-scratchpad-4.0.1.jar=release/modules/ext/poi-scratchpad-4.0.1.jar file.reference.poi-scratchpad-4.0.1.jar=release/modules/ext/poi-scratchpad-4.0.1.jar
file.reference.protobuf-java-2.5.0.jar=release/modules/ext/protobuf-java-2.5.0.jar file.reference.protobuf-java-2.5.0.jar=release/modules/ext/protobuf-java-2.5.0.jar
file.reference.quartz-2.2.0.jar=release/modules/ext/quartz-2.2.0.jar file.reference.quartz-2.2.0.jar=release/modules/ext/quartz-2.2.0.jar
file.reference.solr-solrj-4.9.1-javadoc.jar=release/modules/ext/solr-solrj-4.9.1-javadoc.jar
file.reference.solr-solrj-4.9.1-sources.jar=release/modules/ext/solr-solrj-4.9.1-sources.jar
file.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1.jar file.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1.jar
file.reference.sqlwrapper-0.0.1.jar=release/modules/ext/sqlwrapper-0.0.1.jar file.reference.sqlwrapper-0.0.1.jar=release/modules/ext/sqlwrapper-0.0.1.jar
file.reference.stax2-api-3.1.4.jar=release/modules/ext/stax2-api-3.1.4.jar file.reference.stax2-api-3.1.4.jar=release/modules/ext/stax2-api-3.1.4.jar

View File

@ -235,14 +235,18 @@
<package>org.slf4j.helpers</package> <package>org.slf4j.helpers</package>
<package>org.slf4j.spi</package> <package>org.slf4j.spi</package>
</public-packages> </public-packages>
<class-path-extension>
<runtime-relative-path>ext/commons-validator-1.5.1-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-validator-1.5.1-sources.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/commons-digester-1.8.1.jar</runtime-relative-path> <runtime-relative-path>ext/commons-digester-1.8.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-digester-1.8.1.jar</binary-origin> <binary-origin>release/modules/ext/commons-digester-1.8.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/lucene-sandbox-4.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/lucene-sandbox-4.0.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jericho-html-3.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jericho-html-3.3.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/cdm-4.5.5.jar</runtime-relative-path> <runtime-relative-path>ext/cdm-4.5.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/cdm-4.5.5.jar</binary-origin> <binary-origin>release/modules/ext/cdm-4.5.5.jar</binary-origin>
@ -251,6 +255,10 @@
<runtime-relative-path>ext/httpservices-4.5.5.jar</runtime-relative-path> <runtime-relative-path>ext/httpservices-4.5.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/httpservices-4.5.5.jar</binary-origin> <binary-origin>release/modules/ext/httpservices-4.5.5.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/httpcore-4.4.10.jar</runtime-relative-path>
<binary-origin>release/modules/ext/httpcore-4.4.10.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/hamcrest-core-1.3.jar</runtime-relative-path> <runtime-relative-path>ext/hamcrest-core-1.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/hamcrest-core-1.3.jar</binary-origin> <binary-origin>release/modules/ext/hamcrest-core-1.3.jar</binary-origin>
@ -263,14 +271,14 @@
<runtime-relative-path>ext/commons-logging-api-1.1.jar</runtime-relative-path> <runtime-relative-path>ext/commons-logging-api-1.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-logging-api-1.1.jar</binary-origin> <binary-origin>release/modules/ext/commons-logging-api-1.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/solr-solrj-4.9.1-javadoc.jar</runtime-relative-path>
<binary-origin>release/modules/ext/solr-solrj-4.9.1-javadoc.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/quartz-2.2.0.jar</runtime-relative-path> <runtime-relative-path>ext/quartz-2.2.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/quartz-2.2.0.jar</binary-origin> <binary-origin>release/modules/ext/quartz-2.2.0.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/icu4j-3.8.jar</runtime-relative-path>
<binary-origin>release/modules/ext/icu4j-3.8.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/guava-17.0.jar</runtime-relative-path> <runtime-relative-path>ext/guava-17.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/guava-17.0.jar</binary-origin> <binary-origin>release/modules/ext/guava-17.0.jar</binary-origin>
@ -287,6 +295,10 @@
<runtime-relative-path>ext/tagsoup-1.2.1.jar</runtime-relative-path> <runtime-relative-path>ext/tagsoup-1.2.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/tagsoup-1.2.1.jar</binary-origin> <binary-origin>release/modules/ext/tagsoup-1.2.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/lucene-core-4.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/lucene-core-4.0.0.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/opennlp-maxent-3.0.3.jar</runtime-relative-path> <runtime-relative-path>ext/opennlp-maxent-3.0.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/opennlp-maxent-3.0.3.jar</binary-origin> <binary-origin>release/modules/ext/opennlp-maxent-3.0.3.jar</binary-origin>
@ -295,33 +307,33 @@
<runtime-relative-path>ext/poi-scratchpad-4.0.1.jar</runtime-relative-path> <runtime-relative-path>ext/poi-scratchpad-4.0.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/poi-scratchpad-4.0.1.jar</binary-origin> <binary-origin>release/modules/ext/poi-scratchpad-4.0.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-logging-1.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-logging-1.2.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/json-simple-1.1.1.jar</runtime-relative-path> <runtime-relative-path>ext/json-simple-1.1.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/json-simple-1.1.1.jar</binary-origin> <binary-origin>release/modules/ext/json-simple-1.1.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/c3p0-0.9.1.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/c3p0-0.9.1.1.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/poi-ooxml-4.0.1.jar</runtime-relative-path> <runtime-relative-path>ext/poi-ooxml-4.0.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/poi-ooxml-4.0.1.jar</binary-origin> <binary-origin>release/modules/ext/poi-ooxml-4.0.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/httpclient-4.5.6.jar</runtime-relative-path>
<binary-origin>release\modules\ext\httpclient-4.5.6.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-codec-1.11.jar</runtime-relative-path>
<binary-origin>release\modules\ext\commons-codec-1.11.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/tika-parsers-1.20.jar</runtime-relative-path> <runtime-relative-path>ext/tika-parsers-1.20.jar</runtime-relative-path>
<binary-origin>release/modules/ext/tika-parsers-1.20.jar</binary-origin> <binary-origin>release/modules/ext/tika-parsers-1.20.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/log4j-1.2.17.jar</runtime-relative-path> <runtime-relative-path>ext/sqlwrapper-0.0.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/log4j-1.2.17.jar</binary-origin> <binary-origin>release/modules/ext/sqlwrapper-0.0.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/jericho-html-3.3-javadoc.jar</runtime-relative-path> <runtime-relative-path>ext/log4j-1.2.17.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jericho-html-3.3-javadoc.jar</binary-origin> <binary-origin>release/modules/ext/log4j-1.2.17.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/udunits-4.5.5.jar</runtime-relative-path> <runtime-relative-path>ext/udunits-4.5.5.jar</runtime-relative-path>
@ -379,18 +391,6 @@
<runtime-relative-path>ext/lucene-queries-4.0.0.jar</runtime-relative-path> <runtime-relative-path>ext/lucene-queries-4.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/lucene-queries-4.0.0.jar</binary-origin> <binary-origin>release/modules/ext/lucene-queries-4.0.0.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-io-2.3.jar</runtime-relative-path>
<binary-origin>release\modules\ext\commons-io-2.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jericho-html-3.3-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jericho-html-3.3-sources.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/solr-solrj-4.9.1-sources.jar</runtime-relative-path>
<binary-origin>release/modules/ext/solr-solrj-4.9.1-sources.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/juniversalchardet-1.0.3.jar</runtime-relative-path> <runtime-relative-path>ext/juniversalchardet-1.0.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/juniversalchardet-1.0.3.jar</binary-origin> <binary-origin>release/modules/ext/juniversalchardet-1.0.3.jar</binary-origin>
@ -411,122 +411,14 @@
<runtime-relative-path>ext/poi-4.0.1.jar</runtime-relative-path> <runtime-relative-path>ext/poi-4.0.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/poi-4.0.1.jar</binary-origin> <binary-origin>release/modules/ext/poi-4.0.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jna-4.1.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jna-4.1.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/qdox-1.12.jar</runtime-relative-path>
<binary-origin>release/modules/ext/qdox-1.12.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/bcpkix-jdk15on-1.54.jar</runtime-relative-path>
<binary-origin>release/modules/ext/bcpkix-jdk15on-1.54.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/bzip2-0.9.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/bzip2-0.9.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/grib-4.5.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/grib-4.5.5.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jackson-core-2.9.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jackson-core-2.9.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/uimaj-core-2.5.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/uimaj-core-2.5.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jmatio-1.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jmatio-1.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/wstx-asl-3.2.7.jar</runtime-relative-path>
<binary-origin>release\modules\ext\wstx-asl-3.2.7.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-csv-1.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-csv-1.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-validator-1.5.1-javadoc.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-validator-1.5.1-javadoc.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/lucene-sandbox-4.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/lucene-sandbox-4.0.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jericho-html-3.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jericho-html-3.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jsr-275-0.9.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jsr-275-0.9.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/httpcore-4.4.10.jar</runtime-relative-path>
<binary-origin>release/modules/ext/httpcore-4.4.10.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/bcmail-jdk15on-1.54.jar</runtime-relative-path>
<binary-origin>release/modules/ext/bcmail-jdk15on-1.54.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/asm-all-3.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/asm-all-3.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/icu4j-3.8.jar</runtime-relative-path>
<binary-origin>release/modules/ext/icu4j-3.8.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/curvesapi-1.04.jar</runtime-relative-path>
<binary-origin>release/modules/ext/curvesapi-1.04.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/sis-referencing-0.6.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sis-referencing-0.6.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/ctakes-core-res-3.2.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/ctakes-core-res-3.2.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/lucene-core-4.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/lucene-core-4.0.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/asm-5.0.4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/asm-5.0.4.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/commons-logging-1.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-logging-1.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/org.osgi.core-4.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/org.osgi.core-4.0.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/c3p0-0.9.1.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/c3p0-0.9.1.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/sqlwrapper-0.0.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sqlwrapper-0.0.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jackcess-encrypt-2.1.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jackcess-encrypt-2.1.2.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/httpmime-4.5.6.jar</runtime-relative-path> <runtime-relative-path>ext/httpmime-4.5.6.jar</runtime-relative-path>
<binary-origin>release\modules\ext\httpmime-4.5.6.jar</binary-origin> <binary-origin>release\modules\ext\httpmime-4.5.6.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/httpclient-4.5.6.jar</runtime-relative-path>
<binary-origin>release\modules\ext\httpclient-4.5.6.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/jcip-annotations-1.0.jar</runtime-relative-path> <runtime-relative-path>ext/jcip-annotations-1.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jcip-annotations-1.0.jar</binary-origin> <binary-origin>release/modules/ext/jcip-annotations-1.0.jar</binary-origin>
@ -535,10 +427,18 @@
<runtime-relative-path>ext/commons-validator-1.5.1.jar</runtime-relative-path> <runtime-relative-path>ext/commons-validator-1.5.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-validator-1.5.1.jar</binary-origin> <binary-origin>release/modules/ext/commons-validator-1.5.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/bzip2-0.9.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/bzip2-0.9.1.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/cleartk-util-2.0.0.jar</runtime-relative-path> <runtime-relative-path>ext/cleartk-util-2.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/cleartk-util-2.0.0.jar</binary-origin> <binary-origin>release/modules/ext/cleartk-util-2.0.0.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/grib-4.5.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/grib-4.5.5.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/jdom-1.0.jar</runtime-relative-path> <runtime-relative-path>ext/jdom-1.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jdom-1.0.jar</binary-origin> <binary-origin>release/modules/ext/jdom-1.0.jar</binary-origin>
@ -555,6 +455,10 @@
<runtime-relative-path>ext/poi-ooxml-schemas-4.0.1.jar</runtime-relative-path> <runtime-relative-path>ext/poi-ooxml-schemas-4.0.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/poi-ooxml-schemas-4.0.1.jar</binary-origin> <binary-origin>release/modules/ext/poi-ooxml-schemas-4.0.1.jar</binary-origin>
</class-path-extension> </class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/wstx-asl-3.2.7.jar</runtime-relative-path>
<binary-origin>release\modules\ext\wstx-asl-3.2.7.jar</binary-origin>
</class-path-extension>
<class-path-extension> <class-path-extension>
<runtime-relative-path>ext/commons-exec-1.3.jar</runtime-relative-path> <runtime-relative-path>ext/commons-exec-1.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/commons-exec-1.3.jar</binary-origin> <binary-origin>release/modules/ext/commons-exec-1.3.jar</binary-origin>

View File

@ -45,22 +45,22 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane2" alignment="0" pref="100" max="32767" attributes="0"/> <Component id="controlScrollPane" alignment="0" pref="54" max="32767" attributes="0"/>
<Component id="jScrollPane1" alignment="0" pref="100" max="32767" attributes="0"/> <Component id="extractedScrollPane" alignment="0" pref="54" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="jScrollPane2" min="-2" pref="46" max="-2" attributes="0"/> <Component id="controlScrollPane" min="-2" pref="29" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jScrollPane1" pref="23" max="32767" attributes="0"/> <Component id="extractedScrollPane" pref="23" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> <Container class="javax.swing.JScrollPane" name="extractedScrollPane">
<Properties> <Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="ff" red="ff" type="rgb"/> <Color blue="ff" green="ff" red="ff" type="rgb"/>
@ -90,7 +90,7 @@
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Container class="javax.swing.JScrollPane" name="jScrollPane2"> <Container class="javax.swing.JScrollPane" name="controlScrollPane">
<Properties> <Properties>
<Property name="horizontalScrollBarPolicy" type="int" value="31"/> <Property name="horizontalScrollBarPolicy" type="int" value="31"/>
<Property name="verticalScrollBarPolicy" type="int" value="21"/> <Property name="verticalScrollBarPolicy" type="int" value="21"/>
@ -101,7 +101,7 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents> <SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1"> <Container class="javax.swing.JPanel" name="controlPanel">
<Properties> <Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 0]"/> <Dimension value="[0, 0]"/>
@ -114,78 +114,71 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="600" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0">
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/>
<Group type="102" attributes="0"> <Component id="hitLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="hitLabel" min="-2" max="-2" attributes="0"/> <Component id="hitCountLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="hitCountLabel" min="-2" max="-2" attributes="0"/> <Component id="hitOfLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="hitOfLabel" min="-2" max="-2" attributes="0"/> <Component id="hitTotalLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="hitTotalLabel" min="-2" max="-2" attributes="0"/> <Component id="hitButtonsLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="hitButtonsLabel" min="-2" max="-2" attributes="0"/> <Component id="hitPreviousButton" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="hitPreviousButton" min="-2" max="-2" attributes="0"/> <Component id="hitNextButton" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="hitNextButton" min="-2" max="-2" attributes="0"/> <Component id="jSeparator2" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jSeparator2" min="-2" max="-2" attributes="0"/> <Component id="pagesLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="pagesLabel" min="-2" max="-2" attributes="0"/> <Component id="pageCurLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Component id="pageCurLabel" min="-2" max="-2" attributes="0"/> <Component id="pageOfLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="pageOfLabel" min="-2" max="-2" attributes="0"/> <Component id="pageTotalLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/> <EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
<Component id="pageTotalLabel" min="-2" max="-2" attributes="0"/> <Component id="pageButtonsLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="pageButtonsLabel" min="-2" max="-2" attributes="0"/> <Component id="pagePreviousButton" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="pagePreviousButton" min="-2" max="-2" attributes="0"/> <Component id="pageNextButton" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="pageNextButton" min="-2" max="-2" attributes="0"/> <Component id="jSeparator1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Component id="jSeparator1" min="-2" max="-2" attributes="0"/> <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/> <Component id="sourceComboBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="sourceComboBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="81" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0">
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="2" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Component id="hitPreviousButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <Component id="jLabel1" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0"> <Component id="hitNextButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="hitPreviousButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="pageButtonsLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="pagePreviousButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="hitNextButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="pageNextButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pageButtonsLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="jSeparator1" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pagePreviousButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="sourceComboBox" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pageNextButton" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="pagesLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jSeparator1" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="hitLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="sourceComboBox" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="jSeparator2" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pagesLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="pageCurLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="hitLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="pageOfLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jSeparator2" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="hitCountLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pageCurLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="pageTotalLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pageOfLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="hitOfLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="hitCountLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="hitTotalLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="pageTotalLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="hitButtonsLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="hitOfLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="hitTotalLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="hitButtonsLabel" linkSize="1" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2011-2018 Basis Technology Corp. * Copyright 2011-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -51,6 +51,7 @@ import org.sleuthkit.autopsy.coreutils.TextUtil;
class ExtractedContentPanel extends javax.swing.JPanel { class ExtractedContentPanel extends javax.swing.JPanel {
private static final Logger logger = Logger.getLogger(ExtractedContentPanel.class.getName()); private static final Logger logger = Logger.getLogger(ExtractedContentPanel.class.getName());
private static final long serialVersionUID = 1L;
private String contentName; private String contentName;
ExtractedContentPanel() { ExtractedContentPanel() {
@ -65,6 +66,8 @@ class ExtractedContentPanel extends javax.swing.JPanel {
* http://java-sl.com/tip_html_letter_wrap.html. * http://java-sl.com/tip_html_letter_wrap.html.
*/ */
HTMLEditorKit editorKit = new HTMLEditorKit() { HTMLEditorKit editorKit = new HTMLEditorKit() {
private static final long serialVersionUID = 1L;
@Override @Override
public ViewFactory getViewFactory() { public ViewFactory getViewFactory() {
@ -96,17 +99,18 @@ class ExtractedContentPanel extends javax.swing.JPanel {
return new ParagraphView(e) { return new ParagraphView(e) {
@Override @Override
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) { protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) {
if (r == null) { SizeRequirements requirements = r;
r = new SizeRequirements(); if (requirements == null) {
requirements = new SizeRequirements();
} }
float pref = layoutPool.getPreferredSpan(axis); float pref = layoutPool.getPreferredSpan(axis);
float min = layoutPool.getMinimumSpan(axis); float min = layoutPool.getMinimumSpan(axis);
// Don't include insets, Box.getXXXSpan will include them. // Don't include insets, Box.getXXXSpan will include them.
r.minimum = (int) min; requirements.minimum = (int) min;
r.preferred = Math.max(r.minimum, (int) pref); requirements.preferred = Math.max(requirements.minimum, (int) pref);
r.maximum = Integer.MAX_VALUE; requirements.maximum = Integer.MAX_VALUE;
r.alignment = 0.5f; requirements.alignment = 0.5f;
return r; return requirements;
} }
}; };
} }
@ -144,10 +148,10 @@ class ExtractedContentPanel extends javax.swing.JPanel {
rightClickMenu = new javax.swing.JPopupMenu(); rightClickMenu = new javax.swing.JPopupMenu();
copyMenuItem = new javax.swing.JMenuItem(); copyMenuItem = new javax.swing.JMenuItem();
selectAllMenuItem = new javax.swing.JMenuItem(); selectAllMenuItem = new javax.swing.JMenuItem();
jScrollPane1 = new javax.swing.JScrollPane(); extractedScrollPane = new javax.swing.JScrollPane();
extractedTextPane = new javax.swing.JTextPane(); extractedTextPane = new javax.swing.JTextPane();
jScrollPane2 = new javax.swing.JScrollPane(); controlScrollPane = new javax.swing.JScrollPane();
jPanel1 = new javax.swing.JPanel(); controlPanel = new javax.swing.JPanel();
sourceComboBox = new javax.swing.JComboBox<>(); sourceComboBox = new javax.swing.JComboBox<>();
jLabel1 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel();
pageOfLabel = new javax.swing.JLabel(); pageOfLabel = new javax.swing.JLabel();
@ -175,22 +179,22 @@ class ExtractedContentPanel extends javax.swing.JPanel {
setPreferredSize(new java.awt.Dimension(100, 58)); setPreferredSize(new java.awt.Dimension(100, 58));
jScrollPane1.setBackground(new java.awt.Color(255, 255, 255)); extractedScrollPane.setBackground(new java.awt.Color(255, 255, 255));
jScrollPane1.setPreferredSize(new java.awt.Dimension(640, 29)); extractedScrollPane.setPreferredSize(new java.awt.Dimension(640, 29));
extractedTextPane.setEditable(false); extractedTextPane.setEditable(false);
extractedTextPane.setAutoscrolls(false); extractedTextPane.setAutoscrolls(false);
extractedTextPane.setInheritsPopupMenu(true); extractedTextPane.setInheritsPopupMenu(true);
extractedTextPane.setMaximumSize(new java.awt.Dimension(2000, 2000)); extractedTextPane.setMaximumSize(new java.awt.Dimension(2000, 2000));
extractedTextPane.setPreferredSize(new java.awt.Dimension(600, 29)); extractedTextPane.setPreferredSize(new java.awt.Dimension(600, 29));
jScrollPane1.setViewportView(extractedTextPane); extractedScrollPane.setViewportView(extractedTextPane);
jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); controlScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); controlScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
jScrollPane2.setPreferredSize(new java.awt.Dimension(600, 100)); controlScrollPane.setPreferredSize(new java.awt.Dimension(600, 100));
jPanel1.setMinimumSize(new java.awt.Dimension(0, 0)); controlPanel.setMinimumSize(new java.awt.Dimension(0, 0));
jPanel1.setPreferredSize(new java.awt.Dimension(600, 81)); controlPanel.setPreferredSize(new java.awt.Dimension(600, 81));
sourceComboBox.setModel(new javax.swing.DefaultComboBoxModel<org.sleuthkit.autopsy.keywordsearch.IndexedText>()); sourceComboBox.setModel(new javax.swing.DefaultComboBoxModel<org.sleuthkit.autopsy.keywordsearch.IndexedText>());
sourceComboBox.setMaximumSize(new java.awt.Dimension(150, 32767)); sourceComboBox.setMaximumSize(new java.awt.Dimension(150, 32767));
@ -272,100 +276,98 @@ class ExtractedContentPanel extends javax.swing.JPanel {
jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); javax.swing.GroupLayout controlPanelLayout = new javax.swing.GroupLayout(controlPanel);
jPanel1.setLayout(jPanel1Layout); controlPanel.setLayout(controlPanelLayout);
jPanel1Layout.setHorizontalGroup( controlPanelLayout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 600, Short.MAX_VALUE) .addGroup(controlPanelLayout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addContainerGap()
.addGroup(jPanel1Layout.createSequentialGroup() .addComponent(hitLabel)
.addContainerGap() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(hitLabel) .addComponent(hitCountLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(hitCountLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(hitOfLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(hitOfLabel) .addComponent(hitTotalLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(hitTotalLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(hitButtonsLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(hitButtonsLabel) .addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGap(0, 0, 0)
.addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(pagesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pageCurLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(pageOfLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pageTotalLabel)
.addGap(18, 18, 18)
.addComponent(pageButtonsLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pagePreviousButton)
.addGap(0, 0, 0)
.addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
controlPanelLayout.setVerticalGroup(
controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(controlPanelLayout.createSequentialGroup()
.addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(pagesLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pageCurLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(pageOfLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pageTotalLabel)
.addGap(18, 18, 18)
.addComponent(pageButtonsLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(pagePreviousButton)
.addGap(0, 0, 0)
.addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel1) .addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pageButtonsLabel)
.addComponent(pagePreviousButton)
.addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(sourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())) .addComponent(pagesLabel)
); .addComponent(hitLabel)
jPanel1Layout.setVerticalGroup( .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pageCurLabel)
.addGap(0, 81, Short.MAX_VALUE) .addComponent(pageOfLabel)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(hitCountLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup() .addComponent(pageTotalLabel)
.addContainerGap() .addComponent(hitOfLabel)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(hitTotalLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(hitButtonsLabel))
.addComponent(jLabel1) .addGap(0, 0, 0))
.addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pageButtonsLabel)
.addComponent(pagePreviousButton)
.addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pagesLabel)
.addComponent(hitLabel)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pageCurLabel)
.addComponent(pageOfLabel)
.addComponent(hitCountLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pageTotalLabel)
.addComponent(hitOfLabel)
.addComponent(hitTotalLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(hitButtonsLabel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
); );
jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {hitButtonsLabel, hitCountLabel, hitLabel, hitNextButton, hitOfLabel, hitPreviousButton, hitTotalLabel, jLabel1, jSeparator1, jSeparator2, pageButtonsLabel, pageCurLabel, pageNextButton, pageOfLabel, pagePreviousButton, pageTotalLabel, pagesLabel, sourceComboBox}); controlPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {hitButtonsLabel, hitCountLabel, hitLabel, hitNextButton, hitOfLabel, hitPreviousButton, hitTotalLabel, jLabel1, jSeparator1, jSeparator2, pageButtonsLabel, pageCurLabel, pageNextButton, pageOfLabel, pagePreviousButton, pageTotalLabel, pagesLabel, sourceComboBox});
jScrollPane2.setViewportView(jPanel1); controlScrollPane.setViewportView(controlPanel);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE) .addComponent(controlScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE) .addComponent(extractedScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE)
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(controlScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)) .addComponent(extractedScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel controlPanel;
private javax.swing.JScrollPane controlScrollPane;
private javax.swing.JMenuItem copyMenuItem; private javax.swing.JMenuItem copyMenuItem;
private javax.swing.JScrollPane extractedScrollPane;
private javax.swing.JTextPane extractedTextPane; private javax.swing.JTextPane extractedTextPane;
private javax.swing.JLabel hitButtonsLabel; private javax.swing.JLabel hitButtonsLabel;
private javax.swing.JLabel hitCountLabel; private javax.swing.JLabel hitCountLabel;
@ -375,9 +377,6 @@ class ExtractedContentPanel extends javax.swing.JPanel {
private javax.swing.JButton hitPreviousButton; private javax.swing.JButton hitPreviousButton;
private javax.swing.JLabel hitTotalLabel; private javax.swing.JLabel hitTotalLabel;
private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2; private javax.swing.JSeparator jSeparator2;
private javax.swing.JLabel pageButtonsLabel; private javax.swing.JLabel pageButtonsLabel;
@ -404,14 +403,17 @@ class ExtractedContentPanel extends javax.swing.JPanel {
* @param sources A list of IndexedText that have different 'views' of * @param sources A list of IndexedText that have different 'views' of
* the content. * the content.
*/ */
void setSources(String contentName, List<IndexedText> sources) { final void setSources(String contentName, List<IndexedText> sources) {
this.contentName = contentName; this.contentName = contentName;
setPanelText(null, false); setPanelText(null, false);
sourceComboBox.removeAllItems(); sourceComboBox.removeAllItems();
sources.forEach(sourceComboBox::addItem); sources.forEach(sourceComboBox::addItem);
if (false == sources.isEmpty()) { if (false == sources.isEmpty()) {
sourceComboBox.setEnabled(true);
sourceComboBox.setSelectedIndex(0); sourceComboBox.setSelectedIndex(0);
} else {
sourceComboBox.setEnabled(false);
} }
} }
@ -425,18 +427,17 @@ class ExtractedContentPanel extends javax.swing.JPanel {
} }
private void setPanelText(String text, boolean detectDirection) { private void setPanelText(String text, boolean detectDirection) {
text = StringUtils.defaultString(text); String safeText = StringUtils.defaultString(text);
if (detectDirection) { if (detectDirection) {
//detect text direction using first 1024 chars and set it //detect text direction using first 1024 chars and set it
//get first up to 1024 chars, strip <pre> tag and unescape html to get the string on which to detect //get first up to 1024 chars, strip <pre> tag and unescape html to get the string on which to detect
final int len = text.length(); final int len = safeText.length();
final int prefixLen = "<pre>".length(); //NON-NLS final int prefixLen = "<pre>".length(); //NON-NLS
if (len > prefixLen) { if (len > prefixLen) {
final int maxOrientChars = Math.min(len, 1024); final int maxOrientChars = Math.min(len, 1024);
final String orientDetectText = EscapeUtil.unEscapeHtml(text.substring(prefixLen, maxOrientChars)); final String orientDetectText = EscapeUtil.unEscapeHtml(safeText.substring(prefixLen, maxOrientChars));
ComponentOrientation direction = TextUtil.getTextDirection(orientDetectText); ComponentOrientation direction = TextUtil.getTextDirection(orientDetectText);
//logger.log(Level.INFO, "ORIENTATION LEFT TO RIGHT: " + direction.isLeftToRight());
extractedTextPane.applyComponentOrientation(direction); extractedTextPane.applyComponentOrientation(direction);
} else { } else {
extractedTextPane.applyComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); extractedTextPane.applyComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
@ -445,7 +446,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
extractedTextPane.applyComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); extractedTextPane.applyComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
} }
extractedTextPane.setText(text); extractedTextPane.setText(safeText);
extractedTextPane.setCaretPosition(0); extractedTextPane.setCaretPosition(0);
} }
@ -454,6 +455,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
} }
/** /**
* Update the value displayed as the current match
* *
* @param current, current hit to update the display with * @param current, current hit to update the display with
*/ */
@ -466,6 +468,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
} }
/** /**
* Update the value dispalyed for the total number of matches
* *
* @param total total number of hits to update the display with * @param total total number of hits to update the display with
*/ */
@ -478,6 +481,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
} }
/** /**
* Update the value displayed for the current page
* *
* @param current, current page to update the display with * @param current, current page to update the display with
*/ */
@ -486,10 +490,11 @@ class ExtractedContentPanel extends javax.swing.JPanel {
} }
/** /**
* Update the value displayed for the total pages
* *
* @param total total number of pages to update the display with * @param total total number of pages to update the display with
*/ */
void updateTotalPageslDisplay(int total) { void updateTotalPagesDisplay(int total) {
pageTotalLabel.setText(Integer.toString(total)); pageTotalLabel.setText(Integer.toString(total));
} }
@ -581,15 +586,15 @@ class ExtractedContentPanel extends javax.swing.JPanel {
enableNextPageControl(false); enableNextPageControl(false);
enablePrevPageControl(false); enablePrevPageControl(false);
updateCurrentPageDisplay(0); updateCurrentPageDisplay(0);
updateTotalPageslDisplay(0); updateTotalPagesDisplay(0);
return; return;
} }
updateCurrentPageDisplay(source.getCurrentPage()); updateCurrentPageDisplay(source.getCurrentPage());
int totalPages = source.getNumberPages(); int totalPages = source.getNumberPages();
updateTotalPageslDisplay(totalPages); updateTotalPagesDisplay(totalPages);
if (totalPages == 1) { if (totalPages < 2) {
enableNextPageControl(false); enableNextPageControl(false);
enablePrevPageControl(false); enablePrevPageControl(false);
} else { } else {
@ -686,14 +691,12 @@ class ExtractedContentPanel extends javax.swing.JPanel {
} else { } else {
setPanelText("", false); setPanelText("", false);
} }
} catch (InterruptedException | CancellationException | ExecutionException ex) { } catch (InterruptedException | CancellationException | ExecutionException ex) {
logger.log(Level.SEVERE, "Error getting marked up text", ex); //NON-NLS logger.log(Level.SEVERE, "Error getting marked up text", ex); //NON-NLS
setPanelText(Bundle.IndexedText_errorMessage_errorGettingText(), true); setPanelText(Bundle.IndexedText_errorMessage_errorGettingText(), true);
} }
updateControls(source); updateControls(source);
scrollToCurrentHit(source); scrollToCurrentHit(source);
} }
} }

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2011-2018 Basis Technology Corp. * Copyright 2011-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -32,7 +32,7 @@ import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer; import org.sleuthkit.autopsy.corecomponentinterfaces.TextViewer;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.keywordsearch.AdHocSearchChildFactory.AdHocQueryResult; import org.sleuthkit.autopsy.keywordsearch.AdHocSearchChildFactory.AdHocQueryResult;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
@ -47,13 +47,13 @@ import org.sleuthkit.datamodel.Report;
import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskCoreException;
/** /**
* A content viewer that displays the indexed text associated with a file or an * A text viewer that displays the indexed text associated with a file or an
* artifact, possibly marked up with HTML to highlight keyword hits. * artifact, possibly marked up with HTML to highlight keyword hits.
*/ */
@ServiceProvider(service = DataContentViewer.class, position = 4) @ServiceProvider(service = TextViewer.class, position = 2)
public class ExtractedContentViewer implements DataContentViewer { public class ExtractedTextViewer implements TextViewer {
private static final Logger logger = Logger.getLogger(ExtractedContentViewer.class.getName()); private static final Logger logger = Logger.getLogger(ExtractedTextViewer.class.getName());
private static final BlackboardAttribute.Type TSK_ASSOCIATED_ARTIFACT_TYPE = new BlackboardAttribute.Type(TSK_ASSOCIATED_ARTIFACT); private static final BlackboardAttribute.Type TSK_ASSOCIATED_ARTIFACT_TYPE = new BlackboardAttribute.Type(TSK_ASSOCIATED_ARTIFACT);
private static final BlackboardAttribute.Type TSK_ACCOUNT_TYPE = new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE); private static final BlackboardAttribute.Type TSK_ACCOUNT_TYPE = new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE);
@ -63,15 +63,16 @@ public class ExtractedContentViewer implements DataContentViewer {
private IndexedText currentSource = null; private IndexedText currentSource = null;
/** /**
* Constructs a content viewer that displays the indexed text associated * Constructs a text viewer that displays the indexed text associated with a
* with a file or an artifact, possibly marked up with HTML to highlight * file or an artifact, possibly marked up with HTML to highlight keyword
* keyword hits. * hits.
*/ */
public ExtractedContentViewer() { public ExtractedTextViewer() {
// This constructor is intentionally empty.
} }
/** /**
* Sets the node displayed by the content viewer. * Sets the node displayed by the text viewer.
* *
* @param node The node to display * @param node The node to display
*/ */
@ -88,7 +89,7 @@ public class ExtractedContentViewer implements DataContentViewer {
* This deals with the known bug with an unknown cause where setNode is * This deals with the known bug with an unknown cause where setNode is
* sometimes called twice for the same node. * sometimes called twice for the same node.
*/ */
if (node == currentNode) { if (node.equals(currentNode)) {
return; return;
} else { } else {
currentNode = node; currentNode = node;
@ -265,8 +266,8 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
@Override @Override
public DataContentViewer createInstance() { public TextViewer createInstance() {
return new ExtractedContentViewer(); return new ExtractedTextViewer();
} }
@Override @Override
@ -284,10 +285,10 @@ public class ExtractedContentViewer implements DataContentViewer {
@Override @Override
public void resetComponent() { public void resetComponent() {
panel.resetDisplay(); panel.resetDisplay();
currentNode = null; currentNode = null;
currentSource = null; currentSource = null;
panel.updateControls(currentSource);
} }
@Override @Override
@ -435,6 +436,9 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
} }
/**
* Listener to select the next match found in the text
*/
private class NextFindActionListener implements ActionListener { private class NextFindActionListener implements ActionListener {
@Override @Override
@ -475,6 +479,9 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
} }
/**
* Listener to select the previous match found in the text
*/
private class PrevFindActionListener implements ActionListener { private class PrevFindActionListener implements ActionListener {
@Override @Override
@ -510,6 +517,9 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
} }
/**
* Listener to update the text displayed based on the source changing
*/
private class SourceChangeActionListener implements ActionListener { private class SourceChangeActionListener implements ActionListener {
@Override @Override
@ -522,7 +532,6 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
panel.updateControls(currentSource); panel.updateControls(currentSource);
panel.updateSearchControls(currentSource);
} }
} }
@ -545,7 +554,7 @@ public class ExtractedContentViewer implements DataContentViewer {
panel.updateCurrentPageDisplay(currentSource.getCurrentPage()); panel.updateCurrentPageDisplay(currentSource.getCurrentPage());
//scroll to current selection //scroll to current selection
ExtractedContentViewer.this.scrollToCurrentHit(); scrollToCurrentHit();
//update controls if needed //update controls if needed
if (!currentSource.hasNextPage()) { if (!currentSource.hasNextPage()) {
@ -578,7 +587,7 @@ public class ExtractedContentViewer implements DataContentViewer {
panel.updateCurrentPageDisplay(currentSource.getCurrentPage()); panel.updateCurrentPageDisplay(currentSource.getCurrentPage());
//scroll to current selection //scroll to current selection
ExtractedContentViewer.this.scrollToCurrentHit(); scrollToCurrentHit();
//update controls if needed //update controls if needed
if (!currentSource.hasPreviousPage()) { if (!currentSource.hasPreviousPage()) {
@ -593,6 +602,9 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
} }
/**
* Listener to go to the next page of the text
*/
private class NextPageActionListener implements ActionListener { private class NextPageActionListener implements ActionListener {
@Override @Override
@ -601,6 +613,9 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
} }
/**
* Listener to go to the previous page of the text
*/
private class PrevPageActionListener implements ActionListener { private class PrevPageActionListener implements ActionListener {
@Override @Override

View File

@ -1,4 +1,4 @@
/*! \page translations_page Translating This Document /*! \page translations_page Translating Documentation and the UI
The Autopsy user base is global. You can help out by translating the UI and this documentation. The Autopsy user base is global. You can help out by translating the UI and this documentation.

BIN
thirdparty/7-Zip/7-zip.chm vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7-zip.dll vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7-zip32.dll vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7z.dll vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7z.exe vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7z.sfx vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7zCon.sfx vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7zFM.exe vendored Normal file

Binary file not shown.

BIN
thirdparty/7-Zip/7zG.exe vendored Normal file

Binary file not shown.

1398
thirdparty/7-Zip/History.txt vendored Normal file

File diff suppressed because it is too large Load Diff

404
thirdparty/7-Zip/Lang/af.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; 4.09 : Petri Jooste
;
;
;
;
;
;
;
;
;
;
0
7-Zip
Afrikaans
Afrikaans
401
OK
Kanselleer
&Ja
&Nee
A&fsluit
Hulp
&Gaan voort
440
Ja vir &almal
Nee vir a&lmal
Stop
Herbegin
&Agtergrond
&Voorgrond
&Wag
Wagtend
Is u seker dat u wil kanselleer?
500
&Lêer
R&edigeer
&Vertoon
G&unstelinge
&Gereedskap
&Hulp
540
&Open
Open &Binne
Open B&uite
&Wys
R&edigeer
Her&noem
&Kopieer na...
&Verskuif na...
Ve&rwyder
Ver&deel lêer...
Kom&bineer lêers...
E&ienskappe
Komme&ntaar
Maak gids
Maak lêer
A&fsluit
600
Selekteer &alles
Deselekteer a&lles
Keer &seleksie om
Selekteer...
Deselekteer...
Selekteer op Soort
Deselekteer op Soort
700
&Groot ikone
&Klein ikone
&Lys
&Detail
730
Ongesorteer
&2 Panele
&Nutsbalke
Maak wortelgids oop
Een vlak hoër
Gidse geskiedenis...
&Verfris
750
Argiveernutsbalk
Standaardnutsbalk
Groot knoppies
Wys teks op knoppies
800
Voeg gids by gunstelinge &as
Boekmerk
900
&Opsies...
&Normtoetsing
960
&Inhoud...
&Aangaande 7-Zip...
1003
Pad
Naam
Uitgang
Gids
Grootte
Ingepakte grootte
Kenmerke
Gemaak
Laatste toegang
Gewysig
Kompak
Kommentaar
Versleuteld
Verdeel Voor
Verdeel Na
Woordeboek
CRC
Tipe
Anti
Metode
Gasheer BS
Lêersstelsel
Gebruiker
Groep
Blok
Kommentaar
Posisie
Fout
Totale grootte
Vrye ruimte
Klustergrootte
Etiket
Plaaslike naam
Verskaffer
2100
Opsies
Taal
Taal:
Redigeerder
R&edigeerder:
2200
Stelsel
Assosieer 7-Zip met:
2301
Integreer 7-Zip in kontekskeuselys.
Trapsgewyse kontekskeuselys
Kontekskeuselysitems:
2320
<Gids>
<Argief>
Open
Pak lêers uit...
Voeg by argief...
Toets argief
Pak hier uit
Pak uit in {0}
Voeg by {0}
Saampers en e-pos...
Pers saam in {0} en e-pos
2400
Gidse
&Werkgids
&TEMP-gids van het stelsel
&Huidige gids
&Gespesifiseerde gids:
Gebruik slegs vir verwisselbare media.
Spesifiseer die stoorplek vir tydelyke argieflêers.
2500
Instellings
Wys ".." &item
Wys &ware lêerikone
Wys &stelselkeuselys
Wys seleksie oor &hele ry(e)
Wys &roosterlyne
2900
Aangaande 7-Zip
7-Zip is gratis programmatuur. Indien u egter so baie van 7-Zip hou dat u die verdere ontwikkeling wil ondersteun, registreer dan asb. met 'n geldelike donasie aan die 7-Zip Projek.
3000
Daar is geen foute nie
{0} objekt(e) is geselekteer
Kan gids '{0}' nie maak nie
Bywerk-funksie word vir hierdie argief nie ondersteun nie.
Lêer '{0}' is gewysig.\nWil u dit bywerk in die argief?
Kan lêer\n'{0}' nie bywerk nie
Redigeerder nie aan die gang gesit word nie.
Te veel items
3300
Besig om uit te pak
Besig met saampersing
Besig om te toets
Besig om oop te maak...
3400
&Uitpak
U&itpak in:
Gee 'n bestemming vir uitgepakte lêers.
3410
Pad-metode
Volledige padname
Geen padname
3420
Vervang lêers
Vervang slegs met bevestiging
Vervang sonder bevestiging
Slaan bestaande lêers oor
Hernoem outomaties
Hernoem bestaande lêers outomaties
3500
Bevestig lêeroorskrywing
Doelgids bevat alreeds 'n lêer met hierdie naam.
Wil u die bestaande lêer vervang
deur hierdie lêer ?
{0} grepe
O&utomaties hernoem
3700
Nie-ondersteunde saampersmetode vir '{0}'.
Datafout in '{0}'. Lêer is beskadig.
CRC het misluk in '{0}'. Lêer is beskadig.
3800
Tik wagwoord in
Tik wagwoord in:
&Wys wagwoord
&Wagwoord
3900
Tydsduur sovêr:
Oorblywende tyd:
Grootte:
Spoed:
Foute:
4000
Voeg by argief
&Argief:
&Bywerkwyse:
Argie&fformaat:
Saampersingv&lak:
&Saampersmetode:
&Woordeboekgrootte:
&Woordgrootte:
Pa&rameters:
Opsies
Maak SF&X argief
Enkripteer lêer&name
Geheuegebruik vir saampersing:
Geheuegebruik vir uitpakking:
4050
Stoor
Vinnigste
Vinnig
Normaal
Maksimum
Ultra
4060
Lêers byvoeg en vervang
Lêers bywerk en byvoeg
Verfris bestaande lêers
Sinkroniseer lêers
4070
Blaai
Alle lêers
6000
Kopieer
Verskuif
Kopieer na:
Verskuif na:
Besig met kopiëring...
Besig met verskuiwing...
Besig met hernoeming...
Bewerking word nie ondersteun nie.
Fout by hernoeming van lêer of gids
6100
Bevestig lêerverwydering
Bevestig gidsverwydering
Bevestig verwydering van meerdere lêers
Is u seker dat u '{0}' wil verwyder?
Is u seker dat u gids '{0}' asook die inhoud daarvan wil verwyder?
Is u seker dat u hierdie {0} items wil verwyder?
Besig met verwydering...
Fout by verwydering van lêer of gids
6300
Maak gids
Maak lêer
Naam van die gids:
Lêernaam:
Nuwe gids
Nuwe lêer
Fout by maak van gids
Fout by maak van nuwe lêer
6400
Selekteer
Deselekteer
Masker:
6600
Gidse-geskiedenis
Diagnostiese boodskappe
Boodskap
7100
Rekenaar
Network
Stelsel
7200
Voeg by
Pak uit
Toets
Kopiëer
Skuif
Vee uit
Intigting
7300
Verdeel lêer
&Verdeel na:
Verdeel in &volumes, aantal grepe:
Besig met verdeling...
7400
Kombineer lêers
&Kombineer na:
Besig met kombinering...
7500
7600
Meet
Geheuegebruik:
Inpakking
Uitpakking
Gradering
Totale gradering
Huidige
Resultaat
Lopies:

404
thirdparty/7-Zip/Lang/an.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; : Feliciano Martínez Tur
; 9.07 : Juan Pablo Martínez
;
;
;
;
;
;
;
;
;
0
7-Zip
Aragonese
Aragonés
401
Acceptar
Cancelar
&Sí
&No
&Zarrar
Aduya
&Continar
440
Sí a &tot
No a t&ot
Aturar
Tornar a empecipiar
Se&gundo plano
P&rimer plano
&Pausa
Aturau
Yes seguro que quiers cancelar?
500
&Fichero
&Editar
&Veyer
&Favoritos
&Ferramientas
Ad&uya
540
&Ubrir
Ubrir &adintro
Ubrir &difuera
&Veyer
&Editar
Re&nombrar
&Copiar en...
&Mover ta...
&Borrar
Di&vidir o fichero...
C&ombinar os fichers...
&Propiedatz
Comen&tario
Calcular a suma de comprebación
Diff
Creyar carpeta
Creyar fichero
&Salir
600
Seleccionar-lo &tot
Deseleccionar-lo tot
&Invertir selección
Seleccionar...
Deseleccionar...
Seleccionar por tipo
Deseleccionar por tipo
700
Iconos g&rans
&Iconos chicotz
&Lista
&Detalles
730
Desordenau
Anvista plana
&2 panels
&Barras de ferramientas
Ubrir a carpeta radiz
Carpeta mai
Historial de carpetas...
&Esviellar
750
Barra de ferramientas d'archivo
Barras de ferramientas estandard
Botons grans
Amostrar texto en os botons
800
&Adhibir carpeta a favoritos como
Adhibir a favoritos
900
&Opcions...
&Prebas de referencia (benchmark)
960
&Conteniu...
A&rredol de 7-Zip...
1003
Rota
Nombre
Tipo de fichero
Carpeta
Grandaria
Grandaria comprimida
Atributos
Creyau
Zaguer acceso
Zaguera modificación
Compacto
Comentario
Zifrau
Expandiu antis
Expandiu dimpués
Diccionario
CRC
Tipo
Anti
Metodo
SO d'orichen
Sistema de fichers
Usuario
Grupo
Bloque
Comentario
Posición
Prefixo de rota
Carpeta
Fichers
Versión
Fragmento
Multiframento
Desplazamiento
Vinclos
Bloques
Fragmentos
64-bit
Big-endian
CPU
Grandaria fisica
Grandaria d'as cabeceras
Suma de comprebación
Caracteristicas
Adreza virtual
ID
Nombre curto
Aplicación creyadera
Grandaria de sector
Modo
Vinclo
Error
Espacio total
Espacio libre
Grandaria de sector
Etiqueta
Nombre local
Proveyedor
2100
Opcions
Luenga
Luenga:
Editor
&Editor:
&Diff:
2200
Sistema
Asociar 7-Zip con:
2301
Integrar 7-Zip en o menú contextual de Windows
Menú contextual en cascada
Elementos d'o menú contextual:
2320
<Carpeta>
<Archivo>
Ubrir archivo
Extrayer-ne os fichers...
Adhibir a l'archivo...
Comprebar l'archivo
Extrayer aquí
Extrayer en {0}
Adhibir a {0}
Comprimir y ninviar por correu...
Comprimir en {0} y ninviar por correu
2400
Carpeta
Carpeta de &treballo
Carpeta temporal d'o &sistema
Carpeta &actual
&Especificar una carpeta:
No emplegar que ta dispositivos extrayibles
Especificar una carpeta ta archivos temporals.
2500
Propiedatz
Amostrar l'elemento ".."
Amostrar iconos propios
Amostrar o menú d'o sistema
&Seleccionar ringlera(s) completa(s)
Amostrar as linias d'a &quadricla
Clicar una vegada ta ubrir elemento
Modo de selección &alternativo
Emplegar pachinas de memoria &grans
2900
Arredol de 7-Zip
7-Zip ye un programa libre y gratuito. Si quiers, puetz colaborar en o desembolique de 7-Zip rechistrando-te ta contribuyir a amillorar o programa.
3000
O sistema no ha puesto asignar a cantidat necesaria de memoria
No i hai errors
{0} elemento(s) seleccionau(s)
No se puet creyar a carpeta '{0}'
Ista mena d'archivo no permite actualización.
No se puet ubrir o fichero '{0}' como archivo comprimiu
No se puet ubrir l'archivo zifrau '{0}'. Comprebe si a clau ye incorrecta.
Tipo d'archivo no admeso
O fichero {0} ya existe
O fichero '{0}' s'ha modificau.\nQuiers esviellar-lo en l'archivo?
No se puet esviellar o fichero\n'{0}'
No se puet executar l'editor.
O fichero pareix un virus (o nombre d'o fichero contiene espacios largos).
No se puet execitar ista operación dende una carpeta que tienga una rota larga.
Has de seleccionar un fichero
Has de seleccionar un u más fichers
Masiaus elementos
3300
Extrayendo
comprimindo
Prebando
Ubrindo...
Buscando...
3400
Extrayer
E&xtrayer a:
Selecciona un destín ta os fichers extrayius.
3410
Modo de rota
Rotas completas
Sin rotas
3420
Modo de sobrescritura
Con confirmación
Sin confirmación
Conservar os fichers ya existents
Renombrar automaticament
Renombrar automaticament os fichers ya existents
3500
Confirmar a substitución de fichers
A carpeta de destín ya contiene un fichero con o mesmo nombre.
Quiers substituyir o fichero existent
por iste atro?
{0} bytes
Renombrar a&utomaticament
3700
Metodo de compresión no valido ta '{0}'.
Error de datos en '{0}'. O fichero ye corrompiu.
O CRC ha fallau en '{0}'. O fichero ye corrompiu.
Error de datos en o fichero zifrau '{0}'. Verifica a clau.
Error de CRC en o fichero zifrau '{0}'. Verifica a clau.
3800
Escribe a clau
Escribe a clau:
Torne a escribir a clau:
&Amostrar a clau
As claus son diferents. Por favor, torne a escribir-la.
Emplega en a clau nomás as letras de l'alfabeto anglés, numeros y caracters especials (!, #, $, ...)
A clau ye masiau larga.
Contrasenya
3900
Tiempo transcorriu:
Tiempo pendient:
Grandaria:
Velocidat:
Procesau:
Razón de compresión:
Errors:
Archivos:
4000
Adhibir a l'archivo
&Archivo:
M&odo d'actualización:
&Formato d'archivo:
&Libel de compresión:
&Metodo de compresión:
Grandaria de &diccionario:
Granda&ria d'a parola:
Grandaria de bloque compacto:
Numero de filos d'a CPU:
&Parametros:
Opcions
Creyar archivo SF&X (autoextrayible)
Comprimir fichers compartius
Encriptación
Metodo d'e &zifrau:
Zifrar &nombres de fichero
Memoria emplegada ta comprimir:
Memoria emplegada ta descomprimir:
4050
Sin compresión
A mas rapida
Rapida
Normal
Maxima
Ultra
4060
Adhibir y substituyir fichers
Esviellar y adhibir-ie fichers
Esviellar fichers ya presents
Sincronizar fichers
4070
Explorar
Totz os fichers
No compacto
Compacto
6000
Copiar
Mover
Copiar en:
Mover ta:
Copiando...
Movendo...
Renombrando...
Selecciona a carpeta de destín
Operación no permitida.
Error en enombrar un fichero u carpeta
Confirmar a copia d'o fichero
Yes seguro de que quiers copiar os fichers en l'archivo
6100
Confirmar borrau de fichero
Confirmar borrau de carpeta
Confirmar borrau multiple fichers
Yes seguro que quiers borrar '{0}'?
Yes seguro que quiers borrar a carpeta '{0}' y tot o suyo conteniu?
Yes seguro que quiers borrar istos {0} elementos?
Borrando...
Error borrando fichero u carpeta
O sistema no puet mover un fichero con rota larga ta la Papelera de Reciclache
6300
Creyar carpeta
Creyar fichero
Nombre de'a carpeta:
Nombre de'o fichero:
Carpeta nueva
Fichero nuevo
Error en creyar carpeta
Error en creyar o fichero:
6400
Comentario
&Comentario:
Seleccionar
Deseleccionar
Patrón:
6600
Propiedatz
Historial de carpetas
Mensaches de diagnostico
Mensache
7100
O mío ordinador
Entorno de ret
Documentos
Sistema
7200
Adhibir
Extrayer
Prebar
Copiar
Mover
Borrar
Información
7300
Dividir fichero
Di&vidir a:
Dividir en fra&gmentos (bytes):
Dividindo...
Confirmar a división
Yes seguro que quiers dividir o fichero en {0} fragmentos?
A grandaria d'os fragmentos ha d'estar menor que a d'o fichero orichinal
Grandaria de fragmento incorrecta
Grandaria de fragmento especificada: {0} bytes.\nYe seguro que quiere dividir o fichero en fragmentos d'ixa grandaria?
7400
Combinar fichers
&Combinar en:
Combinando...
Selecciona només o primer fichero
No s'ha puesto detectar o fichero como parti d'un fichero por fragmentos
No s'ha puesto trobar que un fragmento d'o fichero por fragmentos
7500
Calculando a suma de verificación...
Suma de verificación (CRC)
CRC d'os datos:
CRC d'os datos y os nombres:
7600
Prebas de referencia (benchmark)
Emplego de memoria:
Compresión
Descompresión
Taxa
Taxa total
Actual
Resultant
Emplego de CPU
Taxa / Emplego
Pasadas:

495
thirdparty/7-Zip/Lang/ar.txt vendored Normal file
View File

@ -0,0 +1,495 @@
;!@Lang2@!UTF-8!
; 9.07 :ترجمةالاستاذ:عوض ال-عائض الغامدي
; 9.07 : Awadh A Al-Ghaamdi
;
; 15.00 : 2016-08-28 : تعديل وتصحيح الترجمة: سيف حسام الاسدي
; 15.00 : 2016-08-28 : Saif H Al-asadi (edited and corrected)
;
;
;
;
;
;
0
7-Zip
Arabic
عربي
401
حسنا
إلغاء الأمر
&نعم
&لا
&إغلاق
المساعدة
&استمرار
440
نعم للكل
لا للكل
إيقاف
إعادة تشغيل
&بالخلفية
&بالمقدمة
&إيقاف مؤقت
متوقف مؤقتا
هل أنت متأكد من الإلغاء؟
500
&الملف
&التعديل
&العرض
التف&ضيلات
&ألادوات
&المساعدة
540
&فتح
&افتح بالداخل
&افتح للخارج
&عرض
&تعديل
إعادة التسمية
..نسخ إلى
..نقل إلى
&حذف
&تقسيم الملف...
دم&ج الملفات...
الخ&صائص
تعليق&
حساب قيمة التدقيق
فرق
إنشاء مجلد
إنشاء ملف
خروج
الربط
&الجداول البديلة
600
تحديد الكل
عدم تحديد الكل
عكس التحديد
تحديد...
عدم تحديد...
تحديد حسب النوع
عدم تحديد حسب النوع
700
رموز كبيرة
رموز صغيرة
&القائمة
&التفاصيل
730
غير مرتب
العرض الافقي
&مجموعتين
&أشرطة الأدوات
فتح المجلد الرئيسي
للأعلى بمستوى واحد
...محفوظات المجلدات
&تحديث
تحديث تلقائي
750
شريط أدوات الأرشفة
شريط ألادوات قياسي
أزرار كبيرة
إظهار تسميات الازرار
800
&إضافة المجلد للمفضلة باسم
العلامات المرجعية
900
...&الخيارات
&معالج الاداء
960
..&المحتويات
7-Zip &حول...
1003
المسار
الإسم
الإمتداد
المجلد
الحجم
الحجم المضغوط
الخواص
تم انشاءه
تم الدخول
تم تعديله
ثابت
تم التعيلق
مشفر
التقسيم قبل
التقسيم بعد
القاموس
النوع
متعدد
الطريقة
نظام التشغيل
ملفات النظام
المستخدم
المجموعة
التكتل
التعليق
الموقع
بادئة المسار
المجلدات
الملفات
الإصدار
وحدة التخزين
وحدة تخزين متعددة
التعويض
روابط
كتل
وحدات تخزين
64-بت
Big-endian
CPU
الحجم الطبيعي
حجم المقدمات
قيمة التحقق
المميزات
العنوان الظاهري
الهوية
إسم قصير
برنامج الانشاء
حجم القطاع
الوضع
الرابط الرمزي
خطأ
الحجم الكلي
المساحة الحرة
حجم الجزء
العلامة
الإسم المحلي
المجهز
NT أمان
الجداول البديلة
Aux
تم حذفة
التفرعات
خطأ في النوع
اخطاء
اخطاء
تحذيرات
تحذير
الجداول
الجداول البديلة
حجم الجداول البديلة
الحجم الظاهري
حجم الاخراج
الحجم الطبيعي الكلي
دليل الحجم
النوع الفرعي
تعليق قصير
رمز الصفحة
حجم التذييل
حجم العقبات المضمن
الارتباط
الارتباط الصعب
iNode
للقراءة-فقط
2100
الخيارات
اللغة
ترجمةالأستاذ عوض الغامدي -التعديل سيف الاسدي
المحرر
&المحرر:
ال&فرق:
2200
النظام
تكامل البرنامج مع :
جميع المستخدمين
2301
الإندماج مع قائمة الزر الايمن
تتالي قائمة الزر الايمن
عناصر قائمة الزر الايمن :
الايقونات في قائمة الزر الايمن
2320
<مجلد>
<إرشيف>
فتح ارشيف
استخراج الملفات...
إضافة إلى الإرشيف...
فحص الإرشيف
إستخرج هنا
إستخرج إلى {0}ـ
إضافة إلى {0}ـ
ضغط ثم إرسال...
ضغط إلى {0} ثم إرسال
2400
مجلدات
&مجلد العمل
&مجلد النظام المؤقت
&الحالي
&محدد:
الإستخدام فقط للأقراص المتحركة
تحديد موضع للإرشيف المؤقت للملفات
2500
الاعدادات
".." إظهار عنصر
إظهار أيقونات الملف الفعلية
إظهار قائمة النظام
&تحديد الصف بالكامل
إظهار خطوط الشبكة
نقرة واحدة لفتح أي مادة
&نظام تحديد بديل
إستعمال &صفحات ذاكرة كبيرة
2900
حول البرنامج
7-Zip البرنامج مجاني
3000
لا يمكن للنظام تخصيص الكمية المطلوبة للذاكرة
لا يوجد أخطاء
تم تحديد {0} عنصر
'{0}' لا يمكن إنشاء المجلد
تحديث العمليات غير مدعوم لهذا الإرشيف
كأرشيف '{0}' لا يمكن فتح الملف
كلمة المرور خطأ ؟ . '{0}' تعذر فتح الأرشيف المشفر
نوع أرشيف غير معتمد
موجود مسبقا {0} الملف
أتريد تحديثه في الإرشيف ؟\nالملف '{0}' تم تعديله
لا يمكن تحديث الملف\n'{0}'
لا يمكن بدء المحرر
(الملف يشبه فيروس (إسم الملف يحتوي على مسافات طويلة
لا يمكن إستدعاء العملية من مجلد له مسار طويل
يجب تحديد ملف واحد
يجب تحديد ملف واحد أو أكثر
عناصر كثيرة جداً
لايمكن فتح الملف {0} كأرشيف
الملف مفتوح {0} كأرشيف
ان الارشيف مفتوح بطريقة الطباعة بالاوفسيت
3300
استخراج
الضغط
فحص
...فـتـح...
...يتم التفحص
تتم الازالة
3320
يتم الاضافة
يتم التحديث
يتم التحليل
يتم التكرار
يتم اعادة الضغط
يتم التجاهل
يتم الحذف
يتم انشاء المقدمة
3400
استخراج
استخراج إلى:
تحديد الموضع للملفات المستخرجة
3410
حالة المسار
اسم المسار بالكامل
بدون اسم المسار
اسم المسار المطلق
اسم المسار النسبي
3420
حالة إعادة الكتابة
السؤال قبل إعادة الكتابة
إعادة الكتابة بدون تنبيه
تجاوز الملفات المتوفرة
تسمية تلقائية
تسمية الملفات الموجودة تلقائياً
3430
ازالة تكرارات المجلد الرئيسي
استعادة ملف الامان
3500
تأكيد استبدال الملف
المجلد الهدف يحوي مسبقاً الملف
أتريد استبدال الملف الموجود؟
بهذا الملف؟
{0} بايت
إعادة تسمية تلقائية
3700
'{0}'طريقة ضغط غير معتمدة لـ
'{0}'خطأ بيانات في. الملف تالف
'{0}' خطأ بصمة في . الملف تالف
خطأ بيانات في الملف المشفر '{0}' . كلمة المرور غير صحيحة ؟
فشل الفحص الدوري في الملف المشفر '{0}' . كلمة المرور غير صحيحة ؟
3710
كلمة مرور خاطئة?
3721
طريقة ضغط غير مدعومة
بيانات خطأ
CRC فشل
بيانات غير متاحة
النهاية المفاجئة للبيانات
هناك بعض البيانات بعد نهاية بيانات الحمولة
ليس ارشيفاً
مقدمات خطأ
كلمة مرور خاطئة
3763
البداية غير متوفرة للارشيف
البداية غير مؤكدة للارشيف
ميزة غير مدعومة
3800
أدخل كلمة المرور
أدخل كلمة المرور:
إعادة كلمة المرور :
&إظهار كلمة المرور
كلمتا المرور غير متطابقتان
أستخدم فقط حروف إنجليزية و أرقام و علامات خاصة (!,#,,$ ...) لكلمة المرور
كلمة المرور طويلة جدا
كلمة المرور
3900
الزمن المنقضي:
الزمن المتبقي:
الحجم الكلي:
السرعة:
المعالج:
نسبة الضغط:
الأخطاء:
ملفات الإرشيف:
4000
إضافة للإرشيف
&الإرشيف:
&حالة التحديث:
صيغة الإرشيف:
مستوى الضغط&:
طريقة الضغط:
&حجم المعجم:
&حجم الكلمة:
حجم الكتلة الخاصة :
CPU عدد مؤشرات الـ :
&أوامر إضافية:
الخيارات
إنشاء إرشيف ذاتي الإستخراج
ضغط الملفات المشاركة
التشفير
طريقة التشفير :
تشفير أسماء ال&ملفات
إستهلاك الذاكرة للضغط :
إستهلاك الذاكرة لإلغاء الضغط :
حذف الملفات بعد الضغط
4040
خزن الاتباطات الرمزية
خزن الارتباطات الصعبة
خزن جداول البيانات البديلة
خزن ملف الامان
4050
للخزن
ألاسرع
السريع
الطبيعي
المرتفع
ألاقصى
4060
إضافة واستبدال الملفات
تحديث و إضافة الملفات
تجديد الملفات المتوفرة فقط
مزامنة الملفات
4070
إستعراض
كافة الملفات
غير خالص
خالص
6000
نسخ
نقل
نسخ إلى:
نقل إلى:
...نـسـخ...
...نـقـل...
إعادة تسمية...
تحديد مجلد الوجهة
العملية غير معتمدة
حدوث خطأ لدي إعادة تسمية الملف أو المجلد
تأكيد نسخ الملف
هل أنت متأكد من نسخ الملفات للإرشيف؟
6100
تأكيد الحذف للملف
تأكيد الحذف للمجلد
تأكيد الحذف للملفات
'؟ {0}'هل أنت متأكد من حذف
هل أنت متأكد من حذف المجلد '{0}' و كافة محتوياته ؟
؟ {0} هل أنت متأكد من حذف العناصر التالية
حذف...
حدوث خطأ لدي حذف الملف أو المجلد
لا يمكن للنظام نقل ملف له مسار طويل إلى سلة المحذوفات
6300
إنشاء مجلد
إنشاء ملف
اسم المجلد:
اسم الملف:
مجلد جديد
ملف جديد
حدوث خطأ لدي إنشاء المجلد
حدوث خطأ لدي إنشاء الملف
6400
تعليق
&تعليق:
تحديد
عدم تحديد
إخفاء:
6600
خصائص
محفوظات المجلدات
رسائل الفاحص
رسالة
7100
جهاز الكمبيوتر
الشبكة
المستندات
النظام
7200
إضافة
إستخراج
فحص
نسخ
نقل
حذف
معلومات
7300
تقسيم الملف
&التقسيم إلى:
التقسيم لكتل أو بايتات:
تقسيم...
تأكيد التقسيم
هل تريد فعلا تقسيم الملف إلى {0} كتلة ؟
يجب أن يكون حجم الكتلة أصغر من حجم الملف الأصلي
كتلة الحجم غير صحيحة
حجم الكتلة المعين : {0} بايت\nهل تريد فعلا تقسيم الأرشيف إلى مثل هذه الكتل ؟
7400
دمج الملفات
&دمج إلى:
دمج...
حدد فقط الجزء الأول من ملف التقسيم
لا يمكن إكتشاف الملف كجزء من ملف التقسيم
لا يمكن العثور على أكثر من جزء واحد من ملف التقسيم
7500
...يتم حساب مجموعة الإختبار
معلومات مجموعة الإختبار
للبيانات CRC مجموعة الإختبار:
للبيانات و للأسماء CRC مجموعة الإختبار:
7600
تقييم الأداء
إستخدام الذاكرة:
ضغط
فك ضغط
المعدل
المعدل الكلي
الحالي
الناتج
CPU إستهلاك الـ
التقدير / الإستهلاك
العمليات:
7700
الرابط
الارتباط
ربط من:
ربط الى:
7710
نوع الربط
ربط قوي
ربط الملف الرمزي
ربط القاموس الرمزي
قاموس الربط

404
thirdparty/7-Zip/Lang/ast.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; 4.07 : Dinamiteru
;
;
;
;
;
;
;
;
;
;
0
7-Zip
Asturian
Asturianu
401
Val
Torgar
&Si
&Non
&Zarrar
Axuda
&Siguir
440
Si a &Too
Non a T&oo
Parar
Reentamar
&De fondu
&En primer planu
&Posar
Posao
¿Tas fixu que quies paralo?
500
F&icheru
&Remanar
&Ver
F&avoritos
&Ferramientes
A&xuda
540
&Abrir
Abrir &Dientro
Abrir F&uera
&Ver
&Remanar
Reno&mar
&Copiar a...
&Mover a...
&Borrar
&Partir ficheru...
Com&binar ficheros...
P&ropiedaes
Come&ntariu
Crear carpeta
Crear ficheru
Co&lar
600
Seleicionar &Too
Deseleicionar too
&Invertir seleición
Seleicionar...
Deseleicionar...
Seleicionar por Tipu
Deseleicionar por Tipu
700
Miniatures &Grandes
&Miniatures Pequeñes
&Llista
&Detalles
730
Ensín Ordenar
&2 Paneles
&Barres de Ferramientes
Abrir Carpeta Raiz
Xubir Un Nivel
Hestorial de Carpetes...
Actualiza&r
750
Barra Ferramientes d´Archivu
Barra Ferramientes Normal
Botones Grandes
Amosar Testu nos Botones
800
&Añedir carpeta a Favoritos como
Marca
900
&Opciones...
&Bancu de Pruebes
960
&Conteníos...
&Al rodiu 7-Zip...
1003
Ruta
Nome
Estensión
Carpeta
Tamañu
Tamañu comprimío
Atributos
Creao
Accedío
Cambiao
Sólidu
Comentao
Cifrao
Partir antes
Partir dempués
Diccionariu
CRC
Tipu
Anti
Métodu
S.O. d´Acoyida
Sistema de ficheros
Usuariu
Grupu
Bloque
Comentariu
Posición
Error
Tamañu total
Espaciu llibre
Tamañu del clúster
Etiqueta
Nome llocal
Suministrador
2100
Opciones
Llingua
Llingua:
Remanaor
&Remanaor:
2200
Sistema
Asociar 7-Zip con:
2301
Integrar 7-Zip nel menú contestual
Menú contestual en ´cascada´
Artículos del menú contestual:
2320
<Carpeta>
<Archivu>
Abrir archivu
Estrayer ficheros...
Añedir al archivu...
Probar archivu
Estrayer equí
Estrayer a {0}
Añedir a {0}
Comprimir y mandar per correu...
Comprimir en {0} y mandar per correu
2400
Carpetes
&Carpeta de trabayu
Carpeta &temporal de sistema
&Actual
&Especificar:
Usar sólo pa dispositivos estrayibles
Especificar llocalización pa ficheros d´archivos temporales.
2500
Igües
Amosar ".." artículu
Amosar les miniatures reales del ficheru
Amosar menú del sistema
Seleicionar tola &fila
Amosar les llinies de la &cuadrícula
2900
Al rodiu 7-Zip
7-Zip ye software llibre. De toos moos, tú pues sofitar el desendolcu de 7-Zip rexistrándote.
3000
Ensín errores
{0} oxetu(os) seleicionaos
Nun se puede crear la carpeta '{0}'
Esti archivu nun permite les operaciones d´actualización.
El ficheru '{0}' foi modificáu.\nDo ¿Quies actualizalu nel archivu?
Nun se pudo actualizar l´archivu\n'{0}'
Nun se pudo entamar el Remanaor.
Demasiaos artículos
3300
Estrayendo
Comprimiendo
Probando
Abriendo...
3400
Estrayer
E&strayer a:
Especificar llocalización pa ficheros estrayíos.
3410
Mou de ruta
Nomes de ruta completos
Ensín nomes de ruta
3420
Mou de sobreescritura
Entrugar enantes de sobreescribir
Sobreescribir ensín confirmación
Dexar ficheros esistentes
Auto renomar
Auto renomar ficheros esistentes
3500
Confirmar sustitución de ficheros
La carpeta destín yá tien el ficheru procesáu.
¿Quiés sustituyir el ficheru esistente
con esti otru?
{0} bytes
A&uto Renomar
3700
Métodu de compresión nun permitíu pa '{0}'.
Error de datos en '{0}'. El ficheru ta rotu.
El CRC falló en '{0}'. El ficheru ta rotu.
3800
Introduz clave
Introduz clave:
Amo&sar clave
Clave
3900
Tiempu trescurríu:
Tiempu pa finar:
Tamañu:
Velocidá:
Errores:
4000
Añedir al archivu
&Archivu:
Mo&u d´actualización:
&Formatu del archivu:
Nive&l de compresión:
&Métodu de compresión:
Tamañu del &Diccionariu:
Tamañu de la pa&llabra:
&Parámetros:
Opciones
Crear archivu SF&X
Cifrar &nomes de ficheru
Usu de memoria pa la compresión:
Usu de memoria pa la descompresión:
4050
Nenguna
Más rápida
Rápida
Normal
Másima
Ultra
4060
Añedir y sustituyir ficheros
Actualizar y añedir ficheros
Actualizar ficheros esistentes
Sincronizar ficheros
4070
Agüeyar
Tolos ficheros
6000
Copiar
Mover
Copiar a:
Mover a:
Copiando...
Moviendo...
Renomando...
La operación nun tá permitía.
Error al renomar el ficheru o carpeta
6100
Confirmar Borráu de Ficheru
Confirmar Borráu de Carpeta
Confirmar Borráu Múltiple de Ficheros
¿Tas fixu que quies borrar '{0}'?
¿Tas fixu que quies borrar la carpeta '{0}' y tolos sos conteníos?
¿Tas fixu que quies borrar estos {0} artículos?
Borrando...
Error al borrar el ficheru o carpeta
6300
Crear Carpeta
Crear ficheru
Nome de la carpeta:
Nome del ficheru:
Nueva carpeta
Nuevu ficheru
Error al crear la carpeta
Error al crear el ficheru
6400
Comentariu
&Comentariu:
Seleicionar
Deseleicionar
Mazcarita:
6600
Hestorial de carpetes
Mensaxes de diagnósticu
Mensax
7100
Ordenador
Rede de Trabayu
Sistema
7200
Añedir
Estrayer
Probar
Copiar
Mover
Borrar
Información
7300
Partir Ficheru
&Partir a:
Partir en &cachos, bytes:
Partiendo...
7400
Combinar Ficheros
&Combinar a:
Combinando...
7500
7600
Bancu de Pruebes
Usu de memoria:
Comprimiendo
Descomprimiendo
Valoración
Valoración total
Actual
Resultáu
Correutos:

495
thirdparty/7-Zip/Lang/az.txt vendored Normal file
View File

@ -0,0 +1,495 @@
;!@Lang2@!UTF-8!
; 9.07 : F@rhad
; 15.02 : 2015-03-29 : Г. Гасымов
;
;
;
;
;
;
;
;
;
0
7-Zip
Azerbaijani
Azərbaycanca
401
OLDU
İmtina
&Bəli
&Xeyr
&Bağlamaq
Kömək
&Davam
440
&Hamısına Bəli
Ha&mısına Xeyr
Dayan
Yenidən başlamaq
&Arxa planda
Ö&ndə
F&asilə
Fasilədə
Həqiqətən əməliyyatı dayandırmaq istəyirsiniz?
500
&Fayl
&Düzəliş
&Görünüş
S&eçilmişlər
&Vasitələr
&Arayış
540
&Açmaq
&Daxildə Açmaq
B&ayırda açmaq
&Baxış
&Düzəliş
Ye&nidən Adlandırmaq
&Nüsxələmək...
&Köçürmək...
&Silmək
Faylı &Bölmək...
Faylları B&irləşdirmək...
X&üsusiyyətlər
Şər&h...
Yoxlama Cəmi
Müqayisə
Qovluq Yaratmaq
Fayl Yaratmaq
Ç&ıxış
İstinad
&Əvəzedici Axınlar
600
&Hamısını Seçmək
Seçimin Ləğvi
&Seçimi Çevirmək
Seçmək...
Seçimin Ləğvi...
Növünə Görə Seçmək
Növünə Görə Seçimin Ləğvi
700
&Böyük İşarələr
K&içik İşarələr
&Siyahı
&Cədvəl
730
Çeşidsiz
Müstəvi Görünüş
&2 Lövhə
&Alətlər Lövhələri
Kök Qovluğu Açmaq
Bir Səviyyə Yuxarı
Qovluqlar Tarixçəsi...
&Yeniləmək
Bilavasitə Yeniləmək
750
Arxivləyicinin Düymələr Lövhəsi
Sadə Düymələr Lövhəsi
Böyük Düymələr
Düymələr Üzərində Mətnlər
800
&Qovluğu Seçilmişlərə Fərqli Əlavə Etmək
Əlfəcin
900
Tənzimləmələr...
Səmərə Sınağı
960
&Başlıq...
7-Zip &Haqqında...
1003
İstiqamət
Ad
Genişləmə
Qovluq
Ölçü
Sıxılmış
Rəmzlər
Yaranıb
ıq
Dəyişilib
Aramsız
Şərh
Şifrələnib
Əvvəlki parça
Sonrakı parça
Lüğət
Növ
Əleyhinə
Sıxılma Üsulu
Quruluş
Fayl Quruluşu
İstifadəçi
Dəstə
Bölmə
Şərh
Mövqe
İstiqamət
Qovluq
Fayl
Buraxılış
Cild
Çox Cildli
Uzlaşma
İstinad
Bölmə
Cild
Prosessor
Fiziki Ölçü
Başlıqlar Ölçüsü
Yoxlama Cəmi
Xassələr
Xəyali Ünvan
Qısa Ad
Yaradıcı
Sahə Ölçüsü
Vəziyyət
Rəmzi İstinad
Xəta
Cəmi Həcm
Azad Həcm
Toplam Həcm
Nişan
Qısa Ad
Təchizatcı
NT Təhlükəsizlik
Əvəzedici Axın
Silinmiş
Ağac
Xəta Növü
Xətalar
Xətalar
Xəbərdarlıqlar
Xəbərdarlıq
Axınlar
Əvəzedici Axınlar
Əvəzedici Axınlar Ölçüsü
Xəyali Ölçü
Ceşidli Ölçü
Ümumi Fiziki Ölçü
Cild Nömrəsi
Növaltı
Qısa Şərh
Şifrələnmiş Səhifə
Qalıq Ölçüsü
Tətbiq Olunmuş Bölmə Ölçüsü
İstinad
Sərt İstinad
iNode
Yalnız Oxumaq Üçün
2100
Tənzimləmələr
Dil
Dil:
Düzəliş
&Düzəliş:
&Müqayisə:
2200
Quruluş
7-Zip Fayllarla Əlaqələnsin
Bütün İstifadəçilər
2301
7-Zip əhatə təklifinə tətbiq edilsin
Zəncirvari əhatə təklifi
Ünsürlü əhatə təklifi:
Əhatə təklifində nişanlar
2320
<Qovluq>
<Аrxiv>
Arxivi Açmaq
Çeşidləmək
Arxivə Əlavə Etmək...
Sınaq
Burda Çeşidləmək
{0} Çeşidləmək
{0} Əlavə Etmək
Sıxmaq Və E-Poçtla Göndərmək...
{0} Sıxmaq Və E-Poçtla Göndərmək
2400
Qovluqlar
&İş Qovluğu
&Müvəqqəti Quruluş Qovluğu
&Cari
&Təyin Etmək:
Yalnız dəyişkən daşıyıcılar üçün istifadə
Müvəqqəti arxivlər üçün yer göstərmək.
2500
Tənzimləmələr
".." ünsürünü göstərmək
Həqiqi fayl işarələri göstərmək
Quruluş təklifini göstərmək
Ox bütün sətir üzrə
Ayrıcıları Göstərmək
Bir Toxunuşla Açmaq
Əvəzedici vəziyyət işarələnməsi
Böyük yaddaş səhifələri istifadəsi
2900
7-Zip Haqqında
7-Zip Sərbəst Yayılan Proqramdır
3000
Kifayət qədər boş yaddaş yoxdur
Səhvlər tapılmadı
{0} Ayrılmış hədəf
'{0}' Qovluğunu yaratmaq mümkün olmadı
Bu arxiv üçün dəyişiklik əməliyatı dəstəklənmir
'{0}' Faylını arxiv kimi açmaq alınmadı
Şifrələnmiş '{0}' arxivini açmaq alınmadı. Yanlış şifrə?
Dəstəklənməyən arxiv
{0} faylı artıq mövcuddur
'{0}' faylına dəyişiklik edildi.\nSiz onu arxivdə yeniləmək istəyirsiz?
\n'{0}' faylını yeniləmək alınmadı
Redaktəni işə salmaq alınmadı
Fayl zərərvericiyə oxşayır (faylın adı uzun boşluq ardıcıllığı təşkil edir).
Əməliyyat uzun yol təşkil edən qovluqdan icra oluna bilmir.
Siz bir fayl seçməlisiniz
Siz bir və ya bir neçə fayl seçməlisiniz
Həddən çox ünsür
Faylı, '{0}' arxivi kimi açmaq alınmadı
Fayl, {0} arxivi kimi açıldı
Arxiv əvəzlənərək açıldı
3300
Çeşidlənmə
Sıxılma
Sınaq
ılır...
Yoxlanır...
Silinmə
3320
Əlavə Etmək
Yenilənmə
Təhlil
Nüsxələnmə
Yenidən Çeşidlənmə
Keçmə İcazəsi
Silinmə
Başlıqlar Yaradılması
3400
Ayırmaq
Ç&eçidlə:
Ayrılan faylların yerini göstərin.
3410
Fayllara istiqamət:
Tam istiqamətlər
İstiqamətsiz
Mütləq istiqamətlər
Nisbi istiqamətlər
3420
Yenidən yazılma:
Təsdiqli
Təsdiqsiz
Ötürmək
Birbaşa yenidən adlandırmaq
Mövcud olanları yenidən adlandırmaq
3430
Kök qovluqla bənzərliyi aradan qaldırmaq
Faylın təhlükəsizlik bərpası
3500
Faylın əvəzlənmə təsdiqi
Qovluq artıq emal olunan fayl təşkil edir.
Mövcud faylı əvəzləmək
növbəti faylla?
{0} bayt
Birbaşa yenidən adlandırmaq
3700
'{0}' faylının dəstəklənməyən sıxılma üsulu.
'{0}' məlumatlarında xəta. Fayl korlanıb.
'{0}' CRC xətası. Fayl korlanıb.
'{0}' şifrəli fayl məlumatlarında xəta. Yanlış şifrə?
'{0}' şifrəli faylı üçün CRC xətası. Yanlış şifrə?
3710
Yanlış şifrə?
3721
Dəstəklənməyən sıxılma üsulu
Dəlillərdə xəta
CRC xətası
Mövcud olmayan dəlillər
Dəlillərin gözlənilməz sonu
Bölmənin sonunda faydalı dəlillər olduğuna dəlillər var
Arxiv deyil
Başlıqlarda Xəta
Yanlış şifrə
3763
Arxivin əvvəli mövcud deyil
Təsdiqsiz arxiv əvvəli
Dəstəklənməyən xüsusiyyət
3800
Şifrə daxil etmək
&Şifrə daxil edin:
Şifrəni təkrarlayın:
&Şifrəni göstərmək
Şifrələr uyğun deyil
Şifrə üçün yalnız latın hərfləri, rəqəmlər və xüsusi rəmzlər istifadə edin (!, #, $, ...)
Şifrə şox uzundur
&Şifrə
3900
Keçdi:
Qalıb:
Cəmi:
Sürət:
Ölçü:
Sıxılma dərəcəsi:
Xəta:
Arxiv:
4000
Arxivə əlavə etmək
&Arxiv:
&Dəyişmə vəziyyəti:
Arxiv &qismi:
Sıxılma &dərəcəsi:
Sıxılma &üsulu:
&Lüğət ölçüsü:
&Söz ölçüsü:
Bölmə ölçüsü:
Axın sayı:
&Nizamlar:
&Seçimlər
SF&X arxiv yaratmaq
Yazılış üçün açıq faylları sıxmaq
Şifrələmə
Şifrələmə üsulu:
Fayl adlarını &şifrələmək
Qablaşdırma üçün yaddaş həcmi:
Çeşidləmə üçün yaddaş həcmi:
Sıxılmadan sonra faylları silmək
4040
Rəmzli keçidləri saxlamaq
Sərt keçidləri saxlamaq
Əvəzedici axınları saxlamaq
Giriş hüququnu saxlamaq
4050
Sıxılmasız
Sürətli
Cəld
Məqbul
Yüksək
Daha Yüksək (Ultra)
4060
Əlavə etmək və əvəzləmək
Yeniləmək və əlavə etmək
Yeniləmək
Eyniləşdir (Sinxron)
4070
Vərəqləmək
Bütün Fayllar
Fayl ölçüsünə görə
Aramsız
6000
Nüsxələmək
Köçürmək
Nüsxələmək:
Köçürmək:
Nüsxələlənir...
Köçürülür...
Yenidən adlandırılır...
Qovluğu göstərin.
Əməliyyat bu qovluq üçün dəstəklənmir.
Fayl və ya Qovluğun Yenidən Adlandırılması Zamanı Xəta
Faylların Nüsxələlənmə Təsdiqi
Siz həqiqətən bu faylları arxivə nüsxələmək istəyirsiz
6100
Fayl silinmə təsdiqi
Qovluq silinmə təsdiqi
Fayllar dəstəsinin silinmə təsdiqi
Siz həqiqətən "{0}" silmək istəyirsiz?
Siz həqiqətən "{0}" qovluğunu və onun bütün məzmununu silmək istəyirsiz?
Siz həqiqətən {0} hədəfi silmək istəyirsiz?
Silinir...
Fayl və ya Qovluq Silinməsi Zamanı Xəta
Quruluş uzun yollu faylların səbətə silinməsi əməliyyatını dəstəkləmir
6300
Qovluq Yaratmaq
Fayl Yaratmaq
Qovluq Adı:
Fayl Adı:
Yeni Qovluq
Yeni Fayl
Qovluq Yaradılması Zamanı Zəta
Fayl Yaradılması Zamanı Zəta
6400
Şərh
&Şərh:
Seçin
Seçimin Ləğvi
Üzlük (Maska):
6600
Xassələr
Qovluqlar Tarixçəsi
İsmarıclar
İsmarıc
7100
Kompüter
Şəbəkə
Sənədlər
Quruluş
7200
Əlavə Etmək
Ayırmaq
Sınaq
Nüsxələmək
Köçürmək
Silmək
Məlumat
7300
Fayl Bölmək
&Bölmək:
Cildlərə &bölmək, (bayt) ölçüdə:
Bölünür...
Bölünmə Təsdiqi
Siz həqiqətən faylı {0} hissəyə bölmək istəyirsiz?
Cild ölçüsü ilkin fayl ölçüsündən kiçik olmalıdır
Cildlərin ölçü təyin etmə sahəsində xəta
Təyin edilmiş cild ölçüsü: {0} bayt.\nSiz həqiqətən arxivi belə cildlərə bölmək istəyirsiniz?
7400
Faylları Birləşdir
&Birləşdirmək:
Birləşir...
Bölünmüş faylın yalnız birinci hissəsini seçmək lazımdır
Bölünmüş faylın tanınması mümkün olmadı
Bölünmüş faylın birdən çox hissəsini tapmaq mümkün olmadı
7500
Yoxlanma cəminin hesablanması...
Yoxlanma cəmi
Dəlillər üçün CRC yoxlanma cəmi:
Dəlillər və adlar üçün CRC yoxlanma cəmi:
7600
Səmərə Sinağı
Yaddaş Həcmi:
Qablaşdırma
Çeşidlənmə
Dərəcə
Ümumi Dərəcə
Cari
Nəticə
Yüklənmə
Yüklənmə Dərəcəsi
Keçid:
7700
İstinad
Əlaqələndir
Mənbə:
Məqsəd:
7710
İstinad Qismi
Sərt İstinad
Rəmzi İstinad (Fayl)
Rəmzi İstinad (Qovluq)
Bağlantı Nöqtəsi (Qovşaq)

404
thirdparty/7-Zip/Lang/ba.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; 9.20 : Haqmar : www.bashqort.com
;
;
;
;
;
;
;
;
;
;
0
7-Zip
Bashkir
Башҡортса
401
Тамам
Кире ал
&Эйе
&Юҡ
&Яп
Ярҙам
&Дауам
440
Бөтәһенә лә Э&йе
Бө&тәһенә лә Юҡ
Туҡта
Яңынан башла
&Артҡы планда
А&лғы планда
&Туҡтатып тор
Паузала
Был эште ысынлап та өҙөргә теләйһегеҙме?
500
&Файл
Һа&йлау
&Күренеш
Һ&айланмалар
&Сервис
&Белешмә
540
&Асырға
&Эсендә асырға
&Тышта асырға
Ҡа&рау
&Мөхәррирләргә
&Исемен алыштырырға
&Күбәйтергә...
Кү&серергә...
&Юйырға
Файлды &бүл...
Файлдар бер&ләштереү...
Мәғ&лүмәт
Тас&уирлама
Тикшереү һаны
Diff
Яңы папка...
Яңы &файл...
С&ығырға
600
&Бөтәһен дә һайларға
Һай&лауҙы кире алырға
Бил&дәләнгәндәрҙе кире әйләндерергә
Маска менән һайларға...
Һайлауҙы ябырға...
Төр буйынса һайларға
Төр буйынса һайлауҙы ябырға
700
&Эре тамғалар
&Бәләкәй тамғалар
&Исемлек
&Ентекле
730
Тәртип булмаһын
Барыһын да күрһәт
&2 Панель
&Ҡоралдар панеле
Төп папканы ас
Бер кимәл юғары
Папкалар тарихы...
&Яңырт
750
&Архивлау төймәләре
Стандарт төймәләр
Эре төймәләр
Төймәләр аңлатмалы
800
Ғәмәлдәге папканы һайланғандарға өҫтәргә:
Урын
900
&Көйләү...
&Етештереүсәнлекте үлсәү
960
&Эстәлек...
7-Zip &тураhында...
1003
Юл
Исем
Киңәйеүе
Папка
Күләм
Архивдағы күләме
Атрибуттар
Яһалған
Асылған
Үҙгәртелгән
Өҙөлмәгән
Аңлатма
Серләнгән
Алдағы киҫәк
Киләһе киҫәк
Һүҙлек
CRC
Төр
Анти
Ысул
Система
Файл системаһы
Ҡулланыусы
ркөм
Блок
Тасуирлама
Урын
Юл префиксы
Папкалар
Файлдар
Версия
Том
Күп томлы
Шылыу
Һылтанмалар
Блоктар
Томдар
64-bit
Big-endian
Процессор
Физик күләме
Башлыҡтар күләме
Тикшереү суммаһы
Характеристикалар
Виртуаль адрес
ID
Ҡыҫҡа исем
Яһаусы
Сектор күләме
Режим
Һылтанма
Хата
Бар күләм
Буш урын
Кластер күләме
Билдә
Урындағы Исем
Провайдер
2100
Көйләүҙәр
Тел һайлау
Тел:
Мөхәррирләүсе
&Мөхәррирләүсе:
&Diff:
2200
Система
7-Zip менән килештер:
2301
Контекст менюла 7-Zip-ты күрһәтергә
Каскадлы контекст меню
Контекст меню элементтары:
2320
<Папка>
<Архив>
Архивты асырға
Файлдар сығарыу...
Архивғ өҫтәргә...
Архивты һынарға
Бында сығарырға
{0} папкаһына сығарырға
{0} итеп архивла
Архивлап, e-mail менән ебәрергә...
{0} итеп архивларға һәм e-mail менән ебәрергә
2400
Папкалар
&Эш папкаһы
&Ваҡытлыса система папкаһы
&Ағымдағы
&Билдәләргә:
Алмаш ташығыстар өсөн генә ҡулланырға
Ваҡытлыса архивтар өсөн урын күрһәтегеҙ.
2500
Көйләүҙәр
".." элементы күренһен
Файлдарҙың ысын тамғалары күренһен
Система менюһы күренһен
Бөтә юл һайланһын
Һыҙыҡтар күренһен
Бер сиртеү менән асырға
Альтернатив һайлау ысулы
Ҙур хәтер биттәрен ҡуллан
2900
7-Zip тураhында
7-Zip ирекле таратылған программа.
3000
Буш хәтер етмәй
Хата табылманы
{0} объект һайланған
{0} папкаһын яһап булмай
Был архивды үҙгәртеү ғәмәлен үтәп булмай.
'{0}' файлын архив һымаҡ асып булмай
Шифрланған '{0}' файлын асып булманы. Хаталы пароль?
Терәкләнмәгән архив төрө
{0} файлы бар
'{0}' файлы мөхәррирләнде.\nБыл файл архивда яңыртылһынмы?
Файлды яңыртып булманы\n'{0}'
Мөхәррирләүсене асып булманы.
Файл вирусҡа оҡшаған (файл исемендә бер-бер артлы килгән күп бушлыҡтар бар).
Ғәмәлде бындай оҙон юллы папканан үтәп булмай.
Бер файлды һайлау кәрәк
Бер йәки күберәк файлды һайлау кәрәк
Бик күп элемент
3300
Сығарыу бара...
Ҡыҫыу бара...
Һынау
Асыла...
Тарау бара...
3400
Сығар
Бында &сығар:
Сығарыласаҡ файлдар өсөн урын һайлағыҙ.
3410
Юл исемдәре
&Тулы юл исемдәре
Юл исемдәре булмаһын
3420
Өҫтөнә яҙыу
&Өҫтөнә яҙыу алдынан һора
&Өҫтөнә яҙыу алдынан һорама
Булған файлдарҙы үтеп кит
Яңы исем ҡуш
Булған файлдарға яңы исем ҡуш
3500
Файл алмаштырыуҙы раҫлағыҙ
Сығарыласаҡ папкала эшкәртелгән файл бар.
Булған
файлын киләһе менән алыштырырғамы?
{0} байт
&Яңы исем ҡушылһын
3700
'{0}' файлын ҡыҫыу ысулын табып булманы.
'{0}' файлында мәғлүмәт хатаһы бар. Файл боҙоҡ.
'{0}' файлында CRC хатаһы бар. Файл боҙоҡ.
Шифрланған '{0}' файлы мәғлүмәттәрендә хата. Хаталы пароль?
Шифрланған '{0}' файлында CRC хатаһы. Хаталы пароль?
3800
Пароль керетеү
&Паролде керетегеҙ:
Па&ролде яңынан керетегеҙ:
П&ароль күренһен
Паролдәр тап килмәй
Пароль өсөн тик латин хәрефтәрен, һандарҙы һәм махсус символдарҙы (!, #, $, ...) ҡулланығыҙ
Пароль бик оҙон
Пароль
3900
Үткән ваҡыт:
Ҡалған ваҡыт:
Барыһы:
Тиҙлек:
Күләм:
Ҡыҫыу нисбәте:
Хаталар:
Архив:
4000
Архивлау
&Архив:
&Яңыртыу ысулы:
А&рхив төрө:
Ҡыҫыу &дәрәжәһе:
Ҡ&ыҫыу ысулы:
Һүҙ&лек күләме:
Һүҙ күлә&ме:
Блоктар күләме:
Ағымдар һаны:
&Параметрҙар:
&Көйләү
SFX ар&хивын яһау
Яҙыуға асыҡ файлдарҙы ҡыҫырға
Шифрлау
Шифрлау методы:
&Файл исемдәрен шифрла
Ҡыҫҡанда хәтер ҡулланыу:
Сығарғанда хәтер ҡулланыу:
4050
Ҡыҫыуһыҙ
Бик тиҙ
Тиҙ
Ғәҙәти
Максимум
Ультра
4060
Өҫтәргә һәм алмаштырырға
Яңыртырға һәм өҫтәргә
Яңыртырға
Синхронларға
4070
Ҡарау
Бар файлдар
Файл күләме буйынса
Өҙөлмәгән
6000
Копияһын ал
Күсер
Копия ҡуйыласаҡ урын:
Күсереләсәк урын:
Копияһын алыу...
Күсереү...
Яңынан исемләү бара...
Папканы күрһәтегеҙ.
Ғәмәлде үтәп булмай
Файлға йәки папкаға яңы исем биреү хатаһы
Файлдарҙы күбәйтеүҙе раҫлау
Был файлдар архивға ҡуйылһынмы?
6100
Файл юйыуҙы раҫлау
Папка юйыуҙы раҫлау
Берҙән күп файл юйыуҙы раҫлау
'{0}' юйылһынмы?
'{0}' папкаһы һәм эсендәгеләр юйылһынмы?
{0} есеме юйылһынмы?
Юйыу бара...
Файл йәки папка юйыу хатаһы
Оҙон юллы файлдарҙы кәрзингә юйыуҙы система терәкләмәй
6300
Папка яhа
Файл яhа
Папка исеме:
Файл исеме:
Яңы папка
Яңы файл
Папка яһау хатаһы
Файл яһау хатаһы
6400
Тасуирлама
&Асыҡлама:
hайла
Һайлауҙы кире ал
Маска:
6600
Үҙенсәлектәр
Папкалар тарихы
Белдереүҙәр
Белдереү
7100
Компьютер
Селтәр
Документтар
Система
7200
Өҫтәргә
Сығарырға
Һынарға
Копияһын алырға
Күсерергә
Юйырға
Мәғлүмәт
7300
Файлды бүл
&Ошо папкаға бүл:
Киҫәк/&байт итеп бүл:
Бүлеү бара...
Бүлеүҙе раҫлау
Был файлды {0} киҫәккә бүлеүҙе раҫлайһығыҙмы?
Том күләме сығанак файлдан бәләкәй булырға тейеш
Хаталы том күләме
Том күләме : {0} байт.\nФайлды бындай томдарға бүлеүҙе раҫлайһығыҙмы?
7400
Файлдарҙы берләштер
&Ошо папкала берләштер:
Берләштереү бара...
Бүленгән файлдың беренсе киҫәген генә һайлағыҙ
Бүленгән файлды танып булманы
Бүленгән файлдың берҙән күп киҫәген табып булманы
7500
Тикшереү һанын иҫәпләү бара...
Тикшереү һаны
Мәғлүмәттәр өсөн CRC тикшереү һаны:
Мәғлүмәттәр һәм исемдәр өсөн CRC тикшереү һаны:
7600
Етештереүсәнлекте тикшереү
Хәтер ҡулланыу:
Ҡыҫыу
Сығарыу
Рейтинг
Дөйөм рейтинг
Хәҙерге
Һөҙөмтә
Процессор ҡулланыу
Рейтинг / Проц. ҡулл.
Үтеүҙәр:

404
thirdparty/7-Zip/Lang/be.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; : Kirill Gulyakevitch
; 9.07 : 2011-03-15 : Drive DRKA
;
;
;
;
;
;
;
;
;
0
7-Zip
Belarusian
Беларуская
401
OK
Адмена
&Так
&Не
&Зачыніць
Дапамога
&Працягнуць
440
Так для &усіх
Не для ў&сіх
Стоп
Перазапуск
&Фонам
&На пярэдні план
&Паўза
На паўзе
Вы сапраўды жадаеце перапыніць аперацыю?
500
&Файл
&Праўка
&Выгляд
&Абранае
С&ервіс
&Даведка
540
&Адкрыць
Адкрыць &усярэдзіне
Адкрыць з&вонку
Прагляд
&Рэдагаваць
Пера&назваць
&Капіяваць у...
&Перамясціць у...
&Выдаліць
Ра&збіць файл...
А&б'яднаць файлы...
Сво&йства
Коме&нтар
Кантрольная сума
Diff
&Стварыць папку
Ств&арыць Файл
В&ыхад
600
Вылучыць у&сё
Прыбраць вылучэнне
&Звярнуць в&ыдзяленне
Вылучыць...
Прыбраць вылучэнне...
Вылучыць па тыпе
Прыбраць вылучэнне па тыпе
700
&Буйныя значкі
&Дробныя значкі
Спі&с
&Табліца
730
Без сартавання
Плоскі рэжым
&2 Панэлі
&Панэлі прылад
Адкрыць каранёвую папку
Пераход на адзін узровень уверх
Гісторыя папак...
А&бнавіць
750
Панэль кнопак архіватара
Стандартная панэль кнопак
Вялікія кнопкі
Надпісы на кнопках
800
Дадаць папку ў &абранае як
Закладка
900
Налады...
Тэставанне прадукцыйнасці
960
&Змест...
Аб &праграме...
1003
Шлях
Імя
Пашырэнне
Папка
Памер
Сціснуты
Атрыбуты
Створаны
Адчынены
Зменены
Бесперапынны
Каментар
Зашыфраваны
Пабіты Да
Пабіты Пасля
Слоўнік
CRC
Тып
Анты
Метад
Сістэма
Файлавая Сістэма
Карыстальнік
Група
Блок
Каментар
Пазіцыя
Шлях
Папак
Файлаў
Версія
Тым
Шматтомны
Зрушэнне
Спасылак
Блокаў
Тамоў
64-bit
Big-endian
Працэсар
Фізічны Памер
Памер Загалоўкаў
Кантрольная Сума
Характарыстыкі
Віртуальны Адрас
ID
Кароткае Iмя
Создатель
Памер Сектара
Рэжiм
Ссылка
Памылка
Ёмістасць
Вольна
Памер кластара
Пазнака
Лакальнае імя
Правайдэр
2100
Налады
Мова
Мова:
Рэдактар
&Рэдактар:
&Diff:
2200
Сістэма
Асацыяваць 7-Zip з файламі:
2301
Убудаваць 7-Zip у кантэкстнае меню абалонкі
Каскаднае кантэкстнае меню
Элементы кантэкстнага меню:
2320
<Папка>
<Архіў>
Адкрыць архіў
Распакаваць
Дадаць да архіва...
Тэставаць
Распакаваць тут
Распакаваць у {0}
Дадаць да {0}
Сціснуць і адправіць па email...
Сціснуць у {0} і адправіць па email
2400
Папкі
&Працоўная Папка
&Сістэмная часавая Папка
&Бягучая
&Задаць:
Выкарыстаць толькі для зменных носьбітаў
Пакажыце становішча для часавых архіваў.
2500
Налады
Паказваць элемент ".."
Паказваць рэальныя абразкі файлаў
Паказваць сістэмнае меню
Курсор на ўвесь радок
Паказваць падзельнікі
Адчыняць элемент адным клiкам
Альтэрнатыўны рэжым пазнакі
Выкарыстаць вялікія старонкі памяці
2900
Аб праграме 7-Zip
7-Zip з'яўляецца вольна распаўсюджваемай праграмай. Аднак калі вы жадаеце падтрымаць распрацоўку 7-Zip, вы можаце зарэгістраваць праграму.Праграма перакладена Drive DRKA.Мая электронная скрыня: drka2003@mail.ru.Пераклад зроблен у верасні 2007 года.
3000
Нядосыць вольнай памяці
Памылак не знойдзена
Вылучана аб'ектаў: {0}
Не атрымалася стварыць папку '{0}'
Аперацыі змены не падтрымліваюцца для гэтага архіва.
Не атрымалася адкрыць файл '{0}' як архіў
Не атрымалася адкрыць зашыфраваны архіў '{0}'. Няслушны пароль?
Непадтрымоўваны тып архіва
Файл {0} ужо існуе
Файл '{0}' быў зменены.\nВы жадаеце абнавіць яго ў архіве?
Не атрымалася абнавіць файл\n'{0}'
Не атрымалася запусціць рэдактар
Файл падобны на вірус (імя файла ўтрымоўвае доўгую паслядоўнасць прабелаў).
Аперацыя не можа быць выкананая з папкі, якая мае доўгі шлях.
Вы павінны вылучыць адзін файл
Вы павінны вылучыць адзін або некалькі файлаў
Занадта шмат элементаў
3300
Распакаванне
Кампрэсія
Тэставанне
Адкрыццё...
Сканаванне...
3400
Выняць
&Распакаваць у:
Пакажыце становішча для вымаемых файлаў.
3410
Шляхі
По&ўные шляхі
&Без шляхоў
3420
Перазапіс
&З пацверджаннем
Бы&ез пацверджанні
Прап&ускаць
Пераназваць аўтам.
Переім. аўтам. істот.
3500
Пацверджанне замены файла
Папка ўжо ўтрымоўвае апрацоўваемы файл.
Замяніць наяўны файл
наступным файлам?
{0} байтаў
Пераназваць аўтам.
3700
Непадтрымоўваны метад сціску для файла '{0}'.
Памылка ў дадзеных у '{0}'. Файл сапсаваны.
Памылка CRC у '{0}'. Файл сапсаваны.
Памылка ў дадзеных зашыфраванага файла '{0}'. Няслушны пароль?
Памылка CRC для зашыфраванага файла '{0}'. Няслушны пароль?
3800
Увод пароля
&Увядзіце пароль:
&Паўтарыце пароль:
&Паказаць пароль
Паралі не супадаюць
Для пароля выкарыстайце толькі знакі лацінскага алфавіту, лічбы і адмысловыя знакі (!, #, $, ...)
Пароль занадта доўгі
&Пароль
3900
Мінула:
Засталося:
Усяго:
Хуткасць:
Памер:
Ступень сціску:
Памылак:
Архіваў:
4000
Дадаць да архіва
&Архіў:
&Рэжым змены:
&Фармат архіва:
&Узровень сціску:
&Метад сціску:
Памер &слоўніка:
Памер з&лоўлі:
Памер блока:
Лік струменяў:
&Параметры:
&Опцыі
Стварыць SF&X-архіў
Сціскаць адчыненыя для запісу файлы
Шыфраванне
Метад шыфравання:
&Шыфраваць імёны файлаў
Аб'ём памяці для пакавання:
Аб'ём памяці для распакавання:
4050
Без сціску
Хуткасны
Хуткі
Нармалёвы
Максімальны
Ультра
4060
Дадаць і замяніць
Абнавіць і дадаць
Абнавіць
Сінхранізаваць
4070
Прагартаць
Усе файлы
Па памеры файла
Бесперапынны
6000
Капіяваць
Перамясціць
Капіяваць у:
Перамясціць у:
Капіяванне...
Перамяшчэнне...
Пераназванне...
Пакажыце папку.
Аперацыя не падтрымліваецца для гэтай папкі.
Памылка пры пераназванні файла або папкі
Пацверджанне капіявання файлаў
Вы сапраўды жадаеце скапіяваць гэтыя файлы ў архіў
6100
Пацверджанне выдалення файла
Пацверджанне выдалення папкі
Пацверджанне выдалення групы файлаў
Вы сапраўды жадаеце выдаліць "{0}"?
Вы сапраўды жадаеце выдаліць папку "{0}" і ўсё яе змесціва?
Вы сапраўды жадаеце выдаліць гэтыя аб'екты ({0} шт.)?
Выдаленне...
Памылка пры выдаленні файла або папкі
Сістэма не падтрымлівае аперацыю выдалення файлаў з доўгімі шляхамі ў кошык
6300
Стварыць папку
Стварыць файл
Імя папкі:
Імя файла:
Новая Папка
Новы файл
Памылка пры стварэнні папкі
Памылка пры стварэнні файла
6400
Каментар
&Каментар:
Вылучыць
Прыбраць вылучэнне
Маска:
6600
Уласцівасці
Гісторыя папак
Паведамленні
Паведамленне
7100
Кампутар
Сетка
Дакументы
Сістэма
7200
Дадаць
Выняць
Тэставаць
Капіяваць
Перамясціць
Выдаліць
Інфармацыя
7300
Разбіць файл
&Разбіць у:
Разбіць на &тамы памерам (у байтах):
Разбіццё...
Пацверджанне разбіцця
Вы сапраўды жадаеце разбіць файл на {0} частак?
Памер тома павінен быць менш памеру зыходнага файла
Памылка ў поле для задання памеру тамоў
Усталяваны памер тома: {0} байтаў.\nВы сапраўды жадаеце разбіць архіў на такія тамы?
7400
Аб'яднаць файлы
&Аб'яднаць у:
Аб'яднанне...
Неабходна вылучыць толькі першую частку пабітага файла
Не атрымалася распазнаць пабіты файл
Не атрымалася знайсці больш адной часткі пабітага файла
7500
Вылічэнне кантрольнай сумы...
Кантрольная сума
Кантрольная сума CRC для дадзеных:
Кантрольная сума CRC для дадзеных і імёнаў:
7600
Тэставанне прадукцыйнасці
Аб'ём памяці:
Пакаванне
Распакаванне
Рэйтынг
Агульны рэйтынг
Бягучы
Выніковы
Нагрузка
Рэйтынг / Нагр.
Праходаў:

404
thirdparty/7-Zip/Lang/bg.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; : chavv
; : icobgr
; 4.65 : Vassia Atanassova
;
;
;
;
;
;
;
;
0
7-Zip
Bulgarian
Български
401
OK
Отказ
&Да
&Не
&Затваряне
Помощ
Пр&одължаване
440
Да за &всички
Не за &всички
Стоп
От начало
&Фонов режим
&Нормален режим
&Пауза
В пауза
Наистина ли желаете да прекратите?
500
&Файл
&Редактиране
&Показване
&Любими
&Инструменти
&Помощ
540
&Отваряне
Отваряне &в
Отваряне &извън
&Показване
&Редактиране
Преи&менуване
&Копиране в...
Пре&местване в...
Из&триване
Р&азделяне на файл...
О&бединяване на файлове...
&Свойства
Ком&ентар
Изчисляване на контролна сума
Създаване на директория
Създаване на файл
Из&ход
600
&Маркиране на всички
&Размаркиране на всички
&Обръщане на избора
Маркиране...
Размаркиране...
Маркиране по тип
Размаркиране по тип
700
&Големи икони
&Малки икони
&Списък
&Детайли
730
Несортиран
Плосък изглед
&2 панела
&Ленти с инструменти
Отваряне на главната директория
Едно ниво нагоре
История на директориите...
&Опресняване
750
Лента на архива
Стандартна лента
Големи бутони
Показване на текст под бутоните
800
&Добавяне на директорията като любима:
Отметка
900
&Настройки...
&Статистика
960
&Съдържание...
&За 7-zip...
1003
Път
Име
Разширение
Директория
Размер
Компресиран размер
Атрибути
Създаден
Отварян
Изменен
Солиден
Коментар
Зашифрован
Разделен до
Разделен след
Речник
CRC
Тип
Анти
Метод
Операционна система
Файлова система
Потребител
Група
Блок
Коментар
Позиция
Префикс на пътя
Директории
Файлове
Версия
Том
Multivolume
Offset
Links
Blocks
Томове
64-битов
Big-endian
CPU
Физически размер
Размер на заглавната част
Контролна сума
Характеристики
Виртуален адрес
Грешка
Пълен размер
Свободно пространство
Размер на клъстер
Етикет
Локално име
Доставчик
2100
Настройки
Език
Език:
Редактор
&Редактор:
2200
Система
Асоцииране на 7-Zip с:
2301
Интегриране на 7-Zip в контекстното меню на шела
Каскадно контекстно меню
Елементи на контекстното меню:
2320
<Директория>
<Архив>
Отваряне на архив
Разархивиране на файловете...
Добавяне към архив...
Проверка на архива
Разархивиране тук
Разархивиране в {0}
Добавяне в {0}
Архивиране и изпращане...
Архивиране в {0} и изпращане
2400
Директории
&Работна директория
&Системната TEMP директория
&Текущата
&Друга:
Използване само за преносими носители
Указване на място за временните архиви.
2500
Настройки
Показване на обекта ".."
Показване на истинските икони на файловете
Показване на системното меню
&Избор на цял ред
Показване на помощни &линии
&Алтернативен режим на избор
Използване на &големи страници от паметта
2900
Информация
7-Zip се разпространява като свободен софтуер. Все пак, можете да подпомогнете разработката на 7-zip, като се регистрирате.
3000
Системата не може да задели необходимото количество памет.
Няма грешки в архива
{0} обект(и) избрани
Не може да бъде създадена директория '{0}'
Този архив не поддържа операции за изменение.
Файлът '{0}' не може да се отвори като архив
Криптираният архив '{0}' не може да се отвори. Грешка в паролата?
Архив от тип, който не се поддържа
Файлът {0} вече съществува
Файлът '{0}' е бил променен.\nИскате ли да обновите копието му в архива?
Не може да бъде обновен файл \n'{0}'
Не може да бъде стартиран редактора.
Файлът прилича на вирус (името му съдържа дълги поредици интервали).
Операцията не може да бъде извикана от директория с толкова дълъг път.
Трябва да се избере един файл
Трябва да се изберат един или повече файлове
Твърде много обекти
3300
Разархивиране
Компресия
Проверка
Отваряне...
Претърсване...
3400
Разархивиране
&Разархивиране в:
Избор на място за разархивираните файлове.
3410
Режим за пътищата
Пълни пътища
Без пътища
3420
Режим за презаписване
Потвърждение преди презаписване
Презаписване без потвърждение
Пропускане на съществуващите файлове
Автоматично преименуване
Автоматично преименуване на съществуващите файлове
3500
Подтвърдете замяната на файла
Директорията вече съдържа файл с такова име.
Желаете ли да замените съществуващия файл
с този файл?
{0} байта
&Автоматично преименуване
3700
Неподдържан метод за компресия във файл '{0}'.
Грешка в данните в '{0}'. Файлът е повреден.
Проверката на цикличния остатък даде грешка в '{0}'. Файлът е повреден.
Грешка в данните в криптирания файл '{0}'. Грешка в паролата?
Проверката на цикличния остатък даде грешка в криптирания файл '{0}'. Грешка в паролата?
3800
Въведете парола
Въведете парола:
Въведете повторно парола:
&Показване на паролата
Двете пароли не съвпадат
За паролата си използвайте само латински букви, цифри и специални символи (!, #, $, ...)
Паролата е твърде дълга
&Парола
3900
Изминало време:
Оставащо време:
Размер:
Скорост:
Обработени:
Коефициент на компресия:
Грешки:
Архиви:
4000
Добавяне към архив
&Архив:
Режим за изменение:
Формат на архива:
&Ниво на компресия:
Метод за компресия:
Размер на &речника:
Размер на &думата:
Размер на непрекъснат блок:
Брой процесорни нишки:
&Параметри:
&Опции
Самора&зархивиращ се архив
Компресирани споделени файлове
Криптиране
Метод за криптиране:
Криптиране на файловите &имена
Използвана памет за архивиране:
Използвана памет за разархивиране:
4050
Без компресия
Най-бърза
Бърза
Нормална
Максимална
Ултра
4060
Добавяне и замяна на файлове
Обновяване и добавяне на файлове
Опресняване на съществуващите файлове
Синхронизиране на файловете
4070
Разглеждане
Всички файлове
Non-solid
Непрекъсната (solid) компресия
6000
Копиране
Преместване
Копиране в:
Преместване в:
Копиране...
Местене...
Преименуване...
Избор на целева директория.
Операцията не се поддържа за тази директория.
Грешка при преименуването на файл или директория
Потвърждение за копирането на файл
Сигурни ли сте, че искате да копирате файлове към архива?
6100
Потвърждение за изтриването на файл
Потвърждение за изтриването на директория
Потвърждение за изтриването на множество файлове
Сигурни ли сте, че искате да изтриете '{0}'?
Сигурни ли сте, че искате да изтриете диркеторията '{0}' с цялото й съдържание?
Сигурни ли сте, че искате да изтриете тези {0} обекта?
Изтриване...
Грешка при изтриване на файл или директория
Системата не може да изтрие файл с толкова дълъг път
6300
Създаване на директория
Създаване на файл
Име на директория:
Име на файл:
Нова директория
Нов файл
Грешка при създаване на директория
Грешка при създаване на файл
6400
Коментар
&Коментар:
Маркиране
Размаркиране
Маска:
6600
Свойства
История на директориите
Диагностични съобщения
Съобщение
7100
Компютър
Мрежа
Документи
Система
7200
Добавяне
Извличане
Тестване
Копиране
Преместване
Изтриване
Информация
7300
Разделяне на файл
&Разделяне на:
Разделяне на &томове, байтове:
Разделяне...
Потвърждение на разделянето
Сигурни ли сте, че искате да разделите файла на {0} тома?
Размерът на том трябва да бъде по-малък от размера на оригиналния файл
Невалиден размер на том
Указан размер на том: {0} байта.\nСигурни ли сте, че искате да разделите архива на томове с такъв размер?
7400
Обединяване на файлове
&Обединяване в:
Обединяване...
Избиране само на първата част от разделения файл
Файлът не се разпознава като част от разделен оригинален файл
Не се открива повече от една част от разделения файл
7500
Изчисляване на контролната сума...
Информация за контролната сума
CRC контролна сума за данни:
CRC контролна сума за данни и имена:
7600
Статистика
Използвана памет:
Архивиране
Разархивиране
Оценка
Обща оценка
Текущо
Резултат
Успешно преминали:

404
thirdparty/7-Zip/Lang/bn.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; 4.46 : Team Oruddho (Fahad Mohammad Shaon, Mahmud Hassan) : http://www.oruddho.com
;
;
;
;
;
;
;
;
;
;
0
7-Zip
Bangla
বাংলা
401
ঠিক আছে
বাতিল
&হ্যাঁ
&না
&বন্ধ করা
সাহায্য
&চালিয়ে যাওয়া
440
&সবগুলোর জন্য হ্যাঁ
স&বগুলোর জন্য না
বন্ধ
আবার শুরু
&পটভূমি
& সামনে
&বিরতি
বিরতিতে অবস্থানরত
আপনি বাতিল করতে ইচ্ছুক?
500
&ফাইল
&পরিবর্তন
প্রদর্শন&
&প্রিয়
&দরকারি
&সহায়তা
540
&উন্মুক্ত করা
7-zip-এ উন্মুক্ত করা
বাহিরে উন্মুক্ত করা
&প্রদর্শন
&পরিবর্তন
নাম পরিবর্তন
&অনুলিপি হবে...
প্রতিস্থাপন হবে...
&মুছে ফেলা
&ফাইল খন্ডায়ন...
ফাইল সংযোজন...
বৈশিষ্টাবলি
মন্তব্য
Checksum গননা করা
ফোল্ডার সৃষ্টি
ফাইল সৃষ্টি
বাহির
600
সব নির্বাচন
নির্বাচন রদ করা
উল্টো নির্বাচন
নির্বাচন...
নির্বাচন রদ করা...
ধরণ অনুযায়ী নির্বাচন
ধরণ অনুযায়ী নির্বাচন রদ করা
700
বৃহৎ প্রতিক
ছোট্ট প্রতিক
&তালিকা
&বিবরণ
730
অসজ্জিত
সমতল সজ্জা
&ব্যবস্থাপক দ্বিখন্ডন
&দরকারিখুটি
মূল ফোল্ডার উন্মুক্ত করা
এক পর্যায় উপরে ...
ফোল্ডারের অতীত বিবরণ...
&সতেজতা
750
সংকোচোন ব্যবস্থাপক খুটি
সাধারণ খুটি
বৃহৎ বোতাম
বোতামের শিরোনাম প্রদর্শন
800
&প্রিয় ফোল্ডার হিসাবে সংযোজন ...
পছন্দের তালিকা
900
&পছন্দগুলো...
&বেঞ্চমার্ক
960
&সাহায্য...
&7-Zip সর্ম্পকে...
1003
অবস্থান
নাম
পরিচয়
ফোল্ডার
আকার
সংকুচিত আকার
বৈশিষ্ট
সৃষ্টি হয়েছে
ব্যবহার হয়েছে
পরিবর্ধন হয়েছে
দৃঢ়
Commented
আটকানো
খন্ডনের পূর্বে
খন্ডনের পরে
অভিধান
CRC
ধরন
বিরোধী
পদ্ধতি
চলতি অপারেটিং সিস্টেম
ফাইল ব্যবস্থা
ব্যবহারকারী
দল
বাধা
মন্তব্য
অবস্থান
পথের বিশেষায়ণ (Path Prefix)
ত্রুটি
সম্পূর্ণ আকার
অবশিষ্ট জায়গা
ক্লাস্টারের আকার
শিরোনাম
স্থানীয় নাম
বিতরণকারী
2100
পছন্দগুলো
ভাষা
ভাষা:
সম্পাদক
বর্তমান সম্পাদক :
2200
বর্তমান অবস্থা
7-Zip-এর সাথে সম্পর্কিত :
2301
সাহায্যকারী তালিকায় 7-Zip সংযোজন
সাহায্যকারী তালিকায় একের ভিতর সব গুটিয়ে ফেলা
সাহায্যকারী তালিকার বিষয়সমূহ:
2320
<ফোল্ডার>
<সংকুচিত ফাইল>
সংকুচিত ফাইল চালু করা
ফাইল সম্প্রসারণ...
সংকুচিত ফাইলে সংযোজন...
সংকুচিত ফাইল নিরীক্ষণ
এখানেই সম্প্রসারণ
সম্প্রসারণ করা হবে {0}
সযোজন করা হবে {0}
সংকোচন এবং ই-মেইল...
সংকোচন - {0} এবং ই-মেইল
2400
ফোল্ডার
&কার্যরত ফোল্ডার
&অস্থায়ী ফোল্ডার
&প্রচলিত
&নির্দিষ্ট:
অস্থায়ী অংশের জন্য ব্যবহার করা
অস্থায়ী ফোল্ডার নির্বাচন করুন।
2500
পছন্দগুলো
".." ফাইল প্রদর্শন
ফাইলের আসল প্রতিক দেখানো
কম্পিউটার চালকের তালিকা দেখানো
পূর্ণ পর্যায় প্রদর্শন
ছকের লাইন প্রদর্শন
পরিপূরক নিবাচনের পদ্ধতি
বেশি স্মৃতির ব্যবহার
2900
7-Zip সম্পর্কে
7-Zip একটি মুক্ত প্রোগ্রাম কিন্তু এটি 7-Zip এর কতৃপক্ষের কাচে নিবন্ধনের মাধ্যমে আপনি উন্নত সেবা পেতে পারেন
3000
কোন ত্রুটি নেই
{0} ফাইল(সমূহ) নির্বাচিত
'{0}' ফোল্ডার সৃষ্টি করা সম্ভব হচ্ছেনা
এই সংকোচনের ক্ষেত্রে এই সেবা প্রদান করা সম্ভব হচ্ছে না।
'{0}' -কে সংকুচিত ফাইল হিসেবে চালু করা সম্ভব হচ্ছেনা
'{0}' বদ্ধ সংকুচিত ফাইল চালু করা সম্ভব হচ্ছেনা. ভুল পাসওয়ার্ড?
ফাইলটি '{0}' পরিমার্জিত.\nআপনি সংকুচিত ফাইলটি ও পরিমার্জন করতে চান?
পরিমার্জন করা সম্ভব হয়নি\n'{0}'
সম্পাদক চালু করা সম্ভব নয়
অনেক বেশী ফাইল
3300
সম্প্রসারণ করা হচ্ছে
সংকোচায়ন প্রক্রিয়াধীন
নিরক্ষণ করছে ...
উন্মুক্ত করা হচ্ছে...
তথ্য সংগ্রহ চলছে... (Scanning...)
3400
সম্প্রসারণ
&সম্প্রসারণ করা হবে:
ফাইল সম্প্রসারনের ঠিকানা
3410
ঠিকানা নির্বাচন পদ্ধতি
পূর্ণ ঠিকানাসমূহ
ঠিকানাবিহীন
3420
প্রতিস্থাপন পদ্ধতি
প্রতিস্থাপনের পূর্বাভাস
আভাসবিহীন প্রতিস্থাপন
একই পরিচয় প্রাপ্ত ফাইল এড়িয়ে চলা
স্বয়ংক্রিয় পুঃনামকরণ
একই পরিচয় প্রাপ্ত ফাইলের নাম পরিবর্ত্ন
3500
ফাইল প্রতিস্থাপন নিশ্চিত করণ
নির্ধারিত ফোল্ডারে ফাইলটি আগেথেকেই আছে
আপনিকি বর্তমান ফাইলটি প্রতিস্থাপন করতে চান?
এইটির সাথে?
{0} bytesবাইট
স্বয়ংক্রিয় পুঃনামকরণ
3700
অসমর্থিত সংকোচন পদ্ধতি -'{0}'.
'{0}' ফাইলে ত্রুটিপূর্ণ তথ্য. ফাইলটি খন্ডিত
'{0}' ফাইলে CRC ব্যর্থ. ফাইলটি খন্ডিত
'{0}' বদ্ধ ফাইলে তথ্যে ত্রুটি. ভুল পাসওয়ার্ড?
'{0}' বদ্ধ ফাইলে CRC ব্যর্থ. ভুল পাসওয়ার্ড?
3800
পাসওয়ার্ডটি প্রবেশ করুনঃ
পাসওয়ার্ডটি প্রবেশ করুনঃ
আবার পাসওয়ার্ড প্রবেশ করুনঃ
&পাসওয়ার্ড প্রদর্শন
পাসওয়ার্ড দুটি একই নয়
শুধু ইংলিশ বর্ণ, সংখ্যা এবং বিশেষ বর্ণ (!, #, $, ...) পাসওয়ার্ড হিসেবে ব্যবহার করুন
পাসওয়ার্ডটি খুব বেশী বড় হয়েছে
পাসওর্য়াড
3900
অতিবাহিত সময়ঃ
সময় বাকি আছেঃ
আকার:
গতি:
বিফলতা :
4000
সংকোচনে সংযোজন
&সংকোচন
&পরিমার্জন পদ্ধতি:
সংকোচনের & পরিচয়:
সংকোচনের &পর্যায়:
সংকোচন &পদ্ধতি:
&Dictionary size:
&Word size:
Solid block size:
CPU-এর thread-এর সংখ্যা:
&Parameters:
পছন্দনীয়
স্বয়ংক্রিয় সংকোচন প্রোগ্রাম তৈরি
বিনিময়যোগ্য ফাইল সংকোচন
বদ্ধ করা
বদ্ধ করার পদ্ধতি:
ফাইলের নাম &আটকে ফেলা
সংকোচনের জন্য স্মৃতির ব্যবহার:
সম্প্রসারনের জন্য স্মৃতির ব্যবহার:
4050
অতি সংকোচায়ন
অতি দ্রুত
দ্রুত
সাধারন
সর্ব্বোচ্চ
পলকের গতি
4060
সংকোচন ও ফাইল প্রতিস্থাপন
পরিমার্জন ও ফাইল প্রতিস্থাপন
উল্লেখিত ফাইলে সতেজতা প্রদান
ফাইল সাজিয়ে রাখা
4070
বিচরণ
সকল ফাইল
Non-solid
Solid
6000
অনুলিপি গ্রহন
অনুলিপি গ্রহন এবং মুছে ফেলা
অনুলিপি করা হবে:
প্রতিস্থাপিত হবে:
অনুলিপি করা হচ্ছে...
প্রতিস্থাপিত হচ্ছে...
নাম পরিবর্তন...
গন্তব্য ফোল্ডার নির্বাচন.
কার্যটি সম্ভব নয়
ফাইল বা ফোল্ডারের নাম পরিবর্তনে সম্ভব নয়
ফাইল অনুলিপি নিশ্চিতকরণ
আপনি কি ফাইলগুলোকে সংকুচিত ফাইলে অনুলিপি গ্রহণ করতে চান।
6100
ফাইলটি মুছে ফেলতে কি আপনি নিশ্চিত
ফোল্ডারটি মুছে ফেলতে কি আপনি নিশ্চিত
ফাইলটি মুছে ফেলতে কি আপনি নিশ্চিত
মুছে ফেলতে আপনি কি নিশ্চিত - '{0}'?
'{0}' ফোল্ডার এবং এর সব ফাইল আপনি কি মুছে ফেলতে নিশ্চিত?
নির্বাচিত {0} টি ফাইল আপনি কি মুছে ফেলতে নিশ্চিত?
মুছে ফেলা হচ্ছে...
ফাইল বা ফোল্ডার মুছে ফেলাতে সমস্যা হচ্ছে
6300
ফোল্ডার সৃষ্টি
ফাইল সৃষ্টি
ফোল্ডারের নাম:
ফাইল নাম:
নতুন ফোল্ডার
নতুন ধারক
ফোল্ডার সৃষ্টিতে সমস্যা
ফাইল সৃষ্টিতে সমস্যা
6400
মন্তব্য
&মন্তব্য:
নির্বাচন
নির্বাচন রদ করা
আড়াল করা:
6600
ফোল্ডারের অতিত বিবরন
সমস্যা নিরাময় আভাস
আভাস
7100
কম্পিউটার
আন্তঃ সম্পর্ক
কম্পিউটার চালক
7200
সংজোযন
সম্প্রসারন
নিরীক্ষণ
অনুলিপি গ্রহন
প্রতিস্থাপন
মুছে ফেলা
তথ্য
7300
ফাইল খন্ডায়ন
&ফাইল খন্ডায়িত হবে:
volumes(খন্ডে), bytes(বাইটস)-এ খন্ডায়নঃ
ফাইল খন্ডায়ন চলছে...
ফাইল খন্ডায়ন নিশ্চিতকরণ
আপনি কি সংকুচিত ফাইলটিকে {0} খন্ডে খন্ডায়ন করতে চান?
খন্ডের আকার অবশ্যই মূল ফাইলের চেয়ে ছোট হতে হবে
খন্ডের আকারে ভুল
উল্লেক্ষিত খন্ডের আকার : {0} bytes.\nআপনি কি সংকোচিত ফাইলটিকে এ ভাবেই খন্ডে খন্ডায়ন করতে চান?
7400
ফাইল একীভূতি করণ
&একীভূতি করা হবে:
একীভূতি চলছে...
শুধু প্রথম ফাইলটি নির্বাচন করুন
7500
Checksum গননা চলছে...
Checksum তথ্য
তথ্যের জন্য CRC checksum:
তথ্য এবং নামের জন্য CRC checksum:
7600
বেঞ্চমার্ক
ব্যবহৃত স্মৃতি :
সংকোচায়ন ...
সম্প্রসারণ ...
রেটিং
মোট রেটিং
চলতি
ফলাফল
CPU ব্যবহার করছে
Rating / ব্যবহার করছে
সফলতা :

404
thirdparty/7-Zip/Lang/br.txt vendored Normal file
View File

@ -0,0 +1,404 @@
;!@Lang2@!UTF-8!
; 3.12 : KAD-Korvigelloù An Drouizig (drouizig.org).
;
;
;
;
;
;
;
;
;
;
0
7-Zip
Breton
Brezhoneg
401
Mat eo
Nullañ
&Ya
&Ket
&Serriñ
Skoazell
&Kenderc'hel
440
Ya be&pred
Ket &bepred
Paouez
Adloc'hañ
&Drekleur
&Rakleur
&Ehan
Ehanet
Ha fellout a ra deoc'h nullañ ?
500
&Restr
&Aozañ
&Gwelout
Di&baboù
&Ostilhoù
&Skoazell
540
&Digeriñ
Digeriñ a-zia&barzh
Digeriñ a-zia&vaez
&Gwelout
&Aozañ
Adenv&el
&Kopiañ diwar...
&Dilec'hiañ diwar...
D&ilemel
&Troc'hañ restr...
&Kendeuziñ restroù...
P&erzhioù
Evezhia&denn
Sevel un teul
Sevel ur restr
&Kuitaat
600
Diuz pep &tra
Diziuz pe tra
Lakaat an &diuzad war an tu gin
Diuz...
Diziuz...
Diuz diouzh ar rizh
Diziuz diouzh ar rizh
700
Arlunioù &bras
Arlunioù &bihan
&Roll
&Munudoù
730
Dirummet
&2 brenestr
&Barrennoù ostilhoù
Digeriñ an teul gwrizienn
Teul kerent
Roll istor an teul...
Fresk&aat
750
Barrenn ziell
Barrenn skouerek
Meudellioù bras
Diskouez an destenn
800
&Ouzhpennañ ar c'havlec'h d'ar sinedoù
Sined
900
&Dibaboù...
&Amprouiñ
960
&Roll ar pennadoù...
A-&zivout 7-Zip...
1003
Treug
Anv
Astenn
Teul
Ment
Gwasket
Doareennoù
Savet d'ar
Stoket d'ar
Kemmet d'ar
Solut
Evezhiadenn
Ennodet
Rannañ a-raok
Rannañ war-lerc'h
Geriadur
CRC
Rizh
Enep
Hentenn
OS ostiz
Reizhiad restroù
Implijour
Strollad
Bloc'h
Evezhiadenn
Lec'hiadur
Fazi
Ment en holl
Egor vak
Ment ar c'hleusteurioù
Skritellig
Anv lec'hel
Pourchaser
2100
Dibaboù
Yezh
Yezh :
Embanner
&Embanner :
2200
Reizhiad
Kenstagañ 7-Zip ouzh :
2301
Lakaat 7-Zip el lañser kemperzhel
Lañser kemperzhel a-steud
Elfennoù al lañser kemperzhel :
2320
<Teul>
<Diell>
Digeriñ
Eztennañ ar restroù...
Ouzhpennañ d'an diell...
Gwiriañ an diell
Eztennañ amañ
Eztennañ diwar {0}
Ouzhpennañ da {0}
Gwaskañ ha kas dre postel...
Gwaskañ diwar {0} ha kas dre postel.
2400
Teulioù
Teulioù &labour
Teul dibadelus ar &reizhiad
Teul &red
Teul &spisaet :
Implijout nemet evit ar mediaoù dilec'hus
Spisait un teul evit lakaat ar restroù diell dibadelus.
2500
Perzhioù
Diskouez an elfenn ".."
Diskouez arlunioù gwirion ar restroù
Diskouez al lañser reizhiad
&Diuz ar bannoù a-bezh
Diskouez al &linennoù kael
2900
Keloù
Digoust eo ar meziant 7-Zip. Mar plij deoc'h 7-zip ha mar fell deoc'h skoazellañ ar raktres-mañ e c'hellit donezoniñ argant da 7-Zip.
3000
N'eus fazi ebet
{0} elfenn ziuzet
N'haller ket sevel ar restr '{0}'
N'haller ket ober gant an oberiadennoù nevesaat evti an diell-mañ.
Kemmet ez eo bet ar restr '{0}'.\nHa fellout a ra deoc'h he nevesaat en diell ?
N'haller ket nevesaat\n'{0}'
N'haller ket loc'hañ an embanner.
Re a elfennoù
3300
Eztennañ
O waskañ
Gwiriañ
O tigeriñ...
3400
Eztennañ
E&ztennañ diwar :
Dibabit un teul evit eztennañ an restroù.
3410
Treugoù
Treugoù klok
Treug ebet
3420
Mod erlec'hiañ
Goulenn a-raok erlec'hiañ
Erlec'hiañ hep goulenn
Lakaat ar restroù a zo anezho a-gostez
Adenvel ent-emgefre ar restroù a zo anezho
3500
Kadarnaat a-raok erlec'hiañ ur restr
Emañ dija ur restr gant ar memes anv en teul bukenn.
Ha fellout a ra deoc'h lakaat e-lec'h
ar restr da heul ?
{0} eizhtet
Adenvel ent-&emgefre
3700
Hentenn waskañ direizh evit '{0}'.
Stlenn faziet e-barzh '{0}'. Gwastet eo ar restr.
Fazi ar reoliñ CRC evit '{0}'. Gwastet eo ar restr.
3800
Roit ar ger-tremen
Roit ar ger-tremen :
&Diskouez ar ger-tremen
Ger-tremen
3900
Amzer dremenet :
Amzer o chom :
Ment :
Tizh :
Fazioù :
4000
Ouzhpennañ d'an diell
&Diell :
&Mod nevesaat :
&Mentrezh an diell :
L&ive gwaskañ :
Rizh &gwaskañ:
&Ment ar geriadur :
Me&nt ar gerioù :
&Perzhioù:
&Dibaboù
Sevel un diell SF&X
Ennodiñ an &anvioù restroù
Memor evit ar waskerezh :
Memor evit an diwaskerezh :
4050
Gwaskañ ebet
Primañ
Prim
Reizh
Uhelañ
Gour
4060
Ouzhpennañ hag erlec'hiañ ar restroù
Nevesaat hag ouzhpennañ ar restroù
Freskaat ar restroù a zo anezho
Goubredañ ar restroù
4070
Furchal
An holl restroù
6000
Kopiañ
Dilec'hiañ
Kopiañ e-barzh :
Dilec'hiañ diwar :
O kopiañ...
O tilec'hiañ...
Oc'h adenvel...
N'haller ket ober an oberiadenn-mañ.
Fazi oc'h adenvel ar restr pe an teul
6100
Kadarnañ a-raok dilemel ar restr
Kadarnañ a-raok dilemel an teul
Kadarnañ a-raok dilemel an holl restroù
Ha fellout a ra deoc'h dilemel '{0}' ?
Ha fellout a ra deoc'h dilemel an teul '{0}' ha pep tra a zo e-barzh ?
Ha fellout a ra deoc'h dilemel ar {0} elfenn-mañ ?
O tilemel...
Fazo o tilemel ar restr pe an teul
6300
Sevel un teul
Sevel ur restr
Anv an teul :
Anv restr :
Teul nevez
Restr nevez
Fazi o sevel an teul
Fazi o sevel ar restr
6400
Evezhiadenn
&Evezhiadenn :
Diuz
Diziuz
Kuzh :
6600
Roll istor an teulioù
Kemennoù yalc'h
Kemenn
7100
Urzhiataer
Rouedad
Reizhiad
7200
Ouzhpennañ
Eztennañ
Amprouiñ
Kopiañ
Dilec'hiañ
Dilemel
Keloù
7300
Troc'hañ restr
&Troc'hañ da :
Troc'hañ e &levrennoù, eizhtetoù :
O troc'hañ...
7400
Kendeuziñ restroù
&Kendeuziñ da :
O kendeuziñ...
7500
7600
Amprouiñ
Implij ar vemor :
Gwaskerezh
Diwaskerezh
Feur
Feur en holl
Red
Da heul
Tremenioù :

495
thirdparty/7-Zip/Lang/ca.txt vendored Normal file
View File

@ -0,0 +1,495 @@
;!@Lang2@!UTF-8!
; 9.07 : Josep Casals, Marc Folch
; 17.01 : Benet «BennyBeat» R. i Camps
;
;
;
;
;
;
;
;
;
0
7-Zip
Catalan
Català
401
D'acord
Cancel·la
&Sí
&No
Tan&ca
Ajuda
&Continua
440
Sí a &tot
No a t&ot
Atura
Re&inicia
Rere&fons
Prim&er pla
&Pausa
Pausat
Segur que voleu cancel·lar?
500
&Fitxer
&Edita
&Visualitza
&Preferits
E&ines
Aj&uda
540
&Obre
Obre d&ins
Obre &fora
&Visualitza
&Edita
Reanom&ena
&Copia a...
&Mou a...
&Suprimeix
&Divideix el fitxer...
Com&bina el fitxer...
P&ropietats
Come&ntari
Calcula la suma de verificació
Compara
Crea una carpeta
Crea un fitxer
S&urt
Enlla&ç
Flux &alternatiu
600
Seleccion&a-ho tot
No seleccionis res
&Inverteix la selecció
Selecciona...
Desselecciona...
Selecciona per tipus
Desselecciona per tipus
700
Icones g&rans
Icones petites
&Llista
&Detalls
730
No ordenat
Vista plana
&2 Panells
&Barres d'eines
Obre la carpeta arrel
Carpeta pare
Historial de carpetes...
&Actualitza
Actualitza automàticament
750
Barra d'eines afegeix/extreu
Barra d'eines estàndard
Botons grans
Mostra botons amb text
800
&Afegeix la carpeta als Preferits com
Personal
900
Opcions...
&Test de referència
960
&Contingut...
Quant al 7-Zip...
1003
Camí
Nom
Tipus de fitxer
Carpeta
Mida
Mida comprimit
Atributs
Creat
Darrer accés
Darrera modificació
Compacte
Comentari
Xifrat
Expandit abans
Expandit després
Diccionari
CRC
Tipus
Anti
Mètode
Sistema d'origen
Sistema de fitxers
Usuari
Grup
Bloc
Comentari
Posició
Prefix del camí
Carpetes
Fitxers
Versió
Volum
Volum múltiple
Desplaçament
Enllaços
Blocs
Volums
64-bits
Big-endian
CPU
Mida física
Mida de la capçalera
Suma de verificació
Característiques
Adreça virtual
ID
Nom curt
Aplicació creadora
Mida del sector
Mode
Enllaç simbòlic
Error
Mida total
Espai lliure
Mida per sector
Etiqueta
Nom local
Proveïdor
Seguretat NT
Flux alternatiu
Aux
Suprimit
És un directori
Tipus d'error
Errors
Errors
Advertències
Advertència
Flux
Flux alternatiu
Mida del flux alternatiu
Mida virtual
Mida desempaquetat
Mida física total
Índex del volum
Subtipus
Descripció
Codi de pàgina
Mida de cua
Mida del text incrustat
Enllaç
Enllaç físic
iNode
Només lectura
2100
Opcions
Llengua
Llengua:
Editor
&Editor:
&Compara:
2200
Sistema
Associa el 7-Zip amb:
Tots els usuaris
2301
Integra el 7-Zip al menú contextual del Windows
Menú contextual en cascada
Objectes del menú contextual:
Icones al menú contextual
2320
<Carpeta>
<fitxer>
Obre
Extreu fitxers...
Afegeix a l'arxiu comprimit...
Comprova l'arxiu comprimit
Extreu en aquesta carpeta
Extreu a {0}
Afegeix a {0}
Comprimeix i envia per correu electrònic...
Comprimeix a {0} i envia per correu electrònic
2400
Carpetes
Carpeta de &treball
Carpeta temporal del &sistema
Carpeta a&ctual
E&specifica una carpeta:
Utilitza únicament per a mitjans extraïbles
Especifica una carpeta pels fitxers temporals.
2500
Selecció
Mostra l'element «..»
Mostra les icones reals dels fitxers
Mostra el menú de sistema
&Selecció de columna completa
Mostra les línies de &graella
Obre amb un sol clic els elements
Mode de selecció &alternatiu
Utilitza pàgines de memòria &grans
2900
Quant al 7-Zip
El 7-Zip és programari lliure.\n Traducció realitzada per: Softcatalà\n https://www.softcatala.org
3000
El sistema no pot assignar la quantitat de memòria requerida
Cap error
{0} objecte(s) seleccionat(s)
No es pot crear la carpeta «{0}»
Aquest tipus de fitxer no permet actualització.
No es pot obrir el fitxer «{0}» com a arxiu
No es pot obrir el fitxer xifrat «{0}». Contrasenya errònia?
Tipus d'arxiu no admès
El fitxer {0} ja existeix
S'ha modificat el fitxer «{0}».\nVoleu actualitzar-lo a l'arxiu?
No es pot actualitzar el fitxer\n«{0}»
No es pot executar l'editor.
El fitxer sembla un virus (el nom del fitxer conté espais molt llargs al nom).
L'operació no es pot iniciar des d'una carpeta amb una ruta llarga.
Seleccioneu un fitxer
Seleccionar un o més fitxers
Massa objectes
No es pot obrir el fitxer {0} com a arxiu
S'ha obert el fitxer com l'arxiu {0}
L'arxiu està obert amb compensació
3300
Extraient
Comprimint
Provant
S'està obrint...
S'està analitzant...
Suprimint
3320
Afegint
Actualitzant
Analitzant
Replicant
Reempaquetant
Ometent
Suprimint
Creant la capçalera
3400
Extreu
E&xtreu a:
Seleccioneu una destinació on extreure els fitxers.
3410
Mode d'adreça
Adreça completa
Sense adreça
Adreça absoluta
Adreça relativa
3420
Sobreescriu:
Amb confirmació
Sense confirmació
Omet els fitxers ja existents
Reanomena automàticament
Auto-reanomena fitxers existents
3430
Suprimeix la duplicació de la carpeta arrel
Restaura el fitxer de seguretat
3500
Confirmeu substitució de fitxers
Ja existeix un fitxer amb el mateix nom a la carpeta de destinació.
Voleu substituir el fitxer existent
per aquest altre?
{0} bytes
Reanomena a&utomàticament
3700
Mètode de compressió no vàlid per a «{0}».
Error de dades en «{0}». El fitxer és corrupte.
Ha fallat el CRC en «{0}». El fitxer és corrupte.
Error de dades al fitxer xifrat «{0}». Contrasenya errònia?
Ha fallat el CRC al fitxer xifrat «{0}». Contrasenya errònia?
3710
Contrasenya errònia?
3721
Mètode de compressió no compatible
Error de dades
Ha fallat el CRC
Dades no disponibles
Final de dades inesperat
Hi ha algunes dades després del final de les dades de la càrrega útil
No és cap arxiu
Error de capçalera
Contrasenya no vàlida
3763
Inici d'arxiu no disponible
Inici d'arxiu no confirmat
Característica no suportada
3800
Introduïu la contrasenya
Introduïu la contrasenya:
Torneu a introduir la contrasenya:
Mo&stra la contrasenya
Les contrasenyes no coincideixen
A la contrasenya utilitzeu només lletres (sense accents), números i caràcters especials (!, #, $...)
La contrasenya és massa llarga
Contrasenya
3900
Temps transcorregut:
Temps restant:
Mida:
Taxa:
Processat:
Ràtio de compressió:
Errors:
Arxius:
4000
Afegeix a l'arxiu comprimit
&Arxiu:
Mode d'act&ualització:
&Format de l'arxiu:
Nivell de &compressió:
&Tipus de compressió:
Mida del &diccionari:
Mida de la paraula:
Mida del bloc sòlid:
Nombre de fils de la CPU:
&Paràmetres:
Opcions
Crea un fitxer sòlid (SF&X)
Comprimeix els fitxers compartits
Xifrat
Mètode de xifrat:
Xifra el nom dels fitxers
Ús de memòria per comprimir:
Ús de memòria per descomprimir:
Suprimeix els fitxers en comprimir
4040
Emmagatzema els enllaços simbòlics
Emmagatzema els enllaços físics
Emmagatzema el flux alternatiu
Emmagatzema el fitxer de seguretat
4050
Sense compressió
Molt ràpida
Ràpida
Normal
Màxima
Ultra
4060
Afegeix i substitueix fitxers
Actualitza i afegeix fitxers
Actualitza els fitxers existents
Sincronitza els fitxers
4070
Visualitza
Tots els fitxers
No sòlid
Sòlid
6000
Copia
Mou
Copia a:
Mou a:
S'està copiant...
S'està movent...
S'està reanomenant...
Seleccioneu la carpeta de destinació:
Operació no permesa.
S'ha produït un error reanomenant el fitxer o carpeta
Confirmeu la còpia del fitxer
Segur que voleu copiar els fitxers a l'arxiu
6100
Confirmeu la supressió del fitxer
Confirmeu la supressió de la carpeta
Confirmeu supressió múltiple de fitxers
Segur que voleu suprimir «{0}»?
Segur que voleu suprimir la carpeta «{0}» i tot el seu contingut?
Segur que voleu suprimir aquests {0} elements?
S'està suprimint...
S'ha produït un error suprimint un fitxer o carpeta
El sistema no pot moure un fitxer amb una ruta llarga a la paperera de reciclatge
6300
Crea una carpeta
Crea un fitxer
Nom de la carpeta:
Nom del fitxer:
Carpeta nova
Fitxer nou
Error creant la carpeta
Error creant el fitxer
6400
Comentari
&Comentari:
Selecciona
Desselecciona
Màscara:
6600
Propietats
Historial de carpetes
Missatges de diagnosi
Missatge
7100
Ordinador
Entorn de xarxa
Documents
Sistema
7200
Afegeix
Extreu
Prova
Copia
Mou
Suprimeix
Informació
7300
Divideix el fitxer
&Divideix a:
Divideix en &volums, bytes:
S'està dividint...
Confirmació de la divisió
Segur que voleu dividir el fitxer en {0} volums?
La mida del volum ha de ser més petita que la mida del fitxer original
Mida del volum no valida
Mida de volum especificada: {0} bytes.\nSegur que voleu dividir el fitxer en aquests volums?
7400
Combina fitxers
&Combina a:
S'està combinant...
Seleccioneu només el primer fitxer
No es pot detectar un fitxer com a una part del fitxer dividit
No es pot trobar més d'una part del fitxer dividit
7500
S'està calculant la suma de verificació...
Informació de la suma de verificació
Suma de verificació CRC per les dades:
Suma de verificació CRC per les dades i els noms:
7600
Test de referència
Ús de la memòria:
Comprimint
Descomprimint
Taxa
Taxa total
Actual
Resultant
Ús de la CPU
Taxa / Ús
Passades:
7700
Enllaç
Enllaça
Enllaç des de:
Enllaç a:
7710
Tipus d'enllaç
Enllaç físic
Fitxer d'enllaç simbòlic
Directori d'enllaç simbòlic
Directori d'unió

495
thirdparty/7-Zip/Lang/co.txt vendored Normal file
View File

@ -0,0 +1,495 @@
;!@Lang2@!UTF-8!
; 15.00 : Patriccollu di Santa Maria è Sichè
;
;
;
;
;
;
;
;
;
;
0
7-Zip
Corsican
Corsu
401
OK
Abbandunà
&Iè
I&nnò
&Chjode
Aiutu
&Cuntinuà
440
Iè per &Tutti
Innò per T&utti
Piantà
Riavvià
&Arci pianu
P&rimu pianu
&Pausa
In pausa
Site sicuru di vulè abbandunà ?
500
&Schedariu
&Mudificà
&Affissà
&Favuriti
A&ttrezzi
A&iutu
540
&Apre
Apre Den&tru
Apre F&ora
A&ffissà
&Mudificà
&Rinumà
&Cupià Ver Di...
&Dispiazzà Ver Di...
S&quassà
&Sparte u schedariu...
&Unisce i schedarii...
&Pruprietà
Cumme&ntu...
Calculà a somma di cuntrollu
Paragunà e sfarenze
Creà un Cartulare
Creà un Schedariu
&Esce
Leia
Flussi A&lternativi
600
Selezziunà &Tuttu
Ùn selezziunà &Nunda
&Arritrusà a Selezzione
&Selezziunà...
Ùn selezziunà &micca...
Selezziunà da u Tipu
Ùn Selezziunà da u Tipu
700
Icone &Maiò
Icone &Chjuche
&Lista
&Detaglii
730
Non &Ordinatu
&Vista Sparta
&2 Finestre
&Barre d'Attrezzi
Apre u Cartulare di &Radica
Livellu &Superiore
Crunulugia di i Cartulari...
&Attualizà
Attualisazione Autumatica
750
Barra d'Attrezzi d'Archiviu
Barra d'Attrezzi Classica
Buttoni Maiò
Affissà u Testu di i Buttoni
800
&Aghjunghje u cartulare à i Favuriti cum'è
Indetta
900
&Ozzioni...
&Sperimentu di pussibilità
960
&Cuntenutu (in inglese)...
&Apprupositu di 7-Zip...
1003
Passeghju
Nome
Estensione
Cartulare
Dimensione
Dimensione Cumpressa
Attributi
Creatu u
Accessu u
Mudificatu u
Solidu
Cummentatu
Cifratu
Frazziunà Nanzu
Frazziunà Dopu
Dizziunariu
Tipu
Anti
Metoda
OS ospite
Sistema di Schedariu
Utilizatore
Gruppu
Bloccu
Cummentu
Pusizione
Prefissu di Passeghju
Cartulari
Schedarii
Versione
Vulume
Multi-Vulume
Offset
Leie
Blocchi
Vulumi
64-bit
Big-endian
CPU
Dimensione Fisica
Dimensione di l'Intestature
Somma di cuntrollu
Caratteristiche
Indirizzu Virtuale
ID
Nome Cortu
Appiecazione d'Urigine
Dimensione di Settore
Modu
Leia Simbolica
Sbagliu
Dimensione Tutale
Spaziu Liberu
Dimensione di Cluster
Nome di Vulume
Nome Lucale
Furnidore
Sicurità NT
Flussu Alternativu
Ausiliaru
Squassatu
In Arburu
Tipu di Sbagliu
Sbaglii
Sbaglii
Avertimenti
Avertimentu
Flussi
Flussi Alternativi
Dimensione di i Flussi Alternativi
Dimensione Virtuale
Dimensione Senza Compressione
Dimensione Fisica Tutale
Indice di Vulume
SottuTipu
Cummentu Cortu
Pagina di Codice
Dimensione di a Coda
Dimensione di u Mozzicone Incurpuratu
Leia
Leia Solida
iNode
Lettura sola
2100
Ozzioni
Lingua
Lingua :
Editore
&Editore :
Paragunà e sfarenze :
2200
Sistema
Assucià 7-Zip cù :
Tutti l'utilizatori
2301
Integrà 7-Zip à l'interfaccia cuntestuale
Interfaccia cuntestuale in cascata
Elementi di l'interfaccia cuntestuale :
Icone in l'interfaccia cuntestuale
2320
<Cartulare>
<Archiviu>
Apre l'archiviu
Estrae i schedarii...
Aghjunghje à l'archiviu...
Verificà l'archiviu
Estrae Quì
Estrae ver di {0}
Aghjunghje à {0}
Cumprime è mandà da email...
Cumprime ver di {0} è mandà da email.
2400
Cartulari
Cartulare di &travagliu
Cartulare timpurariu di &sistema
&Currente
&Specificatu :
Impiegà solu per i dischi amuvibili
Specificate un cartulare per i schedarii timpurarii d'archiviu.
2500
Preferenze
Affissà l'elementu ".."
Affissà e vere icone di i schedarii
Affissà l'interfaccia sistema
Selezziunà tutta a linea
Affissà linee &quadrittate
Cliccu unicu per apre un elementu
Modu di selezzione &alternativa
Impiegà pagine maiò di memoria
2900
Apprupositu di 7-Zip
7-Zip hè un prugramma liberu.\n\nTraduttu in lingua corsa da Patriccollu di Santa Maria è Sichè.
3000
U sistema ùn pò micca attribuisce a quantità richiesta di memoria
Ùn ci hè micca sbagliu
{0} ughjettu(i) selezziunatu(i)
U cartulare '{0}' ùn pò micca esse creatu
L'azzioni di mudificazione ùn sò micca pussibule per quessu archiviu.
U schedariu '{0}' ùn pò micca esse apertu cum'è un archiviu
L'archiviu cifratu '{0}' ùn pò micca esse apertu. Parolla d'intrata falsa ?
Stu tipu d'archiviu ùn hè micca accettatu
U schedariu {0} esiste dighjà
U schedariu '{0}' hè statu mudificatu.\nVulete cambiallu in l'archiviu ?
Ùn hè micca pussibule di cambià u schedariu\n'{0}'
Ùn hè micca pussibule d'avvià l'editore.
U schedariu hè podasse infettatu da un virus (u so nome cuntene spazii numerosi).
St'azzione ùn pò micca fassi dapoi un cartulare cù u nome di passeghju cusì longu.
Ci vole à selezziunà un schedariu
Ci vole à selezziunà al menu un schedariu
Troppu elementi
Ùn hè micca pussibule d'apre u schedariu cum'è un archiviu {0}
U schedariu hè apertu cum'è un archiviu {0}
L'archiviu hè apertu cù offset
3300
Estrazzione
Cumpressione
Verificazione
Apertura...
Esplurazione...
Cacciatura
3320
Aghjuntu
Mudificazione
Analisa
Riproduzzione
Rimballasgiu
Tralasciamentu
Squassatura
Creazione di l'intestatura in corsu
3400
Estrae
E&strae ver di :
Sciglite un cartulare per l'estrazzione di i schedarii.
3410
Modu di passeghju :
Nomi cumpletti di passeghju
Alcunu nome di passeghju
Nomi assuluti di passeghju
Nomi relativi di passeghju
3420
Modu di rimpiazzamentu :
Cunfirmà nanzu di rimpiazzà
Rimpiazzà senza dumandà
Ignurà i schedarii esistenti
Rinumà autumaticamente
Rinumà autumaticamente i schedarii esistenti
3430
Ùn cupià micca u cartulare di radica
Risturà a sicurità di i schedarii
3500
Cunfirmà u Rimpiazzamentu di Schedariu
U cartulare di distinazione cuntene dighjà un schedariu cù stu nome.
Vulete rimpiazzà u schedariu esistentu
cù quessu ?
{0} ottetti
Rinumà &Autumaticamente
3700
Metoda di cumpressione micca accettatu per '{0}'.
Sbagliu di dati in '{0}'. U schedariu hè alteratu.
Fiascu di l'ispezzione CRC per u schedariu '{0}'. U schedariu hè alteratu.
Sbagliu di dati in u schedariu cifratu '{0}'. Parolla d'intrata falsa ?
Fiascu di l'ispezzione CRC per u schedariu cifratu '{0}'. Parolla d'intrata falsa ?
3710
Parolla d'intrata falsa ?
3721
Metoda di compressione micca accettatu
Sbagliu di dati
Fiascu di CRC
Dati micca dispunibule
Fine inaspettata di dati
Ci hè d'altri dati dopu à a fine di i dati ghjuvevule
Ùn hè un archiviu
Sbagliu d'Intestature
Parolla d'intrata falsa
3763
Principiu di l'archiviu micca dispunibule
Principiu di l'archiviu micca confirmatu
Funzione micca accettata
3800
Scrivite a parolla d'intrata
Scrivite a parolla d'intrata :
Scrivite torna a parolla d'intrata :
&Affissà a parolla d'intrata
E parolle d'intrata sò sfarente
Per a parolla d'intrata, pudete impiegà solu : lettere senza aletta, cifri è segni particulari (!, #, $, ...)
A parolla d'intrata hè troppu longa
Parolla d'intrata
3900
Tempu passatu :
Tempu rimanentu :
Dimensione tutale :
Celerità :
Prucessu :
Reditu di cumpressione :
Sbaglii :
Archivii :
4000
Aghjunghje à l'archiviu
&Archiviu :
Modu di m&udificazione :
&Forma d'archiviu :
&Livellu de cumpressione :
&Metoda di cumpressione :
&Dimensione di u dizziunariu :
Dimensione di &e parolle :
Dimensione di u bloccu solidu :
Numeru di flussi CPU :
&Parametri :
Ozzioni
Creà un archiviu SF&X
Cumprime schedarii sparti
Cifratura
Metoda di cifratura :
Cifrà i &nomi di schedariu
Memoria impiegata da a Cumpressione :
Memoria impiegata da a Scumpressione :
Squassà i schedarii dopu à a cumpressione
4040
Cunservà e leie simboliche
Cunservà e leie solide
Cunservà i flussi di dati alternativi
Cunservà a sicurità di i schedarii
4050
Alcuna
A più rapida
Rapida
Nurmale
Massima
Ultra
4060
Aghjunghje è rimpiazzà i schedarii
Mudificà è aghjunghje i schedarii
Attualizà i schedarii esistenti
Sincrunizà i schedarii
4070
Sfuglià
Tutti i Schedarii
Non-solidu
Solidu
6000
Cupià
Dispiazzà
Cupià ver di :
Dispiazzà ver di :
Copia in corsu...
Dispiazzamentu in corsu...
Cambiamentu di nome in corsu...
Selezziunà u cartulare di distinazione.
St'azzione ùn hè micca accettata per stu cartulare.
Sbagliu durante u Cambiu di Nome di Schedariu o di Cartulare
Cunfirmazione di a Copia di Schedariu
Site sicuru di vulè cupià u(i) schedariu(i) ver di l'archiviu
6100
Cunfirmà a Squassatura di u Schedariu
Cunfirmà a Squassatura di u Cartulare
Cunfirmà a Squassatura di Schedarii Multiplice
Site sicuru di vulè squassà '{0}' ?
Site sicuru di vulè squassà u cartulare '{0}' è tuttu u so cuntenutu ?
Site sicuru di vulè squassà sti {0} elementi ?
Squassatura in corsu...
Sbagliu durante a Squassatura di Schedariu o di Cartulare
U sistema ùn pò micca mette à a Rumenzula un schedariu cù u nome di passeghju cusì longu
6300
Creà un Cartulare
Creà un Schedariu
Nome di cartulare :
Nome di schedariu :
Novu Cartulare
Novu Schedariu
Sbagliu durante a Creazione di Cartulare
Sbagliu durante a Creazione di Schedariu
6400
Cummentu
&Cummentu :
Selezziunà
Ùn Selezziunà
Filtru :
6600
Pruprietà
Crunulugia di i Cartulari
Messaghji di diagnosticu
Messaghju
7100
Urdinatore
Reta
Ducumenti
Sistema
7200
Aghjunghje
Estrae
Verificà
Cupià
Dispiazzà
Squassà
Infurmazione
7300
Sparte u schedariu
&Sparte in :
Sparte in &vulumi, ottetti :
Spartimentu...
Cunfirmà u Spartimentu
Site sicuru di vulè sparte u schedariu in {0} vulumi ?
A dimensione di u vulume deve esse più chjucu chì u schedariu d'urighjine
Dimensione di vulume falsa
Dimensione di vulume specificata : {0} ottetti.\nSite sicuru di vulè taglià l'archiviu in tali vulumi ?
7400
Unisce i Schedarii
&Unisce in :
Unione...
Selezziunà solu a prima parte di l'archiviu spartutu
Ùn si trova alcuna parte d'archiviu spartutu
Ùn si trova micca più d'una parte d'archiviu spartutu
7500
Calculu di a somma di cuntrollu...
Infurmazione nant'à a somma di cuntrollu
Somma di cuntrollu CRC per i dati :
Somma di cuntrollu CRC per i dati è i nomi :
7600
Sperimentu di pussibilità
Memoria impiegata :
Cumpressione
Scumpressione
Percentuale
Percentuale tutale
Attuale
Risultante
Impiegu CPU
Estimatu / Impiegatu
Passagi :
7700
Leia
Ligà
Leia d'urigine :
Leia di distinazione :
7710
Tipu di Leia
Leia Solida
Leia Simbolica di Schedariu
Leia Simbolica di Cartulare
Unione di Cartulare

495
thirdparty/7-Zip/Lang/cs.txt vendored Normal file
View File

@ -0,0 +1,495 @@
;!@Lang2@!UTF-8!
; 4.30 : Milan Hrubý
; 4.33 : Michal Molhanec
; 9.07 : Jiří Malák
; 15.00 : Kryštof Černý
;
;
;
;
;
;
;
0
7-Zip
Czech
Čeština
401
OK
Storno
&Ano
&Ne
Zavří&t
Nápověda
Po&kračovat
440
Ano na &všechno
N&e na všechno
Zastavit
Spustit znovu
&Pozadí
P&opředí
Po&zastavit
Pozastaveno
Jste si jistí, že to chcete stornovat?
500
&Soubor
Úpr&avy
&Zobrazení
&Oblíbené
&Nástroje
Nápo&věda
540
&Otevřít
Otevřít u&vnitř
Otevřít &mimo
&Zobrazit
&Upravit
&Přejmenovat
Kopírovat &do...
Př&esunout do...
Vymaza&t
&Rozdělit soubor...
&Sloučit soubory...
Vlast&nosti
Poznámk&a
Vypočítat kontrolní součet
Porovnat soubory
Vytvořit složku
Vytvořit soubor
&Konec
Odkázat
&Alternate Streams
600
Vybrat &vše
Zrušit výběr vše
&Invertovat výběr
Vybrat...
Zrušit výběr...
Vybrat podle typu
Zrušit výběr podle typu
700
&Velké ikony
&Malé ikony
&Seznam
&Podrobnosti
730
&Bez třídění
"Ploché" zobrazení
&2 panely
Nástrojové lišty
Otevřít kořenovou složku
O úroveň výš
Historie složek...
&Obnovit
Automatické obnovení
750
Archivační lišta
Standardní lišta
Velká tlačítka
Zobrazovat text tlačítek
800
&Přidat složku do oblíbených jako
Záložka
900
&Možnosti...
&Zkouška výkonu
960
&Obsah...
O progr&amu 7-Zip...
1003
Cesta
Název
Přípona
Složka
Velikost
Komprimovaná velikost
Atributy
Vytvořen
Použit
Změněn
Pevný
S poznámkou
Zakódovaný
Rozdělen do
Rozdělen od
Slovník
CRC
Typ
Anti
Metoda
Hostitelský OS
Souborový systém
Uživatel
Skupina
Blok
Poznámka
Pozice
Cesta
Složky
Soubory
Verze
Díl
Vícedílný
Offset
Odkazy
Bloků
Dílů
64-bit
Big-endian
Procesor
Fyzická velikost
Velikost hlaviček
Kontrolní součet
Charakteristiky
Virtuální adresa
ID
Krátké jméno
Autor
Velikost sektoru
Režim
Odkaz
Chyba
Celková velikost
Volné místo
Velikost clusteru
Označení
Místní název
Poskytovatel
NT Zabezpečení
Alternate Stream
Aux
Odstraněný
Is Tree
Typ chyby
Chyby
Chyby
Upozornění
Upozornění
Streams
Alternate Streams
Alternate Streams Size
Virtuální velikost
Rozbalená velikost
Celková fyzická velikost
Volume Index
SubType
Short Comment
Code Page
Tail Size
Embedded Stub Size
Link
Hard Link
iNode
Jen pro čtení
2100
Možnosti
Jazyk
Jazyk:
Editor
&Editor:
Program pro &porovnání souborů:
2200
Systém
Asociovat 7-Zip s:
Všichni uživatelé
2301
&Integrovat 7-Zip do kontextového menu
S&tupňovité kontextové menu
&Položky kontextového menu:
Ikony v kontextovém menu
2320
<Složka>
<Archiv>
Otevřít
Rozbalit soubory...
Přidat do archivu...
Zkontrolovat archiv
Rozbalit zde
Rozbalit do {0}
Přidat do {0}
Zkomprimovat a odeslat poštou...
Zkomprimovat do {0} a odeslat poštou
2400
Složky
Pracovní složka
&Systémová složka pro dočasné soubory
&Aktuální
S&ložka:
&Používat pouze pro vyjímatelné disky
Vyberte umístění pro dočasné komprimované soubory.
2500
Nastavení
Zobrazovat položku ".."
Zobrazovat skutečnou ikonu souboru
Zobrazovat systémové menu
&Vybírat celý řádek
Zobrazovat &mřížku
Otevřít položku jedním kliknutím
&Alternativní způsob výběru
&Používat velké stránky paměti
2900
O programu 7-Zip
7-Zip je svobodný software. Nicméně můžete podpořit jeho vývoj registrací.
3000
Systém nemůže přidělit požadovanou velikost paměti
Nedošlo k žádným chybám
vybráno {0} objekt(ů)
Nelze vytvořit složku '{0}'
Aktualizace není podporována pro tento archiv.
Soubor '{0}' nelze otevřít jako archiv
Zakódovaný archiv '{0}' nelze otevřít. Špatné heslo?
Nepodporovaný typ archivu
Soubor {0} již existuje
Soubor '{0}' byl změněn.\nChcete ho aktualizovat v archivu?
Nelze aktualizovat soubor\n'{0}'
Editor nelze spustit.
Soubor se jeví jako virus (ve jménu souboru jsou dlouhé mezery).
Operace nemůže být provedena ze složky s dlouhou cestou.
Musíte vybrat jeden soubor
Musíte vybrat jeden nebo více souborů
Příliš mnoho položek
Nelze otevřít soubor jako {0} archiv
Soubor je otevřen jako {0} archiv
Archiv je otevřen s offsetem
3300
Rozbalování
Komprimování
Kontrola
Otevírání...
Prohledávání...
Odebírání
3320
Přidávání
Aktualizování
Analyzování
Replikace
Přebalování
Přeskakování
Odstraňování
Vytváření hlavičky
3400
Rozbalit
&Rozbalit do:
Vyberte umístění pro rozbalené soubory.
3410
Cesty
Plné cesty
Bez cesty
Absolutní cesty
Relativní cesty
3420
Způsob přepisování
Zeptat se před přepisem
Přepsat bez výzvy
Přeskočit existující soubory
Automatické přejmenování
Automatické přejmenování existujících souborů
3430
Eliminovat duplikaci kořenové složky
Obnovit zabezpečení souborů
3500
Potvrzení nahrazení souboru
Cílová složka již obsahuje zpracovaný soubor.
Chcete nahradit existující soubor
tímto?
{0} bajtů
A&utomaticky přejmenovat
3700
Nepodporovaná komprimační metoda pro '{0}'.
Chyba dat v '{0}'. Soubor je poškozený.
Chyba CRC v '{0}'. Soubor je poškozený.
Chyba dat v zakódovaném souboru '{0}'. Chybné heslo?
Chyba CRC v zakódovaném souboru '{0}'. Chybné heslo?
3710
Špatné heslo?
3721
Nepodporovaná komprimační metoda
Chyba dat
CRC selhal
Nedostupná data
Neočekávaný konec dat
Jsou přítomny nějaké data po konci payload dat
Není archiv
Chyba hlavičky
Špatné heslo
3763
Nedostupný start archivu
Nepotvrzený start archivu
Nepodporovaná funkce
3800
Vložit heslo
Vložit heslo:
Potvrzení hesla:
Zobrazit he&slo
Heslo nesouhlasí
Pro heslo použijte pouze anglická písmena, číslice a speciální znaky (!, #, $, ...)
Heslo je příliš dlouhé
Heslo
3900
Uplynulý čas:
Zbývající čas:
Celková velikost:
Rychlost:
Zpracováno:
Komprimační poměr:
Chyb:
Archívy:
4000
Přidat do archivu
&Archiv:
Způsob aktualizace:
&Formát archivu:
Ú&roveň komprese:
&Komprimační metoda:
Ve&likost slovníku:
V&elikost slova:
Velikost bloku:
Počet vláken procesoru:
&Parametry:
Možnosti
Vytvořit SF&X archiv
Zkomprimovat otevřené soubory
Zakódování
Metoda zakódování:
Zakódovat &názvy souborů
Spotřeba paměti pro zabalení:
Spotřeba paměti pro rozbalení:
Odstranit soubory po zabalení
4040
Uložit symbolické odkazy
Uložit pevné odkazy
Store alternate data streams
Uložit zabezpečení souborů
4050
Skladovací
Nejrychlejší
Rychlá
Normální
Maximální
Ultra
4060
Přidat a nahradit soubory
Aktualizovat a přidat soubory
Aktualizovat existující soubory
Synchronizovat soubory
4070
Procházet
Všechny soubory
Podle velikosti souboru
Pevný
6000
Kopírovat
Přesunout
Kopírovat do:
Přesunout do:
Kopírování...
Přesouvání...
Přejmenování...
Vyberte cílovou složku.
Operace není podporována.
Chyba při přejmenování souboru nebo složky
Potvrzení kopírování souborů
Jste si jistí, že chcete zkopírovat soubory do archivu
6100
Potvrdit vymazání souboru
Potvrdit vymazání složky
Potvrdit mnohonásobné vymazání souboru
Jste si jistí, že chcete vymazat '{0}'?
Jste si jistí, že chcete vymazat složku '{0}' a všechno co obsahuje?
Jste si jistí, že chcete vymazat tyto {0} položky?
Mazání...
Chyba při mazání souboru nebo složky
Systém nepodporuje přesun soubor s dlouhou cestou do Odpadkového koše
6300
Vytvořit složku
Vytvořit soubor
Název složky:
Název souboru:
Nová složka
Nový soubor
Chyba při vytváření složky
Chyba při vytváření souboru
6400
Poznámka
&Poznámka:
Vybrat
Zrušit výběr
Maska:
6600
Vlastnosti
Historie složek
Diagnostické zprávy
Zpráva
7100
Počítač
Síť
Dokumenty
Systém
7200
Přidat
Rozbalit
Zkontrolovat
Kopírovat
Přesunout
Vymazat
Informace
7300
Rozdělit soubor
Rozdělit do:
Rozdělit na díly, bajtů:
Rozdělování...
Potvrdit rozdělování
Jste si jistí, že chcete rozdělit soubor na {0} dílů?
Velikost dílu musí být menší než velikost původního souboru
Nesprávná velikost dílu
Zadaná velikost dílu: {0} bytů.\nJste si jistí, že chcete rozdělit archiv do takových dílů?
7400
Sloučit soubory
Sloučit do:
Slučování...
Musí se vybrat pouze první díl rozděleného soubor
Nepodařilo se rozpoznat rozdělený soubor
Nepodařilo se nalézt více než jeden díl rozděleného souboru
7500
Vypočítávání kontrolního součtu...
Informace o kontrolním součtu
CRC kontrolní součet pro data:
CRC kontrolní součet pro data a jména:
7600
Zkouška výkonu
Spotřeba paměti:
Komprimování
Rozbalování
Výkon
Celkový výkon
Aktuální
Výsledné
Využití procesoru
Výkon / Využití
Průchodů:
7700
Odkázat1
Odkázat2
Odkázat z:
Odkázat na:
7710
Typ odkázání
Pevný odkaz
Symbolický odkaz souboru
Symbolický odkaz složky
Spojení složek

Some files were not shown because too many files have changed in this diff Show More