Merge branch 'develop' of github.com:sleuthkit/autopsy into 1501-ja-core-python

This commit is contained in:
Nick Davis 2016-01-29 17:47:50 -05:00
commit 36c8c47b8b
69 changed files with 241 additions and 237 deletions

View File

@ -23,4 +23,9 @@ ServicesMonitor.unknownServiceName.excepton.txt=Requested service name {0} is un
TextConverter.convert.exception.txt=Unable to convert text {0} to hex text TextConverter.convert.exception.txt=Unable to convert text {0} to hex text
TextConverter.convertFromHex.exception.txt=Unable to convert hex text to text TextConverter.convertFromHex.exception.txt=Unable to convert hex text to text
ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service ServicesMonitor.KeywordSearchNull=Cannot find Keyword Search service
ServicesMonitor.InvalidPortNumber=Invalid port number. ServicesMonitor.InvalidPortNumber=Invalid port number.
ServicesMonitor.remoteCaseDatabase.displayName.text=Multi-user case database service
ServicesMonitor.remoteKeywordSearch.displayName.text=Multi-user keyword search service
ServicesMonitor.messaging.displayName.text=Messaging service
ServicesMonitor.databaseConnectionInfo.error.msg=Error accessing case database connection info
ServicesMonitor.messagingService.connErr.text=Error accessing messaging service connection info

View File

@ -123,9 +123,9 @@ public class Installer extends ModuleInstall {
} }
// This library name is different in 32-bit versus 64-bit // This library name is different in 32-bit versus 64-bit
String libintlName = "libintl-8"; String libintlName = "libintl-8"; //NON-NLS
if (PlatformUtil.is64BitJVM() == false) { if (PlatformUtil.is64BitJVM() == false) {
libintlName = "intl"; libintlName = "intl"; //NON-NLS
} }
try { try {
System.loadLibrary(libintlName); //NON-NLS System.loadLibrary(libintlName); //NON-NLS

View File

@ -52,7 +52,7 @@ public class ServicesMonitor {
private static final Logger logger = Logger.getLogger(ServicesMonitor.class.getName()); private static final Logger logger = Logger.getLogger(ServicesMonitor.class.getName());
private final ScheduledThreadPoolExecutor periodicTasksExecutor; private final ScheduledThreadPoolExecutor periodicTasksExecutor;
private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"; private static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"; //NON-NLS
private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 1; private static final int NUMBER_OF_PERIODIC_TASK_THREADS = 1;
private static final long CRASH_DETECTION_INTERVAL_MINUTES = 2; private static final long CRASH_DETECTION_INTERVAL_MINUTES = 2;
@ -84,18 +84,18 @@ public class ServicesMonitor {
* changes. New value is set to updated ServiceStatus, old value is * changes. New value is set to updated ServiceStatus, old value is
* null. * null.
*/ */
REMOTE_CASE_DATABASE("Multi-user case database service"), REMOTE_CASE_DATABASE(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteCaseDatabase.displayName.text")),
/** /**
* Property change event fired when remote keyword search service status * Property change event fired when remote keyword search service status
* changes. New value is set to updated ServiceStatus, old value is * changes. New value is set to updated ServiceStatus, old value is
* null. * null.
*/ */
REMOTE_KEYWORD_SEARCH("Multi-user keyword search service"), REMOTE_KEYWORD_SEARCH(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.remoteKeywordSearch.displayName.text")),
/** /**
* Property change event fired when messaging service status changes. * Property change event fired when messaging service status changes.
* New value is set to updated ServiceStatus, old value is null. * New value is set to updated ServiceStatus, old value is null.
*/ */
MESSAGING("Messaging service"); MESSAGING(NbBundle.getMessage(ServicesMonitor.class, "ServicesMonitor.messaging.displayName.text"));
private final String displayName; private final String displayName;
@ -244,7 +244,7 @@ public class ServicesMonitor {
info = UserPreferences.getDatabaseConnectionInfo(); info = UserPreferences.getDatabaseConnectionInfo();
} catch (UserPreferencesException ex) { } catch (UserPreferencesException ex) {
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), "Error accessing case database connection info"); setServiceStatus(Service.REMOTE_CASE_DATABASE.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.databaseConnectionInfo.error.msg"));
return; return;
} }
try { try {
@ -289,7 +289,7 @@ public class ServicesMonitor {
info = UserPreferences.getMessageServiceConnectionInfo(); info = UserPreferences.getMessageServiceConnectionInfo();
} catch (UserPreferencesException ex) { } catch (UserPreferencesException ex) {
logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS logger.log(Level.SEVERE, "Error accessing messaging service connection info", ex); //NON-NLS
setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), "Error accessing messaging service connection info"); setServiceStatus(Service.MESSAGING.toString(), ServiceStatus.DOWN.toString(), NbBundle.getMessage(this.getClass(), "ServicesMonitor.messagingService.connErr.text"));
return; return;
} }

View File

@ -147,7 +147,7 @@ public final class UserPreferences {
public static CaseDbConnectionInfo getDatabaseConnectionInfo() throws UserPreferencesException { public static CaseDbConnectionInfo getDatabaseConnectionInfo() throws UserPreferencesException {
DbType dbType; DbType dbType;
try { try {
dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); dbType = DbType.valueOf(preferences.get(EXTERNAL_DATABASE_TYPE, "POSTGRESQL")); //NON-NLS
} catch (Exception ex) { } catch (Exception ex) {
dbType = DbType.SQLITE; dbType = DbType.SQLITE;
} }
@ -290,7 +290,7 @@ public final class UserPreferences {
*/ */
static final class TextConverter { static final class TextConverter {
private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); private static final char[] TMP = "hgleri21auty84fwe".toCharArray(); //NON-NLS
private static final byte[] SALT = { private static final byte[] SALT = {
(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12, (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,
(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,}; (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,};
@ -306,9 +306,9 @@ public final class UserPreferences {
*/ */
static String convertTextToHexText(String property) throws UserPreferencesException { static String convertTextToHexText(String property) throws UserPreferencesException {
try { try {
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP));
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS
pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
return base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8"))); return base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8")));
} catch (Exception ex) { } catch (Exception ex) {
@ -332,9 +332,9 @@ public final class UserPreferences {
*/ */
static String convertHexTextToText(String property) throws UserPreferencesException { static String convertHexTextToText(String property) throws UserPreferencesException {
try { try {
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); //NON-NLS
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP)); SecretKey key = keyFactory.generateSecret(new PBEKeySpec(TMP));
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES"); //NON-NLS
pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20)); pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
return new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8"); return new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8");
} catch (Exception ex) { } catch (Exception ex) {

View File

@ -21,4 +21,7 @@ PlatformUtil.getAllMemUsageInfo.usageText={0}\n\
{1}\n\ {1}\n\
Process Virtual Memory\: {2} Process Virtual Memory\: {2}
StringExtract.illegalStateException.cannotInit.msg=Unicode table not properly initialized, cannot instantiate StringExtract StringExtract.illegalStateException.cannotInit.msg=Unicode table not properly initialized, cannot instantiate StringExtract
ImageUtils.GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0}
ImageUtils.GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0}
ImageUtils.ReadImageTask.mesage.text=Reading image: {0}
VideoUtils.genVideoThumb.progress.text=extracting temporary file {0}

View File

@ -31,7 +31,7 @@ import java.nio.file.Path;
public class FileUtil { public class FileUtil {
private static final Logger logger = Logger.getLogger(FileUtil.class.getName()); private static final Logger logger = Logger.getLogger(FileUtil.class.getName());
private static String TEMP_FILE_PREFIX = "Autopsy"; private static String TEMP_FILE_PREFIX = "Autopsy"; //NON-NLS
/** /**
* Recursively delete all of the files and sub-directories in a directory. * Recursively delete all of the files and sub-directories in a directory.

View File

@ -67,16 +67,16 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskCoreException;
/** /**
* Utilities for working with image files and creating thumbnails. Reuses * Utilities for working with image files and creating thumbnails. Re-uses
* thumbnails by storing them in the case's cache directory. * thumbnails by storing them in the case's cache directory.
*/ */
public class ImageUtils { public class ImageUtils {
private static final Logger LOGGER = Logger.getLogger(ImageUtils.class.getName()); private static final Logger LOGGER = Logger.getLogger(ImageUtils.class.getName());
private static final String COULD_NOT_WRITE_CACHE_THUMBNAIL = "Could not write cache thumbnail: "; //NOI18N private static final String COULD_NOT_WRITE_CACHE_THUMBNAIL = "Could not write cache thumbnail: "; //NOI18N NON-NLS
private static final String COULD_NOT_CREATE_IMAGE_INPUT_STREAM = "Could not create ImageInputStream."; //NOI18N private static final String COULD_NOT_CREATE_IMAGE_INPUT_STREAM = "Could not create ImageInputStream."; //NOI18N NON-NLS
private static final String NO_IMAGE_READER_FOUND_FOR_ = "No ImageReader found for "; //NOI18N private static final String NO_IMAGE_READER_FOUND_FOR_ = "No ImageReader found for "; //NOI18N NON-NLS
/** /**
* save thumbnails to disk as this format * save thumbnails to disk as this format
@ -89,12 +89,12 @@ public class ImageUtils {
private static final BufferedImage DEFAULT_THUMBNAIL; private static final BufferedImage DEFAULT_THUMBNAIL;
private static final String IMAGE_GIF_MIME = "image/gif"; //NOI18N private static final String IMAGE_GIF_MIME = "image/gif"; //NOI18N NON-NLS
private static final SortedSet<String> GIF_MIME_SET = ImmutableSortedSet.copyOf(new String[]{IMAGE_GIF_MIME}); private static final SortedSet<String> GIF_MIME_SET = ImmutableSortedSet.copyOf(new String[]{IMAGE_GIF_MIME});
private static final List<String> SUPPORTED_IMAGE_EXTENSIONS; private static final List<String> SUPPORTED_IMAGE_EXTENSIONS;
private static final SortedSet<String> SUPPORTED_IMAGE_MIME_TYPES; private static final SortedSet<String> SUPPORTED_IMAGE_MIME_TYPES;
private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream"); //NOI18N private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream"); //NOI18N NON-NLS
private static final boolean openCVLoaded; private static final boolean openCVLoaded;
@ -104,7 +104,7 @@ public class ImageUtils {
try { try {
tempImage = ImageIO.read(ImageUtils.class.getResourceAsStream("/org/sleuthkit/autopsy/images/file-icon.png"));//NON-NLS //NOI18N tempImage = ImageIO.read(ImageUtils.class.getResourceAsStream("/org/sleuthkit/autopsy/images/file-icon.png"));//NON-NLS //NOI18N
} catch (IOException ex) { } catch (IOException ex) {
LOGGER.log(Level.SEVERE, "Failed to load default icon.", ex); //NOI18N LOGGER.log(Level.SEVERE, "Failed to load default icon.", ex); //NOI18N NON-NLS
tempImage = null; tempImage = null;
} }
DEFAULT_THUMBNAIL = tempImage; DEFAULT_THUMBNAIL = tempImage;
@ -113,16 +113,16 @@ public class ImageUtils {
boolean openCVLoadedTemp; boolean openCVLoadedTemp;
try { try {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME); System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NOI18N if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NOI18N NON-NLS
System.loadLibrary("opencv_ffmpeg248_64"); //NOI18N System.loadLibrary("opencv_ffmpeg248_64"); //NOI18N NON-NLS
} else { } else {
System.loadLibrary("opencv_ffmpeg248"); //NOI18N System.loadLibrary("opencv_ffmpeg248"); //NOI18N NON-NLS
} }
openCVLoadedTemp = true; openCVLoadedTemp = true;
} catch (UnsatisfiedLinkError e) { } catch (UnsatisfiedLinkError e) {
openCVLoadedTemp = false; openCVLoadedTemp = false;
LOGGER.log(Level.SEVERE, "OpenCV Native code library failed to load", e); //NOI18N LOGGER.log(Level.SEVERE, "OpenCV Native code library failed to load", e); //NOI18N NON-NLS
//TODO: show warning bubble //TODO: show warning bubble
} }
@ -136,12 +136,12 @@ public class ImageUtils {
* with ImageIO automatically * with ImageIO automatically
*/ */
SUPPORTED_IMAGE_MIME_TYPES.addAll(Arrays.asList( SUPPORTED_IMAGE_MIME_TYPES.addAll(Arrays.asList(
"image/x-rgb", "image/x-rgb", //NON-NLS
"image/x-ms-bmp", "image/x-ms-bmp", //NON-NLS
"image/x-portable-graymap", "image/x-portable-graymap", //NON-NLS
"image/x-portable-bitmap", "image/x-portable-bitmap", //NON-NLS
"application/x-123")); //TODO: is this correct? -jm //NOI18N "application/x-123")); //TODO: is this correct? -jm //NOI18N NON-NLS
SUPPORTED_IMAGE_MIME_TYPES.removeIf("application/octet-stream"::equals); //NOI18N SUPPORTED_IMAGE_MIME_TYPES.removeIf("application/octet-stream"::equals); //NOI18N NON-NLS
} }
/** /**
@ -154,7 +154,7 @@ public class ImageUtils {
*/ */
private static final Executor imageSaver = private static final Executor imageSaver =
Executors.newSingleThreadExecutor(new BasicThreadFactory.Builder() Executors.newSingleThreadExecutor(new BasicThreadFactory.Builder()
.namingPattern("icon saver-%d").build()); //NOI18N .namingPattern("icon saver-%d").build()); //NOI18N NON-NLS
public static List<String> getSupportedImageExtensions() { public static List<String> getSupportedImageExtensions() {
return Collections.unmodifiableList(SUPPORTED_IMAGE_EXTENSIONS); return Collections.unmodifiableList(SUPPORTED_IMAGE_EXTENSIONS);
@ -240,22 +240,22 @@ public class ImageUtils {
return IMAGE_GIF_MIME.equalsIgnoreCase(fileType); return IMAGE_GIF_MIME.equalsIgnoreCase(fileType);
} }
} catch (FileTypeDetectorInitException ex) { } catch (FileTypeDetectorInitException ex) {
LOGGER.log(Level.WARNING, "Failed to initialize FileTypeDetector.", ex); //NOI18N LOGGER.log(Level.WARNING, "Failed to initialize FileTypeDetector.", ex); //NOI18N NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
if (ex.getMessage().contains("An SQLException was provoked by the following failure: java.lang.InterruptedException")) { if (ex.getMessage().contains("An SQLException was provoked by the following failure: java.lang.InterruptedException")) { //NON-NLS
LOGGER.log(Level.WARNING, "Mime type look up with FileTypeDetector was interupted."); //NOI18N} LOGGER.log(Level.WARNING, "Mime type look up with FileTypeDetector was interupted."); //NOI18N} NON-NLS
return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N
} else { } else {
LOGGER.log(Level.SEVERE, "Failed to get mime type of " + getContentPathSafe(file) + " with FileTypeDetector.", ex); //NOI18N} LOGGER.log(Level.SEVERE, "Failed to get mime type of " + getContentPathSafe(file) + " with FileTypeDetector.", ex); //NOI18N} NON-NLS
} }
} }
LOGGER.log(Level.WARNING, "Falling back on direct mime type check for {0}.", getContentPathSafe(file)); //NOI18N LOGGER.log(Level.WARNING, "Falling back on direct mime type check for {0}.", getContentPathSafe(file)); //NOI18N NON-NLS
switch (file.isMimeType(GIF_MIME_SET)) { switch (file.isMimeType(GIF_MIME_SET)) {
case TRUE: case TRUE:
return true; return true;
case UNDEFINED: case UNDEFINED:
LOGGER.log(Level.WARNING, "Falling back on extension check."); //NOI18N LOGGER.log(Level.WARNING, "Falling back on extension check."); //NOI18N NON-NLS
return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N return "gif".equalsIgnoreCase(file.getNameExtension()); //NOI18N
case FALSE: case FALSE:
default: default:
@ -294,8 +294,8 @@ public class ImageUtils {
|| (conditionalMimes.contains(mimeType.toLowerCase()) && supportedExtension.contains(extension)); || (conditionalMimes.contains(mimeType.toLowerCase()) && supportedExtension.contains(extension));
} }
} catch (FileTypeDetector.FileTypeDetectorInitException | TskCoreException ex) { } catch (FileTypeDetector.FileTypeDetectorInitException | TskCoreException ex) {
LOGGER.log(Level.WARNING, "Failed to look up mimetype for {0} using FileTypeDetector:{1}", new Object[]{getContentPathSafe(file), ex.toString()}); //NOI18N LOGGER.log(Level.WARNING, "Failed to look up mimetype for {0} using FileTypeDetector:{1}", new Object[]{getContentPathSafe(file), ex.toString()}); //NOI18N NON-NLS
LOGGER.log(Level.INFO, "Falling back on AbstractFile.isMimeType"); //NOI18N LOGGER.log(Level.INFO, "Falling back on AbstractFile.isMimeType"); //NOI18N NON-NLS
AbstractFile.MimeMatchEnum mimeMatch = file.isMimeType(supportedMimeTypes); AbstractFile.MimeMatchEnum mimeMatch = file.isMimeType(supportedMimeTypes);
if (mimeMatch == AbstractFile.MimeMatchEnum.TRUE) { if (mimeMatch == AbstractFile.MimeMatchEnum.TRUE) {
return true; return true;
@ -360,7 +360,7 @@ public class ImageUtils {
try { try {
return SwingFXUtils.fromFXImage(thumbnailTask.get(), null); return SwingFXUtils.fromFXImage(thumbnailTask.get(), null);
} catch (InterruptedException | ExecutionException ex) { } catch (InterruptedException | ExecutionException ex) {
LOGGER.log(Level.WARNING, "Failed to get thumbnail for {0}: " + ex.toString(), getContentPathSafe(content)); LOGGER.log(Level.WARNING, "Failed to get thumbnail for {0}: " + ex.toString(), getContentPathSafe(content)); //NON-NLS
return DEFAULT_THUMBNAIL; return DEFAULT_THUMBNAIL;
} }
} else { } else {
@ -435,9 +435,9 @@ public class ImageUtils {
private static File getCachedThumbnailLocation(long fileID) { private static File getCachedThumbnailLocation(long fileID) {
try { try {
String cacheDirectory = Case.getCurrentCase().getCacheDirectory(); String cacheDirectory = Case.getCurrentCase().getCacheDirectory();
return Paths.get(cacheDirectory, "thumbnails", fileID + ".png").toFile(); //NOI18N return Paths.get(cacheDirectory, "thumbnails", fileID + ".png").toFile(); //NOI18N NON-NLS
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
LOGGER.log(Level.WARNING, "Could not get cached thumbnail location. No case is open."); LOGGER.log(Level.WARNING, "Could not get cached thumbnail location. No case is open."); //NON-NLS
return null; return null;
} }
@ -532,7 +532,7 @@ public class ImageUtils {
*/ */
static public int getImageWidth(AbstractFile file) throws IOException { static public int getImageWidth(AbstractFile file) throws IOException {
return getImageProperty(file, return getImageProperty(file,
"ImageIO could not determine width of {0}: ", //NOI18N "ImageIO could not determine width of {0}: ", //NOI18N NON-NLS
imageReader -> imageReader.getWidth(0) imageReader -> imageReader.getWidth(0)
); );
} }
@ -549,7 +549,7 @@ public class ImageUtils {
*/ */
static public int getImageHeight(AbstractFile file) throws IOException { static public int getImageHeight(AbstractFile file) throws IOException {
return getImageProperty(file, return getImageProperty(file,
"ImageIO could not determine height of {0}: ", //NOI18N "ImageIO could not determine height of {0}: ", //NOI18N NON-NLS
imageReader -> imageReader.getHeight(0) imageReader -> imageReader.getHeight(0)
); );
} }
@ -646,18 +646,18 @@ public class ImageUtils {
*/ */
static private class GetThumbnailTask extends ReadImageTaskBase { static private class GetThumbnailTask extends ReadImageTaskBase {
private static final String FAILED_TO_READ_IMAGE_FOR_THUMBNAIL_GENERATION = "Failed to read image for thumbnail generation."; //NOI18N private static final String FAILED_TO_READ_IMAGE_FOR_THUMBNAIL_GENERATION = "Failed to read image for thumbnail generation."; //NOI18N NON-NLS
private final int iconSize; private final int iconSize;
private final File cacheFile; private final File cacheFile;
private final boolean defaultOnFailure; private final boolean defaultOnFailure;
@NbBundle.Messages({"# {0} - file name", // @NbBundle.Messages({"# {0} - file name",
"GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0}", "# {0} - file name", // "GetOrGenerateThumbnailTask.loadingThumbnailFor=Loading thumbnail for {0}", "# {0} - file name",
"GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0}"}) // "GetOrGenerateThumbnailTask.generatingPreviewFor=Generating preview for {0}"})
private GetThumbnailTask(AbstractFile file, int iconSize, boolean defaultOnFailure) { private GetThumbnailTask(AbstractFile file, int iconSize, boolean defaultOnFailure) {
super(file); super(file);
updateMessage(Bundle.GetOrGenerateThumbnailTask_loadingThumbnailFor(file.getName())); updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.GetOrGenerateThumbnailTask.loadingThumbnailFor", file.getName()));
this.iconSize = iconSize; this.iconSize = iconSize;
this.defaultOnFailure = defaultOnFailure; this.defaultOnFailure = defaultOnFailure;
this.cacheFile = getCachedThumbnailLocation(file.getId()); this.cacheFile = getCachedThumbnailLocation(file.getId());
@ -679,7 +679,7 @@ public class ImageUtils {
return SwingFXUtils.toFXImage(cachedThumbnail, null); return SwingFXUtils.toFXImage(cachedThumbnail, null);
} }
} catch (IOException ex) { } catch (IOException ex) {
LOGGER.log(Level.WARNING, "ImageIO had a problem reading thumbnail for image {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N LOGGER.log(Level.WARNING, "ImageIO had a problem reading thumbnail for image {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS
} }
} }
@ -691,7 +691,7 @@ public class ImageUtils {
if (VideoUtils.isVideoThumbnailSupported(file)) { if (VideoUtils.isVideoThumbnailSupported(file)) {
if (openCVLoaded) { if (openCVLoaded) {
updateMessage(Bundle.GetOrGenerateThumbnailTask_generatingPreviewFor(file.getName())); updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.GetOrGenerateThumbnailTask.generatingPreviewFor", file.getName()));
thumbnail = VideoUtils.generateVideoThumbnail(file, iconSize); thumbnail = VideoUtils.generateVideoThumbnail(file, iconSize);
} }
if (null == thumbnail) { if (null == thumbnail) {
@ -716,7 +716,7 @@ public class ImageUtils {
thumbnail = ScalrWrapper.resizeFast(bufferedImage, iconSize); thumbnail = ScalrWrapper.resizeFast(bufferedImage, iconSize);
} catch (IllegalArgumentException | OutOfMemoryError e) { } catch (IllegalArgumentException | OutOfMemoryError e) {
// if resizing does not work due to extreme aspect ratio or oom, crop the image instead. // if resizing does not work due to extreme aspect ratio or oom, crop the image instead.
LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString() + ". Attemptying to crop {0} instead", ImageUtils.getContentPathSafe(file)); //NOI18N LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString() + ". Attemptying to crop {0} instead", ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS
final int height = bufferedImage.getHeight(); final int height = bufferedImage.getHeight();
final int width = bufferedImage.getWidth(); final int width = bufferedImage.getWidth();
@ -727,12 +727,12 @@ public class ImageUtils {
try { try {
thumbnail = ScalrWrapper.cropImage(bufferedImage, cropWidth, cropHeight); thumbnail = ScalrWrapper.cropImage(bufferedImage, cropWidth, cropHeight);
} catch (Exception cropException) { } catch (Exception cropException) {
LOGGER.log(Level.WARNING, "Could not crop image {0}: " + cropException.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N LOGGER.log(Level.WARNING, "Could not crop image {0}: " + cropException.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS
throw cropException; throw cropException;
} }
} }
} catch (Exception e) { } catch (Exception e) {
LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N LOGGER.log(Level.WARNING, "Could not scale image {0}: " + e.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS
throw e; throw e;
} }
} }
@ -765,7 +765,7 @@ public class ImageUtils {
} }
ImageIO.write(thumbnail, FORMAT, cacheFile); ImageIO.write(thumbnail, FORMAT, cacheFile);
} catch (IllegalArgumentException | IOException ex) { } catch (IllegalArgumentException | IOException ex) {
LOGGER.log(Level.WARNING, "Could not write thumbnail for {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N LOGGER.log(Level.WARNING, "Could not write thumbnail for {0}: " + ex.toString(), ImageUtils.getContentPathSafe(file)); //NOI18N NON-NLS
} }
}); });
} }
@ -794,13 +794,13 @@ public class ImageUtils {
ReadImageTask(AbstractFile file) { ReadImageTask(AbstractFile file) {
super(file); super(file);
updateMessage(Bundle.LoadImageTask_mesageText(file.getName())); updateMessage(NbBundle.getMessage(this.getClass(), "ImageUtils.ReadImageTask.mesage.text", file.getName()));
} }
// @NbBundle.Messages({
// "# {0} - file name",
// "LoadImageTask.mesageText=Reading image: {0}"})
@Override @Override
@NbBundle.Messages({
"# {0} - file name",
"LoadImageTask.mesageText=Reading image: {0}"})
protected javafx.scene.image.Image call() throws Exception { protected javafx.scene.image.Image call() throws Exception {
return readImage(); return readImage();
} }
@ -811,7 +811,7 @@ public class ImageUtils {
*/ */
static private abstract class ReadImageTaskBase extends Task<javafx.scene.image.Image> implements IIOReadProgressListener { static private abstract class ReadImageTaskBase extends Task<javafx.scene.image.Image> implements IIOReadProgressListener {
private static final String IMAGE_UTILS_COULD_NOT_READ_UNSUPPORTE_OR_CORRUPT = "ImageUtils could not read {0}. It may be unsupported or corrupt"; //NOI18N private static final String IMAGE_UTILS_COULD_NOT_READ_UNSUPPORTE_OR_CORRUPT = "ImageUtils could not read {0}. It may be unsupported or corrupt"; //NOI18N NON-NLS
final AbstractFile file; final AbstractFile file;
private ImageReader reader; private ImageReader reader;
@ -955,7 +955,7 @@ public class ImageUtils {
return content.getUniquePath(); return content.getUniquePath();
} catch (TskCoreException tskCoreException) { } catch (TskCoreException tskCoreException) {
String contentName = content.getName(); String contentName = content.getName();
LOGGER.log(Level.SEVERE, "Failed to get unique path for " + contentName, tskCoreException); //NOI18N LOGGER.log(Level.SEVERE, "Failed to get unique path for " + contentName, tskCoreException); //NOI18N NON-NLS
return contentName; return contentName;
} }
} }

View File

@ -34,10 +34,10 @@ public class NetworkUtils {
} catch (UnknownHostException ex) { } catch (UnknownHostException ex) {
// getLocalHost().getHostName() can fail in some situations. // getLocalHost().getHostName() can fail in some situations.
// Use environment variable if so. // Use environment variable if so.
hostName = System.getenv("COMPUTERNAME"); hostName = System.getenv("COMPUTERNAME"); //NON-NLS
} }
if (hostName == null || hostName.isEmpty()) { if (hostName == null || hostName.isEmpty()) {
hostName = System.getenv("COMPUTERNAME"); hostName = System.getenv("COMPUTERNAME"); //NON-NLS
} }
return hostName; return hostName;
} }

View File

@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException;
*/ */
public class PlatformUtil { public class PlatformUtil {
private static final String PYTHON_MODULES_SUBDIRECTORY = "python_modules"; private static final String PYTHON_MODULES_SUBDIRECTORY = "python_modules"; //NON-NLS
private static String javaPath = null; private static String javaPath = null;
public static final String OS_NAME_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.nameUnknown"); public static final String OS_NAME_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.nameUnknown");
public static final String OS_VERSION_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.verUnknown"); public static final String OS_VERSION_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.verUnknown");
@ -80,13 +80,13 @@ public class PlatformUtil {
File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false); //NON-NLS File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false); //NON-NLS
File rootPath = coreFolder.getParentFile(); File rootPath = coreFolder.getParentFile();
String modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; String modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; //NON-NLS
File modulesPathF = new File(modulesPath); File modulesPathF = new File(modulesPath);
if (modulesPathF.exists() && modulesPathF.isDirectory()) { if (modulesPathF.exists() && modulesPathF.isDirectory()) {
return modulesPath; return modulesPath;
} else { } else {
rootPath = rootPath.getParentFile(); rootPath = rootPath.getParentFile();
modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; modulesPath = rootPath.getAbsolutePath() + File.separator + "modules"; //NON-NLS
modulesPathF = new File(modulesPath); modulesPathF = new File(modulesPath);
if (modulesPathF.exists() && modulesPathF.isDirectory()) { if (modulesPathF.exists() && modulesPathF.isDirectory()) {
return modulesPath; return modulesPath;
@ -104,7 +104,7 @@ public class PlatformUtil {
* not found * not found
*/ */
public static String getUserModulesPath() { public static String getUserModulesPath() {
return getUserDirectory().getAbsolutePath() + File.separator + "modules"; return getUserDirectory().getAbsolutePath() + File.separator + "modules"; //NON-NLS
} }
/** /**

View File

@ -36,7 +36,7 @@ public class UNCPathUtilities {
private static Map<String, String> drives; private static Map<String, String> drives;
private static final String MAPPED_DRIVES = "_mapped_drives.txt"; //NON-NLS private static final String MAPPED_DRIVES = "_mapped_drives.txt"; //NON-NLS
private static final String TEMP_FOLDER = "TEMP"; private static final String TEMP_FOLDER = "TEMP"; //NON-NLS
private static final String DATA_TRIGGER = "----------"; //NON-NLS private static final String DATA_TRIGGER = "----------"; //NON-NLS
private static final String OK_TXT = "OK"; //NON-NLS private static final String OK_TXT = "OK"; //NON-NLS
private static final String COLON = ":"; //NON-NLS private static final String COLON = ":"; //NON-NLS

View File

@ -32,6 +32,7 @@ import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory; import org.netbeans.api.progress.ProgressHandleFactory;
import org.opencv.core.Mat; import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture; import org.opencv.highgui.VideoCapture;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.corelibs.ScalrWrapper; import org.sleuthkit.autopsy.corelibs.ScalrWrapper;
import static org.sleuthkit.autopsy.coreutils.ImageUtils.isMediaThumbnailSupported; import static org.sleuthkit.autopsy.coreutils.ImageUtils.isMediaThumbnailSupported;
@ -44,24 +45,24 @@ import org.sleuthkit.datamodel.AbstractFile;
public class VideoUtils { public class VideoUtils {
private static final List<String> SUPPORTED_VIDEO_EXTENSIONS = private static final List<String> SUPPORTED_VIDEO_EXTENSIONS =
Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", //NON-NLS
"mpeg", "asf", "divx", "rm", "moov", "wmv", "vob", "dat", "mpeg", "asf", "divx", "rm", "moov", "wmv", "vob", "dat", //NON-NLS
"m1v", "m2v", "m4v", "mkv", "mpe", "yop", "vqa", "xmv", "m1v", "m2v", "m4v", "mkv", "mpe", "yop", "vqa", "xmv", //NON-NLS
"mve", "wtv", "webm", "vivo", "vc1", "seq", "thp", "san", "mve", "wtv", "webm", "vivo", "vc1", "seq", "thp", "san", //NON-NLS
"mjpg", "smk", "vmd", "sol", "cpk", "sdp", "sbg", "rtsp", "mjpg", "smk", "vmd", "sol", "cpk", "sdp", "sbg", "rtsp", //NON-NLS
"rpl", "rl2", "r3d", "mlp", "mjpeg", "hevc", "h265", "265", "rpl", "rl2", "r3d", "mlp", "mjpeg", "hevc", "h265", "265", //NON-NLS
"h264", "h263", "h261", "drc", "avs", "pva", "pmp", "ogg", "h264", "h263", "h261", "drc", "avs", "pva", "pmp", "ogg", //NON-NLS
"nut", "nuv", "nsv", "mxf", "mtv", "mvi", "mxg", "lxf", "nut", "nuv", "nsv", "mxf", "mtv", "mvi", "mxg", "lxf", //NON-NLS
"lvf", "ivf", "mve", "cin", "hnm", "gxf", "fli", "flc", "lvf", "ivf", "mve", "cin", "hnm", "gxf", "fli", "flc", //NON-NLS
"flx", "ffm", "wve", "uv2", "dxa", "dv", "cdxl", "cdg", "flx", "ffm", "wve", "uv2", "dxa", "dv", "cdxl", "cdg", //NON-NLS
"bfi", "jv", "bik", "vid", "vb", "son", "avs", "paf", "mm", "bfi", "jv", "bik", "vid", "vb", "son", "avs", "paf", "mm", //NON-NLS
"flm", "tmv", "4xm"); //NON-NLS "flm", "tmv", "4xm"); //NON-NLS
private static final SortedSet<String> SUPPORTED_VIDEO_MIME_TYPES = new TreeSet<>( private static final SortedSet<String> SUPPORTED_VIDEO_MIME_TYPES = new TreeSet<>(
Arrays.asList("application/x-shockwave-flash", "video/x-m4v", "video/x-flv", "video/quicktime", "video/avi", "video/msvideo", "video/x-msvideo", Arrays.asList("application/x-shockwave-flash", "video/x-m4v", "video/x-flv", "video/quicktime", "video/avi", "video/msvideo", "video/x-msvideo", //NON-NLS
"video/mp4", "video/x-ms-wmv", "video/mpeg", "video/asf")); //NON-NLS "video/mp4", "video/x-ms-wmv", "video/mpeg", "video/asf")); //NON-NLS
private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream"); private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("application/octet-stream"); //NON-NLS
public static List<String> getSupportedVideoExtensions() { public static List<String> getSupportedVideoExtensions() {
return SUPPORTED_VIDEO_EXTENSIONS; return SUPPORTED_VIDEO_EXTENSIONS;
@ -83,7 +84,7 @@ public class VideoUtils {
} }
public static File getTempVideoFile(AbstractFile file) { public static File getTempVideoFile(AbstractFile file) {
return Paths.get(Case.getCurrentCase().getTempDirectory(), "videos", file.getId() + "." + file.getNameExtension()).toFile(); return Paths.get(Case.getCurrentCase().getTempDirectory(), "videos", file.getId() + "." + file.getNameExtension()).toFile(); //NON-NLS
} }
public static boolean isVideoThumbnailSupported(AbstractFile file) { public static boolean isVideoThumbnailSupported(AbstractFile file) {
@ -96,7 +97,7 @@ public class VideoUtils {
try { try {
if (tempFile.exists() == false || tempFile.length() < file.getSize()) { if (tempFile.exists() == false || tempFile.length() < file.getSize()) {
com.google.common.io.Files.createParentDirs(tempFile); com.google.common.io.Files.createParentDirs(tempFile);
ProgressHandle progress = ProgressHandleFactory.createHandle("extracting temporary file " + file.getName()); ProgressHandle progress = ProgressHandleFactory.createHandle(NbBundle.getMessage(VideoUtils.class, "VideoUtils.genVideoThumb.progress.text", file.getName()));
progress.start(100); progress.start(100);
try { try {
ContentUtils.writeToFile(file, tempFile, progress, null, true); ContentUtils.writeToFile(file, tempFile, progress, null, true);

View File

@ -416,6 +416,6 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "BlackboardArtifact"; return "BlackboardArtifact"; //NON-NLS
} }
} }

View File

@ -110,6 +110,6 @@ public class BlackboardArtifactTagNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "BlackboardArtifactTag"; return "BlackboardArtifactTag"; //NON-NLS
} }
} }

View File

@ -124,6 +124,6 @@ class ContentTagNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "ContentTag"; return "ContentTag"; //NON-NLS
} }
} }

View File

@ -58,7 +58,7 @@ public class DataSourcesNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "DataSources"; return "DataSources"; //NON-NLS
} }
/* /*

View File

@ -149,7 +149,7 @@ public class DeletedContent implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "DeletedContent"; return "DeletedContent"; //NON-NLS
} }
} }
@ -282,7 +282,7 @@ public class DeletedContent implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "DeletedContentChildren"; return "DeletedContentChildren"; //NON-NLS
} }
// update the display name when new events are fired // update the display name when new events are fired

View File

@ -103,6 +103,6 @@ public class DirectoryNode extends AbstractFsContentNode<AbstractFile> {
@Override @Override
public String getItemType() { public String getItemType() {
return "Directory"; return "Directory"; //NON-NLS
} }
} }

View File

@ -193,7 +193,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "EmailExtractedRoot"; return "EmailExtractedRoot"; //NON-NLS
} }
} }
@ -348,7 +348,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "EmailExtractedAccount"; return "EmailExtractedAccount"; //NON-NLS
} }
} }
@ -439,7 +439,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "EmailExtractedFolder"; return "EmailExtractedFolder"; //NON-NLS
} }
} }

View File

@ -85,7 +85,7 @@ public class ExtractedContent implements AutopsyVisitableItem {
} }
static String getIconFilePath(int typeID) { static String getIconFilePath(int typeID) {
String filePath = "org/sleuthkit/autopsy/images/"; String filePath = "org/sleuthkit/autopsy/images/"; //NON-NLS
if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()) { if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()) {
return filePath + "bookmarks.png"; //NON-NLS return filePath + "bookmarks.png"; //NON-NLS
} else if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()) { } else if (typeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()) {
@ -185,7 +185,7 @@ public class ExtractedContent implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "ExtractedContentRoot"; return "ExtractedContentRoot"; //NON-NLS
} }
} }

View File

@ -186,6 +186,6 @@ public class FileNode extends AbstractFsContentNode<AbstractFile> {
@Override @Override
public String getItemType() { public String getItemType() {
return "File"; return "File"; //NON-NLS
} }
} }

View File

@ -146,7 +146,7 @@ public class FileSize implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "FileSizeRoot"; return "FileSizeRoot"; //NON-NLS
} }
} }
@ -288,7 +288,7 @@ public class FileSize implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "FileSize"; return "FileSize"; //NON-NLS
} }
// update the display name when new events are fired // update the display name when new events are fired

View File

@ -84,7 +84,7 @@ public class FileTypeNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "FileType"; return "FileType"; //NON-NLS
} }
// update the display name when new events are fired // update the display name when new events are fired

View File

@ -107,12 +107,12 @@ public class FileTypesNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
if(filter == null) if(filter == null)
return "FileTypes"; return "FileTypes"; //NON-NLS
if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_DOCUMENT_FILTER)) if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_DOCUMENT_FILTER))
return "FileTypesDoc"; return "FileTypesDoc"; //NON-NLS
if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_EXECUTABLE_FILTER)) if (filter.equals(FileTypeExtensionFilters.RootFilter.TSK_EXECUTABLE_FILTER))
return "FileTypesExe"; return "FileTypesExe"; //NON-NLS
return "FileTypes"; return "FileTypes"; //NON-NLS
} }
/** /**

View File

@ -171,7 +171,7 @@ public class HashsetHits implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "HashsetRoot"; return "HashsetRoot"; //NON-NLS
} }
} }
@ -329,7 +329,7 @@ public class HashsetHits implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "HashsetName"; return "HashsetName"; //NON-NLS
} }
} }

View File

@ -112,6 +112,6 @@ public class ImageNode extends AbstractContentNode<Image> {
@Override @Override
public String getItemType() { public String getItemType() {
return "Image"; return "Image"; //NON-NLS
} }
} }

View File

@ -164,7 +164,7 @@ public class InterestingHits implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "InterestingHitsRoot"; return "InterestingHitsRoot"; //NON-NLS
} }
} }
@ -315,7 +315,7 @@ public class InterestingHits implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "InterestingHitsSetName"; return "InterestingHitsSetName"; //NON-NLS
} }
} }

View File

@ -242,7 +242,7 @@ public class KeywordHits implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "KeywordRoot"; return "KeywordRoot"; //NON-NLS
} }
} }
@ -397,7 +397,7 @@ public class KeywordHits implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "KeywordList"; return "KeywordList"; //NON-NLS
} }
} }
@ -495,7 +495,7 @@ public class KeywordHits implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "KeywordTerm"; return "KeywordTerm"; //NON-NLS
} }
} }

View File

@ -40,7 +40,7 @@ public class LayoutFileNode extends AbstractAbstractFileNode<LayoutFile> {
@Override @Override
public String getItemType() { public String getItemType() {
return "LayoutFile"; return "LayoutFile"; //NON-NLS
} }
public static enum LayoutContentPropertyType { public static enum LayoutContentPropertyType {

View File

@ -118,6 +118,6 @@ public class LocalFileNode extends AbstractAbstractFileNode<AbstractFile> {
@Override @Override
public String getItemType() { public String getItemType() {
return "LocalFile"; return "LocalFile"; //NON-NLS
} }
} }

View File

@ -85,6 +85,6 @@ public class RecentFilesFilterNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "RecentFilesFilter"; return "RecentFilesFilter"; //NON-NLS
} }
} }

View File

@ -68,6 +68,6 @@ public class RecentFilesNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "RecentFiles"; return "RecentFiles"; //NON-NLS
} }
} }

View File

@ -91,7 +91,7 @@ public final class Reports implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "ReportsList"; return "ReportsList"; //NON-NLS
} }
} }
@ -216,7 +216,7 @@ public final class Reports implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "Reports"; return "Reports"; //NON-NLS
} }
private static class DeleteReportAction extends AbstractAction { private static class DeleteReportAction extends AbstractAction {

View File

@ -71,6 +71,6 @@ public class ResultsNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "Results"; return "Results"; //NON-NLS
} }
} }

View File

@ -111,7 +111,7 @@ public class Tags implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "TagsRoots"; return "TagsRoots"; //NON-NLS
} }
} }
@ -273,7 +273,7 @@ public class Tags implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "TagsName"; return "TagsName"; //NON-NLS
} }
} }
@ -373,7 +373,7 @@ public class Tags implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "TagsContentType"; return "TagsContentType"; //NON-NLS
} }
} }
@ -471,7 +471,7 @@ public class Tags implements AutopsyVisitableItem {
@Override @Override
public String getItemType() { public String getItemType() {
return "TagsBlackboardArtifact"; return "TagsBlackboardArtifact"; //NON-NLS
} }
} }

View File

@ -75,6 +75,6 @@ public class ViewsNode extends DisplayableItemNode {
@Override @Override
public String getItemType() { public String getItemType() {
return "Views"; return "Views"; //NON-NLS
} }
} }

View File

@ -151,6 +151,6 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode<VirtualDirect
@Override @Override
public String getItemType() { public String getItemType() {
return "VirtualDirectory"; return "VirtualDirectory"; //NON-NLS
} }
} }

View File

@ -192,6 +192,6 @@ public class VolumeNode extends AbstractContentNode<Volume> {
@Override @Override
public String getItemType() { public String getItemType() {
return "Volume"; return "Volume"; //NON-NLS
} }
} }

View File

@ -107,7 +107,7 @@ final class LocalEventPublisher {
try { try {
subscriber.propertyChange(event); subscriber.propertyChange(event);
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.SEVERE, "Exception thrown by subscriber", ex); logger.log(Level.SEVERE, "Exception thrown by subscriber", ex); //NON-NLS
} }
} }
} }

View File

@ -35,10 +35,10 @@ import org.openide.util.NbBundle;
@Immutable @Immutable
public final class MessageServiceConnectionInfo { public final class MessageServiceConnectionInfo {
private static final String MESSAGE_SERVICE_URI = "tcp://%s:%s?wireFormat.maxInactivityDuration=0"; private static final String MESSAGE_SERVICE_URI = "tcp://%s:%s?wireFormat.maxInactivityDuration=0"; //NON-NLS
private static final String CONNECTION_TIMED_OUT = "connection timed out"; private static final String CONNECTION_TIMED_OUT = "connection timed out"; //NON-NLS
private static final String CONNECTION_REFUSED = "connection refused"; private static final String CONNECTION_REFUSED = "connection refused"; //NON-NLS
private static final String PASSWORD_OR_USERNAME_BAD = "user name ["; private static final String PASSWORD_OR_USERNAME_BAD = "user name ["; //NON-NLS
private static final int IS_REACHABLE_TIMEOUT_MS = 1000; private static final int IS_REACHABLE_TIMEOUT_MS = 1000;
private final String userName; private final String userName;
private final String password; private final String password;

View File

@ -43,7 +43,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
final class RemoteEventPublisher { final class RemoteEventPublisher {
private static final Logger logger = Logger.getLogger(RemoteEventPublisher.class.getName()); private static final Logger logger = Logger.getLogger(RemoteEventPublisher.class.getName());
private static final String ALL_MESSAGE_SELECTOR = "All"; private static final String ALL_MESSAGE_SELECTOR = "All"; //NON-NLS
private final LocalEventPublisher localPublisher; private final LocalEventPublisher localPublisher;
private final Connection connection; private final Connection connection;
private final Session session; private final Session session;
@ -76,11 +76,11 @@ final class RemoteEventPublisher {
Topic topic = session.createTopic(eventChannelName); Topic topic = session.createTopic(eventChannelName);
producer = session.createProducer(topic); producer = session.createProducer(topic);
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
consumer = session.createConsumer(topic, "events = '" + ALL_MESSAGE_SELECTOR + "'", true); consumer = session.createConsumer(topic, "events = '" + ALL_MESSAGE_SELECTOR + "'", true); //NON-NLS
receiver = new MessageReceiver(); receiver = new MessageReceiver();
consumer.setMessageListener(receiver); consumer.setMessageListener(receiver);
} catch (URISyntaxException | JMSException ex) { } catch (URISyntaxException | JMSException ex) {
logger.log(Level.SEVERE, "Failed to connect to event channel", ex); logger.log(Level.SEVERE, "Failed to connect to event channel", ex); //NON-NLS
try { try {
stop(); stop();
} catch (JMSException ignored) { } catch (JMSException ignored) {
@ -121,7 +121,7 @@ final class RemoteEventPublisher {
*/ */
synchronized void publish(AutopsyEvent event) throws JMSException { synchronized void publish(AutopsyEvent event) throws JMSException {
ObjectMessage message = session.createObjectMessage(); ObjectMessage message = session.createObjectMessage();
message.setStringProperty("events", ALL_MESSAGE_SELECTOR); message.setStringProperty("events", ALL_MESSAGE_SELECTOR); //NON-NLS
message.setObject(event); message.setObject(event);
producer.send(message); producer.send(message);
} }
@ -151,7 +151,7 @@ final class RemoteEventPublisher {
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.SEVERE, "Error receiving message", ex); logger.log(Level.SEVERE, "Error receiving message", ex); //NON-NLS
} }
} }
} }

View File

@ -148,19 +148,19 @@ public final class ExternalResultsImporter {
if (attributeType == null) { if (attributeType == null) {
switch (attributeData.getValueType()) { switch (attributeData.getValueType()) {
case "text": //NON-NLS case "text": //NON-NLS
attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("String"), attributeData.getType()); attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("String"), attributeData.getType()); //NON-NLS
break; break;
case "int32": //NON-NLS case "int32": //NON-NLS
attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Integer"), attributeData.getType()); attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Integer"), attributeData.getType()); //NON-NLS
break; break;
case "int64": //NON-NLS case "int64": //NON-NLS
attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Long"), attributeData.getType()); attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Long"), attributeData.getType()); //NON-NLS
break; break;
case "double": //NON-NLS case "double": //NON-NLS
attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Double"), attributeData.getType()); attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("Double"), attributeData.getType()); //NON-NLS
break; break;
case "datetime": case "datetime": //NON-NLS
attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("DateTime"), attributeData.getType()); attributeType = caseDb.addArtifactAttributeType(attributeData.getType(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromLabel("DateTime"), attributeData.getType()); //NON-NLS
} }
} }
@ -180,7 +180,7 @@ public final class ExternalResultsImporter {
double doubleValue = Double.parseDouble(attributeData.getValue()); double doubleValue = Double.parseDouble(attributeData.getValue());
attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), doubleValue)); attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), doubleValue));
break; break;
case "datetime": case "datetime": //NON-NLS
long dateTimeValue = Long.parseLong(attributeData.getValue()); long dateTimeValue = Long.parseLong(attributeData.getValue());
attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), dateTimeValue)); attributes.add(new BlackboardAttribute(attributeType, attributeData.getSourceModule(), dateTimeValue));
break; break;

View File

@ -101,7 +101,7 @@ public final class ExternalResultsXMLParser implements ExternalResultsParser {
VALUE_TYPE_INT32("int32"), //NON-NLS VALUE_TYPE_INT32("int32"), //NON-NLS
VALUE_TYPE_INT64("int64"), //NON-NLS VALUE_TYPE_INT64("int64"), //NON-NLS
VALUE_TYPE_DOUBLE("double"), //NON-NLS VALUE_TYPE_DOUBLE("double"), //NON-NLS
VALUE_TYPE_DATETIME("datetime"); VALUE_TYPE_DATETIME("datetime"); //NON-NLS
private final String text; private final String text;
private AttributeValues(final String text) { private AttributeValues(final String text) {

View File

@ -109,3 +109,11 @@ IngestManager.cancellingIngest.msgDlg.text=Cancelling all currently running inge
IngestManager.serviceIsDown.msgDlg.text={0} is down IngestManager.serviceIsDown.msgDlg.text={0} is down
RunIngestSubMenu.menuItem.empty=-Empty- RunIngestSubMenu.menuItem.empty=-Empty-
RunIngestModulesMenu.getName.text=Run Ingest Modules RunIngestModulesMenu.getName.text=Run Ingest Modules
DataSourceIngestPipeline.moduleError.title.text={0} Error
FileIngestPipeline.moduleError.title.text={0} Error
IngestJob.cancelReason.notCancelled.text=Not cancelled
IngestJob.cancelReason.cancelledByUser.text=Cancelled by user
IngestJob.cancelReason.ingestModStartFail.text=Ingest modules startup failed
IngestJob.cancelReason.outOfDiskSpace.text=Out of disk space
IngestJob.cancelReason.servicesDown.text=Not cancelled
IngestJob.cancelReason.caseClosed.text=Case closed

View File

@ -360,10 +360,10 @@ final class DataSourceIngestJob {
List<IngestModuleError> errors = startUpIngestPipelines(); List<IngestModuleError> errors = startUpIngestPipelines();
if (errors.isEmpty()) { if (errors.isEmpty()) {
if (this.hasFirstStageDataSourceIngestPipeline() || this.hasFileIngestPipeline()) { if (this.hasFirstStageDataSourceIngestPipeline() || this.hasFileIngestPipeline()) {
logger.log(Level.INFO, "Starting first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Starting first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS
this.startFirstStage(); this.startFirstStage();
} else if (this.hasSecondStageDataSourceIngestPipeline()) { } else if (this.hasSecondStageDataSourceIngestPipeline()) {
logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1}), no first stage configured", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1}), no first stage configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS
this.startSecondStage(); this.startSecondStage();
} }
} }
@ -450,13 +450,13 @@ final class DataSourceIngestJob {
* Schedule the first stage tasks. * Schedule the first stage tasks.
*/ */
if (this.hasFirstStageDataSourceIngestPipeline() && this.hasFileIngestPipeline()) { if (this.hasFirstStageDataSourceIngestPipeline() && this.hasFileIngestPipeline()) {
logger.log(Level.INFO, "Scheduling first stage data source and file level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Scheduling first stage data source and file level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS
DataSourceIngestJob.taskScheduler.scheduleIngestTasks(this); DataSourceIngestJob.taskScheduler.scheduleIngestTasks(this);
} else if (this.hasFirstStageDataSourceIngestPipeline()) { } else if (this.hasFirstStageDataSourceIngestPipeline()) {
logger.log(Level.INFO, "Scheduling first stage data source level analysis tasks for {0} (jobId={1}), no file level analysis configured", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Scheduling first stage data source level analysis tasks for {0} (jobId={1}), no file level analysis configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS
DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this); DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this);
} else { } else {
logger.log(Level.INFO, "Scheduling file level analysis tasks for {0} (jobId={1}), no first stage data source level analysis configured", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Scheduling file level analysis tasks for {0} (jobId={1}), no first stage data source level analysis configured", new Object[]{dataSource.getName(), this.id}); //NON-NLS
DataSourceIngestJob.taskScheduler.scheduleFileIngestTasks(this); DataSourceIngestJob.taskScheduler.scheduleFileIngestTasks(this);
/** /**
@ -475,7 +475,7 @@ final class DataSourceIngestJob {
* Starts the second stage of this ingest job. * Starts the second stage of this ingest job.
*/ */
private void startSecondStage() { private void startSecondStage() {
logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Starting second stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS
this.stage = DataSourceIngestJob.Stages.SECOND; this.stage = DataSourceIngestJob.Stages.SECOND;
if (this.doUI) { if (this.doUI) {
this.startDataSourceIngestProgressBar(); this.startDataSourceIngestProgressBar();
@ -483,7 +483,7 @@ final class DataSourceIngestJob {
synchronized (this.dataSourceIngestPipelineLock) { synchronized (this.dataSourceIngestPipelineLock) {
this.currentDataSourceIngestPipeline = this.secondStageDataSourceIngestPipeline; this.currentDataSourceIngestPipeline = this.secondStageDataSourceIngestPipeline;
} }
logger.log(Level.INFO, "Scheduling second stage data source level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Scheduling second stage data source level analysis tasks for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS
DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this); DataSourceIngestJob.taskScheduler.scheduleDataSourceIngestTask(this);
} }
@ -572,7 +572,7 @@ final class DataSourceIngestJob {
* job and starts the second stage, if appropriate. * job and starts the second stage, if appropriate.
*/ */
private void finishFirstStage() { private void finishFirstStage() {
logger.log(Level.INFO, "Finished first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Finished first stage analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS
// Shut down the file ingest pipelines. Note that no shut down is // Shut down the file ingest pipelines. Note that no shut down is
// required for the data source ingest pipeline because data source // required for the data source ingest pipeline because data source
@ -622,7 +622,7 @@ final class DataSourceIngestJob {
* Shuts down the ingest pipelines and progress bars for this job. * Shuts down the ingest pipelines and progress bars for this job.
*/ */
private void finish() { private void finish() {
logger.log(Level.INFO, "Finished analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); logger.log(Level.INFO, "Finished analysis for {0} (jobId={1})", new Object[]{dataSource.getName(), this.id}); //NON-NLS
this.stage = DataSourceIngestJob.Stages.FINALIZATION; this.stage = DataSourceIngestJob.Stages.FINALIZATION;
if (this.doUI) { if (this.doUI) {

View File

@ -109,9 +109,9 @@ final class DataSourceIngestPipeline {
this.job.updateDataSourceIngestProgressBarDisplayName(displayName); this.job.updateDataSourceIngestProgressBarDisplayName(displayName);
this.job.switchDataSourceIngestProgressBarToIndeterminate(); this.job.switchDataSourceIngestProgressBarToIndeterminate();
DataSourceIngestPipeline.ingestManager.setIngestTaskProgress(task, module.getDisplayName()); DataSourceIngestPipeline.ingestManager.setIngestTaskProgress(task, module.getDisplayName());
logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) starting", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) starting", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); //NON-NLS
module.process(dataSource, new DataSourceIngestModuleProgress(this.job)); module.process(dataSource, new DataSourceIngestModuleProgress(this.job));
logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) finished", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) finished", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); //NON-NLS
} catch (Throwable ex) { // Catch-all exception firewall } catch (Throwable ex) { // Catch-all exception firewall
errors.add(new IngestModuleError(module.getDisplayName(), ex)); errors.add(new IngestModuleError(module.getDisplayName(), ex));
String msg = ex.getMessage(); String msg = ex.getMessage();
@ -119,7 +119,7 @@ final class DataSourceIngestPipeline {
if (msg == null) { if (msg == null) {
msg = ex.toString(); msg = ex.toString();
} }
MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "DataSourceIngestPipeline.moduleError.title.text", module.getDisplayName()), msg);
} }
if (this.job.isCancelled()) { if (this.job.isCancelled()) {
break; break;

View File

@ -21,6 +21,8 @@ package org.sleuthkit.autopsy.ingest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
@ -128,7 +130,7 @@ final class FileIngestPipeline {
if (msg == null) { if (msg == null) {
msg = ex.toString(); msg = ex.toString();
} }
MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "FileIngestPipeline.moduleError.title.text", module.getDisplayName()), msg);
} }
if (this.job.isCancelled()) { if (this.job.isCancelled()) {
break; break;
@ -161,7 +163,7 @@ final class FileIngestPipeline {
if (msg == null) { if (msg == null) {
msg = ex.toString(); msg = ex.toString();
} }
MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "FileIngestPipeline.moduleError.title.text", module.getDisplayName()), msg);
} }
} }
} }

View File

@ -27,6 +27,8 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import org.openide.util.NbBundle;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
/** /**
@ -42,12 +44,12 @@ public final class IngestJob {
*/ */
public enum CancellationReason { public enum CancellationReason {
NOT_CANCELLED("Not cancelled"), NOT_CANCELLED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.notCancelled.text")),
USER_CANCELLED("Cancelled by user"), USER_CANCELLED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.cancelledByUser.text")),
INGEST_MODULES_STARTUP_FAILED("Ingest modules startup failed"), INGEST_MODULES_STARTUP_FAILED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.ingestModStartFail.text")),
OUT_OF_DISK_SPACE("Out of disk space"), OUT_OF_DISK_SPACE(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.outOfDiskSpace.text")),
SERVICES_DOWN("Not cancelled"), SERVICES_DOWN(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.servicesDown.text")),
CASE_CLOSED("Case closed"); CASE_CLOSED(NbBundle.getMessage(IngestJob.class, "IngestJob.cancelReason.caseClosed.text"));
private final String displayName; private final String displayName;
@ -128,7 +130,7 @@ public final class IngestJob {
synchronized List<IngestModuleError> start() { synchronized List<IngestModuleError> start() {
List<IngestModuleError> errors = new ArrayList<>(); List<IngestModuleError> errors = new ArrayList<>();
if (started) { if (started) {
errors.add(new IngestModuleError("IngestJob", new IllegalStateException("Job already started"))); errors.add(new IngestModuleError("IngestJob", new IllegalStateException("Job already started"))); //NON-NLS
return errors; return errors;
} }
started = true; started = true;

View File

@ -55,7 +55,7 @@ public class IngestJobSettings {
private final String executionContext; private final String executionContext;
private final IngestType ingestType; private final IngestType ingestType;
private String moduleSettingsFolderPath; private String moduleSettingsFolderPath;
private static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1); private static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1); //NON-NLS
private final List<IngestModuleTemplate> moduleTemplates; private final List<IngestModuleTemplate> moduleTemplates;
private boolean processUnallocatedSpace; private boolean processUnallocatedSpace;
private final List<String> warnings; private final List<String> warnings;
@ -337,7 +337,7 @@ public class IngestJobSettings {
moduleNames.add("E01 Verifier"); //NON-NLS moduleNames.add("E01 Verifier"); //NON-NLS
break; break;
case "Archive Extractor": //NON-NLS case "Archive Extractor": //NON-NLS
moduleNames.add("Embedded File Extractor"); moduleNames.add("Embedded File Extractor"); //NON-NLS
break; break;
default: default:
moduleNames.add(name); moduleNames.add(name);
@ -454,7 +454,7 @@ public class IngestJobSettings {
if (isPythonModuleSettingsFile(moduleSettingsFilePath)) { if (isPythonModuleSettingsFile(moduleSettingsFilePath)) {
// compiled python modules have variable instance number as a part of their file name. // compiled python modules have variable instance number as a part of their file name.
// This block of code gets rid of that variable instance number and helps maitains constant module name over multiple runs. // This block of code gets rid of that variable instance number and helps maitains constant module name over multiple runs.
moduleSettingsFilePath = moduleSettingsFilePath.replaceAll("[$][\\d]+.settings$", "\\$.settings"); moduleSettingsFilePath = moduleSettingsFilePath.replaceAll("[$][\\d]+.settings$", "\\$.settings"); //NON-NLS NON-NLS
} }
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(moduleSettingsFilePath))) { try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(moduleSettingsFilePath))) {
out.writeObject(settings); out.writeObject(settings);

View File

@ -106,8 +106,8 @@ public class IngestManager {
private int numberOfFileIngestThreads; private int numberOfFileIngestThreads;
private final ExecutorService fileIngestThreadPool; private final ExecutorService fileIngestThreadPool;
private static final String JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; private static final String JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; //NON-NLS
private static final String MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; private static final String MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; //NON-NLS
private static final Set<String> jobEventNames = Stream.of(IngestJobEvent.values()) private static final Set<String> jobEventNames = Stream.of(IngestJobEvent.values())
.map(IngestJobEvent::toString) .map(IngestJobEvent::toString)
.collect(Collectors.toSet()); .collect(Collectors.toSet());

View File

@ -64,7 +64,7 @@ public final class IngestMonitor {
MONITOR_LOGGER.setUseParentHandlers(false); MONITOR_LOGGER.setUseParentHandlers(false);
MONITOR_LOGGER.addHandler(monitorLogHandler); MONITOR_LOGGER.addHandler(monitorLogHandler);
} catch (IOException | SecurityException ex) { } catch (IOException | SecurityException ex) {
logger.log(Level.SEVERE, "Failed to create memory usage logger", ex); logger.log(Level.SEVERE, "Failed to create memory usage logger", ex); //NON-NLS
} }
} }

View File

@ -52,7 +52,7 @@ final class RunIngestSubMenu extends JMenuItem implements DynamicMenuContent {
// No open Cases, create a disabled empty menu // No open Cases, create a disabled empty menu
return getEmpty(); return getEmpty();
} catch (TskCoreException e) { } catch (TskCoreException e) {
System.out.println("Exception getting images: " + e.getMessage()); System.out.println("Exception getting images: " + e.getMessage()); //NON-NLS
} }
JComponent[] comps = new JComponent[images.size()]; JComponent[] comps = new JComponent[images.size()];

View File

@ -99,7 +99,7 @@ public final class BlackboardPostEvent extends AutopsyEvent implements Serializa
eventData = new ModuleDataEvent(data.moduleName, data.artifactTypeId, !artifacts.isEmpty() ? artifacts : null); eventData = new ModuleDataEvent(data.moduleName, data.artifactTypeId, !artifacts.isEmpty() ? artifacts : null);
return eventData; return eventData;
} catch (IllegalStateException | TskCoreException ex) { } catch (IllegalStateException | TskCoreException ex) {
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
return null; return null;
} }
} }

View File

@ -89,7 +89,7 @@ public final class ContentChangedEvent extends AutopsyEvent implements Serializa
eventData = new ModuleContentEvent(data.moduleName, content); eventData = new ModuleContentEvent(data.moduleName, content);
return eventData; return eventData;
} catch (IllegalStateException | TskCoreException ex) { } catch (IllegalStateException | TskCoreException ex) {
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
return null; return null;
} }
} }

View File

@ -99,7 +99,7 @@ public abstract class DataSourceAnalysisEvent extends AutopsyEvent implements Se
dataSource = Case.getCurrentCase().getSleuthkitCase().getContentById(id); dataSource = Case.getCurrentCase().getSleuthkitCase().getContentById(id);
return dataSource; return dataSource;
} catch (IllegalStateException | TskCoreException ex) { } catch (IllegalStateException | TskCoreException ex) {
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
return null; return null;
} }
} }

View File

@ -79,7 +79,7 @@ public final class FileAnalyzedEvent extends AutopsyEvent implements Serializabl
file = Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(id); file = Case.getCurrentCase().getSleuthkitCase().getAbstractFileById(id);
return file; return file;
} catch (IllegalStateException | TskCoreException ex) { } catch (IllegalStateException | TskCoreException ex) {
logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); logger.log(Level.SEVERE, "Error doing lazy load for remote event", ex); //NON-NLS
return null; return null;
} }
} }

View File

@ -58,7 +58,7 @@ class CacheLocationAnalyzer {
blackboard = Case.getCurrentCase().getServices().getBlackboard(); blackboard = Case.getCurrentCase().getServices().getBlackboard();
try { try {
List<AbstractFile> abstractFiles = fileManager.findFiles(dataSource, "cache.cell"); //NON-NLS List<AbstractFile> abstractFiles = fileManager.findFiles(dataSource, "cache.cell"); //NON-NLS
abstractFiles.addAll(fileManager.findFiles(dataSource, "cache.wifi")); abstractFiles.addAll(fileManager.findFiles(dataSource, "cache.wifi")); //NON-NLS
for (AbstractFile abstractFile : abstractFiles) { for (AbstractFile abstractFile : abstractFiles) {
try { try {

View File

@ -38,4 +38,6 @@ EmbeddedFileExtractorIngestModule.ImageExtractor.xlsxContainer.init.err=Xlsx con
EmbeddedFileExtractorIngestModule.ImageExtractor.extractImage.addToDB.exception.msg=Unable to add the derived files to the database. EmbeddedFileExtractorIngestModule.ImageExtractor.extractImage.addToDB.exception.msg=Unable to add the derived files to the database.
EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0} EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0}
EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0} EmbeddedFileExtractorIngestModule.ImageExtractor.getOutputFolderPath.exception.msg=Could not get path for image extraction from Abstract File: {0}
EmbeddedFileExtractorIngestModule.ArchiveExtractor.UnpackStream.write.noSpace.msg=Unable to write content to disk. Not enough space. EmbeddedFileExtractorIngestModule.ArchiveExtractor.UnpackStream.write.noSpace.msg=Unable to write content to disk. Not enough space.
SevenZipContentReadStream.seek.exception.invalidOrigin=Invalid origin {0}
SevenZipContentReadStream.read.exception.errReadStream=Error reading stream

View File

@ -9,23 +9,3 @@ OpenIDE-Module-Name=7Zip
OpenIDE-Module-Short-Description=7Zip\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb OpenIDE-Module-Short-Description=7Zip\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb
SevenZipContentReadStream.seek.exception.invalidOrigin=\u7121\u52b9\u306a\u30b7\u30fc\u30af\u30aa\u30ea\u30b8\u30f3\uff1a {0} SevenZipContentReadStream.seek.exception.invalidOrigin=\u7121\u52b9\u306a\u30b7\u30fc\u30af\u30aa\u30ea\u30b8\u30f3\uff1a {0}
SevenZipContentReadStream.read.exception.errReadStream=\u30b3\u30f3\u30c6\u30f3\u30c4\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u8aad\u307f\u53d6\u308a\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 SevenZipContentReadStream.read.exception.errReadStream=\u30b3\u30f3\u30c6\u30f3\u30c4\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u8aad\u307f\u53d6\u308a\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
SevenZipIngestModule.moduleName=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a8\u30af\u30b9\u30c8\u30e9\u30af\u30bf\u30fc
SevenZipIngestModule.moduleDesc.text=\u30a2\u30fc\u30ab\u30a4\u30d6\u30d5\u30a1\u30a4\u30eb(zip, rar, arj, 7z, gzip, bzip2, tar)\u3092\u62bd\u51fa\u3057\u3001\u73fe\u5728\u306e\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u306b\u30ea\u30b9\u30b1\u3057\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30c4\u30ea\u30fc\u306b\u65b0\u898f\u30d5\u30a1\u30a4\u30eb\u3092\u6295\u5165\u3057\u307e\u3059\u3002
SevenZipIngestModule.encryptionFileLevel=\u30d5\u30a1\u30a4\u30eb\u30ec\u30d9\u30eb\u6697\u53f7\u5316
SevenZipIngestModule.encryptionFull=\u5168\u4f53\u6697\u53f7\u5316
SevenZipIngestModule.init.errInitModule.msg={0}\u306e\u521d\u671f\u5316\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
SevenZipIngestModule.init.errInitModule.details=\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\: {0}\: {1}\u306e\u521d\u671f\u5316\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
SevenZipIngestModule.init.errCantInitLib=7-Zip\u30e9\u30a4\u30d6\u30e9\u30ea\: {0}\u3092\u521d\u671f\u5316\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f
SevenZipIngestModule.isZipBombCheck.warnMsg=Zip\u7206\u5f3e\u306e\u53ef\u80fd\u6027\u304c\u3042\u308b\u3082\u306e\u304c\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}, item\: {1}\u306b\u691c\u51fa\u3055\u308c\u307e\u3057\u305f
SevenZipIngestModule.isZipBombCheck.warnDetails=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306e\u5727\u7e2e\u7387\u306f{0}\u3001\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306e\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002{1}
SevenZipIngestModule.unpack.warnMsg.zipBomb=Zip\u7206\u5f3e\u306e\u53ef\u80fd\u6027\u304c\u3042\u308b\u3082\u306e\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\uff1a {0}
SevenZipIngestModule.unpack.warnDetails.zipBomb=\u30a2\u30fc\u30ab\u30a4\u30d6\u306f {0}\u30ec\u30d9\u30eb\u306e\u6df1\u3055\u3067\u3059\u3001\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3068\u305d\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u51e6\u7406\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059 {1}
SevenZipIngestModule.unpack.unknownPath.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}\u306b\u4e0d\u660e\u306e\u30a2\u30a4\u30c6\u30e0\u30d1\u30b9\u304c\u5b58\u5728\u3057\u307e\u3059\u3001{1}\u3092\u4f7f\u7528\u3057\u307e\u3059
SevenZipIngestModule.unpack.notEnoughDiskSpace.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\: {0}, {1}\u3092\u89e3\u51cd\u3059\u308b\u306e\u306b\u5341\u5206\u306a\u30c7\u30a3\u30b9\u30af\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093
SevenZipIngestModule.unpack.notEnoughDiskSpace.details=\u30a2\u30fc\u30ab\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306f\u89e3\u51cd\u3059\u308b\u306e\u306b\u5927\u304d\u3059\u304e\u307e\u3059\u3001\u3053\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u89e3\u51cd\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u307e\u3059\u3002
SevenZipIngestModule.unpack.errUnpacking.msg={0}\u89e3\u51cd\u30a8\u30e9\u30fc
SevenZipIngestModule.unpack.errUnpacking.details={0}. {1}\u306e\u89e3\u51cd\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
SevenZipIngestModule.unpack.encrFileDetected.msg=\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u6697\u53f7\u5316\u30d5\u30a1\u30a4\u30eb\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002
SevenZipIngestModule.unpack.encrFileDetected.details=\u30a2\u30fc\u30ab\u30a4\u30d6\: {0}\u306e\u4e00\u90e8\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u6697\u53f7\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002{1}\u30a8\u30af\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u306f\u3053\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u304b\u3089\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
SevenZipIngestModule.UnpackStream.write.exception.msg=\u89e3\u51cd\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e0b\u8a18\u3078\u306e\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\: {0}
SevenZipIngestModule.UnpackedTree.exception.msg=\u6d3e\u751f\u30d5\u30a1\u30a4\u30eb\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\:{0}\u306b\u8ffd\u52a0\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f

View File

@ -57,7 +57,7 @@ class ImageExtractor {
private static final Logger logger = Logger.getLogger(ImageExtractor.class.getName()); private static final Logger logger = Logger.getLogger(ImageExtractor.class.getName());
private final IngestJobContext context; private final IngestJobContext context;
private String parentFileName; private String parentFileName;
private final String UNKNOWN_NAME_PREFIX = "image_"; private final String UNKNOWN_NAME_PREFIX = "image_"; //NON-NLS
private final FileTypeDetector fileTypeDetector; private final FileTypeDetector fileTypeDetector;
private String moduleDirRelative; private String moduleDirRelative;
@ -68,12 +68,12 @@ class ImageExtractor {
*/ */
enum SupportedImageExtractionFormats { enum SupportedImageExtractionFormats {
DOC("application/msword"), DOC("application/msword"), //NON-NLS
DOCX("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), DOCX("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), //NON-NLS
PPT("application/vnd.ms-powerpoint"), PPT("application/vnd.ms-powerpoint"), //NON-NLS
PPTX("application/vnd.openxmlformats-officedocument.presentationml.presentation"), PPTX("application/vnd.openxmlformats-officedocument.presentationml.presentation"), //NON-NLS
XLS("application/vnd.ms-excel"), XLS("application/vnd.ms-excel"), //NON-NLS
XLSX("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); XLSX("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); //NON-NLS
private final String mimeType; private final String mimeType;
@ -266,7 +266,7 @@ class ImageExtractor {
outputFolderPath = getOutputFolderPath(this.parentFileName); outputFolderPath = getOutputFolderPath(this.parentFileName);
} }
if (outputFolderPath == null) { if (outputFolderPath == null) {
logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS
return null; return null;
} }
listOfExtractedImages = new ArrayList<>(); listOfExtractedImages = new ArrayList<>();
@ -309,7 +309,7 @@ class ImageExtractor {
outputFolderPath = getOutputFolderPath(this.parentFileName); outputFolderPath = getOutputFolderPath(this.parentFileName);
} }
if (outputFolderPath == null) { if (outputFolderPath == null) {
logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS
return null; return null;
} }
@ -379,7 +379,7 @@ class ImageExtractor {
outputFolderPath = getOutputFolderPath(this.parentFileName); outputFolderPath = getOutputFolderPath(this.parentFileName);
} }
if (outputFolderPath == null) { if (outputFolderPath == null) {
logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS
return null; return null;
} }
@ -428,7 +428,7 @@ class ImageExtractor {
outputFolderPath = getOutputFolderPath(this.parentFileName); outputFolderPath = getOutputFolderPath(this.parentFileName);
} }
if (outputFolderPath == null) { if (outputFolderPath == null) {
logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS
return null; return null;
} }
@ -473,7 +473,7 @@ class ImageExtractor {
outputFolderPath = getOutputFolderPath(this.parentFileName); outputFolderPath = getOutputFolderPath(this.parentFileName);
} }
if (outputFolderPath == null) { if (outputFolderPath == null) {
logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); logger.log(Level.WARNING, NbBundle.getMessage(this.getClass(), "EmbeddedFileExtractorIngestModule.ImageExtractor.extractImageFrom.outputPath.exception.msg", af.getName())); //NON-NLS
return null; return null;
} }

View File

@ -99,13 +99,13 @@ class SevenZipExtractor {
*/ */
private enum SupportedArchiveExtractionFormats { private enum SupportedArchiveExtractionFormats {
ZIP("application/zip"), ZIP("application/zip"), //NON-NLS
SEVENZ("application/x-7z-compressed"), SEVENZ("application/x-7z-compressed"), //NON-NLS
GZIP("application/gzip"), GZIP("application/gzip"), //NON-NLS
XGZIP("application/x-gzip"), XGZIP("application/x-gzip"), //NON-NLS
XBZIP2("application/x-bzip2"), XBZIP2("application/x-bzip2"), //NON-NLS
XTAR("application/x-tar"), XTAR("application/x-tar"), //NON-NLS
XGTAR("application/x-gtar"); XGTAR("application/x-gtar"); //NON-NLS
private final String mimeType; private final String mimeType;

View File

@ -294,3 +294,4 @@ SolrConnectionCheck.HostnameOrPort=Invalid hostname and/or port number.
SolrConnectionCheck.Hostname=Invalid hostname. SolrConnectionCheck.Hostname=Invalid hostname.
SolrConnectionCheck.Port=Invalid port number. SolrConnectionCheck.Port=Invalid port number.
SolrConnectionCheck.MissingHostname=Missing hostname. SolrConnectionCheck.MissingHostname=Missing hostname.
RawText.getText.error.msg=Error getting text

View File

@ -119,7 +119,7 @@ class DropdownListSearchPanel extends KeywordSearchPanel {
@Override @Override
public void propertyChange(PropertyChangeEvent evt) { public void propertyChange(PropertyChangeEvent evt) {
Object source = evt.getSource(); Object source = evt.getSource();
if (source instanceof String && ((String) source).equals("LOCAL")) { if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS
EventQueue.invokeLater(new Runnable() { EventQueue.invokeLater(new Runnable() {
@Override @Override
public void run() { public void run() {

View File

@ -154,7 +154,7 @@ public class DropdownSingleTermSearchPanel extends KeywordSearchPanel {
org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.selectAllMenuItem.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.selectAllMenuItem.text")); // NOI18N
rightClickMenu.add(selectAllMenuItem); rightClickMenu.add(selectAllMenuItem);
keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N NON-NLS
keywordTextField.setText(org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.keywordTextField.text")); // NOI18N keywordTextField.setText(org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.keywordTextField.text")); // NOI18N
keywordTextField.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(192, 192, 192), 1, true)); keywordTextField.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(192, 192, 192), 1, true));
keywordTextField.setMinimumSize(new java.awt.Dimension(2, 25)); keywordTextField.setMinimumSize(new java.awt.Dimension(2, 25));
@ -170,7 +170,7 @@ public class DropdownSingleTermSearchPanel extends KeywordSearchPanel {
} }
}); });
searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N NON-NLS
org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.searchButton.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DropdownSingleTermSearchPanel.class, "DropdownSearchPanel.searchButton.text")); // NOI18N
searchButton.addActionListener(new java.awt.event.ActionListener() { searchButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {

View File

@ -129,7 +129,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis
@Override @Override
public void propertyChange(PropertyChangeEvent evt) { public void propertyChange(PropertyChangeEvent evt) {
Object source = evt.getSource(); Object source = evt.getSource();
if (source instanceof String && ((String) source).equals("LOCAL")) { if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS
EventQueue.invokeLater(new Runnable() { EventQueue.invokeLater(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -294,13 +294,13 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis
listOptionsLabel.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.listOptionsLabel.text")); // NOI18N listOptionsLabel.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.listOptionsLabel.text")); // NOI18N
deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N NON-NLS
deleteListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.deleteListButton.text")); // NOI18N deleteListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.deleteListButton.text")); // NOI18N
saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N NON-NLS
saveListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.saveListButton.text")); // NOI18N saveListButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.saveListButton.text")); // NOI18N
exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N NON-NLS
exportButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.exportButton.text")); // NOI18N exportButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.exportButton.text")); // NOI18N
exportButton.addActionListener(new java.awt.event.ActionListener() { exportButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {

View File

@ -75,7 +75,7 @@ public class KeywordSearch {
//do not forward to the parent autopsy logger //do not forward to the parent autopsy logger
TIKA_LOGGER.setUseParentHandlers(false); TIKA_LOGGER.setUseParentHandlers(false);
} catch (IOException | SecurityException ex) { } catch (IOException | SecurityException ex) {
logger.log(Level.SEVERE, "Error setting up tika logging", ex); logger.log(Level.SEVERE, "Error setting up tika logging", ex); //NON-NLS
} }
} }
@ -125,7 +125,7 @@ public class KeywordSearch {
server.closeCore(); server.closeCore();
} catch (Exception ex) { } catch (Exception ex) {
String caseName = closedCase.getName(); String caseName = closedCase.getName();
logger.log(Level.SEVERE, String.format("Failed to close core for %s", caseName), ex); logger.log(Level.SEVERE, String.format("Failed to close core for %s", caseName), ex); //NON-NLS
MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.closeCore.notification.msg"), ex.getMessage()); MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.closeCore.notification.msg"), ex.getMessage());
} }
} }
@ -135,7 +135,7 @@ public class KeywordSearch {
server.openCoreForCase(openedCase); server.openCoreForCase(openedCase);
} catch (Exception ex) { } catch (Exception ex) {
String caseName = openedCase.getName(); String caseName = openedCase.getName();
logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", caseName), ex); logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", caseName), ex); //NON-NLS
MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.openCore.notification.msg"), ex.getMessage()); MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.openCore.notification.msg"), ex.getMessage());
} }
} }

View File

@ -156,7 +156,7 @@ class RawText implements IndexedText {
} catch (SolrServerException | NoOpenCoreException ex) { } catch (SolrServerException | NoOpenCoreException ex) {
logger.log(Level.WARNING, "Couldn't get extracted content.", ex); //NON-NLS logger.log(Level.WARNING, "Couldn't get extracted content.", ex); //NON-NLS
} }
return "Error getting text"; return NbBundle.getMessage(this.getClass(), "RawText.getText.error.msg");
} }
@Override @Override

View File

@ -406,10 +406,10 @@ public class Server {
solrProcessBuilder.directory(solrFolder); solrProcessBuilder.directory(solrFolder);
// Redirect stdout and stderr to files to prevent blocking. // Redirect stdout and stderr to files to prevent blocking.
Path solrStdoutPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stdout"); Path solrStdoutPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stdout"); //NON-NLS
solrProcessBuilder.redirectOutput(solrStdoutPath.toFile()); solrProcessBuilder.redirectOutput(solrStdoutPath.toFile());
Path solrStderrPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stderr"); Path solrStderrPath = Paths.get(Places.getUserDirectory().getAbsolutePath(), "var", "log", "solr.log.stderr"); //NON-NLS
solrProcessBuilder.redirectError(solrStderrPath.toFile()); solrProcessBuilder.redirectError(solrStderrPath.toFile());
logger.log(Level.INFO, "Starting Solr using: {0}", solrProcessBuilder.command()); //NON-NLS logger.log(Level.INFO, "Starting Solr using: {0}", solrProcessBuilder.command()); //NON-NLS

View File

@ -46,8 +46,8 @@ import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchServiceException;
@ServiceProvider(service = KeywordSearchService.class) @ServiceProvider(service = KeywordSearchService.class)
public class SolrSearchService implements KeywordSearchService { public class SolrSearchService implements KeywordSearchService {
private static final String BAD_IP_ADDRESS_FORMAT = "ioexception occurred when talking to server"; private static final String BAD_IP_ADDRESS_FORMAT = "ioexception occurred when talking to server"; //NON-NLS
private static final String SERVER_REFUSED_CONNECTION = "server refused connection"; private static final String SERVER_REFUSED_CONNECTION = "server refused connection"; //NON-NLS
private static final int IS_REACHABLE_TIMEOUT_MS = 1000; private static final int IS_REACHABLE_TIMEOUT_MS = 1000;
@Override @Override

View File

@ -383,9 +383,9 @@ class ExtractRegistry extends Extract {
String value = artnode.getTextContent().trim(); String value = artnode.getTextContent().trim();
String name = artnode.getAttribute("name"); //NON-NLS String name = artnode.getAttribute("name"); //NON-NLS
if (name.equals("ProductName")) { // NON_NLS if (name.equals("ProductName")) { // NON-NLS
version = value; version = value;
} else if (name.equals("CSDVersion")) { // NON_NLS } else if (name.equals("CSDVersion")) { // NON-NLS
// This is dependant on the fact that ProductName shows up first in the module output // This is dependant on the fact that ProductName shows up first in the module output
version = version + " " + value; version = version + " " + value;
} else if (name.equals("SystemRoot")) { //NON-NLS } else if (name.equals("SystemRoot")) { //NON-NLS