Merge remote-tracking branch 'upstream/develop' into dbClosing

This commit is contained in:
alexjacks92 2014-04-23 11:19:09 -04:00
commit a830e8b349
65 changed files with 988 additions and 930 deletions

View File

@ -65,3 +65,14 @@ IngestMessagePanel.sortByComboBox.model.time=Time
IngestMessagePanel.sortByComboBox.model.priority=Priority IngestMessagePanel.sortByComboBox.model.priority=Priority
IngestMessagesToolbar.customizeButton.toolTipText=Ingest Messages IngestMessagesToolbar.customizeButton.toolTipText=Ingest Messages
IngestMessageTopComponent.initComponents.name=Ingest Inbox IngestMessageTopComponent.initComponents.name=Ingest Inbox
IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg=Unable to start up one or more ingest modules, ingest job cancelled.
IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution=Please disable the failed modules or fix the errors and then restart ingest\
by right clicking on the data source and selecting Run Ingest Modules.
IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList=Errors\:\
\
{0}
IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle=Ingest Failure
IngestManager.StartIngestJobsTask.run.progress.msg1=Data source ingest tasks for {0}
IngestManager.StartIngestJobsTask.run.progress.msg2=Data source ingest tasks for {0}
IngestManager.StartIngestJobsTask.run.progress.msg3=Data source ingest tasks for {0}
IngestManager.StartIngestJobsTask.run.progress.msg4=Data source ingest tasks for {0}

View File

@ -1,64 +1,74 @@
CTL_IngestMessageTopComponent=\u30e1\u30c3\u30bb\u30fc\u30b8 CTL_IngestMessageTopComponent=\u30E1\u30C3\u30BB\u30FC\u30B8
HINT_IngestMessageTopComponent=\u30e1\u30c3\u30bb\u30fc\u30b8\u30a6\u30a3\u30f3\u30c9\u30a6 HINT_IngestMessageTopComponent=\u30E1\u30C3\u30BB\u30FC\u30B8\u30A6\u30A3\u30F3\u30C9\u30A6
IngestDialog.closeButton.title=\u9589\u3058\u308b IngestDialog.closeButton.title=\u9589\u3058\u308B
IngestDialog.startButton.title=\u30b9\u30bf\u30fc\u30c8 IngestDialog.startButton.title=\u30B9\u30BF\u30FC\u30C8
IngestDialog.title.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb IngestDialog.title.text=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB
IngestJob.progress.cancelling={0}\uff08\u30ad\u30e3\u30f3\u30bb\u30eb\u4e2d\u2026\uff09 IngestJob.progress.cancelling={0}\uFF08\u30AD\u30E3\u30F3\u30BB\u30EB\u4E2D\u2026\uFF09
IngestJob.progress.dataSourceIngest.displayName={0}\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8 IngestJob.progress.dataSourceIngest.displayName={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8
IngestJob.progress.fileIngest.displayName={0}\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8 IngestJob.progress.fileIngest.displayName={0}\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8
IngestJobConfigurationPanel.advancedButton.actionCommand=\u30a2\u30c9\u30d0\u30f3\u30b9 IngestJobConfigurationPanel.advancedButton.actionCommand=\u30A2\u30C9\u30D0\u30F3\u30B9
IngestJobConfigurationPanel.advancedButton.text=\u30a2\u30c9\u30d0\u30f3\u30b9 IngestJobConfigurationPanel.advancedButton.text=\u30A2\u30C9\u30D0\u30F3\u30B9
IngestJobConfigurationPanel.processUnallocCheckbox.text=\u672a\u5272\u308a\u5f53\u3066\u9818\u57df\u306e\u51e6\u7406 IngestJobConfigurationPanel.processUnallocCheckbox.text=\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u306E\u51E6\u7406
IngestJobConfigurationPanel.processUnallocCheckbox.toolTipText=\u524a\u9664\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u7b49\u306e\u672a\u5272\u308a\u5f53\u3066\u9818\u57df\u3092\u51e6\u7406\u3002\u3088\u308a\u5b8c\u5168\u306a\u7d50\u679c\u304c\u51fa\u307e\u3059\u304c\u3001\u5927\u304d\u3044\u30a4\u30e1\u30fc\u30b8\u3067\u306f\u51e6\u7406\u6642\u9593\u304c\u9577\u304f\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 IngestJobConfigurationPanel.processUnallocCheckbox.toolTipText=\u524A\u9664\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u7B49\u306E\u672A\u5272\u308A\u5F53\u3066\u9818\u57DF\u3092\u51E6\u7406\u3002\u3088\u308A\u5B8C\u5168\u306A\u7D50\u679C\u304C\u51FA\u307E\u3059\u304C\u3001\u5927\u304D\u3044\u30A4\u30E1\u30FC\u30B8\u3067\u306F\u51E6\u7406\u6642\u9593\u304C\u9577\u304F\u306A\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
IngestManager.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc IngestManager.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC
IngestManager.moduleErr.errListenToUpdates.msg=Ingest Manager\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 IngestManager.moduleErr.errListenToUpdates.msg=Ingest Manager\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3092\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
IngestManager.StartIngestJobsTask.run.cancelling={0}\uff08\u30ad\u30e3\u30f3\u30bb\u30eb\u4e2d\u2026\uff09 IngestManager.StartIngestJobsTask.run.cancelling={0}\uFF08\u30AD\u30E3\u30F3\u30BB\u30EB\u4E2D\u2026\uFF09
IngestManager.StartIngestJobsTask.run.catchException.msg=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u306e\u958b\u59cb\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u7d50\u679c\u304c\u4e00\u90e8\u306e\u3082\u306e IngestManager.StartIngestJobsTask.run.catchException.msg=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u306E\u958B\u59CB\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u7D50\u679C\u304C\u4E00\u90E8\u306E\u3082\u306E
IngestManager.StartIngestJobsTask.run.displayName=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30bf\u30b9\u30af\u3092\u30ad\u30e5\u30fc\u30a4\u30f3\u30b0 IngestManager.StartIngestJobsTask.run.displayName=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF\u3092\u30AD\u30E5\u30FC\u30A4\u30F3\u30B0
IngestMessage.exception.srcSubjDetailsDataNotNull.msg=\u30bd\u30fc\u30b9\u3001\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u8a73\u7d30\u304a\u3088\u3073\u30c7\u30fc\u30bf\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093 IngestMessage.exception.srcSubjDetailsDataNotNull.msg=\u30BD\u30FC\u30B9\u3001\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u3001\u8A73\u7D30\u304A\u3088\u3073\u30C7\u30FC\u30BF\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093
IngestMessage.exception.srcSubjNotNull.msg=\u30bd\u30fc\u30b9\u304a\u3088\u3073\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093 IngestMessage.exception.srcSubjNotNull.msg=\u30BD\u30FC\u30B9\u304A\u3088\u3073\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093
IngestMessage.exception.typeSrcSubjNotNull.msg=\u30e1\u30c3\u30bb\u30fc\u30b8\u30bf\u30a4\u30d7\u3001\u30bd\u30fc\u30b9\u304a\u3088\u3073\u30b5\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u30cc\u30eb\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093 IngestMessage.exception.typeSrcSubjNotNull.msg=\u30E1\u30C3\u30BB\u30FC\u30B8\u30BF\u30A4\u30D7\u3001\u30BD\u30FC\u30B9\u304A\u3088\u3073\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30CC\u30EB\u3067\u3042\u3063\u3066\u306F\u3044\u3051\u307E\u305B\u3093
IngestMessage.toString.data.text=\ \u30c7\u30fc\u30bf\uff1a{0} IngestMessage.toString.data.text=\ \u30C7\u30FC\u30BF\uFF1A{0}
IngestMessage.toString.date.text=\ \u65e5\u4ed8\uff1a{0} IngestMessage.toString.date.text=\ \u65E5\u4ED8\uFF1A{0}
IngestMessage.toString.details.text=\ \u8a73\u7d30\uff1a{0} IngestMessage.toString.details.text=\ \u8A73\u7D30\uFF1A{0}
IngestMessage.toString.subject.text=\ \u30b5\u30d6\u30b8\u30a7\u30af\u30c8\uff1a{0} IngestMessage.toString.subject.text=\ \u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\uFF1A{0}
IngestMessage.toString.type.text=\u30bf\u30a4\u30d7\uff1a{0} IngestMessage.toString.type.text=\u30BF\u30A4\u30D7\uFF1A{0}
IngestMessageDetailsPanel.copyMenuItem.text=\u30b3\u30d4\u30fc IngestMessageDetailsPanel.copyMenuItem.text=\u30B3\u30D4\u30FC
IngestMessageDetailsPanel.messageDetailsPane.contentType=\u30c6\u30ad\u30b9\u30c8\uff0fhtml IngestMessageDetailsPanel.messageDetailsPane.contentType=\u30C6\u30AD\u30B9\u30C8\uFF0Fhtml
IngestMessageDetailsPanel.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629e IngestMessageDetailsPanel.selectAllMenuItem.text=\u3059\u3079\u3066\u9078\u629E
IngestMessageDetailsPanel.viewArtifactButton.text=\u7d50\u679c\u3078\u79fb\u52d5 IngestMessageDetailsPanel.viewArtifactButton.text=\u7D50\u679C\u3078\u79FB\u52D5
IngestMessageDetailsPanel.viewContentButton.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u79fb\u52d5 IngestMessageDetailsPanel.viewContentButton.text=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3078\u79FB\u52D5
IngestMessagePanel.BooleanRenderer.exception.nonBoolVal.msg=\u30d6\u30fc\u30eb\u5024\u3067\u306f\u306a\u3044\u3082\u306e\u306bBooleanRenderer\u3092\u4f7f\u7528\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f IngestMessagePanel.BooleanRenderer.exception.nonBoolVal.msg=\u30D6\u30FC\u30EB\u5024\u3067\u306F\u306A\u3044\u3082\u306E\u306BBooleanRenderer\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F
IngestMessagePanel.DateRenderer.exception.nonDateVal.text=\u65e5\u4ed8\u3067\u306f\u306a\u3044\u3082\u306e\u306bDateRenderer\u3092\u4f7f\u7528\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u3002 IngestMessagePanel.DateRenderer.exception.nonDateVal.text=\u65E5\u4ED8\u3067\u306F\u306A\u3044\u3082\u306E\u306BDateRenderer\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F\u3002
IngestMessagePanel.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc IngestMessagePanel.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC
IngestMessagePanel.moduleErr.errListenUpdates.text=IngestMessagePanel\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 IngestMessagePanel.moduleErr.errListenUpdates.text=IngestMessagePanel\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3092\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
IngestMessagePanel.MsgTableMod.colNames.module=\u30e2\u30b8\u30e5\u30fc\u30eb IngestMessagePanel.MsgTableMod.colNames.module=\u30E2\u30B8\u30E5\u30FC\u30EB
IngestMessagePanel.MsgTableMod.colNames.new=\u65b0\u898f\uff1f IngestMessagePanel.MsgTableMod.colNames.new=\u65B0\u898F\uFF1F
IngestMessagePanel.MsgTableMod.colNames.num=\u756a\u53f7 IngestMessagePanel.MsgTableMod.colNames.num=\u756A\u53F7
IngestMessagePanel.MsgTableMod.colNames.subject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8 IngestMessagePanel.MsgTableMod.colNames.subject=\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8
IngestMessagePanel.MsgTableMod.colNames.timestamp=\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7 IngestMessagePanel.MsgTableMod.colNames.timestamp=\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7
IngestMessagePanel.sortByComboBox.model.priority=\u512a\u5148\u5ea6 IngestMessagePanel.sortByComboBox.model.priority=\u512A\u5148\u5EA6
IngestMessagePanel.sortByComboBox.model.time=\u6642\u9593 IngestMessagePanel.sortByComboBox.model.time=\u6642\u9593
IngestMessagePanel.sortByComboBox.toolTipText=\u6642\u9593\u9806\uff08\u6642\u7cfb\u5217\uff09\u307e\u305f\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u512a\u5148\u5ea6\u3067\u30bd\u30fc\u30c8 IngestMessagePanel.sortByComboBox.toolTipText=\u6642\u9593\u9806\uFF08\u6642\u7CFB\u5217\uFF09\u307E\u305F\u306F\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u512A\u5148\u5EA6\u3067\u30BD\u30FC\u30C8
IngestMessagePanel.sortByLabel.text=\u4e0b\u8a18\u3067\u30bd\u30fc\u30c8\uff1a IngestMessagePanel.sortByLabel.text=\u4E0B\u8A18\u3067\u30BD\u30FC\u30C8\uFF1A
IngestMessagePanel.totalMessagesNameLabel.text=\u5408\u8a08\uff1a IngestMessagePanel.totalMessagesNameLabel.text=\u5408\u8A08\uFF1A
IngestMessagePanel.totalMessagesNameVal.text=- IngestMessagePanel.totalMessagesNameVal.text=-
IngestMessagePanel.totalUniqueMessagesNameLabel.text=\u30e6\u30cb\u30fc\u30af\uff1a IngestMessagePanel.totalUniqueMessagesNameLabel.text=\u30E6\u30CB\u30FC\u30AF\uFF1A
IngestMessagePanel.totalUniqueMessagesNameVal.text=- IngestMessagePanel.totalUniqueMessagesNameVal.text=-
IngestMessagesToolbar.customizeButton.toolTipText=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8 IngestMessagesToolbar.customizeButton.toolTipText=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8
IngestMessageTopComponent.displayName=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30a4\u30f3\u30dc\u30c3\u30af\u30b9 IngestMessageTopComponent.displayName=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30A4\u30F3\u30DC\u30C3\u30AF\u30B9
IngestMessageTopComponent.displayReport.option.GenRpt=\u30ec\u30dd\u30fc\u30c8\u751f\u6210 IngestMessageTopComponent.displayReport.option.GenRpt=\u30EC\u30DD\u30FC\u30C8\u751F\u6210
IngestMessageTopComponent.displayReport.option.OK=OK IngestMessageTopComponent.displayReport.option.OK=OK
IngestMessageTopComponent.initComponents.name=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30a4\u30f3\u30dc\u30c3\u30af\u30b9 IngestMessageTopComponent.initComponents.name=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30A4\u30F3\u30DC\u30C3\u30AF\u30B9
IngestMessageTopComponent.msgDlg.ingestRpt.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8 IngestMessageTopComponent.msgDlg.ingestRpt.text=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30EC\u30DD\u30FC\u30C8
IngestMonitor.mgrErrMsg.lowDiskSpace.msg=\u30c7\u30a3\u30b9\u30af{0}\u306e\u30c7\u30a3\u30b9\u30af\u9818\u57df\u4e0d\u8db3\u306e\u305f\u3081\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u4e2d\u6b62\u3057\u307e\u3059\u3002\ IngestMonitor.mgrErrMsg.lowDiskSpace.msg=\u30C7\u30A3\u30B9\u30AF{0}\u306E\u30C7\u30A3\u30B9\u30AF\u9818\u57DF\u4E0D\u8DB3\u306E\u305F\u3081\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u4E2D\u6B62\u3057\u307E\u3059\u3002\
\u30b1\u30fc\u30b9\u30c9\u30e9\u30a4\u30d6\u306b\u6700\u4f4e1GB\u306e\u7a7a\u304d\u9818\u57df\u304c\u3042\u308b\u306e\u3092\u78ba\u8a8d\u3057\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u518d\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u4e0b\u3055\u3044\u3002 \u30B1\u30FC\u30B9\u30C9\u30E9\u30A4\u30D6\u306B\u6700\u4F4E1GB\u306E\u7A7A\u304D\u9818\u57DF\u304C\u3042\u308B\u306E\u3092\u78BA\u8A8D\u3057\u3001\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u518D\u30B9\u30BF\u30FC\u30C8\u3057\u3066\u4E0B\u3055\u3044\u3002
IngestMonitor.mgrErrMsg.lowDiskSpace.title=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u4e2d\u6b62\u3055\u308c\u307e\u3057\u305f\u30fc{0}\u306e\u30c7\u30a3\u30b9\u30af\u9818\u57df\u4e0d\u8db3 IngestMonitor.mgrErrMsg.lowDiskSpace.title=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u304C\u4E2D\u6B62\u3055\u308C\u307E\u3057\u305F\u30FC{0}\u306E\u30C7\u30A3\u30B9\u30AF\u9818\u57DF\u4E0D\u8DB3
IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, \u30b5\u30a4\u30ba\uff1a IngestScheduler.DataSourceScheduler.toString.size=DataSourceQueue, \u30B5\u30A4\u30BA\uFF1A
IngestScheduler.FileSched.toString.curDirs.text=\ IngestScheduler.FileSched.toString.curDirs.text=\
CurDirs(stack), \u30b5\u30a4\u30ba\uff1a CurDirs(stack), \u30B5\u30A4\u30BA\uFF1A
IngestScheduler.FileSched.toString.curFiles.text=\ IngestScheduler.FileSched.toString.curFiles.text=\
CurFiles, \u30b5\u30a4\u30ba\uff1a CurFiles, \u30B5\u30A4\u30BA\uFF1A
IngestScheduler.FileSched.toString.rootDirs.text=\ IngestScheduler.FileSched.toString.rootDirs.text=\
RootDirs(sorted), \u30b5\u30a4\u30ba\uff1a RootDirs(sorted), \u30B5\u30A4\u30BA\uFF1A
OpenIDE-Module-Name=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8 OpenIDE-Module-Name=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8
IngestManager.StartIngestJobsTask.run.progress.msg1={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.progress.msg2={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.progress.msg3={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.progress.msg4={0}\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30BF\u30B9\u30AF
IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList=\u30A8\u30E9\u30FC\uFF1A\
\
{0}
IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg=\uFF11\u3064\u307E\u305F\u306F\u8907\u6570\u306E\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30B9\u30BF\u30FC\u30C8\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30B8\u30E7\u30D6\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F\u3002
IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution=\u5931\u6557\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7121\u52B9\u5316\u3059\u308B\u304B\u30A8\u30E9\u30FC\u3092\u89E3\u6C7A\u3057\u3001\u305D\u306E\u5F8C\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u53F3\u30AF\u30EA\u30C3\u30AF\u3057\u3001\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u5B9F\u884C\u3092\u9078\u629E\u3057\u3066\u3001\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u3092\u30EA\u30B9\u30BF\u30FC\u30C8\u3057\u3066\u4E0B\u3055\u3044\u3002
IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u5931\u6557

View File

@ -132,16 +132,16 @@ public final class IngestJobLauncher {
for (String name : settingNames) { for (String name : settingNames) {
// Map some old core module names to the current core module names. // Map some old core module names to the current core module names.
switch (name) { switch (name) {
case "Thunderbird Parser": case "Thunderbird Parser": //NON-NLS
case "MBox Parser": case "MBox Parser": //NON-NLS
moduleNames.add("Email Parser"); moduleNames.add("Email Parser"); //NON-NLS
break; break;
case "File Extension Mismatch Detection": case "File Extension Mismatch Detection": //NON-NLS
moduleNames.add("Extension Mismatch Detector"); moduleNames.add("Extension Mismatch Detector"); //NON-NLS
break; break;
case "EWF Verify": case "EWF Verify": //NON-NLS
case "E01 Verify": case "E01 Verify": //NON-NLS
moduleNames.add("E01 Verifier"); moduleNames.add("E01 Verifier"); //NON-NLS
break; break;
default: default:
moduleNames.add(name); moduleNames.add(name);

View File

@ -405,13 +405,19 @@ public class IngestManager {
moduleStartUpErrors.append("\n"); moduleStartUpErrors.append("\n");
} }
StringBuilder notifyMessage = new StringBuilder(); StringBuilder notifyMessage = new StringBuilder();
notifyMessage.append("Unable to start up one or more ingest modules, ingest job cancelled.\n"); notifyMessage.append(NbBundle.getMessage(this.getClass(),
notifyMessage.append("Please disable the failed modules or fix the errors and then restart ingest\n"); "IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg"));
notifyMessage.append("by right clicking on the data source and selecting Run Ingest Modules.\n"); notifyMessage.append("\n");
notifyMessage.append("Errors:\n\n"); notifyMessage.append(NbBundle.getMessage(this.getClass(),
notifyMessage.append(moduleStartUpErrors.toString()); "IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution"));
notifyMessage.append("\n");
notifyMessage.append(NbBundle.getMessage(this.getClass(),
"IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList",
moduleStartUpErrors.toString()));
notifyMessage.append("\n\n"); notifyMessage.append("\n\n");
JOptionPane.showMessageDialog(null, notifyMessage.toString(), "Ingest Failure", JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(null, notifyMessage.toString(),
NbBundle.getMessage(this.getClass(),
"IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle"), JOptionPane.ERROR_MESSAGE);
// Jettison the ingest job and move on to the next one. // Jettison the ingest job and move on to the next one.
synchronized (IngestManager.this) { synchronized (IngestManager.this) {
@ -423,14 +429,22 @@ public class IngestManager {
// Queue the data source ingest tasks for the ingest job. // Queue the data source ingest tasks for the ingest job.
final String inputName = dataSource.getName(); final String inputName = dataSource.getName();
progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted); progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg1",
inputName), workUnitsCompleted);
scheduler.getDataSourceIngestScheduler().queueForIngest(ingestJob); scheduler.getDataSourceIngestScheduler().queueForIngest(ingestJob);
progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted); progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg2",
inputName), ++workUnitsCompleted);
// Queue the file ingest tasks for the ingest job. // Queue the file ingest tasks for the ingest job.
progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted); progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg3",
inputName), workUnitsCompleted);
scheduler.getFileIngestScheduler().queueForIngest(ingestJob); scheduler.getFileIngestScheduler().queueForIngest(ingestJob);
progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted); progress.progress(
NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg4",
inputName), ++workUnitsCompleted);
if (!Thread.currentThread().isInterrupted()) { if (!Thread.currentThread().isInterrupted()) {
startIngestTasks(); startIngestTasks();

View File

@ -50,3 +50,5 @@ FileExtMismatchSettingsPanel.userExtTextField.text=
FileExtMismatchSettingsPanel.addExtButton.text=Add Extension FileExtMismatchSettingsPanel.addExtButton.text=Add Extension
FileExtMismatchSettingsPanel.removeExtButton.text=Remove Selected Extension FileExtMismatchSettingsPanel.removeExtButton.text=Remove Selected Extension
FileExtMismatchSettingsPanel.userTypeTextField.text= FileExtMismatchSettingsPanel.userTypeTextField.text=
FileExtMismatchDetectorModuleFactory.getIngestJobSettingsPanel.exception.msg=Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings
FileExtMismatchDetectorModuleFactory.createFileIngestModule.exception.msg=Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings

View File

@ -1,46 +1,48 @@
OpenIDE-Module-Name=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4 OpenIDE-Module-Name=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4
OptionsCategory_Name_FileExtMismatchOptions=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4 OptionsCategory_Name_FileExtMismatchOptions=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4
OptionsCategory_FileExtMismatch=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4 OptionsCategory_FileExtMismatch=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4
AddFileExtensionAction.msgDlg.msg=XML\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304f\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f\u3002 AddFileExtensionAction.msgDlg.msg=XML\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304F\u306E\u3092\u5931\u6557\u3057\u307E\u3057\u305F\u3002
AddFileExtensionAction.msgDlg.title=\u4e0d\u4e00\u81f4\u62e1\u5f35\u5b50\u306e\u8ffd\u52a0\u30a8\u30e9\u30fc AddFileExtensionAction.msgDlg.title=\u4E0D\u4E00\u81F4\u62E1\u5F35\u5B50\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC
FileExtMismatchConfigPanel.name.text=\u30a2\u30c9\u30d0\u30f3\u30b9\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4\u8a2d\u5b9a FileExtMismatchConfigPanel.name.text=\u30A2\u30C9\u30D0\u30F3\u30B9\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4\u8A2D\u5B9A
FileExtMismatchConfigPanel.addExtButton.errLabel.empty=\u62e1\u5f35\u5b50\u30c6\u30ad\u30b9\u30c8\u304c\u7a7a\u767d\u3067\u3059\uff01 FileExtMismatchConfigPanel.addExtButton.errLabel.empty=\u62E1\u5F35\u5B50\u30C6\u30AD\u30B9\u30C8\u304C\u7A7A\u767D\u3067\u3059\uFF01
FileExtMismatchConfigPanel.addExtButton.errLabel.noMimeType=MIME\u30bf\u30a4\u30d7\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 FileExtMismatchConfigPanel.addExtButton.errLabel.noMimeType=MIME\u30BF\u30A4\u30D7\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01
FileExtMismatchConfigPanel.addExtButton.errLabel.extExists=\u62e1\u5f35\u5b50\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u307e\u3059\uff01 FileExtMismatchConfigPanel.addExtButton.errLabel.extExists=\u62E1\u5F35\u5B50\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\uFF01
FileExtMismatchConfigPanel.addExtButton.errLabel.extAdded=\u62e1\u5f35\u5b50{0}\u306f\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 FileExtMismatchConfigPanel.addExtButton.errLabel.extAdded=\u62E1\u5F35\u5B50{0}\u306F\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002
FileExtMismatchConfigPanel.addTypeButton.empty=MIME\u30bf\u30a4\u30d7\u30c6\u30ad\u30b9\u30c8\u304c\u7a7a\u767d\u3067\u3059\uff01 FileExtMismatchConfigPanel.addTypeButton.empty=MIME\u30BF\u30A4\u30D7\u30C6\u30AD\u30B9\u30C8\u304C\u7A7A\u767D\u3067\u3059\uFF01
FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotSupported=MIME\u30bf\u30a4\u30d7\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotSupported=MIME\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01
FileExtMismatchConfigPanel.addTypeButton.mimeTypeExists=MIME\u30bf\u30a4\u30d7\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u307e\u3059\uff01 FileExtMismatchConfigPanel.addTypeButton.mimeTypeExists=MIME\u30BF\u30A4\u30D7\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\uFF01
FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotDetectable=MIME\u30bf\u30a4\u30d7\u306f\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f\u691c\u51fa\u3067\u304d\u307e\u305b\u3093\u3002 FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotDetectable=MIME\u30BF\u30A4\u30D7\u306F\u3053\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306F\u691C\u51FA\u3067\u304D\u307E\u305B\u3093\u3002
FileExtMismatchConfigPanel.addTypeButton.mimeTypeAdded=MIME\u30bf\u30a4\u30d7{0}\u306f\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 FileExtMismatchConfigPanel.addTypeButton.mimeTypeAdded=MIME\u30BF\u30A4\u30D7{0}\u306F\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002
FileExtMismatchConfigPanel.removeTypeButton.noneSelected=MIME\u30bf\u30a4\u30d7\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 FileExtMismatchConfigPanel.removeTypeButton.noneSelected=MIME\u30BF\u30A4\u30D7\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01
FileExtMismatchConfigPanel.remoteTypeButton.deleted=MIME\u30bf\u30a4\u30d7{0}\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002 FileExtMismatchConfigPanel.remoteTypeButton.deleted=MIME\u30BF\u30A4\u30D7{0}\u306F\u524A\u9664\u3055\u308C\u307E\u3057\u305F\u3002
FileExtMismatchConfigPanel.removeExtButton.noneSelected=\u62e1\u5f35\u5b50\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 FileExtMismatchConfigPanel.removeExtButton.noneSelected=\u62E1\u5F35\u5B50\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01
FileExtMismatchConfigPanel.removeExtButton.noMimeTypeSelected=MIME\u30bf\u30a4\u30d7\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 FileExtMismatchConfigPanel.removeExtButton.noMimeTypeSelected=MIME\u30BF\u30A4\u30D7\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01
FileExtMismatchConfigPanel.removeExtButton.deleted=\u62e1\u5f35\u5b50{0}\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002 FileExtMismatchConfigPanel.removeExtButton.deleted=\u62E1\u5F35\u5B50{0}\u306F\u524A\u9664\u3055\u308C\u307E\u3057\u305F\u3002
FileExtMismatchConfigPanel.store.msg=\u4fdd\u5b58\u3055\u308c\u307e\u3057\u305f\u3002 FileExtMismatchConfigPanel.store.msg=\u4FDD\u5B58\u3055\u308C\u307E\u3057\u305F\u3002
FileExtMismatchConfigPanel.store.msgDlg.msg=XML\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304f\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f\u3002 FileExtMismatchConfigPanel.store.msgDlg.msg=XML\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304F\u306E\u3092\u5931\u6557\u3057\u307E\u3057\u305F\u3002
FileExtMismatchConfigPanel.save.msgDlg.title=\u4fdd\u5b58\u30a8\u30e9\u30fc FileExtMismatchConfigPanel.save.msgDlg.title=\u4FDD\u5B58\u30A8\u30E9\u30FC
FileExtMismatchConfigPanel.ok.confDlg.msg=\u8a2d\u5b9a\u5909\u66f4\u3092\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f FileExtMismatchConfigPanel.ok.confDlg.msg=\u8A2D\u5B9A\u5909\u66F4\u3092\u4FDD\u5B58\u3057\u307E\u3059\u304B\uFF1F
FileExtMismatchConfigPanel.confDlg.title=\u4fdd\u5b58\u3055\u308c\u3066\u3044\u306a\u3044\u5909\u66f4 FileExtMismatchConfigPanel.confDlg.title=\u4FDD\u5B58\u3055\u308C\u3066\u3044\u306A\u3044\u5909\u66F4
FileExtMismatchConfigPanel.mimeTableModel.colName=MIME\u30bf\u30a4\u30d7 FileExtMismatchConfigPanel.mimeTableModel.colName=MIME\u30BF\u30A4\u30D7
FileExtMismatchConfigPanel.extTableModel.colName=\u62e1\u5f35\u5b50 FileExtMismatchConfigPanel.extTableModel.colName=\u62E1\u5F35\u5B50
FileExtMismatchContextMenuActionsProvider.menuItemStr=\u62e1\u5f35\u5b50{0}\u3092MIME\u30bf\u30a4\u30d7{1}\u306e\u4e00\u81f4\u3068\u3057\u3066\u8ffd\u52a0 FileExtMismatchContextMenuActionsProvider.menuItemStr=\u62E1\u5F35\u5B50{0}\u3092MIME\u30BF\u30A4\u30D7{1}\u306E\u4E00\u81F4\u3068\u3057\u3066\u8FFD\u52A0
FileExtMismatchIngestModule.moduleName=\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4\u30c7\u30a3\u30c6\u30af\u30bf\u30fc FileExtMismatchIngestModule.moduleName=\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4\u30C7\u30A3\u30C6\u30AF\u30BF\u30FC
FileExtMismatchIngestModule.moduleDesc.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306b\u57fa\u3065\u3044\u3066\u3001\u6a19\u6e96\u7684\u3067\u306f\u306a\u3044\u62e1\u5f35\u5b50\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u3092\u30d5\u30e9\u30b0\u4ed8\u3051\u3057\u307e\u3059\u3002d FileExtMismatchIngestModule.moduleDesc.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\u306B\u57FA\u3065\u3044\u3066\u3001\u6A19\u6E96\u7684\u3067\u306F\u306A\u3044\u62E1\u5F35\u5B50\u3092\u6301\u3064\u30D5\u30A1\u30A4\u30EB\u3092\u30D5\u30E9\u30B0\u4ED8\u3051\u3057\u307E\u3059\u3002d
FileExtMismatchIngestModule.complete.totalProcTime=\u5408\u8a08\u51e6\u7406\u6642\u9593 FileExtMismatchIngestModule.complete.totalProcTime=\u5408\u8A08\u51E6\u7406\u6642\u9593
FileExtMismatchIngestModule.complete.totalFiles=\u5408\u8a08\u51e6\u7406\u30d5\u30a1\u30a4\u30eb\u6570 FileExtMismatchIngestModule.complete.totalFiles=\u5408\u8A08\u51E6\u7406\u30D5\u30A1\u30A4\u30EB\u6570
FileExtMismatchIngestModule.complete.svcMsg.text=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4\u7d50\u679c FileExtMismatchIngestModule.complete.svcMsg.text=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4\u7D50\u679C
FileExtMismatchOptionsPanelController.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc FileExtMismatchOptionsPanelController.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC
FileExtMismatchOptionsPanelController.moduleErr.msg=FileExtMismatchOptionsPanelController\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 FileExtMismatchOptionsPanelController.moduleErr.msg=FileExtMismatchOptionsPanelController\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306E\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002
AddFileExtensionAction.extHeaderLbl.text=\u4e0b\u8a18\u7528\u306b\u8a31\u53ef\u3055\u308c\u305f\u62e1\u5f35\u5b50 AddFileExtensionAction.extHeaderLbl.text=\u4E0B\u8A18\u7528\u306B\u8A31\u53EF\u3059\u308B\u62E1\u5F35\u5B50
FileExtMismatchModuleSettingsPanel.skipTextPlain.text=\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u30b9\u30ad\u30c3\u30d7 FileExtMismatchModuleSettingsPanel.skipTextPlain.text=\u30C6\u30AD\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306F\u30B9\u30AD\u30C3\u30D7
FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text=\u62e1\u5f35\u5b50\u306e\u7121\u3044\u30d5\u30a1\u30a4\u30eb\u306f\u30b9\u30ad\u30c3\u30d7 FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text=\u62E1\u5F35\u5B50\u306E\u7121\u3044\u30D5\u30A1\u30A4\u30EB\u306F\u30B9\u30AD\u30C3\u30D7
FileExtMismatchSettingsPanel.addTypeButton.text=\u30bf\u30a4\u30d7\u3092\u8ffd\u52a0 FileExtMismatchSettingsPanel.addTypeButton.text=\u30BF\u30A4\u30D7\u3092\u8FFD\u52A0
FileExtMismatchSettingsPanel.extHeaderLabel.text=\u8a31\u53ef\u3055\u308c\u305f\u62e1\u5f35\u5b50\uff1a FileExtMismatchSettingsPanel.extHeaderLabel.text=\u8A31\u53EF\u3059\u308B\u62E1\u5F35\u5B50\uFF1A
FileExtMismatchSettingsPanel.removeTypeButton.text=\u9078\u629e\u3057\u305f\u30bf\u30a4\u30d7\u3092\u524a\u9664 FileExtMismatchSettingsPanel.removeTypeButton.text=\u9078\u629E\u3057\u305F\u30BF\u30A4\u30D7\u3092\u524A\u9664
FileExtMismatchSettingsPanel.saveButton.text=\u8a2d\u5b9a\u3092\u4fdd\u5b58 FileExtMismatchSettingsPanel.saveButton.text=\u8A2D\u5B9A\u3092\u4FDD\u5B58
FileExtMismatchSettingsPanel.jLabel1.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\uff1a FileExtMismatchSettingsPanel.jLabel1.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\uFF1A
FileExtMismatchSettingsPanel.addExtButton.text=\u62e1\u5f35\u5b50\u3092\u8ffd\u52a0 FileExtMismatchSettingsPanel.addExtButton.text=\u62E1\u5F35\u5B50\u3092\u8FFD\u52A0
FileExtMismatchSettingsPanel.removeExtButton.text=\u9078\u629e\u3057\u305f\u62e1\u5f35\u5b50\u3092\u524a\u9664 FileExtMismatchSettingsPanel.removeExtButton.text=\u9078\u629E\u3057\u305F\u62E1\u5F35\u5B50\u3092\u524A\u9664
FileExtMismatchDetectorModuleFactory.getIngestJobSettingsPanel.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileExtMismatchDetectorModuleSettings\u3067\u3059\u3002
FileExtMismatchDetectorModuleFactory.createFileIngestModule.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileExtMismatchDetectorModuleSettings\u3067\u3059\u3002

View File

@ -70,7 +70,8 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda
public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) { public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) {
assert settings instanceof FileExtMismatchDetectorModuleSettings; assert settings instanceof FileExtMismatchDetectorModuleSettings;
if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) { if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) {
throw new IllegalArgumentException("Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings"); throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
"FileExtMismatchDetectorModuleFactory.getIngestJobSettingsPanel.exception.msg"));
} }
FileExtMismatchModuleSettingsPanel settingsPanel = new FileExtMismatchModuleSettingsPanel((FileExtMismatchDetectorModuleSettings) settings); FileExtMismatchModuleSettingsPanel settingsPanel = new FileExtMismatchModuleSettingsPanel((FileExtMismatchDetectorModuleSettings) settings);
return settingsPanel; return settingsPanel;
@ -97,7 +98,8 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) { public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
assert settings instanceof FileExtMismatchDetectorModuleSettings; assert settings instanceof FileExtMismatchDetectorModuleSettings;
if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) { if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) {
throw new IllegalArgumentException("Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings"); throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
"FileExtMismatchDetectorModuleFactory.createFileIngestModule.exception.msg"));
} }
return new FileExtMismatchIngestModule((FileExtMismatchDetectorModuleSettings) settings); return new FileExtMismatchIngestModule((FileExtMismatchDetectorModuleSettings) settings);
} }

View File

@ -6,3 +6,5 @@ FileTypeIdIngestModule.moduleDesc.text=Matches file types based on binary signat
FileTypeIdIngestModule.complete.totalProcTime=Total Processing Time FileTypeIdIngestModule.complete.totalProcTime=Total Processing Time
FileTypeIdIngestModule.complete.totalFiles=Total Files Processed FileTypeIdIngestModule.complete.totalFiles=Total Files Processed
FileTypeIdIngestModule.complete.srvMsg.text=File Type Id Results FileTypeIdIngestModule.complete.srvMsg.text=File Type Id Results
FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg=Expected settings argument to be instanceof FileTypeIdModuleSettings
FileTypeIdModuleFactory.createFileIngestModule.exception.msg=Expected settings argument to be instanceof FileTypeIdModuleSettings

View File

@ -5,4 +5,6 @@ FileTypeIdIngestModule.moduleDesc.text=\u30D0\u30A4\u30CA\u30EA\u7F72\u540D\u306
FileTypeIdIngestModule.complete.totalProcTime=\u5408\u8A08\u51E6\u7406\u6642\u9593 FileTypeIdIngestModule.complete.totalProcTime=\u5408\u8A08\u51E6\u7406\u6642\u9593
FileTypeIdIngestModule.complete.totalFiles=\u5408\u8A08\u51E6\u7406\u30D5\u30A1\u30A4\u30EB\u6570 FileTypeIdIngestModule.complete.totalFiles=\u5408\u8A08\u51E6\u7406\u30D5\u30A1\u30A4\u30EB\u6570
FileTypeIdIngestModule.complete.srvMsg.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\u7279\u5B9A\u306E\u7D50\u679C FileTypeIdIngestModule.complete.srvMsg.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\u7279\u5B9A\u306E\u7D50\u679C
FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text=\u65E2\u77E5\u30D5\u30A1\u30A4\u30EB\uFF08NSRL\uFF09\u3092\u30B9\u30AD\u30C3\u30D7 FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text=\u65E2\u77E5\u30D5\u30A1\u30A4\u30EB\uFF08NSRL\uFF09\u3092\u30B9\u30AD\u30C3\u30D7
FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileTypeIdModuleSettings\u3067\u3059\u3002
FileTypeIdModuleFactory.createFileIngestModule.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileTypeIdModuleSettings\u3067\u3059\u3002

View File

@ -69,7 +69,8 @@ public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter {
public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) { public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) {
assert settings instanceof FileTypeIdModuleSettings; assert settings instanceof FileTypeIdModuleSettings;
if (!(settings instanceof FileTypeIdModuleSettings)) { if (!(settings instanceof FileTypeIdModuleSettings)) {
throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings"); throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
"FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg"));
} }
return new FileTypeIdModuleSettingsPanel((FileTypeIdModuleSettings) settings); return new FileTypeIdModuleSettingsPanel((FileTypeIdModuleSettings) settings);
} }
@ -83,7 +84,8 @@ public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter {
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) { public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
assert settings instanceof FileTypeIdModuleSettings; assert settings instanceof FileTypeIdModuleSettings;
if (!(settings instanceof FileTypeIdModuleSettings)) { if (!(settings instanceof FileTypeIdModuleSettings)) {
throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings"); throw new IllegalArgumentException(
NbBundle.getMessage(this.getClass(), "FileTypeIdModuleFactory.createFileIngestModule.exception.msg"));
} }
return new FileTypeIdIngestModule((FileTypeIdModuleSettings) settings); return new FileTypeIdIngestModule((FileTypeIdModuleSettings) settings);
} }

View File

@ -201,3 +201,5 @@ AddContentToHashDbAction.addFilesToHashSet.files=files
AddContentToHashDbAction.addFilesToHashSet.file=file AddContentToHashDbAction.addFilesToHashSet.file=file
HashDbManager.errCreatingIndex.title=Error creating index HashDbManager.errCreatingIndex.title=Error creating index
HashDbManager.errCreatingIndex.msg=Error creating index\: {0} HashDbManager.errCreatingIndex.msg=Error creating index\: {0}
HashLookupModuleFactory.getIngestJobSettingsPanel.exception.msg=Expected settings argument to be instanceof HashLookupModuleSettings
HashLookupModuleFactory.createFileIngestModule.exception.msg=Expected settings argument to be instanceof HashLookupModuleSettings

View File

@ -78,7 +78,7 @@ HashDbImportDatabaseDialog.failedToGetDbPathMsg=\u9078\u629E\u3057\u305F\u30C7\u
HashDbImportDatabaseDialog.importHashDbErr=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u30A8\u30E9\u30FC HashDbImportDatabaseDialog.importHashDbErr=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u30A8\u30E9\u30FC
HashDbImportDatabaseDialog.mustSelectHashDbFilePathMsg=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9\u306E\u9078\u629E\u304C\u5FC5\u8981\u3067\u3059\u3002 HashDbImportDatabaseDialog.mustSelectHashDbFilePathMsg=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9\u306E\u9078\u629E\u304C\u5FC5\u8981\u3067\u3059\u3002
HashDbImportDatabaseDialog.hashDbDoesNotExistMsg=\u9078\u629E\u3055\u308C\u305F\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002 HashDbImportDatabaseDialog.hashDbDoesNotExistMsg=\u9078\u629E\u3055\u308C\u305F\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002
HashDbImportDatabaseDialog.errorMessage.failedToOpenHashDbMsg=\ {0}\u3067\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u958B\u304F\u306E\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 HashDbImportDatabaseDialog.errorMessage.failedToOpenHashDbMsg={0}\u3067\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u958B\u304F\u306E\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
HashDbIngestModule.moduleName=\u30CF\u30C3\u30B7\u30E5\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7 HashDbIngestModule.moduleName=\u30CF\u30C3\u30B7\u30E5\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7
HashDbIngestModule.moduleDescription=\u6A19\u6E96\u306ENSRL\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306A\u3069\u3001\u63D0\u4F9B\u3055\u308C\u305F\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u5229\u7528\u3057\u3066\u3001\u65E2\u77E5\u307E\u305F\u306F\u7591\u308F\u3057\u3044\u3082\u306E\u3092\u7279\u5B9A\u3057\u307E\u3059\u3002 HashDbIngestModule.moduleDescription=\u6A19\u6E96\u306ENSRL\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306A\u3069\u3001\u63D0\u4F9B\u3055\u308C\u305F\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u5229\u7528\u3057\u3066\u3001\u65E2\u77E5\u307E\u305F\u306F\u7591\u308F\u3057\u3044\u3082\u306E\u3092\u7279\u5B9A\u3057\u307E\u3059\u3002
HashDbIngestModule.noKnownHashDbSetMsg=\u65E2\u77E5\u306E\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093\u3002 HashDbIngestModule.noKnownHashDbSetMsg=\u65E2\u77E5\u306E\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093\u3002
@ -88,7 +88,7 @@ HashDbConfigPanel.dbNotIndexedMsg=\u4E0B\u8A18\u306E\u30C7\u30FC\u30BF\u30D9\u30
{0} {0}
HashDbIngestModule.knownBadFileSearchWillNotExecuteWarn=\u65E2\u77E5\u306E\u60AA\u8CEA\u30D5\u30A1\u30A4\u30EB\u691C\u7D22\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3002 HashDbIngestModule.knownBadFileSearchWillNotExecuteWarn=\u65E2\u77E5\u306E\u60AA\u8CEA\u30D5\u30A1\u30A4\u30EB\u691C\u7D22\u306F\u5B9F\u884C\u3055\u308C\u307E\u305B\u3093\u3002
HashDbIngestModule.fileReadErrorMsg=\u8AAD\u307F\u8FBC\u307F\u30A8\u30E9\u30FC\uFF1A {0} HashDbIngestModule.fileReadErrorMsg=\u8AAD\u307F\u8FBC\u307F\u30A8\u30E9\u30FC\uFF1A {0}
HashDbIngestModule.calcHashValueErr=\ {0}\u306E\u30CF\u30C3\u30B7\u30E5\u5024\u3092\u8A08\u7B97\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 HashDbIngestModule.calcHashValueErr={0}\u306E\u30CF\u30C3\u30B7\u30E5\u5024\u3092\u8A08\u7B97\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
HashDbIngestModule.hashLookupErrorMsg=\u30CF\u30C3\u30B7\u30E5\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7\u30A8\u30E9\u30FC\uFF1A {0} HashDbIngestModule.hashLookupErrorMsg=\u30CF\u30C3\u30B7\u30E5\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7\u30A8\u30E9\u30FC\uFF1A {0}
HashDbIngestModule.settingKnownBadStateErr={0}\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u65E2\u77E5\u306E\u60AA\u8CEA\u3068\u8A2D\u5B9A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 HashDbIngestModule.settingKnownBadStateErr={0}\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u65E2\u77E5\u306E\u60AA\u8CEA\u3068\u8A2D\u5B9A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
HashDbIngestModule.lookingUpKnownBadHashValueErr={0}\u306E\u65E2\u77E5\u306E\u60AA\u8CEA\u30CF\u30C3\u30B7\u30E5\u5024\u3092\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 HashDbIngestModule.lookingUpKnownBadHashValueErr={0}\u306E\u65E2\u77E5\u306E\u60AA\u8CEA\u30CF\u30C3\u30B7\u30E5\u5024\u3092\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
@ -135,8 +135,9 @@ HashDbSimpleConfigPanel.dlgMsg.mustIndexDbBeforeUse=\u30CF\u30C3\u30B7\u30E5\u30
ModalNoButtons.indexingDbsTitle=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D ModalNoButtons.indexingDbsTitle=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D
ModalNoButtons.indexingDbTitle=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D ModalNoButtons.indexingDbTitle=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D
ModalNoButtons.exitHashDbIndexingMsg=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u3092\u4E2D\u6B62\u3057\u307E\u3059\u3002\ ModalNoButtons.exitHashDbIndexingMsg=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u3092\u4E2D\u6B62\u3057\u307E\u3059\u3002\
\u4F5C\u6210\u3055\u308C\u305F\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306F\u5229\u7528\u4E0D\u53EF\u3068\u306A\u308A\u307E\u3059\u3002\u7D9A\u884C\u3059\u308B\u5834\u5408\u306F\u30CF\u30C3\u30B7\u30E5\u30D5\u30A9\u30EB\u30C0\u5185\u306B\u3042\u308B\u3001\u5BFE\u5FDC\u3059\u308B-md5.idx \u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u3066\u4E0B\u3055\u3044\u3002\ \u4F5C\u6210\u3055\u308C\u305F\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u306F\u5229\u7528\u4E0D\u53EF\u3068\u306A\u308A\u307E\u3059\u3002\u7D9A\u884C\u3059\u308B\u5834\u5408\u306F\
\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u3092\u4E2D\u6B62\u3057\u307E\u3059\u304B\uFF1F \u30CF\u30C3\u30B7\u30E5\u30D5\u30A9\u30EB\u30C0\u5185\u306B\u3042\u308B\u3001\u5BFE\u5FDC\u3059\u308B-md5.idx \u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u3066\u4E0B\u3055\u3044\u3002\
\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u3092\u4E2D\u6B62\u3057\u307E\u3059\u304B\uFF1F
ModalNoButtons.dlgTitle.unfinishedIndexing=\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u672A\u5B8C\u4E86 ModalNoButtons.dlgTitle.unfinishedIndexing=\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u672A\u5B8C\u4E86
ModalNoButtons.indexThis.currentlyIndexing1Db=\uFF11\u3064\u306E\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D ModalNoButtons.indexThis.currentlyIndexing1Db=\uFF11\u3064\u306E\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D
ModalNoButtons.indexThese.currentlyIndexing1OfNDbs=\uFF11\uFF0F {0}\u3064\u76EE\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D ModalNoButtons.indexThese.currentlyIndexing1OfNDbs=\uFF11\uFF0F {0}\u3064\u76EE\u3092\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u5316\u4E2D
@ -196,3 +197,5 @@ HashLookupSettingsPanel.indexLabel.text=\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u30
HashLookupModuleSettingsPanel.alwaysCalcHashesCheckbox.text=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u306A\u304F\u3066\u3082\u3001\u30CF\u30C3\u30B7\u30E5\u5024\u3092\u8A08\u7B97 HashLookupModuleSettingsPanel.alwaysCalcHashesCheckbox.text=\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u306A\u304F\u3066\u3082\u3001\u30CF\u30C3\u30B7\u30E5\u5024\u3092\u8A08\u7B97
HashLookupModuleSettingsPanel.knownHashDbsLabel.text=\u65E2\u77E5\u306E\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u51E6\u7406\u306B\u5229\u7528\uFF1A HashLookupModuleSettingsPanel.knownHashDbsLabel.text=\u65E2\u77E5\u306E\u30CF\u30C3\u30B7\u30E5\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u51E6\u7406\u306B\u5229\u7528\uFF1A
HashLookupModuleSettingsPanel.knownBadHashDbsLabel.text=\u65E2\u77E5\u306E\u60AA\u8CEA\u306A\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u51E6\u7406\u306B\u5229\u7528\uFF1A HashLookupModuleSettingsPanel.knownBadHashDbsLabel.text=\u65E2\u77E5\u306E\u60AA\u8CEA\u306A\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u51E6\u7406\u306B\u5229\u7528\uFF1A
HashLookupModuleFactory.createFileIngestModule.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof HashLookupModuleSettings\u3067\u3059\u3002
HashLookupModuleFactory.getIngestJobSettingsPanel.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof HashLookupModuleSettings\u3067\u3059\u3002

View File

@ -82,7 +82,8 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter {
@Override @Override
public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) { public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) {
if (!(settings instanceof HashLookupModuleSettings)) { if (!(settings instanceof HashLookupModuleSettings)) {
throw new IllegalArgumentException("Expected settings argument to be instanceof HashLookupModuleSettings"); throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
"HashLookupModuleFactory.getIngestJobSettingsPanel.exception.msg"));
} }
if (moduleSettingsPanel == null) { if (moduleSettingsPanel == null) {
moduleSettingsPanel = new HashLookupModuleSettingsPanel((HashLookupModuleSettings) settings); moduleSettingsPanel = new HashLookupModuleSettingsPanel((HashLookupModuleSettings) settings);
@ -112,7 +113,8 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter {
@Override @Override
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) { public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
if (!(settings instanceof HashLookupModuleSettings)) { if (!(settings instanceof HashLookupModuleSettings)) {
throw new IllegalArgumentException("Expected settings argument to be instanceof HashLookupModuleSettings"); throw new IllegalArgumentException(
NbBundle.getMessage(this.getClass(), "HashLookupModuleFactory.createFileIngestModule.exception.msg"));
} }
return new HashDbIngestModule((HashLookupModuleSettings) settings); return new HashDbIngestModule((HashLookupModuleSettings) settings);
} }

View File

@ -44,37 +44,37 @@ interface AbstractFileExtract {
static final List<String> ARCHIVE_MIME_TYPES = static final List<String> ARCHIVE_MIME_TYPES =
Arrays.asList( Arrays.asList(
//ignore unstructured binary and compressed data, for which string extraction or unzipper works better //ignore unstructured binary and compressed data, for which string extraction or unzipper works better
"application/x-7z-compressed", "application/x-7z-compressed", //NON-NLS
"application/x-ace-compressed", "application/x-ace-compressed", //NON-NLS
"application/x-alz-compressed", "application/x-alz-compressed", //NON-NLS
"application/x-arj", "application/x-arj", //NON-NLS
"application/vnd.ms-cab-compressed", "application/vnd.ms-cab-compressed", //NON-NLS
"application/x-cfs-compressed", "application/x-cfs-compressed", //NON-NLS
"application/x-dgc-compressed", "application/x-dgc-compressed", //NON-NLS
"application/x-apple-diskimage", "application/x-apple-diskimage", //NON-NLS
"application/x-gca-compressed", "application/x-gca-compressed", //NON-NLS
"application/x-dar", "application/x-dar", //NON-NLS
"application/x-lzx", "application/x-lzx", //NON-NLS
"application/x-lzh", "application/x-lzh", //NON-NLS
"application/x-rar-compressed", "application/x-rar-compressed", //NON-NLS
"application/x-stuffit", "application/x-stuffit", //NON-NLS
"application/x-stuffitx", "application/x-stuffitx", //NON-NLS
"application/x-gtar", "application/x-gtar", //NON-NLS
"application/x-archive", "application/x-archive", //NON-NLS
"application/x-executable", "application/x-executable", //NON-NLS
"application/x-gzip", "application/x-gzip", //NON-NLS
"application/zip", "application/zip", //NON-NLS
"application/x-zoo", "application/x-zoo", //NON-NLS
"application/x-cpio", "application/x-cpio", //NON-NLS
"application/x-shar", "application/x-shar", //NON-NLS
"application/x-tar", "application/x-tar", //NON-NLS
"application/x-bzip", "application/x-bzip", //NON-NLS
"application/x-bzip2", "application/x-bzip2", //NON-NLS
"application/x-lzip", "application/x-lzip", //NON-NLS
"application/x-lzma", "application/x-lzma", //NON-NLS
"application/x-lzop", "application/x-lzop", //NON-NLS
"application/x-z", "application/x-z", //NON-NLS
"application/x-compress"); "application/x-compress"); //NON-NLS
/** /**
* Get number of chunks resulted from extracting this AbstractFile * Get number of chunks resulted from extracting this AbstractFile

View File

@ -53,12 +53,13 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
private int numChunks = 0; private int numChunks = 0;
static final List<String> WEB_MIME_TYPES = Arrays.asList( static final List<String> WEB_MIME_TYPES = Arrays.asList(
"application/javascript", "application/javascript", //NON-NLS
"application/xhtml+xml", "application/xhtml+xml", //NON-NLS
"application/json", "application/json", //NON-NLS
"text/css", "text/css", //NON-NLS
"text/html", "text/html", //NON-NLS NON-NLS
"text/javascript" //"application/xml", "text/javascript" //NON-NLS
//"application/xml",
//"application/xml-dtd", //"application/xml-dtd",
); );
@ -114,7 +115,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
// In case there is an exception or parse() isn't called // In case there is an exception or parse() isn't called
if (reader == null) { if (reader == null) {
logger.log(Level.WARNING, "No reader available from HTML parser"); logger.log(Level.WARNING, "No reader available from HTML parser"); //NON-NLS
return false; return false;
} }
@ -174,29 +175,29 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
++this.numChunks; ++this.numChunks;
} catch (Ingester.IngesterException ingEx) { } catch (Ingester.IngesterException ingEx) {
success = false; success = false;
logger.log(Level.WARNING, "Ingester had a problem with extracted HTML from file '" logger.log(Level.WARNING, "Ingester had a problem with extracted HTML from file '" //NON-NLS
+ sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); //NON-NLS
throw ingEx; //need to rethrow/return to signal error and move on throw ingEx; //need to rethrow/return to signal error and move on
} }
} }
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); logger.log(Level.WARNING, "Unable to read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS
success = false; success = false;
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.WARNING, "Unexpected error, can't read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); logger.log(Level.WARNING, "Unexpected error, can't read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS
success = false; success = false;
} finally { } finally {
try { try {
stream.close(); stream.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to close content stream from " + sourceFile.getId(), ex); logger.log(Level.WARNING, "Unable to close content stream from " + sourceFile.getId(), ex); //NON-NLS
} }
try { try {
if (reader != null) { if (reader != null) {
reader.close(); reader.close();
} }
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); //NON-NLS
} }
} }

View File

@ -54,7 +54,7 @@ import org.sleuthkit.datamodel.AbstractFile;
@Override @Override
public String getContentType() { public String getContentType() {
return "text/plain;charset=" + charset.name(); return "text/plain;charset=" + charset.name(); //NON-NLS
} }
@Override @Override

View File

@ -141,7 +141,7 @@ class AbstractFileStringExtract implements AbstractFileExtract {
++this.numChunks; ++this.numChunks;
} catch (IngesterException ingEx) { } catch (IngesterException ingEx) {
success = false; success = false;
logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); //NON-NLS
throw ingEx; //need to rethrow/return to signal error and move on throw ingEx; //need to rethrow/return to signal error and move on
} }
@ -153,13 +153,13 @@ class AbstractFileStringExtract implements AbstractFileExtract {
ingester.ingest(this); ingester.ingest(this);
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to read input stream to divide and send to Solr, file: " + sourceFile.getName(), ex); logger.log(Level.WARNING, "Unable to read input stream to divide and send to Solr, file: " + sourceFile.getName(), ex); //NON-NLS
success = false; success = false;
} finally { } finally {
try { try {
stringStream.close(); stringStream.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Error closing input stream stream, file: " + sourceFile.getName(), ex); logger.log(Level.WARNING, "Error closing input stream stream, file: " + sourceFile.getName(), ex); //NON-NLS
} }
} }

View File

@ -80,7 +80,7 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract {
for (MediaType mt : mediaTypes) { for (MediaType mt : mediaTypes) {
TIKA_SUPPORTED_TYPES.add(mt.getType() + "/" + mt.getSubtype()); TIKA_SUPPORTED_TYPES.add(mt.getType() + "/" + mt.getSubtype());
} }
logger.log(Level.INFO, "Tika supported media types: {0}", TIKA_SUPPORTED_TYPES); logger.log(Level.INFO, "Tika supported media types: {0}", TIKA_SUPPORTED_TYPES); //NON-NLS
} }
@Override @Override
@ -149,7 +149,7 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract {
reader = parseTask.getReader(); reader = parseTask.getReader();
if (reader == null) { if (reader == null) {
//likely due to exception in parse() //likely due to exception in parse()
logger.log(Level.WARNING, "No reader available from Tika parse"); logger.log(Level.WARNING, "No reader available from Tika parse"); //NON-NLS
return false; return false;
} }
@ -206,7 +206,7 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract {
//sort meta data keys //sort meta data keys
List<String> sortedKeyList = Arrays.asList(meta.names()); List<String> sortedKeyList = Arrays.asList(meta.names());
Collections.sort(sortedKeyList); Collections.sort(sortedKeyList);
sb.append("\n\n------------------------------METADATA------------------------------\n\n"); sb.append("\n\n------------------------------METADATA------------------------------\n\n"); //NON-NLS
for (String key : sortedKeyList) { for (String key : sortedKeyList) {
String value = meta.get(key); String value = meta.get(key);
sb.append(key).append(": ").append(value).append("\n"); sb.append(key).append(": ").append(value).append("\n");
@ -224,18 +224,18 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract {
++this.numChunks; ++this.numChunks;
} catch (Ingester.IngesterException ingEx) { } catch (Ingester.IngesterException ingEx) {
success = false; success = false;
logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" //NON-NLS
+ sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); //NON-NLS
throw ingEx; //need to rethrow/return to signal error and move on throw ingEx; //need to rethrow/return to signal error and move on
} }
} }
} catch (IOException ex) { } catch (IOException ex) {
final String msg = "Exception: Unable to read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); final String msg = "Exception: Unable to read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); //NON-NLS
KeywordSearch.getTikaLogger().log(Level.WARNING, msg, ex); KeywordSearch.getTikaLogger().log(Level.WARNING, msg, ex);
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
success = false; success = false;
} catch (Exception ex) { } catch (Exception ex) {
final String msg = "Exception: Unexpected error, can't read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); final String msg = "Exception: Unexpected error, can't read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); //NON-NLS
KeywordSearch.getTikaLogger().log(Level.WARNING, msg, ex); KeywordSearch.getTikaLogger().log(Level.WARNING, msg, ex);
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
success = false; success = false;
@ -243,14 +243,14 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract {
try { try {
stream.close(); stream.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to close Tika content stream from " + sourceFile.getId(), ex); logger.log(Level.WARNING, "Unable to close Tika content stream from " + sourceFile.getId(), ex); //NON-NLS
} }
try { try {
if (reader != null) { if (reader != null) {
reader.close(); reader.close();
} }
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); //NON-NLS
} }
} }
@ -269,17 +269,17 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract {
public boolean isSupported(AbstractFile file, String detectedFormat) { public boolean isSupported(AbstractFile file, String detectedFormat) {
if (detectedFormat == null) { if (detectedFormat == null) {
return false; return false;
} else if (detectedFormat.equals("application/octet-stream") } else if (detectedFormat.equals("application/octet-stream") //NON-NLS
|| detectedFormat.equals("application/x-msdownload")) { || detectedFormat.equals("application/x-msdownload")) { //NON-NLS
//any binary unstructured blobs (string extraction will be used) //any binary unstructured blobs (string extraction will be used)
return false; return false;
} else if (AbstractFileExtract.ARCHIVE_MIME_TYPES.contains(detectedFormat)) { } else if (AbstractFileExtract.ARCHIVE_MIME_TYPES.contains(detectedFormat)) {
return false; return false;
} //skip video other than flv (tika supports flv only) } //skip video other than flv (tika supports flv only)
else if (detectedFormat.contains("video/") else if (detectedFormat.contains("video/") //NON-NLS
&& !detectedFormat.equals("video/x-flv")) { && !detectedFormat.equals("video/x-flv")) { //NON-NLS
return false; return false;
} else if (detectedFormat.contains("application/x-font-ttf")) { } else if (detectedFormat.contains("application/x-font-ttf")) { //NON-NLS
// Tika currently has a bug in the ttf parser in fontbox. // Tika currently has a bug in the ttf parser in fontbox.
// It will throw an out of memory exception // It will throw an out of memory exception
return false; return false;
@ -319,11 +319,11 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract {
try { try {
reader = tika.parse(stream, meta); reader = tika.parse(stream, meta);
} catch (IOException ex) { } catch (IOException ex) {
KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS
tika = null; tika = null;
reader = null; reader = null;
} catch (Exception ex) { } catch (Exception ex) {
KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS
tika = null; tika = null;
reader = null; reader = null;
} }

View File

@ -65,7 +65,7 @@ class ByteContentStream implements ContentStream {
@Override @Override
public String getContentType() { public String getContentType() {
return "text/plain;charset=" + charset.name(); return "text/plain;charset=" + charset.name(); //NON-NLS
} }
@Override @Override

View File

@ -161,7 +161,7 @@ public class DropdownSearchPanel extends AbstractKeywordSearchPerformer {
org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DropdownSearchPanel.class, "DropdownSearchPanel.selectAllMenuItem.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DropdownSearchPanel.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(DropdownSearchPanel.class, "DropdownSearchPanel.keywordTextField.text")); // NOI18N keywordTextField.setText(org.openide.util.NbBundle.getMessage(DropdownSearchPanel.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));
@ -177,7 +177,7 @@ public class DropdownSearchPanel extends AbstractKeywordSearchPerformer {
} }
}); });
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(DropdownSearchPanel.class, "DropdownSearchPanel.searchButton.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DropdownSearchPanel.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) {
@ -239,7 +239,7 @@ public class DropdownSearchPanel extends AbstractKeywordSearchPerformer {
try { try {
search(); search();
} catch(Exception e) { } catch(Exception e) {
logger.log(Level.SEVERE, "search() threw exception", e); logger.log(Level.SEVERE, "search() threw exception", e); //NON-NLS
} }
}//GEN-LAST:event_keywordTextFieldActionPerformed }//GEN-LAST:event_keywordTextFieldActionPerformed

View File

@ -122,7 +122,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
// set font size manually in an effort to get fonts in this panel to look // set font size manually in an effort to get fonts in this panel to look
// similar to what is in the 'String View' content viewer. // similar to what is in the 'String View' content viewer.
StyleSheet ss = editorKit.getStyleSheet(); StyleSheet ss = editorKit.getStyleSheet();
ss.addRule("body {font-size: 8.5px;}"); ss.addRule("body {font-size: 8.5px;}"); //NON-NLS
extractedTextPane.setEditorKit(editorKit); extractedTextPane.setEditorKit(editorKit);
@ -226,43 +226,43 @@ class ExtractedContentPanel extends javax.swing.JPanel {
hitButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitButtonsLabel.text")); // NOI18N hitButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitButtonsLabel.text")); // NOI18N
hitPreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N hitPreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N NON-NLS
hitPreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitPreviousButton.text")); // NOI18N hitPreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitPreviousButton.text")); // NOI18N
hitPreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); hitPreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
hitPreviousButton.setBorderPainted(false); hitPreviousButton.setBorderPainted(false);
hitPreviousButton.setContentAreaFilled(false); hitPreviousButton.setContentAreaFilled(false);
hitPreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N hitPreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N NON-NLS
hitPreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); hitPreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
hitPreviousButton.setPreferredSize(new java.awt.Dimension(23, 23)); hitPreviousButton.setPreferredSize(new java.awt.Dimension(23, 23));
hitPreviousButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_hover.png"))); // NOI18N hitPreviousButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_hover.png"))); // NOI18N NON-NLS
hitNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N hitNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N NON-NLS
hitNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitNextButton.text")); // NOI18N hitNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitNextButton.text")); // NOI18N
hitNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); hitNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
hitNextButton.setBorderPainted(false); hitNextButton.setBorderPainted(false);
hitNextButton.setContentAreaFilled(false); hitNextButton.setContentAreaFilled(false);
hitNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N hitNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
hitNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); hitNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
hitNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); hitNextButton.setPreferredSize(new java.awt.Dimension(23, 23));
hitNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_hover.png"))); // NOI18N hitNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_hover.png"))); // NOI18N NON-NLS
pageButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageButtonsLabel.text")); // NOI18N pageButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageButtonsLabel.text")); // NOI18N
pagePreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N pagePreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N NON-NLS
pagePreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.text")); // NOI18N pagePreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.text")); // NOI18N
pagePreviousButton.setActionCommand(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.actionCommand")); // NOI18N pagePreviousButton.setActionCommand(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.actionCommand")); // NOI18N
pagePreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); pagePreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
pagePreviousButton.setBorderPainted(false); pagePreviousButton.setBorderPainted(false);
pagePreviousButton.setContentAreaFilled(false); pagePreviousButton.setContentAreaFilled(false);
pagePreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N pagePreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N NON-NLS
pagePreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); pagePreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N NON-NLS
pageNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageNextButton.text")); // NOI18N pageNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageNextButton.text")); // NOI18N
pageNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); pageNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
pageNextButton.setBorderPainted(false); pageNextButton.setBorderPainted(false);
pageNextButton.setContentAreaFilled(false); pageNextButton.setContentAreaFilled(false);
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
pageNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); pageNextButton.setPreferredSize(new java.awt.Dimension(23, 23));
@ -416,7 +416,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
//detect text direction using first 1024 chars and set it //detect text direction using first 1024 chars and set it
//get first up to 1024 chars, strip <pre> tag and unescape html to get the string on which to detect //get first up to 1024 chars, strip <pre> tag and unescape html to get the string on which to detect
final int len = text.length(); final int len = text.length();
final int prefixLen = "<pre>".length(); final int prefixLen = "<pre>".length(); //NON-NLS
if (len > prefixLen) { if (len > prefixLen) {
final int maxOrientChars = Math.min(len, 1024); final int maxOrientChars = Math.min(len, 1024);
final String orientDetectText = EscapeUtil.unEscapeHtml(text.substring(prefixLen, maxOrientChars)); final String orientDetectText = EscapeUtil.unEscapeHtml(text.substring(prefixLen, maxOrientChars));
@ -708,7 +708,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
try { try {
get(); get();
} catch (InterruptedException | ExecutionException ex) { } catch (InterruptedException | ExecutionException ex) {
logger.log(Level.SEVERE, "Error getting marked up text" ); logger.log(Level.SEVERE, "Error getting marked up text" ); //NON-NLS
} }
// catch and ignore if we were cancelled // catch and ignore if we were cancelled
catch (java.util.concurrent.CancellationException ex ) { } catch (java.util.concurrent.CancellationException ex ) { }

View File

@ -62,7 +62,7 @@ public class ExtractedContentViewer implements DataContentViewer {
private int curContentChunk; private int curContentChunk;
public ExtractedContentViewer() { public ExtractedContentViewer() {
logger.log(Level.INFO, "Created TextView instance: " + this); logger.log(Level.INFO, "Created TextView instance: " + this); //NON-NLS
} }
@Override @Override
@ -186,7 +186,7 @@ public class ExtractedContentViewer implements DataContentViewer {
try { try {
return getSolrContent(selectedNode, currentPage, hasChunks); return getSolrContent(selectedNode, currentPage, hasChunks);
} catch (SolrServerException ex) { } catch (SolrServerException ex) {
logger.log(Level.WARNING, "Couldn't get extracted content.", ex); logger.log(Level.WARNING, "Couldn't get extracted content.", ex); //NON-NLS
return ""; return "";
} }
} }
@ -234,10 +234,10 @@ public class ExtractedContentViewer implements DataContentViewer {
} }
inited = true; inited = true;
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Could not get number of chunks: ", ex); logger.log(Level.WARNING, "Could not get number of chunks: ", ex); //NON-NLS
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Could not get number of chunks: ", ex); logger.log(Level.WARNING, "Could not get number of chunks: ", ex); //NON-NLS
} }
return numPages; return numPages;
} }
@ -395,10 +395,10 @@ public class ExtractedContentViewer implements DataContentViewer {
try { try {
return solrServer.queryIsIndexed(contentID); return solrServer.queryIsIndexed(contentID);
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex); logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex); //NON-NLS
return false; return false;
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex); logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex); //NON-NLS
return false; return false;
} }
} }
@ -456,12 +456,12 @@ public class ExtractedContentViewer implements DataContentViewer {
try { try {
curContent = EscapeUtil.escapeHtml(solrServer.getSolrContent(contentObj, chunkId)).trim(); curContent = EscapeUtil.escapeHtml(solrServer.getSolrContent(contentObj, chunkId)).trim();
StringBuilder sb = new StringBuilder(curContent.length() + 20); StringBuilder sb = new StringBuilder(curContent.length() + 20);
sb.append("<pre>").append(curContent).append("</pre>"); sb.append("<pre>").append(curContent).append("</pre>"); //NON-NLS
curContent = sb.toString(); curContent = sb.toString();
curContentId = contentId; curContentId = contentId;
curContentChunk = chunkId; curContentChunk = chunkId;
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Couldn't get text content.", ex); logger.log(Level.WARNING, "Couldn't get text content.", ex); //NON-NLS
return ""; return "";
} }
return curContent; return curContent;

View File

@ -44,8 +44,8 @@ import org.sleuthkit.datamodel.Content;
class HighlightedMatchesSource implements MarkupSource, HighlightLookup { class HighlightedMatchesSource implements MarkupSource, HighlightLookup {
private static final Logger logger = Logger.getLogger(HighlightedMatchesSource.class.getName()); private static final Logger logger = Logger.getLogger(HighlightedMatchesSource.class.getName());
private static final String HIGHLIGHT_PRE = "<span style='background:yellow'>"; private static final String HIGHLIGHT_PRE = "<span style='background:yellow'>"; //NON-NLS
private static final String HIGHLIGHT_POST = "</span>"; private static final String HIGHLIGHT_POST = "</span>"; //NON-NLS
private static final String ANCHOR_PREFIX = HighlightedMatchesSource.class.getName() + "_"; private static final String ANCHOR_PREFIX = HighlightedMatchesSource.class.getName() + "_";
private Content content; private Content content;
@ -105,10 +105,10 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup {
try { try {
this.numberPages = solrServer.queryNumFileChunks(content.getId()); this.numberPages = solrServer.queryNumFileChunks(content.getId());
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); //NON-NLS
return; return;
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); //NON-NLS
return; return;
} }
@ -146,7 +146,7 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup {
try { try {
hits = chunksQuery.performQuery(); hits = chunksQuery.performQuery();
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.INFO, "Could not get chunk info and get highlights", ex); logger.log(Level.INFO, "Could not get chunk info and get highlights", ex); //NON-NLS
return; return;
} }
} }
@ -355,13 +355,13 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup {
q.setHighlightFragsize(0); // don't fragment the highlight, works with original highlighter, or needs "single" list builder with FVH q.setHighlightFragsize(0); // don't fragment the highlight, works with original highlighter, or needs "single" list builder with FVH
//tune the highlighter //tune the highlighter
q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one NON-NLS
q.setParam("hl.tag.pre", HIGHLIGHT_PRE); //makes sense for FastVectorHighlighter only q.setParam("hl.tag.pre", HIGHLIGHT_PRE); //makes sense for FastVectorHighlighter only NON-NLS
q.setParam("hl.tag.post", HIGHLIGHT_POST); //makes sense for FastVectorHighlighter only q.setParam("hl.tag.post", HIGHLIGHT_POST); //makes sense for FastVectorHighlighter only NON-NLS
q.setParam("hl.fragListBuilder", "single"); //makes sense for FastVectorHighlighter only q.setParam("hl.fragListBuilder", "single"); //makes sense for FastVectorHighlighter only NON-NLS
//docs says makes sense for the original Highlighter only, but not really //docs says makes sense for the original Highlighter only, but not really
q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); //NON-NLS
try { try {
QueryResponse response = solrServer.query(q, METHOD.POST); QueryResponse response = solrServer.query(q, METHOD.POST);
@ -381,13 +381,13 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup {
highlightedContent = insertAnchors(highlightedContent); highlightedContent = insertAnchors(highlightedContent);
return "<html><pre>" + highlightedContent + "</pre></html>"; return "<html><pre>" + highlightedContent + "</pre></html>"; //NON-NLS
} }
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Couldn't query markup for page: " + currentPage, ex); logger.log(Level.WARNING, "Couldn't query markup for page: " + currentPage, ex); //NON-NLS
return ""; return "";
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Could not query markup for page: " + currentPage, ex); logger.log(Level.WARNING, "Could not query markup for page: " + currentPage, ex); //NON-NLS
return ""; return "";
} }
} }
@ -423,8 +423,8 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup {
final String searchToken = HIGHLIGHT_PRE; final String searchToken = HIGHLIGHT_PRE;
final int indexSearchTokLen = searchToken.length(); final int indexSearchTokLen = searchToken.length();
final String insertPre = "<a name='" + ANCHOR_PREFIX; final String insertPre = "<a name='" + ANCHOR_PREFIX; //NON-NLS
final String insertPost = "'></a>"; final String insertPost = "'></a>"; //NON-NLS
int count = 0; int count = 0;
while ((index = buf.indexOf(searchToken, searchOffset)) >= 0) { while ((index = buf.indexOf(searchToken, searchOffset)) >= 0) {
String insertString = insertPre + Integer.toString(count + 1) + insertPost; String insertString = insertPre + Integer.toString(count + 1) + insertPost;

View File

@ -74,7 +74,7 @@ class Ingester {
//for ingesting chunk as SolrInputDocument (non-content-streaming, by-pass tika) //for ingesting chunk as SolrInputDocument (non-content-streaming, by-pass tika)
//TODO use a streaming way to add content to /update handler //TODO use a streaming way to add content to /update handler
private static final int MAX_DOC_CHUNK_SIZE = 1024*1024; private static final int MAX_DOC_CHUNK_SIZE = 1024*1024;
private static final String docContentEncoding = "UTF-8"; private static final String docContentEncoding = "UTF-8"; //NON-NLS
private Ingester() { private Ingester() {
@ -94,7 +94,7 @@ class Ingester {
// Warn if files might have been left uncommited. // Warn if files might have been left uncommited.
if (uncommitedIngests) { if (uncommitedIngests) {
logger.warning("Ingester was used to add files that it never committed."); logger.warning("Ingester was used to add files that it never committed."); //NON-NLS
} }
} }
@ -249,7 +249,7 @@ class Ingester {
dataSourceId = curCase.getFileDataSource(af); dataSourceId = curCase.getFileDataSource(af);
params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(dataSourceId)); params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(dataSourceId));
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Could not get data source id to properly index the file " + af.getId()); logger.log(Level.SEVERE, "Could not get data source id to properly index the file " + af.getId()); //NON-NLS
params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(-1)); params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(-1));
} }
@ -309,7 +309,7 @@ class Ingester {
try { try {
is.close(); is.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Could not close input stream after reading content, " + cs.getName(), ex); logger.log(Level.WARNING, "Could not close input stream after reading content, " + cs.getName(), ex); //NON-NLS
} }
} }
@ -356,34 +356,34 @@ class Ingester {
* content, but the Solr server is probably fine. * content, but the Solr server is probably fine.
*/ */
private void ingestExtract(ContentStream cs, Map<String, String> fields, final long size) throws IngesterException { private void ingestExtract(ContentStream cs, Map<String, String> fields, final long size) throws IngesterException {
final ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); final ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); //NON-NLS
up.addContentStream(cs); up.addContentStream(cs);
setFields(up, fields); setFields(up, fields);
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true); up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
final String contentType = cs.getContentType(); final String contentType = cs.getContentType();
if (contentType != null && !contentType.trim().equals("")) { if (contentType != null && !contentType.trim().equals("")) {
up.setParam("stream.contentType", contentType); up.setParam("stream.contentType", contentType); //NON-NLS
} }
//logger.log(Level.INFO, "Ingesting " + fields.get("file_name")); //logger.log(Level.INFO, "Ingesting " + fields.get("file_name"));
up.setParam("commit", "false"); up.setParam("commit", "false"); //NON-NLS
final Future<?> f = upRequestExecutor.submit(new UpRequestTask(up)); final Future<?> f = upRequestExecutor.submit(new UpRequestTask(up));
try { try {
f.get(getTimeout(size), TimeUnit.SECONDS); f.get(getTimeout(size), TimeUnit.SECONDS);
} catch (TimeoutException te) { } catch (TimeoutException te) {
logger.log(Level.WARNING, "Solr timeout encountered, trying to restart Solr"); logger.log(Level.WARNING, "Solr timeout encountered, trying to restart Solr"); //NON-NLS
//restart may be needed to recover from some error conditions //restart may be needed to recover from some error conditions
hardSolrRestart(); hardSolrRestart();
throw new IngesterException( throw new IngesterException(
NbBundle.getMessage(this.getClass(), "Ingester.ingestExtract.exception.solrTimeout.msg", NbBundle.getMessage(this.getClass(), "Ingester.ingestExtract.exception.solrTimeout.msg",
fields.get("id"), fields.get("file_name"))); fields.get("id"), fields.get("file_name"))); //NON-NLS
} catch (Exception e) { } catch (Exception e) {
throw new IngesterException( throw new IngesterException(
NbBundle.getMessage(this.getClass(), "Ingester.ingestExtract.exception.probPostToSolr.msg", NbBundle.getMessage(this.getClass(), "Ingester.ingestExtract.exception.probPostToSolr.msg",
fields.get("id"), fields.get("file_name")), e); fields.get("id"), fields.get("file_name")), e); //NON-NLS
} }
uncommitedIngests = true; uncommitedIngests = true;
} }
@ -395,7 +395,7 @@ class Ingester {
try { try {
solrServer.closeCore(); solrServer.closeCore();
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Cannot close core", ex); logger.log(Level.WARNING, "Cannot close core", ex); //NON-NLS
} }
solrServer.stop(); solrServer.stop();
@ -403,15 +403,15 @@ class Ingester {
try { try {
solrServer.start(); solrServer.start();
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Cannot start", ex); logger.log(Level.WARNING, "Cannot start", ex); //NON-NLS
} catch (SolrServerNoPortException ex) { } catch (SolrServerNoPortException ex) {
logger.log(Level.WARNING, "Cannot start server with this port", ex); logger.log(Level.WARNING, "Cannot start server with this port", ex); //NON-NLS
} }
try { try {
solrServer.openCore(); solrServer.openCore();
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Cannot open core", ex); logger.log(Level.WARNING, "Cannot open core", ex); //NON-NLS
} }
} }
@ -491,9 +491,9 @@ class Ingester {
solrServer.commit(); solrServer.commit();
uncommitedIngests = false; uncommitedIngests = false;
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Error commiting index", ex); logger.log(Level.WARNING, "Error commiting index", ex); //NON-NLS
} catch (SolrServerException ex) { } catch (SolrServerException ex) {
logger.log(Level.WARNING, "Error commiting index", ex); logger.log(Level.WARNING, "Error commiting index", ex); //NON-NLS
} }
} }
@ -505,7 +505,7 @@ class Ingester {
*/ */
private static void setFields(ContentStreamUpdateRequest up, Map<String, String> fields) { private static void setFields(ContentStreamUpdateRequest up, Map<String, String> fields) {
for (Entry<String, String> field : fields.entrySet()) { for (Entry<String, String> field : fields.entrySet()) {
up.setParam("literal." + field.getKey(), field.getValue()); up.setParam("literal." + field.getKey(), field.getValue()); //NON-NLS
} }
} }

View File

@ -53,19 +53,19 @@ class Installer extends ModuleInstall {
//TODO revise this logic, handle other server types, move some logic to Server class //TODO revise this logic, handle other server types, move some logic to Server class
try { try {
//check if running from previous application instance and try to shut down //check if running from previous application instance and try to shut down
logger.log(Level.INFO, "Checking if server is running"); logger.log(Level.INFO, "Checking if server is running"); //NON-NLS
if (server.isRunning()) { if (server.isRunning()) {
//TODO this could hang if other type of server is running //TODO this could hang if other type of server is running
logger.log(Level.WARNING, "Already a server running on " + server.getCurrentSolrServerPort() logger.log(Level.WARNING, "Already a server running on " + server.getCurrentSolrServerPort() //NON-NLS
+ " port, maybe leftover from a previous run. Trying to shut it down."); + " port, maybe leftover from a previous run. Trying to shut it down."); //NON-NLS
//stop gracefully //stop gracefully
server.stop(); server.stop();
logger.log(Level.INFO, "Re-checking if server is running"); logger.log(Level.INFO, "Re-checking if server is running"); //NON-NLS
if (server.isRunning()) { if (server.isRunning()) {
int serverPort = server.getCurrentSolrServerPort(); int serverPort = server.getCurrentSolrServerPort();
int serverStopPort = server.getCurrentSolrStopPort(); int serverStopPort = server.getCurrentSolrStopPort();
logger.log(Level.SEVERE, "There's already a server running on " logger.log(Level.SEVERE, "There's already a server running on " //NON-NLS
+ serverPort + " port that can't be shutdown."); + serverPort + " port that can't be shutdown."); //NON-NLS
if (!Server.isPortAvailable(serverPort)) { if (!Server.isPortAvailable(serverPort)) {
reportPortError(serverPort); reportPortError(serverPort);
} else if (!Server.isPortAvailable(serverStopPort)) { } else if (!Server.isPortAvailable(serverStopPort)) {
@ -78,13 +78,13 @@ class Installer extends ModuleInstall {
//in this case give up //in this case give up
} else { } else {
logger.log(Level.INFO, "Old Solr server shutdown successfully."); logger.log(Level.INFO, "Old Solr server shutdown successfully."); //NON-NLS
//make sure there really isn't a hang Solr process, in case isRunning() reported false //make sure there really isn't a hang Solr process, in case isRunning() reported false
server.killSolr(); server.killSolr();
} }
} }
} catch (KeywordSearchModuleException e) { } catch (KeywordSearchModuleException e) {
logger.log(Level.SEVERE, "Starting server failed, will try to kill. ", e); logger.log(Level.SEVERE, "Starting server failed, will try to kill. ", e); //NON-NLS
server.killSolr(); server.killSolr();
} }
@ -94,13 +94,13 @@ class Installer extends ModuleInstall {
//Try to bind to the port 4 times at 1 second intervals. //Try to bind to the port 4 times at 1 second intervals.
//TODO move some of this logic to Server class //TODO move some of this logic to Server class
for (int i = 0; i <= 3; i++) { for (int i = 0; i <= 3; i++) {
logger.log(Level.INFO, "Checking if port available."); logger.log(Level.INFO, "Checking if port available."); //NON-NLS
if (Server.isPortAvailable(server.getCurrentSolrServerPort())) { if (Server.isPortAvailable(server.getCurrentSolrServerPort())) {
logger.log(Level.INFO, "Port available, trying to start server."); logger.log(Level.INFO, "Port available, trying to start server."); //NON-NLS
server.start(); server.start();
break; break;
} else if (i == 3) { } else if (i == 3) {
logger.log(Level.INFO, "No port available, done retrying."); logger.log(Level.INFO, "No port available, done retrying."); //NON-NLS
reportPortError(server.getCurrentSolrServerPort()); reportPortError(server.getCurrentSolrServerPort());
retries = 0; retries = 0;
break; break;
@ -108,16 +108,16 @@ class Installer extends ModuleInstall {
try { try {
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException iex) { } catch (InterruptedException iex) {
logger.log(Level.WARNING, "Timer interrupted"); logger.log(Level.WARNING, "Timer interrupted"); //NON-NLS
} }
} }
} }
} catch (SolrServerNoPortException npe) { } catch (SolrServerNoPortException npe) {
logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); //NON-NLS
//try to kill it //try to kill it
} catch (KeywordSearchModuleException e) { } catch (KeywordSearchModuleException e) {
logger.log(Level.SEVERE, "Starting server failed. ", e); logger.log(Level.SEVERE, "Starting server failed. ", e); //NON-NLS
} }
@ -127,25 +127,25 @@ class Installer extends ModuleInstall {
try { try {
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
logger.log(Level.WARNING, "Timer interrupted."); logger.log(Level.WARNING, "Timer interrupted."); //NON-NLS
} }
try { try {
logger.log(Level.INFO, "Ensuring the server is running, retries remaining: " + retries); logger.log(Level.INFO, "Ensuring the server is running, retries remaining: " + retries); //NON-NLS
if (!server.isRunning()) { if (!server.isRunning()) {
logger.log(Level.WARNING, "Server still not running"); logger.log(Level.WARNING, "Server still not running"); //NON-NLS
try { try {
logger.log(Level.WARNING, "Trying to start the server. "); logger.log(Level.WARNING, "Trying to start the server. "); //NON-NLS
server.start(); server.start();
} catch (SolrServerNoPortException npe) { } catch (SolrServerNoPortException npe) {
logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); //NON-NLS
} }
} else { } else {
logger.log(Level.INFO, "Server appears now running. "); logger.log(Level.INFO, "Server appears now running. "); //NON-NLS
break; break;
} }
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.SEVERE, "Starting server failed. ", ex); logger.log(Level.SEVERE, "Starting server failed. ", ex); //NON-NLS
//retry if has retries //retry if has retries
} }
@ -156,12 +156,12 @@ class Installer extends ModuleInstall {
try { try {
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
logger.log(Level.WARNING, "Timer interrupted."); logger.log(Level.WARNING, "Timer interrupted."); //NON-NLS
} }
try { try {
logger.log(Level.INFO, "Last check if server is running. "); logger.log(Level.INFO, "Last check if server is running. "); //NON-NLS
if (!server.isRunning()) { if (!server.isRunning()) {
logger.log(Level.SEVERE, "Server is still not running. "); logger.log(Level.SEVERE, "Server is still not running. "); //NON-NLS
//check if port is taken or some other reason //check if port is taken or some other reason
int serverPort = server.getCurrentSolrServerPort(); int serverPort = server.getCurrentSolrServerPort();
int serverStopPort = server.getCurrentSolrStopPort(); int serverStopPort = server.getCurrentSolrStopPort();
@ -175,7 +175,7 @@ class Installer extends ModuleInstall {
} }
} }
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.SEVERE, "Starting server failed. ", ex); logger.log(Level.SEVERE, "Starting server failed. ", ex); //NON-NLS
reportInitError(); reportInitError();
} }

View File

@ -83,7 +83,7 @@ class JerichoParserWrapper {
// Get all the tags in the source // Get all the tags in the source
List<StartTag> tags = source.getAllStartTags(); List<StartTag> tags = source.getAllStartTags();
for(StartTag tag : tags) { for(StartTag tag : tags) {
if(tag.getName().equals("script")) { if(tag.getName().equals("script")) { //NON-NLS
// If the <script> tag has attributes // If the <script> tag has attributes
scripts.append(numScripts).append(") "); scripts.append(numScripts).append(") ");
if(tag.getTagContent().length()>0) { if(tag.getTagContent().length()>0) {
@ -92,11 +92,11 @@ class JerichoParserWrapper {
// Get whats between the <script> .. </script> tags // Get whats between the <script> .. </script> tags
scripts.append(tag.getElement().getContent()).append("\n"); scripts.append(tag.getElement().getContent()).append("\n");
numScripts++; numScripts++;
} else if(tag.getName().equals("a")) { } else if(tag.getName().equals("a")) { //NON-NLS
links.append(numLinks).append(") "); links.append(numLinks).append(") ");
links.append(tag.getTagContent()).append("\n"); links.append(tag.getTagContent()).append("\n");
numLinks++; numLinks++;
} else if(tag.getName().equals("img")) { } else if(tag.getName().equals("img")) { //NON-NLS
images.append(numImages).append(") "); images.append(numImages).append(") ");
images.append(tag.getTagContent()).append("\n"); images.append(tag.getTagContent()).append("\n");
numImages++; numImages++;
@ -118,27 +118,27 @@ class JerichoParserWrapper {
out.append(text).append("\n\n"); out.append(text).append("\n\n");
out.append("----------NONVISIBLE TEXT----------\n\n"); out.append("----------NONVISIBLE TEXT----------\n\n"); //NON-NLS
if(numScripts>1) { if(numScripts>1) {
out.append("---Scripts---\n"); out.append("---Scripts---\n"); //NON-NLS
out.append(scripts.toString()).append("\n"); out.append(scripts.toString()).append("\n");
} if(numLinks>1) { } if(numLinks>1) {
out.append("---Links---\n"); out.append("---Links---\n"); //NON-NLS
out.append(links.toString()).append("\n"); out.append(links.toString()).append("\n");
} if(numImages>1) { } if(numImages>1) {
out.append("---Images---\n"); out.append("---Images---\n"); //NON-NLS
out.append(images.toString()).append("\n"); out.append(images.toString()).append("\n");
} if(numComments>1) { } if(numComments>1) {
out.append("---Comments---\n"); out.append("---Comments---\n"); //NON-NLS
out.append(comments.toString()).append("\n"); out.append(comments.toString()).append("\n");
} if(numOthers>1) { } if(numOthers>1) {
out.append("---Others---\n"); out.append("---Others---\n"); //NON-NLS
out.append(others.toString()).append("\n"); out.append(others.toString()).append("\n");
} }
// All done, now make it a reader // All done, now make it a reader
reader = new StringReader(out.toString()); reader = new StringReader(out.toString());
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to parse the HTML file", ex); logger.log(Level.WARNING, "Unable to parse the HTML file", ex); //NON-NLS
} }
} }

View File

@ -42,12 +42,12 @@ public class KeywordSearch {
private static Server server; private static Server server;
//we want a custom java.util.logging.Logger here for a reason //we want a custom java.util.logging.Logger here for a reason
//a separate logger from framework logs //a separate logger from framework logs
private static final Logger TIKA_LOGGER = Logger.getLogger("Tika"); private static final Logger TIKA_LOGGER = Logger.getLogger("Tika"); //NON-NLS
private static final Logger logger = Logger.getLogger(Case.class.getName()); private static final Logger logger = Logger.getLogger(Case.class.getName());
public enum QueryType { public enum QueryType {
LITERAL, REGEX LITERAL, REGEX
}; };
public static final String NUM_FILES_CHANGE_EVT = "NUM_FILES_CHANGE_EVT"; public static final String NUM_FILES_CHANGE_EVT = "NUM_FILES_CHANGE_EVT"; //NON-NLS
private static PropertyChangeSupport changeSupport = new PropertyChangeSupport(KeywordSearch.class); private static PropertyChangeSupport changeSupport = new PropertyChangeSupport(KeywordSearch.class);
/** /**
@ -66,7 +66,7 @@ public class KeywordSearch {
static { static {
try { try {
final int MAX_TIKA_LOG_FILES = 3; final int MAX_TIKA_LOG_FILES = 3;
FileHandler tikaLogHandler = new FileHandler(PlatformUtil.getUserDirectory().getAbsolutePath() + "/var/log/tika.log", FileHandler tikaLogHandler = new FileHandler(PlatformUtil.getUserDirectory().getAbsolutePath() + "/var/log/tika.log", //NON-NLS
0, MAX_TIKA_LOG_FILES); 0, MAX_TIKA_LOG_FILES);
tikaLogHandler.setFormatter(new SimpleFormatter()); tikaLogHandler.setFormatter(new SimpleFormatter());
tikaLogHandler.setEncoding(PlatformUtil.getLogFileEncoding()); tikaLogHandler.setEncoding(PlatformUtil.getLogFileEncoding());
@ -104,7 +104,7 @@ public class KeywordSearch {
changeSupport.firePropertyChange(NUM_FILES_CHANGE_EVT, oldNum, newNum); changeSupport.firePropertyChange(NUM_FILES_CHANGE_EVT, oldNum, newNum);
} }
catch (Exception e) { catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearch listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearch listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.moduleErr"), MessageNotifyUtil.Notify.show(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.moduleErr"),
NbBundle.getMessage(KeywordSearch.class, NbBundle.getMessage(KeywordSearch.class,
"KeywordSearch.fireNumIdxFileChg.moduleErr.msg"), "KeywordSearch.fireNumIdxFileChg.moduleErr.msg"),
@ -133,7 +133,7 @@ public class KeywordSearch {
try { try {
server.openCore(); server.openCore();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Could not open core."); logger.log(Level.WARNING, "Could not open core."); //NON-NLS
} }
} else if (oldValue != null) { } else if (oldValue != null) {
// a case was closed // a case was closed
@ -142,7 +142,7 @@ public class KeywordSearch {
Thread.sleep(2000); Thread.sleep(2000);
server.closeCore(); server.closeCore();
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Could not close core."); logger.log(Level.WARNING, "Could not close core."); //NON-NLS
} }
} }
} }

View File

@ -291,13 +291,13 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
listOptionsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.listOptionsLabel.text")); // NOI18N listOptionsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.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(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.deleteListButton.text")); // NOI18N deleteListButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.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(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.saveListButton.text")); // NOI18N saveListButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.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(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.exportButton.text")); // NOI18N exportButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.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) {
@ -442,7 +442,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
"KeywordSearchEditListPanel.exportButtonAction.featureName.text"); "KeywordSearchEditListPanel.exportButtonAction.featureName.text");
JFileChooser chooser = new JFileChooser(); JFileChooser chooser = new JFileChooser();
final String EXTENSION = "xml"; final String EXTENSION = "xml"; //NON-NLS
FileNameExtensionFilter filter = new FileNameExtensionFilter( FileNameExtensionFilter filter = new FileNameExtensionFilter(
NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.exportButtonActionPerformed.fileFilterLabel"), EXTENSION); NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.exportButtonActionPerformed.fileFilterLabel"), EXTENSION);
chooser.setFileFilter(filter); chooser.setFileFilter(filter);
@ -608,7 +608,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
ret = (Object) !word.isLiteral(); ret = (Object) !word.isLiteral();
break; break;
default: default:
logger.log(Level.SEVERE, "Invalid table column index: {0}", columnIndex); logger.log(Level.SEVERE, "Invalid table column index: {0}", columnIndex); //NON-NLS
break; break;
} }
return ret; return ret;

View File

@ -267,7 +267,7 @@ class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implemen
filesIndexedValue.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedFiles())); filesIndexedValue.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedFiles()));
chunksValLabel.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks())); chunksValLabel.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks()));
} catch (KeywordSearchModuleException | NoOpenCoreException ex) { } catch (KeywordSearchModuleException | NoOpenCoreException ex) {
logger.log(Level.WARNING, "Could not get number of indexed files/chunks"); logger.log(Level.WARNING, "Could not get number of indexed files/chunks"); //NON-NLS
} }
KeywordSearch.addNumIndexedFilesChangeListener( KeywordSearch.addNumIndexedFilesChangeListener(
@ -283,7 +283,7 @@ class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implemen
try { try {
chunksValLabel.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks())); chunksValLabel.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks()));
} catch (KeywordSearchModuleException | NoOpenCoreException ex) { } catch (KeywordSearchModuleException | NoOpenCoreException ex) {
logger.log(Level.WARNING, "Could not get number of indexed chunks"); logger.log(Level.WARNING, "Could not get number of indexed chunks"); //NON-NLS
} }
} }

View File

@ -123,7 +123,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
*/ */
@Override @Override
public void startUp(IngestJobContext context) throws IngestModuleException { public void startUp(IngestJobContext context) throws IngestModuleException {
logger.log(Level.INFO, "Initializing instance {0}", instanceNum); logger.log(Level.INFO, "Initializing instance {0}", instanceNum); //NON-NLS
initialized = false; initialized = false;
jobId = context.getJobId(); jobId = context.getJobId();
caseHandle = Case.getCurrentCase().getSleuthkitCase(); caseHandle = Case.getCurrentCase().getSleuthkitCase();
@ -143,7 +143,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
throw new IngestModuleException(msg); throw new IngestModuleException(msg);
} }
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Error checking if Solr server is running while initializing ingest", ex); logger.log(Level.WARNING, "Error checking if Solr server is running while initializing ingest", ex); //NON-NLS
//this means Solr is not properly initialized //this means Solr is not properly initialized
String msg = NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.badInitMsg"); String msg = NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.badInitMsg");
String details = NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.tryStopSolrMsg", msg); String details = NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.tryStopSolrMsg", msg);
@ -185,7 +185,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
for (SCRIPT s : KeywordSearchSettings.getStringExtractScripts()) { for (SCRIPT s : KeywordSearchSettings.getStringExtractScripts()) {
sbScripts.append(s.name()).append(" "); sbScripts.append(s.name()).append(" ");
} }
logger.log(Level.INFO, "Using string extract scripts: {0}", sbScripts.toString()); logger.log(Level.INFO, "Using string extract scripts: {0}", sbScripts.toString()); //NON-NLS
textExtractors = new ArrayList<>(); textExtractors = new ArrayList<>();
//order matters, more specific extractors first //order matters, more specific extractors first
@ -200,7 +200,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
public ProcessResult process(AbstractFile abstractFile) { public ProcessResult process(AbstractFile abstractFile) {
if (initialized == false) //error initializing indexing/Solr if (initialized == false) //error initializing indexing/Solr
{ {
logger.log(Level.WARNING, "Skipping processing, module not initialized, file: {0}", abstractFile.getName()); logger.log(Level.WARNING, "Skipping processing, module not initialized, file: {0}", abstractFile.getName()); //NON-NLS
putIngestStatus(abstractFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); putIngestStatus(abstractFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING);
return ProcessResult.OK; return ProcessResult.OK;
} }
@ -209,7 +209,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
dataSourceId = caseHandle.getFileDataSource(abstractFile); dataSourceId = caseHandle.getFileDataSource(abstractFile);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting image id of file processed by keyword search: " + abstractFile.getName(), ex); logger.log(Level.SEVERE, "Error getting image id of file processed by keyword search: " + abstractFile.getName(), ex); //NON-NLS
} }
if (abstractFile.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR)) { if (abstractFile.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR)) {
@ -242,14 +242,14 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
*/ */
@Override @Override
public void shutDown(boolean ingestJobCancelled) { public void shutDown(boolean ingestJobCancelled) {
logger.log(Level.INFO, "Instance {0}", instanceNum); logger.log(Level.INFO, "Instance {0}", instanceNum); //NON-NLS
if (initialized == false) { if (initialized == false) {
return; return;
} }
if (ingestJobCancelled) { if (ingestJobCancelled) {
logger.log(Level.INFO, "Ingest job cancelled"); logger.log(Level.INFO, "Ingest job cancelled"); //NON-NLS
stop(); stop();
return; return;
} }
@ -267,10 +267,10 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
try { try {
final int numIndexedFiles = KeywordSearch.getServer().queryNumIndexedFiles(); final int numIndexedFiles = KeywordSearch.getServer().queryNumIndexedFiles();
final int numIndexedChunks = KeywordSearch.getServer().queryNumIndexedChunks(); final int numIndexedChunks = KeywordSearch.getServer().queryNumIndexedChunks();
logger.log(Level.INFO, "Indexed files count: {0}", numIndexedFiles); logger.log(Level.INFO, "Indexed files count: {0}", numIndexedFiles); //NON-NLS
logger.log(Level.INFO, "Indexed file chunks count: {0}", numIndexedChunks); logger.log(Level.INFO, "Indexed file chunks count: {0}", numIndexedChunks); //NON-NLS
} catch (NoOpenCoreException | KeywordSearchModuleException ex) { } catch (NoOpenCoreException | KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Error executing Solr query to check number of indexed files/chunks: ", ex); logger.log(Level.WARNING, "Error executing Solr query to check number of indexed files/chunks: ", ex); //NON-NLS
} }
} }
@ -278,7 +278,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
* Handle stop event (ingest interrupted) Cleanup resources, threads, timers * Handle stop event (ingest interrupted) Cleanup resources, threads, timers
*/ */
private void stop() { private void stop() {
logger.log(Level.INFO, "stop()"); logger.log(Level.INFO, "stop()"); //NON-NLS
SearchRunner.getInstance().stopJob(jobId); SearchRunner.getInstance().stopJob(jobId);
@ -341,15 +341,15 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
} }
StringBuilder msg = new StringBuilder(); StringBuilder msg = new StringBuilder();
msg.append("<table border=0><tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.knowFileHeaderLbl")).append("</td><td>").append(text_ingested).append("</td></tr>"); msg.append("<table border=0><tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.knowFileHeaderLbl")).append("</td><td>").append(text_ingested).append("</td></tr>"); //NON-NLS
msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.fileGenStringsHead")).append("</td><td>").append(strings_ingested).append("</td></tr>"); msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.fileGenStringsHead")).append("</td><td>").append(strings_ingested).append("</td></tr>"); //NON-NLS
msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.mdOnlyLbl")).append("</td><td>").append(metadata_ingested).append("</td></tr>"); msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.mdOnlyLbl")).append("</td><td>").append(metadata_ingested).append("</td></tr>"); //NON-NLS
msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.idxErrLbl")).append("</td><td>").append(error_index).append("</td></tr>"); msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.idxErrLbl")).append("</td><td>").append(error_index).append("</td></tr>"); //NON-NLS
msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errTxtLbl")).append("</td><td>").append(error_text).append("</td></tr>"); msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errTxtLbl")).append("</td><td>").append(error_text).append("</td></tr>"); //NON-NLS
msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errIoLbl")).append("</td><td>").append(error_io).append("</td></tr>"); msg.append("<tr><td>").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errIoLbl")).append("</td><td>").append(error_io).append("</td></tr>"); //NON-NLS
msg.append("</table>"); msg.append("</table>"); //NON-NLS
String indexStats = msg.toString(); String indexStats = msg.toString();
logger.log(Level.INFO, "Keyword Indexing Completed: {0}", indexStats); logger.log(Level.INFO, "Keyword Indexing Completed: {0}", indexStats); //NON-NLS
services.postMessage(IngestMessage.createMessage(MessageType.INFO, KeywordSearchModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.kwIdxResultsLbl"), indexStats)); services.postMessage(IngestMessage.createMessage(MessageType.INFO, KeywordSearchModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.kwIdxResultsLbl"), indexStats));
if (error_index > 0) { if (error_index > 0) {
MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.kwIdxErrsTitle"), MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.kwIdxErrsTitle"),
@ -391,7 +391,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
} }
if (fileExtract == null) { if (fileExtract == null) {
logger.log(Level.INFO, "No text extractor found for file id:{0}, name: {1}, detected format: {2}", new Object[]{aFile.getId(), aFile.getName(), detectedFormat}); logger.log(Level.INFO, "No text extractor found for file id:{0}, name: {1}, detected format: {2}", new Object[]{aFile.getId(), aFile.getName(), detectedFormat}); //NON-NLS
return false; return false;
} }
@ -414,12 +414,12 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
putIngestStatus(aFile.getId(), IngestStatus.STRINGS_INGESTED); putIngestStatus(aFile.getId(), IngestStatus.STRINGS_INGESTED);
return true; return true;
} else { } else {
logger.log(Level.WARNING, "Failed to extract strings and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); logger.log(Level.WARNING, "Failed to extract strings and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); //NON-NLS
putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT);
return false; return false;
} }
} catch (IngesterException ex) { } catch (IngesterException ex) {
logger.log(Level.WARNING, "Failed to extract strings and ingest, file '" + aFile.getName() + "' (id: " + aFile.getId() + ").", ex); logger.log(Level.WARNING, "Failed to extract strings and ingest, file '" + aFile.getName() + "' (id: " + aFile.getId() + ").", ex); //NON-NLS
putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING);
return false; return false;
} }
@ -469,7 +469,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED); putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED);
} catch (IngesterException ex) { } catch (IngesterException ex) {
putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING);
logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); //NON-NLS
} }
return; return;
} }
@ -481,13 +481,13 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
is = new ReadContentInputStream(aFile); is = new ReadContentInputStream(aFile);
detectedFormat = tikaFormatDetector.detect(is, aFile.getName()); detectedFormat = tikaFormatDetector.detect(is, aFile.getName());
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Could not detect format using tika for file: " + aFile, e); logger.log(Level.WARNING, "Could not detect format using tika for file: " + aFile, e); //NON-NLS
} finally { } finally {
if (is != null) { if (is != null) {
try { try {
is.close(); is.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Could not close stream after detecting format using tika for file: " logger.log(Level.WARNING, "Could not close stream after detecting format using tika for file: " //NON-NLS
+ aFile, ex); + aFile, ex);
} }
} }
@ -505,7 +505,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED); putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED);
} catch (IngesterException ex) { } catch (IngesterException ex) {
putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING);
logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); //NON-NLS
} }
return; return;
} }
@ -516,7 +516,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
try { try {
//logger.log(Level.INFO, "indexing: " + aFile.getName()); //logger.log(Level.INFO, "indexing: " + aFile.getName());
if (!extractTextAndIndex(aFile, detectedFormat)) { if (!extractTextAndIndex(aFile, detectedFormat)) {
logger.log(Level.WARNING, "Failed to extract text and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); logger.log(Level.WARNING, "Failed to extract text and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); //NON-NLS
putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT);
} else { } else {
putIngestStatus(aFile.getId(), IngestStatus.TEXT_INGESTED); putIngestStatus(aFile.getId(), IngestStatus.TEXT_INGESTED);
@ -524,11 +524,11 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme
} }
} catch (IngesterException e) { } catch (IngesterException e) {
logger.log(Level.INFO, "Could not extract text with Tika, " + aFile.getId() + ", " logger.log(Level.INFO, "Could not extract text with Tika, " + aFile.getId() + ", " //NON-NLS
+ aFile.getName(), e); + aFile.getName(), e);
putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Error extracting text with Tika, " + aFile.getId() + ", " logger.log(Level.WARNING, "Error extracting text with Tika, " + aFile.getId() + ", " //NON-NLS
+ aFile.getName(), e); + aFile.getName(), e);
putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT);
} }

View File

@ -86,14 +86,14 @@ public final class KeywordSearchJobSettingsPanel extends IngestModuleIngestJobSe
private void displayLanguages() { private void displayLanguages() {
List<SCRIPT> scripts = KeywordSearchSettings.getStringExtractScripts(); List<SCRIPT> scripts = KeywordSearchSettings.getStringExtractScripts();
StringBuilder langs = new StringBuilder(); StringBuilder langs = new StringBuilder();
langs.append("<html>"); langs.append("<html>"); //NON-NLS
for (int i = 0; i < scripts.size(); i++) { for (int i = 0; i < scripts.size(); i++) {
langs.append(scripts.get(i).toString()); langs.append(scripts.get(i).toString());
if (i + 1 < scripts.size()) { if (i + 1 < scripts.size()) {
langs.append(", "); langs.append(", ");
} }
} }
langs.append("</html>"); langs.append("</html>"); //NON-NLS
String langsS = langs.toString(); String langsS = langs.toString();
this.languagesValLabel.setText(langsS); this.languagesValLabel.setText(langsS);
this.languagesValLabel.setToolTipText(langsS); this.languagesValLabel.setToolTipText(langsS);
@ -107,7 +107,7 @@ public final class KeywordSearchJobSettingsPanel extends IngestModuleIngestJobSe
encodingsList.add("UTF8"); encodingsList.add("UTF8");
} }
if (utf16 == null || Boolean.parseBoolean(utf16)) { if (utf16 == null || Boolean.parseBoolean(utf16)) {
encodingsList.add("UTF16"); encodingsList.add("UTF16"); //NON-NLS
} }
String encodings = encodingsList.toString(); String encodings = encodingsList.toString();
encodings = encodings.substring(1, encodings.length() - 1); encodings = encodings.substring(1, encodings.length() - 1);

View File

@ -69,7 +69,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(event.toString(), null, null); changeSupport.firePropertyChange(event.toString(), null, null);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
} }
} }
@ -87,40 +87,40 @@ abstract class KeywordSearchListsAbstract {
} }
//phone number //phone number
List<Keyword> phones = new ArrayList<>(); List<Keyword> phones = new ArrayList<>();
phones.add(new Keyword("[(]{0,1}\\d\\d\\d[)]{0,1}[\\.-]\\d\\d\\d[\\.-]\\d\\d\\d\\d", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)); phones.add(new Keyword("[(]{0,1}\\d\\d\\d[)]{0,1}[\\.-]\\d\\d\\d[\\.-]\\d\\d\\d\\d", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)); //NON-NLS
//phones.add(new Keyword("\\d{8,10}", false)); //phones.add(new Keyword("\\d{8,10}", false));
//IP address //IP address
List<Keyword> ips = new ArrayList<>(); List<Keyword> ips = new ArrayList<>();
ips.add(new Keyword("(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IP_ADDRESS)); ips.add(new Keyword("(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_IP_ADDRESS));
//email //email
List<Keyword> emails = new ArrayList<>(); List<Keyword> emails = new ArrayList<>();
emails.add(new Keyword("(?=.{8})[a-z0-9%+_-]+(?:\\.[a-z0-9%+_-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z]{2,4}(?<!\\.txt|\\.exe|\\.dll|\\.jpg|\\.xml)", emails.add(new Keyword("(?=.{8})[a-z0-9%+_-]+(?:\\.[a-z0-9%+_-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z]{2,4}(?<!\\.txt|\\.exe|\\.dll|\\.jpg|\\.xml)", //NON-NLS
false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL)); false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL));
//emails.add(new Keyword("[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}", //emails.add(new Keyword("[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}",
// false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL)); // false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL));
//URL //URL
List<Keyword> urls = new ArrayList<>(); List<Keyword> urls = new ArrayList<>();
//urls.add(new Keyword("http://|https://|^www\\.", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL)); //urls.add(new Keyword("http://|https://|^www\\.", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL));
urls.add(new Keyword("((((ht|f)tp(s?))\\://)|www\\.)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,5})(\\:[0-9]+)*(/($|[a-zA-Z0-9\\.\\,\\;\\?\\'\\\\+&amp;%\\$#\\=~_\\-]+))*", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL)); urls.add(new Keyword("((((ht|f)tp(s?))\\://)|www\\.)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,5})(\\:[0-9]+)*(/($|[a-zA-Z0-9\\.\\,\\;\\?\\'\\\\+&amp;%\\$#\\=~_\\-]+))*", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL)); //NON-NLS
//urls.add(new Keyword("ssh://", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL)); //urls.add(new Keyword("ssh://", false, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL));
//disable messages for harcoded/locked lists //disable messages for harcoded/locked lists
String name; String name;
name = "Phone Numbers"; name = "Phone Numbers"; //NON-NLS
lockedLists.add(name); lockedLists.add(name);
addList(name, phones, false, false, true); addList(name, phones, false, false, true);
name = "IP Addresses"; name = "IP Addresses"; //NON-NLS
lockedLists.add(name); lockedLists.add(name);
addList(name, ips, false, false, true); addList(name, ips, false, false, true);
name = "Email Addresses"; name = "Email Addresses"; //NON-NLS
lockedLists.add(name); lockedLists.add(name);
addList(name, emails, true, false, true); addList(name, emails, true, false, true);
name = "URLs"; name = "URLs"; //NON-NLS
lockedLists.add(name); lockedLists.add(name);
addList(name, urls, false, false, true); addList(name, urls, false, false, true);
} }
@ -287,7 +287,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, name); changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, name);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.addList.errMsg1.msg"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.addList.errMsg1.msg"),
@ -300,7 +300,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, name); changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, name);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.addList.errMsg2.msg"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.addList.errMsg2.msg"),
@ -349,7 +349,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, list.getName()); changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, list.getName());
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.saveList.errMsg1.msg"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.saveList.errMsg1.msg"),
@ -360,7 +360,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, over.getName()); changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, over.getName());
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.saveList.errMsg2.msg"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.saveList.errMsg2.msg"),
@ -395,7 +395,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, list.getName()); changeSupport.firePropertyChange(ListsEvt.LIST_ADDED.toString(), null, list.getName());
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.writeLists.errMsg1.msg"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.writeLists.errMsg1.msg"),
@ -408,7 +408,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, over.getName()); changeSupport.firePropertyChange(ListsEvt.LIST_UPDATED.toString(), null, over.getName());
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.writeLists.errMsg2.msg"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.writeLists.errMsg2.msg"),
@ -434,7 +434,7 @@ abstract class KeywordSearchListsAbstract {
try { try {
changeSupport.firePropertyChange(ListsEvt.LIST_DELETED.toString(), null, name); changeSupport.firePropertyChange(ListsEvt.LIST_DELETED.toString(), null, name);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchListsAbstract listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.deleteList.errMsg1.msg"), NbBundle.getMessage(this.getClass(), "KeywordSearchListsAbstract.deleteList.errMsg1.msg"),

View File

@ -130,7 +130,7 @@ class KeywordSearchListsEncase extends KeywordSearchListsAbstract{
@Override @Override
public boolean load() { public boolean load() {
try { try {
BufferedReader readBuffer = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "utf-16")); BufferedReader readBuffer = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "utf-16")); //NON-NLS
String structLine; String structLine;
String metaLine; String metaLine;
entriesUnsorted = new ArrayList<>(); entriesUnsorted = new ArrayList<>();
@ -161,9 +161,9 @@ class KeywordSearchListsEncase extends KeywordSearchListsAbstract{
return true; return true;
} catch (FileNotFoundException ex) { } catch (FileNotFoundException ex) {
logger.log(Level.INFO, "File at " + filePath + " does not exist!", ex); logger.log(Level.INFO, "File at " + filePath + " does not exist!", ex); //NON-NLS
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.INFO, "Failed to read file at " + filePath, ex); logger.log(Level.INFO, "Failed to read file at " + filePath, ex); //NON-NLS
} }
return false; return false;
} }

View File

@ -113,7 +113,7 @@ class KeywordSearchListsManagementPanel extends javax.swing.JPanel implements Op
}); });
jScrollPane1.setViewportView(listsTable); jScrollPane1.setViewportView(listsTable);
newListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N newListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N NON-NLS
newListButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsManagementPanel.class, "KeywordSearchListsManagementPanel.newListButton.text")); // NOI18N newListButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsManagementPanel.class, "KeywordSearchListsManagementPanel.newListButton.text")); // NOI18N
newListButton.addActionListener(new java.awt.event.ActionListener() { newListButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -121,7 +121,7 @@ class KeywordSearchListsManagementPanel extends javax.swing.JPanel implements Op
} }
}); });
importButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/import16.png"))); // NOI18N importButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/import16.png"))); // NOI18N NON-NLS
importButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsManagementPanel.class, "KeywordSearchListsManagementPanel.importButton.text")); // NOI18N importButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsManagementPanel.class, "KeywordSearchListsManagementPanel.importButton.text")); // NOI18N
importButton.addActionListener(new java.awt.event.ActionListener() { importButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -208,7 +208,7 @@ class KeywordSearchListsManagementPanel extends javax.swing.JPanel implements Op
private void importButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importButtonActionPerformed private void importButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importButtonActionPerformed
JFileChooser chooser = new JFileChooser(); JFileChooser chooser = new JFileChooser();
final String[] EXTENSION = new String[]{"xml", "txt"}; final String[] EXTENSION = new String[]{"xml", "txt"}; //NON-NLS
FileNameExtensionFilter filter = new FileNameExtensionFilter( FileNameExtensionFilter filter = new FileNameExtensionFilter(
NbBundle.getMessage(this.getClass(), "KeywordSearchListsManagementPanel.fileExtensionFilterLbl"), EXTENSION); NbBundle.getMessage(this.getClass(), "KeywordSearchListsManagementPanel.fileExtensionFilterLbl"), EXTENSION);
chooser.setFileFilter(filter); chooser.setFileFilter(filter);

View File

@ -141,7 +141,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (ingestRunning) { if (ingestRunning) {
SearchRunner.getInstance().addKeywordListsToAllJobs(listsTableModel.getSelectedLists()); SearchRunner.getInstance().addKeywordListsToAllJobs(listsTableModel.getSelectedLists());
logger.log(Level.INFO, "Submitted enqueued lists to ingest"); logger.log(Level.INFO, "Submitted enqueued lists to ingest"); //NON-NLS
} else { } else {
searchAction(e); searchAction(e);
} }
@ -233,7 +233,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
searchAddButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsViewerPanel.class, "KeywordSearchListsViewerPanel.searchAddButton.text")); // NOI18N searchAddButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsViewerPanel.class, "KeywordSearchListsViewerPanel.searchAddButton.text")); // NOI18N
ingestIndexLabel.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N ingestIndexLabel.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N NON-NLS
ingestIndexLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsViewerPanel.class, "KeywordSearchListsViewerPanel.ingestIndexLabel.text")); // NOI18N ingestIndexLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchListsViewerPanel.class, "KeywordSearchListsViewerPanel.ingestIndexLabel.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);

View File

@ -44,21 +44,21 @@ import org.w3c.dom.NodeList;
final class KeywordSearchListsXML extends KeywordSearchListsAbstract { final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
private static final Logger xmlListslogger = Logger.getLogger(KeywordSearchListsXML.class.getName()); private static final Logger xmlListslogger = Logger.getLogger(KeywordSearchListsXML.class.getName());
private static final String CUR_LISTS_FILE_NAME = "keywords.xml"; private static final String CUR_LISTS_FILE_NAME = "keywords.xml"; //NON-NLS
private static String CUR_LISTS_FILE = PlatformUtil.getUserConfigDirectory() + File.separator + CUR_LISTS_FILE_NAME; private static String CUR_LISTS_FILE = PlatformUtil.getUserConfigDirectory() + File.separator + CUR_LISTS_FILE_NAME;
private static final String XSDFILE = "KeywordsSchema.xsd"; private static final String XSDFILE = "KeywordsSchema.xsd"; //NON-NLS
private static final String ROOT_EL = "keyword_lists"; private static final String ROOT_EL = "keyword_lists"; //NON-NLS
private static final String LIST_EL = "keyword_list"; private static final String LIST_EL = "keyword_list"; //NON-NLS
private static final String LIST_NAME_ATTR = "name"; private static final String LIST_NAME_ATTR = "name"; //NON-NLS
private static final String LIST_CREATE_ATTR = "created"; private static final String LIST_CREATE_ATTR = "created"; //NON-NLS
private static final String LIST_MOD_ATTR = "modified"; private static final String LIST_MOD_ATTR = "modified"; //NON-NLS
private static final String LIST_USE_FOR_INGEST = "use_for_ingest"; private static final String LIST_USE_FOR_INGEST = "use_for_ingest"; //NON-NLS
private static final String LIST_INGEST_MSGS = "ingest_messages"; private static final String LIST_INGEST_MSGS = "ingest_messages"; //NON-NLS
private static final String KEYWORD_EL = "keyword"; private static final String KEYWORD_EL = "keyword"; //NON-NLS
private static final String KEYWORD_LITERAL_ATTR = "literal"; private static final String KEYWORD_LITERAL_ATTR = "literal"; //NON-NLS
private static final String KEYWORD_SELECTOR_ATTR = "selector"; private static final String KEYWORD_SELECTOR_ATTR = "selector"; //NON-NLS
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; //NON-NLS
private static final String ENCODING = "UTF-8"; private static final String ENCODING = "UTF-8"; //NON-NLS
private static KeywordSearchListsXML currentInstance = null; private static KeywordSearchListsXML currentInstance = null;
private DateFormat dateFormatter; private DateFormat dateFormatter;
@ -127,7 +127,7 @@ final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
for (Keyword keyword : keywords) { for (Keyword keyword : keywords) {
Element keywordEl = doc.createElement(KEYWORD_EL); Element keywordEl = doc.createElement(KEYWORD_EL);
String literal = keyword.isLiteral()?"true":"false"; String literal = keyword.isLiteral()?"true":"false"; //NON-NLS
keywordEl.setAttribute(KEYWORD_LITERAL_ATTR, literal); keywordEl.setAttribute(KEYWORD_LITERAL_ATTR, literal);
BlackboardAttribute.ATTRIBUTE_TYPE selectorType = keyword.getType(); BlackboardAttribute.ATTRIBUTE_TYPE selectorType = keyword.getType();
if (selectorType != null) { if (selectorType != null) {
@ -141,7 +141,7 @@ final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
success = XMLUtil.saveDoc(KeywordSearchListsXML.class, filePath, ENCODING, doc); success = XMLUtil.saveDoc(KeywordSearchListsXML.class, filePath, ENCODING, doc);
} catch (ParserConfigurationException e) { } catch (ParserConfigurationException e) {
xmlListslogger.log(Level.SEVERE, "Error saving keyword list: can't initialize parser.", e); xmlListslogger.log(Level.SEVERE, "Error saving keyword list: can't initialize parser.", e); //NON-NLS
} }
return success; return success;
} }
@ -158,7 +158,7 @@ final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
Element root = doc.getDocumentElement(); Element root = doc.getDocumentElement();
if (root == null) { if (root == null) {
xmlListslogger.log(Level.SEVERE, "Error loading keyword list: invalid file format."); xmlListslogger.log(Level.SEVERE, "Error loading keyword list: invalid file format."); //NON-NLS
return false; return false;
} }
try { try {
@ -200,7 +200,7 @@ final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
for (int j = 0; j < numKeywords; ++j) { for (int j = 0; j < numKeywords; ++j) {
Element wordEl = (Element) wordsNList.item(j); Element wordEl = (Element) wordsNList.item(j);
String literal = wordEl.getAttribute(KEYWORD_LITERAL_ATTR); String literal = wordEl.getAttribute(KEYWORD_LITERAL_ATTR);
boolean isLiteral = literal.equals("true"); boolean isLiteral = literal.equals("true"); //NON-NLS
Keyword keyword = new Keyword(wordEl.getTextContent(), isLiteral); Keyword keyword = new Keyword(wordEl.getTextContent(), isLiteral);
String selector = wordEl.getAttribute(KEYWORD_SELECTOR_ATTR); String selector = wordEl.getAttribute(KEYWORD_SELECTOR_ATTR);
if (! selector.equals("")) { if (! selector.equals("")) {
@ -214,7 +214,7 @@ final class KeywordSearchListsXML extends KeywordSearchListsAbstract {
} }
} catch (ParseException e) { } catch (ParseException e) {
//error parsing dates //error parsing dates
xmlListslogger.log(Level.SEVERE, "Error loading keyword list: can't parse dates.", e); xmlListslogger.log(Level.SEVERE, "Error loading keyword list: can't parse dates.", e); //NON-NLS
return false; return false;
} }
return true; return true;

View File

@ -39,7 +39,7 @@ import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel;
@ServiceProvider(service = IngestModuleFactory.class) @ServiceProvider(service = IngestModuleFactory.class)
public class KeywordSearchModuleFactory extends IngestModuleFactoryAdapter { public class KeywordSearchModuleFactory extends IngestModuleFactoryAdapter {
private static final HashSet<String> defaultDisabledKeywordListNames = new HashSet<>(Arrays.asList("Phone Numbers", "IP Addresses", "URLs")); private static final HashSet<String> defaultDisabledKeywordListNames = new HashSet<>(Arrays.asList("Phone Numbers", "IP Addresses", "URLs")); //NON-NLS
private KeywordSearchJobSettingsPanel jobSettingsPanel = null; private KeywordSearchJobSettingsPanel jobSettingsPanel = null;
@Override @Override

View File

@ -103,7 +103,7 @@ public final class KeywordSearchOptionsPanelController extends OptionsPanelContr
try { try {
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true); pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchOptionsPanelController listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchOptionsPanelController listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr.msg1"), NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr.msg1"),
@ -113,7 +113,7 @@ public final class KeywordSearchOptionsPanelController extends OptionsPanelContr
try { try {
pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null); pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.SEVERE, "KeywordSearchOptionsPanelController listener threw exception", e); logger.log(Level.SEVERE, "KeywordSearchOptionsPanelController listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show( MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr"), NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr"),
NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr.msg2"), NbBundle.getMessage(this.getClass(), "KeywordSearchOptionsPanelController.moduleErr.msg2"),

View File

@ -143,13 +143,13 @@ class KeywordSearchPanel extends javax.swing.JPanel {
setOpaque(false); setOpaque(false);
listsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/watchbutton-icon.png"))); // NOI18N listsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/watchbutton-icon.png"))); // NOI18N NON-NLS
listsButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "ListBundleName")); // NOI18N listsButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "ListBundleName")); // NOI18N
listsButton.setBorderPainted(false); listsButton.setBorderPainted(false);
listsButton.setContentAreaFilled(false); listsButton.setContentAreaFilled(false);
listsButton.setEnabled(false); listsButton.setEnabled(false);
listsButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/watchbutton-icon-rollover.png"))); // NOI18N listsButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/watchbutton-icon-rollover.png"))); // NOI18N NON-NLS
listsButton.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/watchbutton-icon-pressed.png"))); // NOI18N listsButton.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/watchbutton-icon-pressed.png"))); // NOI18N NON-NLS
listsButton.addMouseListener(new java.awt.event.MouseAdapter() { listsButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) { public void mousePressed(java.awt.event.MouseEvent evt) {
listsButtonMousePressed(evt); listsButtonMousePressed(evt);
@ -161,7 +161,7 @@ class KeywordSearchPanel extends javax.swing.JPanel {
} }
}); });
searchDropButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/searchbutton-icon.png"))); // NOI18N searchDropButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/searchbutton-icon.png"))); // NOI18N NON-NLS
searchDropButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "KeywordSearchPanel.searchDropButton.text")); // NOI18N searchDropButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchPanel.class, "KeywordSearchPanel.searchDropButton.text")); // NOI18N
searchDropButton.setBorderPainted(false); searchDropButton.setBorderPainted(false);
searchDropButton.setContentAreaFilled(false); searchDropButton.setContentAreaFilled(false);
@ -169,8 +169,8 @@ class KeywordSearchPanel extends javax.swing.JPanel {
searchDropButton.setMaximumSize(new java.awt.Dimension(146, 27)); searchDropButton.setMaximumSize(new java.awt.Dimension(146, 27));
searchDropButton.setMinimumSize(new java.awt.Dimension(146, 27)); searchDropButton.setMinimumSize(new java.awt.Dimension(146, 27));
searchDropButton.setPreferredSize(new java.awt.Dimension(146, 27)); searchDropButton.setPreferredSize(new java.awt.Dimension(146, 27));
searchDropButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/searchbutton-icon-rollover.png"))); // NOI18N searchDropButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/searchbutton-icon-rollover.png"))); // NOI18N NON-NLS
searchDropButton.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/searchbutton-icon-pressed.png"))); // NOI18N searchDropButton.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/searchbutton-icon-pressed.png"))); // NOI18N NON-NLS
searchDropButton.addMouseListener(new java.awt.event.MouseAdapter() { searchDropButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) { public void mousePressed(java.awt.event.MouseEvent evt) {
searchDropButtonMousePressed(evt); searchDropButtonMousePressed(evt);
@ -247,10 +247,10 @@ class KeywordSearchPanel extends javax.swing.JPanel {
//setFilesIndexed(numIndexedFiles); //setFilesIndexed(numIndexedFiles);
} }
catch (NoOpenCoreException ex) { catch (NoOpenCoreException ex) {
logger.log(Level.SEVERE, "Error executing Solr query, " + ex); logger.log(Level.SEVERE, "Error executing Solr query, " + ex); //NON-NLS
} }
catch (KeywordSearchModuleException se) { catch (KeywordSearchModuleException se) {
logger.log(Level.SEVERE, "Error executing Solr query, " + se.getMessage()); logger.log(Level.SEVERE, "Error executing Solr query, " + se.getMessage()); //NON-NLS
} }
break; break;
case STOPPED: case STOPPED:

View File

@ -192,7 +192,7 @@ class KeywordSearchQueryManager {
boolean allValid = true; boolean allValid = true;
for (KeywordSearchQuery tcq : queryDelegates) { for (KeywordSearchQuery tcq : queryDelegates) {
if (!tcq.validate()) { if (!tcq.validate()) {
logger.log(Level.WARNING, "Query has invalid syntax: {0}", tcq.getQueryString()); logger.log(Level.WARNING, "Query has invalid syntax: {0}", tcq.getQueryString()); //NON-NLS
allValid = false; allValid = false;
break; break;
} }

View File

@ -247,7 +247,7 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQuery> {
try { try {
tcqRes = tcq.performQuery(); tcqRes = tcq.performQuery();
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Could not perform the query. ", ex); logger.log(Level.WARNING, "Could not perform the query. ", ex); //NON-NLS
return false; return false;
} }
@ -425,7 +425,7 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQuery> {
try { try {
matchesRes = filesQuery.performQuery(); matchesRes = filesQuery.performQuery();
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Could not perform the query. ", ex); logger.log(Level.WARNING, "Could not perform the query. ", ex); //NON-NLS
return false; return false;
} }
@ -580,11 +580,11 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQuery> {
try { try {
snippet = LuceneQuery.querySnippet(snippetQuery, f.getId(), chunkId, !query.isLiteral(), true); snippet = LuceneQuery.querySnippet(snippetQuery, f.getId(), chunkId, !query.isLiteral(), true);
} catch (NoOpenCoreException e) { } catch (NoOpenCoreException e) {
logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); //NON-NLS
//no reason to continie //no reason to continie
return null; return null;
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); //NON-NLS
continue; continue;
} }
if (snippet != null) { if (snippet != null) {
@ -608,7 +608,7 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQuery> {
// test if any exceptions were thrown // test if any exceptions were thrown
get(); get();
} catch (InterruptedException | ExecutionException ex) { } catch (InterruptedException | ExecutionException ex) {
logger.log(Level.SEVERE, "Error querying ", ex); logger.log(Level.SEVERE, "Error querying ", ex); //NON-NLS
} }
// catch and ignore if we were cancelled // catch and ignore if we were cancelled
catch (java.util.concurrent.CancellationException ex ) { } catch (java.util.concurrent.CancellationException ex ) { }

View File

@ -38,7 +38,7 @@ class KeywordSearchSettings {
static final String PROPERTIES_OPTIONS = NbBundle.getMessage(KeywordSearchSettings.class, "KeywordSearchSettings.properties_options.text", MODULE_NAME); static final String PROPERTIES_OPTIONS = NbBundle.getMessage(KeywordSearchSettings.class, "KeywordSearchSettings.properties_options.text", MODULE_NAME);
static final String PROPERTIES_NSRL = NbBundle.getMessage(KeywordSearchSettings.class, "KeywordSearchSettings.propertiesNSRL.text", MODULE_NAME); static final String PROPERTIES_NSRL = NbBundle.getMessage(KeywordSearchSettings.class, "KeywordSearchSettings.propertiesNSRL.text", MODULE_NAME);
static final String PROPERTIES_SCRIPTS = NbBundle.getMessage(KeywordSearchSettings.class, "KeywordSearchSettings.propertiesScripts.text", MODULE_NAME); static final String PROPERTIES_SCRIPTS = NbBundle.getMessage(KeywordSearchSettings.class, "KeywordSearchSettings.propertiesScripts.text", MODULE_NAME);
static final String SHOW_SNIPPETS = "showSnippets"; static final String SHOW_SNIPPETS = "showSnippets"; //NON-NLS
static final boolean DEFAULT_SHOW_SNIPPETS = true; static final boolean DEFAULT_SHOW_SNIPPETS = true;
private static boolean skipKnown = true; private static boolean skipKnown = true;
private static final Logger logger = Logger.getLogger(KeywordSearchSettings.class.getName()); private static final Logger logger = Logger.getLogger(KeywordSearchSettings.class.getName());
@ -52,11 +52,11 @@ class KeywordSearchSettings {
* @return KeywordSearchIngestModule's update frequency * @return KeywordSearchIngestModule's update frequency
*/ */
static UpdateFrequency getUpdateFrequency() { static UpdateFrequency getUpdateFrequency() {
if (ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, "UpdateFrequency") != null) { if (ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, "UpdateFrequency") != null) { //NON-NLS
return UpdateFrequency.valueOf(ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, "UpdateFrequency")); return UpdateFrequency.valueOf(ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, "UpdateFrequency")); //NON-NLS
} }
//if it failed, return the default/last known value //if it failed, return the default/last known value
logger.log(Level.WARNING, "Could not read property for UpdateFrequency, returning backup value."); logger.log(Level.WARNING, "Could not read property for UpdateFrequency, returning backup value."); //NON-NLS
return UpdateFrequency.DEFAULT; return UpdateFrequency.DEFAULT;
} }
@ -66,7 +66,7 @@ class KeywordSearchSettings {
* @param freq Sets KeywordSearchIngestModule to this value. * @param freq Sets KeywordSearchIngestModule to this value.
*/ */
static void setUpdateFrequency(UpdateFrequency freq) { static void setUpdateFrequency(UpdateFrequency freq) {
ModuleSettings.setConfigSetting(PROPERTIES_OPTIONS, "UpdateFrequency", freq.name()); ModuleSettings.setConfigSetting(PROPERTIES_OPTIONS, "UpdateFrequency", freq.name()); //NON-NLS
UpdateFreq = freq; UpdateFreq = freq;
} }
@ -77,7 +77,7 @@ class KeywordSearchSettings {
* @param skip * @param skip
*/ */
static void setSkipKnown(boolean skip) { static void setSkipKnown(boolean skip) {
ModuleSettings.setConfigSetting(PROPERTIES_NSRL, "SkipKnown", Boolean.toString(skip)); ModuleSettings.setConfigSetting(PROPERTIES_NSRL, "SkipKnown", Boolean.toString(skip)); //NON-NLS
skipKnown = skip; skipKnown = skip;
} }
@ -88,11 +88,11 @@ class KeywordSearchSettings {
* @return skip setting * @return skip setting
*/ */
static boolean getSkipKnown() { static boolean getSkipKnown() {
if (ModuleSettings.getConfigSetting(PROPERTIES_NSRL, "SkipKnown") != null) { if (ModuleSettings.getConfigSetting(PROPERTIES_NSRL, "SkipKnown") != null) { //NON-NLS
return Boolean.parseBoolean(ModuleSettings.getConfigSetting(PROPERTIES_NSRL, "SkipKnown")); return Boolean.parseBoolean(ModuleSettings.getConfigSetting(PROPERTIES_NSRL, "SkipKnown")); //NON-NLS
} }
//if it fails, return the default/last known value //if it fails, return the default/last known value
logger.log(Level.WARNING, "Could not read property for SkipKnown, returning backup value."); logger.log(Level.WARNING, "Could not read property for SkipKnown, returning backup value."); //NON-NLS
return skipKnown; return skipKnown;
} }
@ -108,12 +108,12 @@ class KeywordSearchSettings {
//Disabling scripts that weren't selected //Disabling scripts that weren't selected
for (String s : ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS).keySet()) { for (String s : ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS).keySet()) {
if (!scripts.contains(StringExtract.StringExtractUnicodeTable.SCRIPT.valueOf(s))) { if (!scripts.contains(StringExtract.StringExtractUnicodeTable.SCRIPT.valueOf(s))) {
ModuleSettings.setConfigSetting(PROPERTIES_SCRIPTS, s, "false"); ModuleSettings.setConfigSetting(PROPERTIES_SCRIPTS, s, "false"); //NON-NLS
} }
} }
//Writing and enabling selected scripts //Writing and enabling selected scripts
for (StringExtract.StringExtractUnicodeTable.SCRIPT s : stringExtractScripts) { for (StringExtract.StringExtractUnicodeTable.SCRIPT s : stringExtractScripts) {
ModuleSettings.setConfigSetting(PROPERTIES_SCRIPTS, s.name(), "true"); ModuleSettings.setConfigSetting(PROPERTIES_SCRIPTS, s.name(), "true"); //NON-NLS
} }
} }
@ -130,12 +130,12 @@ class KeywordSearchSettings {
} }
static void setShowSnippets(boolean showSnippets) { static void setShowSnippets(boolean showSnippets) {
ModuleSettings.setConfigSetting(PROPERTIES_OPTIONS, SHOW_SNIPPETS, (showSnippets ? "true" : "false")); ModuleSettings.setConfigSetting(PROPERTIES_OPTIONS, SHOW_SNIPPETS, (showSnippets ? "true" : "false")); //NON-NLS
} }
static boolean getShowSnippets() { static boolean getShowSnippets() {
if (ModuleSettings.settingExists(PROPERTIES_OPTIONS, SHOW_SNIPPETS)) { if (ModuleSettings.settingExists(PROPERTIES_OPTIONS, SHOW_SNIPPETS)) {
return ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, SHOW_SNIPPETS).equals("true"); return ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, SHOW_SNIPPETS).equals("true"); //NON-NLS
} else { } else {
return DEFAULT_SHOW_SNIPPETS; return DEFAULT_SHOW_SNIPPETS;
} }
@ -150,14 +150,14 @@ class KeywordSearchSettings {
if (ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS) != null && !ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS).isEmpty()) { if (ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS) != null && !ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS).isEmpty()) {
List<SCRIPT> scripts = new ArrayList<>(); List<SCRIPT> scripts = new ArrayList<>();
for (Map.Entry<String, String> kvp : ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS).entrySet()) { for (Map.Entry<String, String> kvp : ModuleSettings.getConfigSettings(PROPERTIES_SCRIPTS).entrySet()) {
if (kvp.getValue().equals("true")) { if (kvp.getValue().equals("true")) { //NON-NLS
scripts.add(SCRIPT.valueOf(kvp.getKey())); scripts.add(SCRIPT.valueOf(kvp.getKey()));
} }
} }
return scripts; return scripts;
} }
//if it failed, try to return the built-in list maintained by the singleton. //if it failed, try to return the built-in list maintained by the singleton.
logger.log(Level.WARNING, "Could not read properties for extracting scripts, returning backup values."); logger.log(Level.WARNING, "Could not read properties for extracting scripts, returning backup values."); //NON-NLS
return new ArrayList<>(stringExtractScripts); return new ArrayList<>(stringExtractScripts);
} }
@ -171,7 +171,7 @@ class KeywordSearchSettings {
if (ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, key) != null) { if (ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, key) != null) {
return ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, key); return ModuleSettings.getConfigSetting(PROPERTIES_OPTIONS, key);
} else { } else {
logger.log(Level.WARNING, "Could not read property for key {0}, returning backup value.", key); logger.log(Level.WARNING, "Could not read property for key {0}, returning backup value.", key); //NON-NLS
return stringExtractOptions.get(key); return stringExtractOptions.get(key);
} }
} }
@ -185,7 +185,7 @@ class KeywordSearchSettings {
Map<String, String> settings = ModuleSettings.getConfigSettings(PROPERTIES_OPTIONS); Map<String, String> settings = ModuleSettings.getConfigSettings(PROPERTIES_OPTIONS);
if (settings == null) { if (settings == null) {
Map<String, String> settingsv2 = new HashMap<>(); Map<String, String> settingsv2 = new HashMap<>();
logger.log(Level.WARNING, "Could not read properties for {0}.properties, returning backup values", PROPERTIES_OPTIONS); logger.log(Level.WARNING, "Could not read properties for {0}.properties, returning backup values", PROPERTIES_OPTIONS); //NON-NLS
settingsv2.putAll(stringExtractOptions); settingsv2.putAll(stringExtractOptions);
return settingsv2; return settingsv2;
} else { } else {
@ -198,30 +198,30 @@ class KeywordSearchSettings {
* already exist. * already exist.
*/ */
static void setDefaults() { static void setDefaults() {
logger.log(Level.INFO, "Detecting default settings."); logger.log(Level.INFO, "Detecting default settings."); //NON-NLS
//setting default NSRL //setting default NSRL
if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_NSRL, "SkipKnown")) { if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_NSRL, "SkipKnown")) { //NON-NLS
logger.log(Level.INFO, "No configuration for NSRL found, generating default..."); logger.log(Level.INFO, "No configuration for NSRL found, generating default..."); //NON-NLS
KeywordSearchSettings.setSkipKnown(true); KeywordSearchSettings.setSkipKnown(true);
} }
//setting default Update Frequency //setting default Update Frequency
if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_OPTIONS, "UpdateFrequency")) { if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_OPTIONS, "UpdateFrequency")) { //NON-NLS
logger.log(Level.INFO, "No configuration for Update Frequency found, generating default..."); logger.log(Level.INFO, "No configuration for Update Frequency found, generating default..."); //NON-NLS
KeywordSearchSettings.setUpdateFrequency(UpdateFrequency.DEFAULT); KeywordSearchSettings.setUpdateFrequency(UpdateFrequency.DEFAULT);
} }
//setting default Extract UTF8 //setting default Extract UTF8
if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_OPTIONS, AbstractFileExtract.ExtractOptions.EXTRACT_UTF8.toString())) { if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_OPTIONS, AbstractFileExtract.ExtractOptions.EXTRACT_UTF8.toString())) {
logger.log(Level.INFO, "No configuration for UTF8 found, generating default..."); logger.log(Level.INFO, "No configuration for UTF8 found, generating default..."); //NON-NLS
KeywordSearchSettings.setStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF8.toString(), Boolean.TRUE.toString()); KeywordSearchSettings.setStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF8.toString(), Boolean.TRUE.toString());
} }
//setting default Extract UTF16 //setting default Extract UTF16
if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_OPTIONS, AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString())) { if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_OPTIONS, AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString())) {
logger.log(Level.INFO, "No configuration for UTF16 found, generating defaults..."); logger.log(Level.INFO, "No configuration for UTF16 found, generating defaults..."); //NON-NLS
KeywordSearchSettings.setStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString(), Boolean.TRUE.toString()); KeywordSearchSettings.setStringExtractOption(AbstractFileExtract.ExtractOptions.EXTRACT_UTF16.toString(), Boolean.TRUE.toString());
} }
//setting default Latin-1 Script //setting default Latin-1 Script
if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_SCRIPTS, SCRIPT.LATIN_1.name())) { if (!ModuleSettings.settingExists(KeywordSearchSettings.PROPERTIES_SCRIPTS, SCRIPT.LATIN_1.name())) {
logger.log(Level.INFO, "No configuration for Scripts found, generating defaults..."); logger.log(Level.INFO, "No configuration for Scripts found, generating defaults..."); //NON-NLS
ModuleSettings.setConfigSetting(KeywordSearchSettings.PROPERTIES_SCRIPTS, SCRIPT.LATIN_1.name(), Boolean.toString(true)); ModuleSettings.setConfigSetting(KeywordSearchSettings.PROPERTIES_SCRIPTS, SCRIPT.LATIN_1.name(), Boolean.toString(true));
} }
} }

View File

@ -141,6 +141,6 @@ class KeywordSearchUtil {
*/ */
static boolean isXMLList(String absPath) { static boolean isXMLList(String absPath) {
//TODO: make this more robust, if necessary //TODO: make this more robust, if necessary
return new File(absPath).getName().endsWith(".xml"); return new File(absPath).getName().endsWith(".xml"); //NON-NLS
} }
} }

View File

@ -163,7 +163,7 @@ class LuceneQuery implements KeywordSearchQuery {
bba = newFsHit.newArtifact(ARTIFACT_TYPE.TSK_KEYWORD_HIT); bba = newFsHit.newArtifact(ARTIFACT_TYPE.TSK_KEYWORD_HIT);
writeResult = new KeywordWriteResult(bba); writeResult = new KeywordWriteResult(bba);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Error adding bb artifact for keyword hit", e); logger.log(Level.WARNING, "Error adding bb artifact for keyword hit", e); //NON-NLS
return null; return null;
} }
@ -193,7 +193,7 @@ class LuceneQuery implements KeywordSearchQuery {
writeResult.add(attributes); writeResult.add(attributes);
return writeResult; return writeResult;
} catch (TskException e) { } catch (TskException e) {
logger.log(Level.WARNING, "Error adding bb attributes to artifact", e); logger.log(Level.WARNING, "Error adding bb attributes to artifact", e); //NON-NLS
} }
return null; return null;
} }
@ -241,10 +241,10 @@ class LuceneQuery implements KeywordSearchQuery {
} }
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + keywordString, ex); logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + keywordString, ex); //NON-NLS
throw ex; throw ex;
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + keywordString, ex); logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + keywordString, ex); //NON-NLS
} }
} }
@ -284,17 +284,17 @@ class LuceneQuery implements KeywordSearchQuery {
q.setHighlightFragsize(SNIPPET_LENGTH); q.setHighlightFragsize(SNIPPET_LENGTH);
//tune the highlighter //tune the highlighter
q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one NON-NLS
q.setParam("hl.tag.pre", "&laquo;"); //makes sense for FastVectorHighlighter only q.setParam("hl.tag.pre", "&laquo;"); //makes sense for FastVectorHighlighter only NON-NLS
q.setParam("hl.tag.post", "&laquo;"); //makes sense for FastVectorHighlighter only q.setParam("hl.tag.post", "&laquo;"); //makes sense for FastVectorHighlighter only NON-NLS
q.setParam("hl.fragListBuilder", "simple"); //makes sense for FastVectorHighlighter only q.setParam("hl.fragListBuilder", "simple"); //makes sense for FastVectorHighlighter only NON-NLS
//Solr bug if fragCharSize is smaller than Query string, StringIndexOutOfBoundsException is thrown. //Solr bug if fragCharSize is smaller than Query string, StringIndexOutOfBoundsException is thrown.
q.setParam("hl.fragCharSize", Integer.toString(theQueryStr.length())); //makes sense for FastVectorHighlighter only q.setParam("hl.fragCharSize", Integer.toString(theQueryStr.length())); //makes sense for FastVectorHighlighter only NON-NLS
//docs says makes sense for the original Highlighter only, but not really //docs says makes sense for the original Highlighter only, but not really
//analyze all content SLOW! consider lowering //analyze all content SLOW! consider lowering
q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); //NON-NLS
} }
return q; return q;
@ -331,7 +331,7 @@ class LuceneQuery implements KeywordSearchQuery {
chit.setSnippet(snippet); chit.setSnippet(snippet);
} }
} catch (TskException ex) { } catch (TskException ex) {
logger.log(Level.WARNING, "Could not get the AbstractFile for keyword hit, ", ex); logger.log(Level.WARNING, "Could not get the AbstractFile for keyword hit, ", ex); //NON-NLS
//something wrong with case/db //something wrong with case/db
throw ex; throw ex;
} }
@ -346,7 +346,7 @@ class LuceneQuery implements KeywordSearchQuery {
chit.setSnippet(snippet); chit.setSnippet(snippet);
} }
} catch (TskException ex) { } catch (TskException ex) {
logger.log(Level.WARNING, "Could not get the AbstractFile for keyword hit, ", ex); logger.log(Level.WARNING, "Could not get the AbstractFile for keyword hit, ", ex); //NON-NLS
//something wrong with case/db //something wrong with case/db
throw ex; throw ex;
} }
@ -429,17 +429,17 @@ class LuceneQuery implements KeywordSearchQuery {
//tune the highlighter //tune the highlighter
q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one NON-NLS
q.setParam("hl.tag.pre", "&laquo;"); //makes sense for FastVectorHighlighter only q.setParam("hl.tag.pre", "&laquo;"); //makes sense for FastVectorHighlighter only NON-NLS
q.setParam("hl.tag.post", "&laquo;"); //makes sense for FastVectorHighlighter only q.setParam("hl.tag.post", "&laquo;"); //makes sense for FastVectorHighlighter only NON-NLS
q.setParam("hl.fragListBuilder", "simple"); //makes sense for FastVectorHighlighter only q.setParam("hl.fragListBuilder", "simple"); //makes sense for FastVectorHighlighter only NON-NLS
//Solr bug if fragCharSize is smaller than Query string, StringIndexOutOfBoundsException is thrown. //Solr bug if fragCharSize is smaller than Query string, StringIndexOutOfBoundsException is thrown.
q.setParam("hl.fragCharSize", Integer.toString(queryStr.length())); //makes sense for FastVectorHighlighter only q.setParam("hl.fragCharSize", Integer.toString(queryStr.length())); //makes sense for FastVectorHighlighter only NON-NLS
//docs says makes sense for the original Highlighter only, but not really //docs says makes sense for the original Highlighter only, but not really
//analyze all content SLOW! consider lowering //analyze all content SLOW! consider lowering
q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); //NON-NLS
try { try {
QueryResponse response = solrServer.query(q, METHOD.POST); QueryResponse response = solrServer.query(q, METHOD.POST);
@ -456,10 +456,10 @@ class LuceneQuery implements KeywordSearchQuery {
return EscapeUtil.unEscapeHtml(contentHighlights.get(0)).trim(); return EscapeUtil.unEscapeHtml(contentHighlights.get(0)).trim();
} }
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + query, ex); logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + query, ex); //NON-NLS
throw ex; throw ex;
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + query, ex); logger.log(Level.WARNING, "Error executing Lucene Solr Query: " + query, ex); //NON-NLS
return ""; return "";
} }
} }

View File

@ -86,7 +86,7 @@ public final class SearchRunner {
*/ */
public synchronized void startJob(long jobId, long dataSourceId, List<String> keywordListNames) { public synchronized void startJob(long jobId, long dataSourceId, List<String> keywordListNames) {
if (!jobs.containsKey(jobId)) { if (!jobs.containsKey(jobId)) {
logger.log(Level.INFO, "Adding job {0}", jobId); logger.log(Level.INFO, "Adding job {0}", jobId); //NON-NLS
SearchJobInfo jobData = new SearchJobInfo(jobId, dataSourceId, keywordListNames); SearchJobInfo jobData = new SearchJobInfo(jobId, dataSourceId, keywordListNames);
jobs.put(jobId, jobData); jobs.put(jobId, jobData);
} }
@ -136,7 +136,7 @@ public final class SearchRunner {
* @param jobId * @param jobId
*/ */
public void stopJob(long jobId) { public void stopJob(long jobId) {
logger.log(Level.INFO, "Stopping job {0}", jobId); logger.log(Level.INFO, "Stopping job {0}", jobId); //NON-NLS
commit(); commit();
SearchJobInfo job; SearchJobInfo job;
@ -162,7 +162,7 @@ public final class SearchRunner {
*/ */
public synchronized void addKeywordListsToAllJobs(List<String> keywordListNames) { public synchronized void addKeywordListsToAllJobs(List<String> keywordListNames) {
for(String listName : keywordListNames) { for(String listName : keywordListNames) {
logger.log(Level.INFO, "Adding keyword list {0} to all jobs", listName); logger.log(Level.INFO, "Adding keyword list {0} to all jobs", listName); //NON-NLS
for(SearchJobInfo j : jobs.values()) { for(SearchJobInfo j : jobs.values()) {
j.addKeywordListName(listName); j.addKeywordListName(listName);
} }
@ -180,7 +180,7 @@ public final class SearchRunner {
final int numIndexedFiles = KeywordSearch.getServer().queryNumIndexedFiles(); final int numIndexedFiles = KeywordSearch.getServer().queryNumIndexedFiles();
KeywordSearch.fireNumIndexedFilesChange(null, new Integer(numIndexedFiles)); KeywordSearch.fireNumIndexedFilesChange(null, new Integer(numIndexedFiles));
} catch (NoOpenCoreException | KeywordSearchModuleException ex) { } catch (NoOpenCoreException | KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Error executing Solr query to check number of indexed files: ", ex); logger.log(Level.WARNING, "Error executing Solr query to check number of indexed files: ", ex); //NON-NLS
} }
} }
@ -191,7 +191,7 @@ public final class SearchRunner {
*/ */
private void doFinalSearch(SearchJobInfo job) { private void doFinalSearch(SearchJobInfo job) {
// Run one last search as there are probably some new files committed // Run one last search as there are probably some new files committed
logger.log(Level.INFO, "Running final search for jobid {0}", job.getJobId()); logger.log(Level.INFO, "Running final search for jobid {0}", job.getJobId()); //NON-NLS
if (!job.getKeywordListNames().isEmpty()) { if (!job.getKeywordListNames().isEmpty()) {
try { try {
// In case this job still has a worker running, wait for it to finish // In case this job still has a worker running, wait for it to finish
@ -205,7 +205,7 @@ public final class SearchRunner {
finalSearcher.get(); finalSearcher.get();
} catch (InterruptedException | ExecutionException ex) { } catch (InterruptedException | ExecutionException ex) {
logger.log(Level.WARNING, "Job {1} final search thread failed: {2}", new Object[]{job.getJobId(), ex}); logger.log(Level.WARNING, "Job {1} final search thread failed: {2}", new Object[]{job.getJobId(), ex}); //NON-NLS
} }
} }
} }
@ -381,7 +381,7 @@ public final class SearchRunner {
progressGroup = AggregateProgressFactory.createSystemHandle(pgDisplayName, null, new Cancellable() { progressGroup = AggregateProgressFactory.createSystemHandle(pgDisplayName, null, new Cancellable() {
@Override @Override
public boolean cancel() { public boolean cancel() {
logger.log(Level.INFO, "Cancelling the searcher by user."); logger.log(Level.INFO, "Cancelling the searcher by user."); //NON-NLS
if (progressGroup != null) { if (progressGroup != null) {
progressGroup.setDisplayName(displayName + " (" + NbBundle.getMessage(this.getClass(), "SearchRunner.doInBackGround.cancelMsg") + "...)"); progressGroup.setDisplayName(displayName + " (" + NbBundle.getMessage(this.getClass(), "SearchRunner.doInBackGround.cancelMsg") + "...)");
} }
@ -410,7 +410,7 @@ public final class SearchRunner {
for (Keyword keywordQuery : keywords) { for (Keyword keywordQuery : keywords) {
if (this.isCancelled()) { if (this.isCancelled()) {
logger.log(Level.INFO, "Cancel detected, bailing before new keyword processed: {0}", keywordQuery.getQuery()); logger.log(Level.INFO, "Cancel detected, bailing before new keyword processed: {0}", keywordQuery.getQuery()); //NON-NLS
return null; return null;
} }
@ -444,16 +444,16 @@ public final class SearchRunner {
try { try {
queryResult = del.performQuery(); queryResult = del.performQuery();
} catch (NoOpenCoreException ex) { } catch (NoOpenCoreException ex) {
logger.log(Level.WARNING, "Error performing query: " + keywordQuery.getQuery(), ex); logger.log(Level.WARNING, "Error performing query: " + keywordQuery.getQuery(), ex); //NON-NLS
//no reason to continue with next query if recovery failed //no reason to continue with next query if recovery failed
//or wait for recovery to kick in and run again later //or wait for recovery to kick in and run again later
//likely case has closed and threads are being interrupted //likely case has closed and threads are being interrupted
return null; return null;
} catch (CancellationException e) { } catch (CancellationException e) {
logger.log(Level.INFO, "Cancel detected, bailing during keyword query: {0}", keywordQuery.getQuery()); logger.log(Level.INFO, "Cancel detected, bailing during keyword query: {0}", keywordQuery.getQuery()); //NON-NLS
return null; return null;
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Error performing query: " + keywordQuery.getQuery(), e); logger.log(Level.WARNING, "Error performing query: " + keywordQuery.getQuery(), e); //NON-NLS
continue; continue;
} }
@ -482,7 +482,7 @@ public final class SearchRunner {
for (final Keyword hitTerm : newResults.keySet()) { for (final Keyword hitTerm : newResults.keySet()) {
//checking for cancellation between results //checking for cancellation between results
if (this.isCancelled()) { if (this.isCancelled()) {
logger.log(Level.INFO, "Cancel detected, bailing before new hit processed for query: {0}", keywordQuery.getQuery()); logger.log(Level.INFO, "Cancel detected, bailing before new hit processed for query: {0}", keywordQuery.getQuery()); //NON-NLS
return null; return null;
} }
@ -504,18 +504,18 @@ public final class SearchRunner {
try { try {
snippet = LuceneQuery.querySnippet(snippetQuery, hitFile.getId(), chunkId, isRegex, true); snippet = LuceneQuery.querySnippet(snippetQuery, hitFile.getId(), chunkId, isRegex, true);
} catch (NoOpenCoreException e) { } catch (NoOpenCoreException e) {
logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); //NON-NLS
//no reason to continue //no reason to continue
return null; return null;
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); logger.log(Level.WARNING, "Error querying snippet: " + snippetQuery, e); //NON-NLS
continue; continue;
} }
// write the blackboard artifact for this keyword in this file // write the blackboard artifact for this keyword in this file
KeywordWriteResult written = del.writeToBlackBoard(hitTerm.getQuery(), hitFile, snippet, listName); KeywordWriteResult written = del.writeToBlackBoard(hitTerm.getQuery(), hitFile, snippet, listName);
if (written == null) { if (written == null) {
logger.log(Level.WARNING, "BB artifact for keyword hit not written, file: {0}, hit: {1}", new Object[]{hitFile, hitTerm.toString()}); logger.log(Level.WARNING, "BB artifact for keyword hit not written, file: {0}, hit: {1}", new Object[]{hitFile, hitTerm.toString()}); //NON-NLS
continue; continue;
} }
@ -540,46 +540,46 @@ public final class SearchRunner {
} }
//details //details
detailsSb.append("<table border='0' cellpadding='4' width='280'>"); detailsSb.append("<table border='0' cellpadding='4' width='280'>"); //NON-NLS
//hit //hit
detailsSb.append("<tr>"); detailsSb.append("<tr>"); //NON-NLS
detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.kwHitThLbl")); detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.kwHitThLbl"));
detailsSb.append("<td>").append(EscapeUtil.escapeHtml(attr.getValueString())).append("</td>"); detailsSb.append("<td>").append(EscapeUtil.escapeHtml(attr.getValueString())).append("</td>"); //NON-NLS
detailsSb.append("</tr>"); detailsSb.append("</tr>"); //NON-NLS
//preview //preview
attr = written.getAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_PREVIEW.getTypeID()); attr = written.getAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_PREVIEW.getTypeID());
if (attr != null) { if (attr != null) {
detailsSb.append("<tr>"); detailsSb.append("<tr>"); //NON-NLS
detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.previewThLbl")); detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.previewThLbl"));
detailsSb.append("<td>").append(EscapeUtil.escapeHtml(attr.getValueString())).append("</td>"); detailsSb.append("<td>").append(EscapeUtil.escapeHtml(attr.getValueString())).append("</td>"); //NON-NLS
detailsSb.append("</tr>"); detailsSb.append("</tr>"); //NON-NLS
} }
//file //file
detailsSb.append("<tr>"); detailsSb.append("<tr>"); //NON-NLS
detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.fileThLbl")); detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.fileThLbl"));
detailsSb.append("<td>").append(hitFile.getParentPath()).append(hitFile.getName()).append("</td>"); detailsSb.append("<td>").append(hitFile.getParentPath()).append(hitFile.getName()).append("</td>"); //NON-NLS
detailsSb.append("</tr>"); detailsSb.append("</tr>"); //NON-NLS
//list //list
attr = written.getAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()); attr = written.getAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID());
detailsSb.append("<tr>"); detailsSb.append("<tr>"); //NON-NLS
detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.listThLbl")); detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.listThLbl"));
detailsSb.append("<td>").append(attr.getValueString()).append("</td>"); detailsSb.append("<td>").append(attr.getValueString()).append("</td>"); //NON-NLS
detailsSb.append("</tr>"); detailsSb.append("</tr>"); //NON-NLS
//regex //regex
if (!keywordQuery.isLiteral()) { if (!keywordQuery.isLiteral()) {
attr = written.getAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_REGEXP.getTypeID()); attr = written.getAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_REGEXP.getTypeID());
if (attr != null) { if (attr != null) {
detailsSb.append("<tr>"); detailsSb.append("<tr>"); //NON-NLS
detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.regExThLbl")); detailsSb.append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.regExThLbl"));
detailsSb.append("<td>").append(attr.getValueString()).append("</td>"); detailsSb.append("<td>").append(attr.getValueString()).append("</td>"); //NON-NLS
detailsSb.append("</tr>"); detailsSb.append("</tr>"); //NON-NLS
} }
} }
detailsSb.append("</table>"); detailsSb.append("</table>"); //NON-NLS
services.postMessage(IngestMessage.createDataMessage(KeywordSearchModuleFactory.getModuleName(), subjectSb.toString(), detailsSb.toString(), uniqueKey, written.getArtifact())); services.postMessage(IngestMessage.createDataMessage(KeywordSearchModuleFactory.getModuleName(), subjectSb.toString(), detailsSb.toString(), uniqueKey, written.getArtifact()));
} }
@ -604,13 +604,13 @@ public final class SearchRunner {
} //end try block } //end try block
catch (Exception ex) { catch (Exception ex) {
logger.log(Level.WARNING, "searcher exception occurred", ex); logger.log(Level.WARNING, "searcher exception occurred", ex); //NON-NLS
} finally { } finally {
try { try {
finalizeSearcher(); finalizeSearcher();
stopWatch.stop(); stopWatch.stop();
logger.log(Level.INFO, "Searcher took to run: {0} secs.", stopWatch.getElapsedTimeSecs()); logger.log(Level.INFO, "Searcher took to run: {0} secs.", stopWatch.getElapsedTimeSecs()); //NON-NLS
} finally { } finally {
// In case a thread is waiting on this worker to be done // In case a thread is waiting on this worker to be done
job.searchNotify(); job.searchNotify();
@ -626,7 +626,7 @@ public final class SearchRunner {
try { try {
get(); get();
} catch (InterruptedException | ExecutionException e) { } catch (InterruptedException | ExecutionException e) {
logger.log(Level.SEVERE, "Error performing keyword search: " + e.getMessage()); logger.log(Level.SEVERE, "Error performing keyword search: " + e.getMessage()); //NON-NLS
services.postMessage(IngestMessage.createErrorMessage(KeywordSearchModuleFactory.getModuleName(), "Error performing keyword search", e.getMessage())); services.postMessage(IngestMessage.createErrorMessage(KeywordSearchModuleFactory.getModuleName(), "Error performing keyword search", e.getMessage()));
} // catch and ignore if we were cancelled } // catch and ignore if we were cancelled
catch (java.util.concurrent.CancellationException ex) { catch (java.util.concurrent.CancellationException ex) {

View File

@ -72,65 +72,65 @@ public class Server {
ID { ID {
@Override @Override
public String toString() { public String toString() {
return "id"; return "id"; //NON-NLS
} }
}, },
IMAGE_ID { IMAGE_ID {
@Override @Override
public String toString() { public String toString() {
return "image_id"; return "image_id"; //NON-NLS
} }
}, },
CONTENT { CONTENT {
@Override @Override
public String toString() { public String toString() {
return "content"; return "content"; //NON-NLS
} }
}, },
CONTENT_WS { CONTENT_WS {
@Override @Override
public String toString() { public String toString() {
return "content_ws"; return "content_ws"; //NON-NLS
} }
}, },
FILE_NAME { FILE_NAME {
@Override @Override
public String toString() { public String toString() {
return "file_name"; return "file_name"; //NON-NLS
} }
}, },
// note that we no longer index this field // note that we no longer index this field
CTIME { CTIME {
@Override @Override
public String toString() { public String toString() {
return "ctime"; return "ctime"; //NON-NLS
} }
}, },
// note that we no longer index this field // note that we no longer index this field
ATIME { ATIME {
@Override @Override
public String toString() { public String toString() {
return "atime"; return "atime"; //NON-NLS
} }
}, },
// note that we no longer index this field // note that we no longer index this field
MTIME { MTIME {
@Override @Override
public String toString() { public String toString() {
return "mtime"; return "mtime"; //NON-NLS
} }
}, },
// note that we no longer index this field // note that we no longer index this field
CRTIME { CRTIME {
@Override @Override
public String toString() { public String toString() {
return "crtime"; return "crtime"; //NON-NLS
} }
}, },
NUM_CHUNKS { NUM_CHUNKS {
@Override @Override
public String toString() { public String toString() {
return "num_chunks"; return "num_chunks"; //NON-NLS
} }
}, },
}; };
@ -138,19 +138,19 @@ public class Server {
//max content size we can send to Solr //max content size we can send to Solr
public static final long MAX_CONTENT_SIZE = 1L * 1024 * 1024 * 1024; public static final long MAX_CONTENT_SIZE = 1L * 1024 * 1024 * 1024;
private static final Logger logger = Logger.getLogger(Server.class.getName()); private static final Logger logger = Logger.getLogger(Server.class.getName());
private static final String DEFAULT_CORE_NAME = "coreCase"; private static final String DEFAULT_CORE_NAME = "coreCase"; //NON-NLS
// TODO: DEFAULT_CORE_NAME needs to be replaced with unique names to support multiple open cases // TODO: DEFAULT_CORE_NAME needs to be replaced with unique names to support multiple open cases
public static final String CORE_EVT = "CORE_EVT"; public static final String CORE_EVT = "CORE_EVT"; //NON-NLS
public static final char ID_CHUNK_SEP = '_'; public static final char ID_CHUNK_SEP = '_';
private String javaPath = "java"; private String javaPath = "java"; //NON-NLS
public static final Charset DEFAULT_INDEXED_TEXT_CHARSET = Charset.forName("UTF-8"); ///< default Charset to index text as public static final Charset DEFAULT_INDEXED_TEXT_CHARSET = Charset.forName("UTF-8"); ///< default Charset to index text as
private static final int MAX_SOLR_MEM_MB = 512; //TODO set dynamically based on avail. system resources private static final int MAX_SOLR_MEM_MB = 512; //TODO set dynamically based on avail. system resources
private Process curSolrProcess = null; private Process curSolrProcess = null;
private static Ingester ingester = null; private static Ingester ingester = null;
static final String PROPERTIES_FILE = KeywordSearchSettings.MODULE_NAME; static final String PROPERTIES_FILE = KeywordSearchSettings.MODULE_NAME;
static final String PROPERTIES_CURRENT_SERVER_PORT = "IndexingServerPort"; static final String PROPERTIES_CURRENT_SERVER_PORT = "IndexingServerPort"; //NON-NLS
static final String PROPERTIES_CURRENT_STOP_PORT = "IndexingServerStopPort"; static final String PROPERTIES_CURRENT_STOP_PORT = "IndexingServerStopPort"; //NON-NLS
private static final String KEY = "jjk#09s"; private static final String KEY = "jjk#09s"; //NON-NLS
static final int DEFAULT_SOLR_SERVER_PORT = 23232; static final int DEFAULT_SOLR_SERVER_PORT = 23232;
static final int DEFAULT_SOLR_STOP_PORT = 34343; static final int DEFAULT_SOLR_STOP_PORT = 34343;
private int currentSolrServerPort = 0; private int currentSolrServerPort = 0;
@ -176,14 +176,14 @@ public class Server {
Server() { Server() {
initSettings(); initSettings();
this.solrUrl = "http://localhost:" + currentSolrServerPort + "/solr"; this.solrUrl = "http://localhost:" + currentSolrServerPort + "/solr"; //NON-NLS
this.solrServer = new HttpSolrServer(solrUrl); this.solrServer = new HttpSolrServer(solrUrl);
serverAction = new ServerAction(); serverAction = new ServerAction();
solrFolder = InstalledFileLocator.getDefault().locate("solr", Server.class.getPackage().getName(), false); solrFolder = InstalledFileLocator.getDefault().locate("solr", Server.class.getPackage().getName(), false); //NON-NLS
instanceDir = solrFolder.getAbsolutePath() + File.separator + "solr"; instanceDir = solrFolder.getAbsolutePath() + File.separator + "solr"; //NON-NLS
javaPath = PlatformUtil.getJavaPath(); javaPath = PlatformUtil.getJavaPath();
logger.log(Level.INFO, "Created Server instance"); logger.log(Level.INFO, "Created Server instance"); //NON-NLS
} }
private void initSettings() { private void initSettings() {
@ -191,7 +191,7 @@ public class Server {
try { try {
currentSolrServerPort = Integer.decode(ModuleSettings.getConfigSetting(PROPERTIES_FILE, PROPERTIES_CURRENT_SERVER_PORT)); currentSolrServerPort = Integer.decode(ModuleSettings.getConfigSetting(PROPERTIES_FILE, PROPERTIES_CURRENT_SERVER_PORT));
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
logger.log(Level.WARNING, "Could not decode indexing server port, value was not a valid port number, using the default. ", nfe); logger.log(Level.WARNING, "Could not decode indexing server port, value was not a valid port number, using the default. ", nfe); //NON-NLS
currentSolrServerPort = DEFAULT_SOLR_SERVER_PORT; currentSolrServerPort = DEFAULT_SOLR_SERVER_PORT;
} }
} else { } else {
@ -203,7 +203,7 @@ public class Server {
try { try {
currentSolrStopPort = Integer.decode(ModuleSettings.getConfigSetting(PROPERTIES_FILE, PROPERTIES_CURRENT_STOP_PORT)); currentSolrStopPort = Integer.decode(ModuleSettings.getConfigSetting(PROPERTIES_FILE, PROPERTIES_CURRENT_STOP_PORT));
} catch (NumberFormatException nfe) { } catch (NumberFormatException nfe) {
logger.log(Level.WARNING, "Could not decode indexing server stop port, value was not a valid port number, using default", nfe); logger.log(Level.WARNING, "Could not decode indexing server stop port, value was not a valid port number, using default", nfe); //NON-NLS
currentSolrStopPort = DEFAULT_SOLR_STOP_PORT; currentSolrStopPort = DEFAULT_SOLR_STOP_PORT;
} }
} else { } else {
@ -243,8 +243,8 @@ public class Server {
this.stream = stream; this.stream = stream;
try { try {
final String log = Places.getUserDirectory().getAbsolutePath() final String log = Places.getUserDirectory().getAbsolutePath()
+ File.separator + "var" + File.separator + "log" + File.separator + "var" + File.separator + "log" //NON-NLS
+ File.separator + "solr.log." + type; + File.separator + "solr.log." + type; //NON-NLS
File outputFile = new File(log.concat(".0")); File outputFile = new File(log.concat(".0"));
File first = new File(log.concat(".1")); File first = new File(log.concat(".1"));
File second = new File(log.concat(".2")); File second = new File(log.concat(".2"));
@ -262,7 +262,7 @@ public class Server {
out = new FileOutputStream(outputFile); out = new FileOutputStream(outputFile);
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.WARNING, "Failed to create solr log file", ex); logger.log(Level.WARNING, "Failed to create solr log file", ex); //NON-NLS
} }
} }
@ -290,20 +290,20 @@ public class Server {
} }
bw.flush(); bw.flush();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Error redirecting Solr output stream"); logger.log(Level.WARNING, "Error redirecting Solr output stream"); //NON-NLS
} finally { } finally {
if (bw != null) { if (bw != null) {
try { try {
bw.close(); bw.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Error closing Solr output stream writer"); logger.log(Level.WARNING, "Error closing Solr output stream writer"); //NON-NLS
} }
} }
if (br != null) { if (br != null) {
try { try {
br.close(); br.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Error closing Solr output stream reader"); logger.log(Level.WARNING, "Error closing Solr output stream reader"); //NON-NLS
} }
} }
} }
@ -319,7 +319,7 @@ public class Server {
List<Long> pids = new ArrayList<Long>(); List<Long> pids = new ArrayList<Long>();
//NOTE: these needs to be in sync with process start string in start() //NOTE: these needs to be in sync with process start string in start()
final String pidsQuery = "Args.4.eq=-DSTOP.KEY=" + KEY + ",Args.7.eq=start.jar"; final String pidsQuery = "Args.4.eq=-DSTOP.KEY=" + KEY + ",Args.7.eq=start.jar"; //NON-NLS
long[] pidsArr = PlatformUtil.getJavaPIDs(pidsQuery); long[] pidsArr = PlatformUtil.getJavaPIDs(pidsQuery);
if (pidsArr != null) { if (pidsArr != null) {
@ -338,7 +338,7 @@ public class Server {
void killSolr() { void killSolr() {
List<Long> solrPids = getSolrPIDs(); List<Long> solrPids = getSolrPIDs();
for (long pid : solrPids) { for (long pid : solrPids) {
logger.log(Level.INFO, "Trying to kill old Solr process, PID: " + pid); logger.log(Level.INFO, "Trying to kill old Solr process, PID: " + pid); //NON-NLS
PlatformUtil.killProcess(pid); PlatformUtil.killProcess(pid);
} }
} }
@ -349,19 +349,19 @@ public class Server {
* successful. * successful.
*/ */
void start() throws KeywordSearchModuleException, SolrServerNoPortException { void start() throws KeywordSearchModuleException, SolrServerNoPortException {
logger.log(Level.INFO, "Starting Solr server from: " + solrFolder.getAbsolutePath()); logger.log(Level.INFO, "Starting Solr server from: " + solrFolder.getAbsolutePath()); //NON-NLS
if (isPortAvailable(currentSolrServerPort)) { if (isPortAvailable(currentSolrServerPort)) {
logger.log(Level.INFO, "Port [" + currentSolrServerPort + "] available, starting Solr"); logger.log(Level.INFO, "Port [" + currentSolrServerPort + "] available, starting Solr"); //NON-NLS
try { try {
final String MAX_SOLR_MEM_MB_PAR = "-Xmx" + Integer.toString(MAX_SOLR_MEM_MB) + "m"; final String MAX_SOLR_MEM_MB_PAR = "-Xmx" + Integer.toString(MAX_SOLR_MEM_MB) + "m"; //NON-NLS
String loggingPropertiesOpt = "-Djava.util.logging.config.file="; String loggingPropertiesOpt = "-Djava.util.logging.config.file="; //NON-NLS
String loggingPropertiesFilePath = instanceDir + File.separator + "conf" + File.separator; String loggingPropertiesFilePath = instanceDir + File.separator + "conf" + File.separator; //NON-NLS
if (DEBUG) { if (DEBUG) {
loggingPropertiesFilePath += "logging-development.properties"; loggingPropertiesFilePath += "logging-development.properties"; //NON-NLS
} else { } else {
loggingPropertiesFilePath += "logging-release.properties"; loggingPropertiesFilePath += "logging-release.properties"; //NON-NLS
} }
final String loggingProperties = loggingPropertiesOpt + loggingPropertiesFilePath; final String loggingProperties = loggingPropertiesOpt + loggingPropertiesFilePath;
@ -369,47 +369,47 @@ public class Server {
final String [] SOLR_START_CMD = { final String [] SOLR_START_CMD = {
javaPath, javaPath,
MAX_SOLR_MEM_MB_PAR, MAX_SOLR_MEM_MB_PAR,
"-DSTOP.PORT=" + currentSolrStopPort, "-DSTOP.PORT=" + currentSolrStopPort, //NON-NLS
"-Djetty.port=" + currentSolrServerPort, "-Djetty.port=" + currentSolrServerPort, //NON-NLS
"-DSTOP.KEY=" + KEY, "-DSTOP.KEY=" + KEY, //NON-NLS
loggingProperties, loggingProperties,
"-jar", "-jar", //NON-NLS
"start.jar"}; "start.jar"}; //NON-NLS
StringBuilder cmdSb = new StringBuilder(); StringBuilder cmdSb = new StringBuilder();
for (int i = 0; i<SOLR_START_CMD.length; ++i ) { for (int i = 0; i<SOLR_START_CMD.length; ++i ) {
cmdSb.append(SOLR_START_CMD[i]).append(" "); cmdSb.append(SOLR_START_CMD[i]).append(" ");
} }
logger.log(Level.INFO, "Starting Solr using: " + cmdSb.toString()); logger.log(Level.INFO, "Starting Solr using: " + cmdSb.toString()); //NON-NLS
curSolrProcess = Runtime.getRuntime().exec(SOLR_START_CMD, null, solrFolder); curSolrProcess = Runtime.getRuntime().exec(SOLR_START_CMD, null, solrFolder);
logger.log(Level.INFO, "Finished starting Solr"); logger.log(Level.INFO, "Finished starting Solr"); //NON-NLS
try { try {
//block for 10 seconds, give time to fully start the process //block for 10 seconds, give time to fully start the process
//so if it's restarted solr operations can be resumed seamlessly //so if it's restarted solr operations can be resumed seamlessly
Thread.sleep(10 * 1000); Thread.sleep(10 * 1000);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
logger.log(Level.WARNING, "Timer interrupted"); logger.log(Level.WARNING, "Timer interrupted"); //NON-NLS
} }
// Handle output to prevent process from blocking // Handle output to prevent process from blocking
errorRedirectThread = new InputStreamPrinterThread(curSolrProcess.getErrorStream(), "stderr"); errorRedirectThread = new InputStreamPrinterThread(curSolrProcess.getErrorStream(), "stderr"); //NON-NLS
errorRedirectThread.start(); errorRedirectThread.start();
final List<Long> pids = this.getSolrPIDs(); final List<Long> pids = this.getSolrPIDs();
logger.log(Level.INFO, "New Solr process PID: " + pids); logger.log(Level.INFO, "New Solr process PID: " + pids); //NON-NLS
} catch (SecurityException ex) { } catch (SecurityException ex) {
logger.log(Level.SEVERE, "Could not start Solr process!", ex); logger.log(Level.SEVERE, "Could not start Solr process!", ex); //NON-NLS
throw new KeywordSearchModuleException( throw new KeywordSearchModuleException(
NbBundle.getMessage(this.getClass(), "Server.start.exception.cantStartSolr.msg"), ex); NbBundle.getMessage(this.getClass(), "Server.start.exception.cantStartSolr.msg"), ex);
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Could not start Solr server process!", ex); logger.log(Level.SEVERE, "Could not start Solr server process!", ex); //NON-NLS
throw new KeywordSearchModuleException( throw new KeywordSearchModuleException(
NbBundle.getMessage(this.getClass(), "Server.start.exception.cantStartSolr.msg2"), ex); NbBundle.getMessage(this.getClass(), "Server.start.exception.cantStartSolr.msg2"), ex);
} }
} else { } else {
logger.log(Level.SEVERE, "Could not start Solr server process, port [" + currentSolrServerPort + "] not available!"); logger.log(Level.SEVERE, "Could not start Solr server process, port [" + currentSolrServerPort + "] not available!"); //NON-NLS
throw new SolrServerNoPortException(currentSolrServerPort); throw new SolrServerNoPortException(currentSolrServerPort);
} }
} }
@ -423,7 +423,7 @@ public class Server {
ServerSocket ss = null; ServerSocket ss = null;
try { try {
ss = new ServerSocket(port, 0, java.net.Inet4Address.getByName("localhost")); ss = new ServerSocket(port, 0, java.net.Inet4Address.getByName("localhost")); //NON-NLS
if (ss.isBound()) { if (ss.isBound()) {
ss.setReuseAddress(true); ss.setReuseAddress(true);
ss.close(); ss.close();
@ -470,18 +470,18 @@ public class Server {
*/ */
synchronized void stop() { synchronized void stop() {
try { try {
logger.log(Level.INFO, "Stopping Solr server from: " + solrFolder.getAbsolutePath()); logger.log(Level.INFO, "Stopping Solr server from: " + solrFolder.getAbsolutePath()); //NON-NLS
//try graceful shutdown //try graceful shutdown
final String [] SOLR_STOP_CMD = { final String [] SOLR_STOP_CMD = {
javaPath, javaPath,
"-DSTOP.PORT=" + currentSolrStopPort, "-DSTOP.PORT=" + currentSolrStopPort, //NON-NLS
"-DSTOP.KEY=" + KEY, "-DSTOP.KEY=" + KEY, //NON-NLS
"-jar", "-jar", //NON-NLS
"start.jar", "start.jar", //NON-NLS
"--stop", "--stop", //NON-NLS
}; };
Process stop = Runtime.getRuntime().exec(SOLR_STOP_CMD, null, solrFolder); Process stop = Runtime.getRuntime().exec(SOLR_STOP_CMD, null, solrFolder);
logger.log(Level.INFO, "Waiting for stopping Solr server"); logger.log(Level.INFO, "Waiting for stopping Solr server"); //NON-NLS
stop.waitFor(); stop.waitFor();
//if still running, forcefully stop it //if still running, forcefully stop it
@ -504,7 +504,7 @@ public class Server {
killSolr(); killSolr();
} }
logger.log(Level.INFO, "Finished stopping Solr server"); logger.log(Level.INFO, "Finished stopping Solr server"); //NON-NLS
} }
} }
@ -525,7 +525,7 @@ public class Server {
//TODO handle timeout in cases when some other type of server on that port //TODO handle timeout in cases when some other type of server on that port
CoreAdminRequest.getStatus(null, solrServer); CoreAdminRequest.getStatus(null, solrServer);
logger.log(Level.INFO, "Solr server is running"); logger.log(Level.INFO, "Solr server is running"); //NON-NLS
} catch (SolrServerException ex) { } catch (SolrServerException ex) {
Throwable cause = ex.getRootCause(); Throwable cause = ex.getRootCause();
@ -534,7 +534,7 @@ public class Server {
// probably caused by starting a connection as the server finishes // probably caused by starting a connection as the server finishes
// shutting down) // shutting down)
if (cause instanceof ConnectException || cause instanceof SocketException) { //|| cause instanceof NoHttpResponseException) { if (cause instanceof ConnectException || cause instanceof SocketException) { //|| cause instanceof NoHttpResponseException) {
logger.log(Level.INFO, "Solr server is not running, cause: {0}", cause.getMessage()); logger.log(Level.INFO, "Solr server is not running, cause: {0}", cause.getMessage()); //NON-NLS
return false; return false;
} else { } else {
throw new KeywordSearchModuleException( throw new KeywordSearchModuleException(
@ -542,7 +542,7 @@ public class Server {
} }
} catch (SolrException ex) { } catch (SolrException ex) {
// Just log 404 errors for now... // Just log 404 errors for now...
logger.log(Level.INFO, "Solr server is not running", ex); logger.log(Level.INFO, "Solr server is not running", ex); //NON-NLS
return false; return false;
} catch (IOException ex) { } catch (IOException ex) {
throw new KeywordSearchModuleException( throw new KeywordSearchModuleException(
@ -575,25 +575,25 @@ public class Server {
* backwards compatibility with older cases) * backwards compatibility with older cases)
*/ */
private void validateIndexLocation(Case theCase) { private void validateIndexLocation(Case theCase) {
logger.log(Level.INFO, "Validating keyword search index location"); logger.log(Level.INFO, "Validating keyword search index location"); //NON-NLS
String properIndexPath = getIndexDirPath(theCase); String properIndexPath = getIndexDirPath(theCase);
String legacyIndexPath = theCase.getCaseDirectory() String legacyIndexPath = theCase.getCaseDirectory()
+ File.separator + "keywordsearch" + File.separator + "data"; + File.separator + "keywordsearch" + File.separator + "data"; //NON-NLS
File properIndexDir = new File(properIndexPath); File properIndexDir = new File(properIndexPath);
File legacyIndexDir = new File(legacyIndexPath); File legacyIndexDir = new File(legacyIndexPath);
if (!properIndexDir.exists() if (!properIndexDir.exists()
&& legacyIndexDir.exists() && legacyIndexDir.isDirectory()) { && legacyIndexDir.exists() && legacyIndexDir.isDirectory()) {
logger.log(Level.INFO, "Moving keyword search index location from: " logger.log(Level.INFO, "Moving keyword search index location from: " //NON-NLS
+ legacyIndexPath + " to: " + properIndexPath); + legacyIndexPath + " to: " + properIndexPath); //NON-NLS
try { try {
Files.move(Paths.get(legacyIndexDir.getParent()), Paths.get(properIndexDir.getParent())); Files.move(Paths.get(legacyIndexDir.getParent()), Paths.get(properIndexDir.getParent()));
} catch (IOException | SecurityException ex) { } catch (IOException | SecurityException ex) {
logger.log(Level.WARNING, "Error moving keyword search index folder from: " logger.log(Level.WARNING, "Error moving keyword search index folder from: " //NON-NLS
+ legacyIndexPath + " to: " + properIndexPath + legacyIndexPath + " to: " + properIndexPath //NON-NLS
+ " will recreate a new index.", ex); + " will recreate a new index.", ex); //NON-NLS
} }
} }
} }
@ -619,7 +619,7 @@ public class Server {
*/ */
String getIndexDirPath(Case theCase) { String getIndexDirPath(Case theCase) {
String indexDir = theCase.getModulesOutputDirAbsPath() String indexDir = theCase.getModulesOutputDirAbsPath()
+ File.separator + "keywordsearch" + File.separator + "data"; + File.separator + "keywordsearch" + File.separator + "data"; //NON-NLS
return indexDir; return indexDir;
} }
@ -887,7 +887,7 @@ public class Server {
//handle a possible scenario when server process might not be fully started //handle a possible scenario when server process might not be fully started
if (!this.isRunning()) { if (!this.isRunning()) {
logger.log(Level.WARNING, "Core open requested, but server not yet running"); logger.log(Level.WARNING, "Core open requested, but server not yet running"); //NON-NLS
throw new KeywordSearchModuleException( throw new KeywordSearchModuleException(
NbBundle.getMessage(this.getClass(), "Server.openCore.exception.msg")); NbBundle.getMessage(this.getClass(), "Server.openCore.exception.msg"));
} }
@ -948,7 +948,7 @@ public class Server {
try { try {
return solrCore.request(request); return solrCore.request(request);
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.WARNING, "Could not issue Solr request. ", e); logger.log(Level.WARNING, "Could not issue Solr request. ", e); //NON-NLS
throw new SolrServerException( throw new SolrServerException(
NbBundle.getMessage(this.getClass(), "Server.request.exception.exception.msg"), e); NbBundle.getMessage(this.getClass(), "Server.request.exception.exception.msg"), e);
} }
@ -969,7 +969,7 @@ public class Server {
//commit and block //commit and block
solrCore.commit(true, true); solrCore.commit(true, true);
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.WARNING, "Could not commit index. ", e); logger.log(Level.WARNING, "Could not commit index. ", e); //NON-NLS
throw new SolrServerException(NbBundle.getMessage(this.getClass(), "Server.commit.exception.msg"), e); throw new SolrServerException(NbBundle.getMessage(this.getClass(), "Server.commit.exception.msg"), e);
} }
} }
@ -978,13 +978,13 @@ public class Server {
try { try {
solrCore.add(doc); solrCore.add(doc);
} catch (SolrServerException ex) { } catch (SolrServerException ex) {
logger.log(Level.SEVERE, "Could not add document to index via update handler: " + doc.getField("id"), ex); logger.log(Level.SEVERE, "Could not add document to index via update handler: " + doc.getField("id"), ex); //NON-NLS
throw new KeywordSearchModuleException( throw new KeywordSearchModuleException(
NbBundle.getMessage(this.getClass(), "Server.addDoc.exception.msg", doc.getField("id")), ex); NbBundle.getMessage(this.getClass(), "Server.addDoc.exception.msg", doc.getField("id")), ex); //NON-NLS
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Could not add document to index via update handler: " + doc.getField("id"), ex); logger.log(Level.SEVERE, "Could not add document to index via update handler: " + doc.getField("id"), ex); //NON-NLS
throw new KeywordSearchModuleException( throw new KeywordSearchModuleException(
NbBundle.getMessage(this.getClass(), "Server.addDoc.exception.msg2", doc.getField("id")), ex); NbBundle.getMessage(this.getClass(), "Server.addDoc.exception.msg2", doc.getField("id")), ex); //NON-NLS
} }
} }
@ -1006,7 +1006,7 @@ public class Server {
try { try {
return (String) solrCore.query(q).getResults().get(0).getFieldValue(Schema.CONTENT.toString()); return (String) solrCore.query(q).getResults().get(0).getFieldValue(Schema.CONTENT.toString());
} catch (SolrServerException ex) { } catch (SolrServerException ex) {
logger.log(Level.WARNING, "Error getting content from Solr", ex); logger.log(Level.WARNING, "Error getting content from Solr", ex); //NON-NLS
return null; return null;
} }
} }

View File

@ -49,7 +49,7 @@ class TermComponentQuery implements KeywordSearchQuery {
private static final int TERMS_UNLIMITED = -1; private static final int TERMS_UNLIMITED = -1;
//corresponds to field in Solr schema, analyzed with white-space tokenizer only //corresponds to field in Solr schema, analyzed with white-space tokenizer only
private static final String TERMS_SEARCH_FIELD = Server.Schema.CONTENT_WS.toString(); private static final String TERMS_SEARCH_FIELD = Server.Schema.CONTENT_WS.toString();
private static final String TERMS_HANDLER = "/terms"; private static final String TERMS_HANDLER = "/terms"; //NON-NLS
private static final int TERMS_TIMEOUT = 90 * 1000; //in ms private static final int TERMS_TIMEOUT = 90 * 1000; //in ms
private static Logger logger = Logger.getLogger(TermComponentQuery.class.getName()); private static Logger logger = Logger.getLogger(TermComponentQuery.class.getName());
private String termsQuery; private String termsQuery;
@ -126,7 +126,7 @@ class TermComponentQuery implements KeywordSearchQuery {
q.setRequestHandler(TERMS_HANDLER); q.setRequestHandler(TERMS_HANDLER);
q.setTerms(true); q.setTerms(true);
q.setTermsLimit(TERMS_UNLIMITED); q.setTermsLimit(TERMS_UNLIMITED);
q.setTermsRegexFlag("case_insensitive"); q.setTermsRegexFlag("case_insensitive"); //NON-NLS
//q.setTermsLimit(200); //q.setTermsLimit(200);
//q.setTermsRegexFlag(regexFlag); //q.setTermsRegexFlag(regexFlag);
//q.setTermsRaw(true); //q.setTermsRaw(true);
@ -148,7 +148,7 @@ class TermComponentQuery implements KeywordSearchQuery {
List<Term> termsCol = tr.getTerms(TERMS_SEARCH_FIELD); List<Term> termsCol = tr.getTerms(TERMS_SEARCH_FIELD);
return termsCol; return termsCol;
} catch (KeywordSearchModuleException ex) { } catch (KeywordSearchModuleException ex) {
logger.log(Level.WARNING, "Error executing the regex terms query: " + termsQuery, ex); logger.log(Level.WARNING, "Error executing the regex terms query: " + termsQuery, ex); //NON-NLS
return null; //no need to create result view, just display error dialog return null; //no need to create result view, just display error dialog
} }
} }
@ -180,7 +180,7 @@ class TermComponentQuery implements KeywordSearchQuery {
bba = newFsHit.newArtifact(ARTIFACT_TYPE.TSK_KEYWORD_HIT); bba = newFsHit.newArtifact(ARTIFACT_TYPE.TSK_KEYWORD_HIT);
writeResult = new KeywordWriteResult(bba); writeResult = new KeywordWriteResult(bba);
} catch (Exception e) { } catch (Exception e) {
logger.log(Level.WARNING, "Error adding bb artifact for keyword hit", e); logger.log(Level.WARNING, "Error adding bb artifact for keyword hit", e); //NON-NLS
return null; return null;
} }
@ -204,7 +204,7 @@ class TermComponentQuery implements KeywordSearchQuery {
writeResult.add(attributes); writeResult.add(attributes);
return writeResult; return writeResult;
} catch (TskException e) { } catch (TskException e) {
logger.log(Level.WARNING, "Error adding bb attributes for terms search artifact", e); logger.log(Level.WARNING, "Error adding bb attributes for terms search artifact", e); //NON-NLS
} }
return null; return null;
@ -217,7 +217,7 @@ class TermComponentQuery implements KeywordSearchQuery {
final SolrQuery q = createQuery(); final SolrQuery q = createQuery();
q.setShowDebugInfo(DEBUG); q.setShowDebugInfo(DEBUG);
q.setTermsLimit(MAX_TERMS_RESULTS); q.setTermsLimit(MAX_TERMS_RESULTS);
logger.log(Level.INFO, "Query: {0}", q.toString()); logger.log(Level.INFO, "Query: {0}", q.toString()); //NON-NLS
terms = executeQuery(q); terms = executeQuery(q);
int resultSize = 0; int resultSize = 0;
@ -243,16 +243,16 @@ class TermComponentQuery implements KeywordSearchQuery {
} }
results.put(term.getTerm(), new ArrayList<>(filesResults)); results.put(term.getTerm(), new ArrayList<>(filesResults));
} catch (NoOpenCoreException e) { } catch (NoOpenCoreException e) {
logger.log(Level.WARNING, "Error executing Solr query,", e); logger.log(Level.WARNING, "Error executing Solr query,", e); //NON-NLS
throw e; throw e;
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.log(Level.WARNING, "Error executing Solr query,", e); logger.log(Level.WARNING, "Error executing Solr query,", e); //NON-NLS
} }
} }
//TODO limit how many results we store, not to hit memory limits //TODO limit how many results we store, not to hit memory limits
logger.log(Level.INFO, "Regex # results: {0}", resultSize); logger.log(Level.INFO, "Regex # results: {0}", resultSize); //NON-NLS
return results; return results;
} }

View File

@ -94,3 +94,4 @@ SearchEngineURLQueryAnalyzer.toString=Name\: {0}\
{3} {3}
SearchEngineURLQueryAnalyzer.parentModuleName.noSpace=RecentActivity SearchEngineURLQueryAnalyzer.parentModuleName.noSpace=RecentActivity
SearchEngineURLQueryAnalyzer.parentModuleName=Recent Activity SearchEngineURLQueryAnalyzer.parentModuleName=Recent Activity
SearchEngineURLQueryAnalyzer.init.exception.msg=Unable to find {0}

View File

@ -1,7 +1,7 @@
OpenIDE-Module-Display-Category=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB OpenIDE-Module-Display-Category=\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB
OpenIDE-Module-Long-Description=\ OpenIDE-Module-Long-Description=\
\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n\n\ \u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n\n\
\u3053\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u51E6\u7406\u4E2D\u306E\u30C7\u30A3\u30B9\u30AF\u30A4\u30E1\u30FC\u30B8\u306E\u6700\u8FD1\u306E\u30E6\u30FC\u30B6\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306B\u95A2\u3057\u3066\u5F79\u7ACB\u3064\u60C5\u5831\u3092\u62BD\u51FA\u3057\u307E\u3059\u3002\u4F8B\u3048\u3070\uFF1A\n\n-\u6700\u8FD1\u958B\u3044\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3001\n-\u30A6\u30A7\u30D6\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\uFF08\u8A2A\u308C\u305F\u30B5\u30A4\u30C8\u3001Cookie\u3001\u30D6\u30C3\u30AF\u30DE\u30FC\u30AF\u3055\u308C\u305F\u30B5\u30A4\u30C8\u3001\u30B5\u30FC\u30C1\u30A8\u30F3\u30B8\u30F3\u30AF\u30A8\u30EA\u3001\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\uFF09\u3001\n-\u6700\u8FD1\u30A2\u30BF\u30C3\u30C1\u3055\u308C\u305F\u30C7\u30D0\u30A4\u30B9\u3001\n-\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u30D7\u30ED\u30B0\u30E9\u30E0\u3002\n\n \u3053\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u4E2D\u306E\u30C7\u30A3\u30B9\u30AF\u30A4\u30E1\u30FC\u30B8\u306E\u6700\u8FD1\u306E\u30E6\u30FC\u30B6\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306B\u95A2\u3057\u3066\u5F79\u7ACB\u3064\u60C5\u5831\u3092\u62BD\u51FA\u3057\u307E\u3059\u3002\u4F8B\u3048\u3070\uFF1A\n\n-\u6700\u8FD1\u958B\u3044\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3001\n-\u30A6\u30A7\u30D6\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\uFF08\u8A2A\u308C\u305F\u30B5\u30A4\u30C8\u3001Cookie\u3001\u30D6\u30C3\u30AF\u30DE\u30FC\u30AF\u3055\u308C\u305F\u30B5\u30A4\u30C8\u3001\u30B5\u30FC\u30C1\u30A8\u30F3\u30B8\u30F3\u30AF\u30A8\u30EA\u3001\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\uFF09\u3001\n-\u6700\u8FD1\u30A2\u30BF\u30C3\u30C1\u3055\u308C\u305F\u30C7\u30D0\u30A4\u30B9\u3001\n-\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u30D7\u30ED\u30B0\u30E9\u30E0\u3002\n\n
OpenIDE-Module-Name=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 OpenIDE-Module-Name=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3
OpenIDE-Module-Short-Description=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30D5\u30A1\u30A4\u30F3\u30C0\u30FC\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB OpenIDE-Module-Short-Description=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30D5\u30A1\u30A4\u30F3\u30C0\u30FC\u30A4\u30F3\u30B8\u30A7\u30B9\u30C8\u30E2\u30B8\u30E5\u30FC\u30EB
Chrome.moduleName=Chrome Chrome.moduleName=Chrome
@ -63,13 +63,13 @@ Firefox.getDlPre24.errMsg.errParsingArtifacts={0}\:{1} Firefox\u30A6\u30A7\u30D6
Firefox.getDlV24.errMsg.errFetchFiles=Firefox\u306E\u300C\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u300D\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u5F97\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 Firefox.getDlV24.errMsg.errFetchFiles=Firefox\u306E\u300C\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u300D\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u5F97\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
Firefox.getDlV24.errMsg.errAnalyzeFile={0}\:\u30D5\u30A1\u30A4\u30EB\:{1}\u3092\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F Firefox.getDlV24.errMsg.errAnalyzeFile={0}\:\u30D5\u30A1\u30A4\u30EB\:{1}\u3092\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
Firefox.getDlV24.errMsg.errParsingArtifacts={0}\:{1} Firefox\u30A6\u30A7\u30D6\u5C65\u6B74\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306E\u30D1\u30FC\u30B9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 Firefox.getDlV24.errMsg.errParsingArtifacts={0}\:{1} Firefox\u30A6\u30A7\u30D6\u5C65\u6B74\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306E\u30D1\u30FC\u30B9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
RAImageIngestModule.process.started={0}\u958B\u59CB\u3057\u307E\u3057\u305F RAImageIngestModule.process.started={0}\u3092\u958B\u59CB\u3057\u307E\u3057\u305F
RAImageIngestModule.process.errModFailed={0}\u5931\u6557\u3057\u307E\u3057\u305F - \u8A73\u7D30\u306F\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044<br> RAImageIngestModule.process.errModFailed={0}\u5931\u6557\u3057\u307E\u3057\u305F - \u8A73\u7D30\u306F\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044<br>
RAImageIngestModule.process.errModErrs={0}\u306B\u306F\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3057\u305F -- \u30ED\u30B0\u3092\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044 RAImageIngestModule.process.errModErrs={0}\u306B\u306F\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3057\u305F -- \u30ED\u30B0\u3092\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044
RAImageIngestModule.process.errMsg.errsEncountered=<p>\u89E3\u6790\u4E2D\u306B\u767A\u751F\u3057\u305F\u30A8\u30E9\u30FC\uFF1A <ul> RAImageIngestModule.process.errMsg.errsEncountered=<p>\u89E3\u6790\u4E2D\u306B\u767A\u751F\u3057\u305F\u30A8\u30E9\u30FC\uFF1A <ul>
RAImageIngestModule.process.errMsgSub.oneErr=1\u500B\u306E\u30A8\u30E9\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3000 RAImageIngestModule.process.errMsgSub.oneErr=1\u3064\u306E\u30A8\u30E9\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3000
RAImageIngestModule.process.errMsgSub.nErrs={0}\u306E\u30A8\u30E9\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F RAImageIngestModule.process.errMsgSub.nErrs={0}\u306E\u30A8\u30E9\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
RAImageIngestModule.process.ingestMsg.finished=\u5B8C\u4E86\u3000{0} - {1} RAImageIngestModule.process.ingestMsg.finished=\u5B8C\u4E86 {0} - {1}
RAImageIngestModule.process.errMsg.noErrs=<p>\u30A8\u30E9\u30FC\u306F\u767A\u751F\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002</p> RAImageIngestModule.process.errMsg.noErrs=<p>\u30A8\u30E9\u30FC\u306F\u767A\u751F\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002</p>
RAImageIngestModule.process.errMsgSub.noErrs=\u30A8\u30E9\u30FC\u306F\u30EC\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 RAImageIngestModule.process.errMsgSub.noErrs=\u30A8\u30E9\u30FC\u306F\u30EC\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
RAImageIngestModule.process.histMsg.title=<p>{0}\u306B\u95A2\u3057\u3066\u306E\u30D6\u30E9\u30A6\u30B6\u30C7\u30FC\u30BF\uFF1A<ul> RAImageIngestModule.process.histMsg.title=<p>{0}\u306B\u95A2\u3057\u3066\u306E\u30D6\u30E9\u30A6\u30B6\u30C7\u30FC\u30BF\uFF1A<ul>
@ -91,4 +91,5 @@ SearchEngineURLQueryAnalyzer.toString=\u540D\u79F0\uFF1A {0}\
\u5206\u5272\u30C8\u30FC\u30AF\u30F3\ \u5206\u5272\u30C8\u30FC\u30AF\u30F3\
{3} {3}
SearchEngineURLQueryAnalyzer.parentModuleName.noSpace=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 SearchEngineURLQueryAnalyzer.parentModuleName.noSpace=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3
SearchEngineURLQueryAnalyzer.parentModuleName=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 SearchEngineURLQueryAnalyzer.parentModuleName=\u6700\u8FD1\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3
SearchEngineURLQueryAnalyzer.init.exception.msg={0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F

View File

@ -55,12 +55,12 @@ import org.sleuthkit.datamodel.TskData;
*/ */
class Chrome extends Extract { class Chrome extends Extract {
private static final String historyQuery = "SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, " private static final String historyQuery = "SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, " //NON-NLS
+ "last_visit_time, urls.hidden, visits.visit_time, (SELECT urls.url FROM urls WHERE urls.id=visits.url) as from_visit, visits.transition FROM urls, visits WHERE urls.id = visits.url"; + "last_visit_time, urls.hidden, visits.visit_time, (SELECT urls.url FROM urls WHERE urls.id=visits.url) as from_visit, visits.transition FROM urls, visits WHERE urls.id = visits.url"; //NON-NLS
private static final String cookieQuery = "select name, value, host_key, expires_utc,last_access_utc, creation_utc from cookies"; private static final String cookieQuery = "select name, value, host_key, expires_utc,last_access_utc, creation_utc from cookies"; //NON-NLS
private static final String downloadQuery = "select full_path, url, start_time, received_bytes from downloads"; private static final String downloadQuery = "select full_path, url, start_time, received_bytes from downloads"; //NON-NLS
private static final String downloadQueryVersion30 = "SELECT current_path as full_path, url, start_time, received_bytes FROM downloads, downloads_url_chains WHERE downloads.id=downloads_url_chains.id"; private static final String downloadQueryVersion30 = "SELECT current_path as full_path, url, start_time, received_bytes FROM downloads, downloads_url_chains WHERE downloads.id=downloads_url_chains.id"; //NON-NLS
private static final String loginQuery = "select origin_url, username_value, signon_realm from logins"; private static final String loginQuery = "select origin_url, username_value, signon_realm from logins"; //NON-NLS
private final Logger logger = Logger.getLogger(this.getClass().getName()); private final Logger logger = Logger.getLogger(this.getClass().getName());
private Content dataSource; private Content dataSource;
private IngestJobContext context; private IngestJobContext context;
@ -88,7 +88,7 @@ class Chrome extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> historyFiles; List<AbstractFile> historyFiles;
try { try {
historyFiles = fileManager.findFiles(dataSource, "History", "Chrome"); historyFiles = fileManager.findFiles(dataSource, "History", "Chrome"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Chrome.getHistory.errMsg.errGettingFiles"); String msg = NbBundle.getMessage(this.getClass(), "Chrome.getHistory.errMsg.errGettingFiles");
logger.log(Level.SEVERE, msg, ex); logger.log(Level.SEVERE, msg, ex);
@ -114,7 +114,7 @@ class Chrome extends Extract {
dataFound = true; dataFound = true;
int j = 0; int j = 0;
while (j < historyFiles.size()) { while (j < historyFiles.size()) {
String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + historyFiles.get(j).getName().toString() + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + historyFiles.get(j).getName().toString() + j + ".db"; //NON-NLS
final AbstractFile historyFile = historyFiles.get(j++); final AbstractFile historyFile = historyFiles.get(j++);
if (historyFile.getSize() == 0) { if (historyFile.getSize() == 0) {
continue; continue;
@ -122,7 +122,7 @@ class Chrome extends Extract {
try { try {
ContentUtils.writeToFile(historyFile, new File(temps)); ContentUtils.writeToFile(historyFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome web history artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome web history artifacts.{0}", ex); //NON-NLS
this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getHistory.errMsg.errAnalyzingFile", this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getHistory.errMsg.errAnalyzingFile",
this.getName(), historyFile.getName())); this.getName(), historyFile.getName()));
continue; continue;
@ -134,27 +134,27 @@ class Chrome extends Extract {
} }
List<HashMap<String, Object>> tempList; List<HashMap<String, Object>> tempList;
tempList = this.dbConnect(temps, historyQuery); tempList = this.dbConnect(temps, historyQuery);
logger.log(Level.INFO, "{0}- Now getting history from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0}- Now getting history from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("url").toString() != null) ? result.get("url").toString() : ""))); ((result.get("url").toString() != null) ? result.get("url").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((Long.valueOf(result.get("last_visit_time").toString())) / 10000000))); ((Long.valueOf(result.get("last_visit_time").toString())) / 10000000))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("from_visit").toString() != null) ? result.get("from_visit").toString() : ""))); ((result.get("from_visit").toString() != null) ? result.get("from_visit").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("title").toString() != null) ? result.get("title").toString() : ""))); ((result.get("title").toString() != null) ? result.get("title").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
NbBundle.getMessage(this.getClass(), "Chrome.moduleName"))); NbBundle.getMessage(this.getClass(), "Chrome.moduleName")));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
(Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); (Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); //NON-NLS
this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, historyFile, bbattributes); this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, historyFile, bbattributes);
} }
dbFile.delete(); dbFile.delete();
@ -171,7 +171,7 @@ class Chrome extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> bookmarkFiles = null; List<AbstractFile> bookmarkFiles = null;
try { try {
bookmarkFiles = fileManager.findFiles(dataSource, "Bookmarks", "Chrome"); bookmarkFiles = fileManager.findFiles(dataSource, "Bookmarks", "Chrome"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errGettingFiles"); String msg = NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errGettingFiles");
logger.log(Level.SEVERE, msg, ex); logger.log(Level.SEVERE, msg, ex);
@ -180,7 +180,7 @@ class Chrome extends Extract {
} }
if (bookmarkFiles.isEmpty()) { if (bookmarkFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any Chrome bookmark files."); logger.log(Level.INFO, "Didn't find any Chrome bookmark files."); //NON-NLS
return; return;
} }
@ -192,17 +192,17 @@ class Chrome extends Extract {
if (bookmarkFile.getSize() == 0) { if (bookmarkFile.getSize() == 0) {
continue; continue;
} }
String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + bookmarkFile.getName().toString() + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + bookmarkFile.getName().toString() + j + ".db"; //NON-NLS
try { try {
ContentUtils.writeToFile(bookmarkFile, new File(temps)); ContentUtils.writeToFile(bookmarkFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome bookmark artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome bookmark artifacts.{0}", ex); //NON-NLS
this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzingFile", this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzingFile",
this.getName(), bookmarkFile.getName())); this.getName(), bookmarkFile.getName()));
continue; continue;
} }
logger.log(Level.INFO, "{0}- Now getting Bookmarks from {1}", new Object[]{moduleName, temps}); logger.log(Level.INFO, "{0}- Now getting Bookmarks from {1}", new Object[]{moduleName, temps}); //NON-NLS
File dbFile = new File(temps); File dbFile = new File(temps);
if (context.isJobCancelled()) { if (context.isJobCancelled()) {
dbFile.delete(); dbFile.delete();
@ -213,7 +213,7 @@ class Chrome extends Extract {
try { try {
tempReader = new FileReader(temps); tempReader = new FileReader(temps);
} catch (FileNotFoundException ex) { } catch (FileNotFoundException ex) {
logger.log(Level.SEVERE, "Error while trying to read into the Bookmarks for Chrome.", ex); logger.log(Level.SEVERE, "Error while trying to read into the Bookmarks for Chrome.", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzeFile", this.getName(), NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzeFile", this.getName(),
bookmarkFile.getName())); bookmarkFile.getName()));
@ -228,11 +228,11 @@ class Chrome extends Extract {
try { try {
jsonElement = parser.parse(tempReader); jsonElement = parser.parse(tempReader);
jElement = jsonElement.getAsJsonObject(); jElement = jsonElement.getAsJsonObject();
jRoot = jElement.get("roots").getAsJsonObject(); jRoot = jElement.get("roots").getAsJsonObject(); //NON-NLS
jBookmark = jRoot.get("bookmark_bar").getAsJsonObject(); jBookmark = jRoot.get("bookmark_bar").getAsJsonObject(); //NON-NLS
jBookmarkArray = jBookmark.getAsJsonArray("children"); jBookmarkArray = jBookmark.getAsJsonArray("children"); //NON-NLS
} catch (JsonIOException | JsonSyntaxException | IllegalStateException ex) { } catch (JsonIOException | JsonSyntaxException | IllegalStateException ex) {
logger.log(Level.WARNING, "Error parsing Json from Chrome Bookmark.", ex); logger.log(Level.WARNING, "Error parsing Json from Chrome Bookmark.", ex); //NON-NLS
this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzingFile3", this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzingFile3",
this.getName(), bookmarkFile.getName())); this.getName(), bookmarkFile.getName()));
continue; continue;
@ -243,7 +243,7 @@ class Chrome extends Extract {
if (address == null) { if (address == null) {
continue; continue;
} }
JsonElement urlEl = address.get("url"); JsonElement urlEl = address.get("url"); //NON-NLS
String url; String url;
if (urlEl != null) { if (urlEl != null) {
url = urlEl.getAsString(); url = urlEl.getAsString();
@ -252,7 +252,7 @@ class Chrome extends Extract {
url = ""; url = "";
} }
String name; String name;
JsonElement nameEl = address.get("name"); JsonElement nameEl = address.get("name"); //NON-NLS
if (nameEl != null) { if (nameEl != null) {
name = nameEl.getAsString(); name = nameEl.getAsString();
} }
@ -260,7 +260,7 @@ class Chrome extends Extract {
name = ""; name = "";
} }
Long date; Long date;
JsonElement dateEl = address.get("date_added"); JsonElement dateEl = address.get("date_added"); //NON-NLS
if (dateEl != null) { if (dateEl != null) {
date = dateEl.getAsLong(); date = dateEl.getAsLong();
} }
@ -291,7 +291,7 @@ class Chrome extends Extract {
"Chrome.parentModuleName"), domain)); "Chrome.parentModuleName"), domain));
bbart.addAttributes(bbattributes); bbart.addAttributes(bbattributes);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error while trying to insert Chrome bookmark artifact{0}", ex); logger.log(Level.SEVERE, "Error while trying to insert Chrome bookmark artifact{0}", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzingFile4", NbBundle.getMessage(this.getClass(), "Chrome.getBookmark.errMsg.errAnalyzingFile4",
this.getName(), bookmarkFile.getName())); this.getName(), bookmarkFile.getName()));
@ -311,7 +311,7 @@ class Chrome extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> cookiesFiles; List<AbstractFile> cookiesFiles;
try { try {
cookiesFiles = fileManager.findFiles(dataSource, "Cookies", "Chrome"); cookiesFiles = fileManager.findFiles(dataSource, "Cookies", "Chrome"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Chrome.getCookie.errMsg.errGettingFiles"); String msg = NbBundle.getMessage(this.getClass(), "Chrome.getCookie.errMsg.errGettingFiles");
logger.log(Level.SEVERE, msg, ex); logger.log(Level.SEVERE, msg, ex);
@ -320,7 +320,7 @@ class Chrome extends Extract {
} }
if (cookiesFiles.isEmpty()) { if (cookiesFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any Chrome cookies files."); logger.log(Level.INFO, "Didn't find any Chrome cookies files."); //NON-NLS
return; return;
} }
@ -331,11 +331,11 @@ class Chrome extends Extract {
if (cookiesFile.getSize() == 0) { if (cookiesFile.getSize() == 0) {
continue; continue;
} }
String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + cookiesFile.getName().toString() + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + cookiesFile.getName().toString() + j + ".db"; //NON-NLS
try { try {
ContentUtils.writeToFile(cookiesFile, new File(temps)); ContentUtils.writeToFile(cookiesFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome cookie artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome cookie artifacts.{0}", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "Chrome.getCookie.errMsg.errAnalyzeFile", this.getName(), NbBundle.getMessage(this.getClass(), "Chrome.getCookie.errMsg.errAnalyzeFile", this.getName(),
cookiesFile.getName())); cookiesFile.getName()));
@ -348,25 +348,25 @@ class Chrome extends Extract {
} }
List<HashMap<String, Object>> tempList = this.dbConnect(temps, cookieQuery); List<HashMap<String, Object>> tempList = this.dbConnect(temps, cookieQuery);
logger.log(Level.INFO, "{0}- Now getting cookies from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0}- Now getting cookies from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("host_key").toString() != null) ? result.get("host_key").toString() : ""))); ((result.get("host_key").toString() != null) ? result.get("host_key").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((Long.valueOf(result.get("last_access_utc").toString())) / 10000000))); ((Long.valueOf(result.get("last_access_utc").toString())) / 10000000))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("name").toString() != null) ? result.get("name").toString() : ""))); ((result.get("name").toString() != null) ? result.get("name").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("value").toString() != null) ? result.get("value").toString() : ""))); ((result.get("value").toString() != null) ? result.get("value").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
NbBundle.getMessage(this.getClass(), "Chrome.moduleName"))); NbBundle.getMessage(this.getClass(), "Chrome.moduleName")));
String domain = result.get("host_key").toString(); String domain = result.get("host_key").toString(); //NON-NLS
domain = domain.replaceFirst("^\\.+(?!$)", ""); domain = domain.replaceFirst("^\\.+(?!$)", "");
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), domain)); NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), domain));
@ -386,7 +386,7 @@ class Chrome extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> downloadFiles = null; List<AbstractFile> downloadFiles = null;
try { try {
downloadFiles = fileManager.findFiles(dataSource, "History", "Chrome"); downloadFiles = fileManager.findFiles(dataSource, "History", "Chrome"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Chrome.getDownload.errMsg.errGettingFiles"); String msg = NbBundle.getMessage(this.getClass(), "Chrome.getDownload.errMsg.errGettingFiles");
logger.log(Level.SEVERE, msg, ex); logger.log(Level.SEVERE, msg, ex);
@ -395,7 +395,7 @@ class Chrome extends Extract {
} }
if (downloadFiles.isEmpty()) { if (downloadFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any Chrome download files."); logger.log(Level.INFO, "Didn't find any Chrome download files."); //NON-NLS
return; return;
} }
@ -406,11 +406,11 @@ class Chrome extends Extract {
if (downloadFile.getSize() == 0) { if (downloadFile.getSize() == 0) {
continue; continue;
} }
String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + downloadFile.getName().toString() + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + downloadFile.getName().toString() + j + ".db"; //NON-NLS
try { try {
ContentUtils.writeToFile(downloadFile, new File(temps)); ContentUtils.writeToFile(downloadFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome download artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome download artifacts.{0}", ex); //NON-NLS
this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getDownload.errMsg.errAnalyzeFiles1", this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Chrome.getDownload.errMsg.errAnalyzeFiles1",
this.getName(), downloadFile.getName())); this.getName(), downloadFile.getName()));
continue; continue;
@ -429,12 +429,12 @@ class Chrome extends Extract {
tempList = this.dbConnect(temps, downloadQueryVersion30); tempList = this.dbConnect(temps, downloadQueryVersion30);
} }
logger.log(Level.INFO, "{0}- Now getting downloads from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0}- Now getting downloads from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), (result.get("full_path").toString()))); NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), (result.get("full_path").toString()))); //NON-NLS
long pathID = Util.findID(dataSource, (result.get("full_path").toString())); long pathID = Util.findID(dataSource, (result.get("full_path").toString())); //NON-NLS
if (pathID != -1) { if (pathID != -1) {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
@ -442,16 +442,16 @@ class Chrome extends Extract {
} }
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("url").toString() != null) ? result.get("url").toString() : ""))); ((result.get("url").toString() != null) ? result.get("url").toString() : ""))); //NON-NLS
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "Recent Activity", ((result.get("url").toString() != null) ? EscapeUtil.decodeURL(result.get("url").toString()) : ""))); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "Recent Activity", ((result.get("url").toString() != null) ? EscapeUtil.decodeURL(result.get("url").toString()) : "")));
Long time = (Long.valueOf(result.get("start_time").toString())); Long time = (Long.valueOf(result.get("start_time").toString())); //NON-NLS
String Tempdate = time.toString(); String Tempdate = time.toString();
time = Long.valueOf(Tempdate) / 10000000; time = Long.valueOf(Tempdate) / 10000000;
//TODO Revisit usage of deprecated constructor as per TSK-583 //TODO Revisit usage of deprecated constructor as per TSK-583
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID(), "Recent Activity", "Last Visited", time)); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID(), "Recent Activity", "Last Visited", time));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), time)); NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), time));
String domain = Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : ""); String domain = Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : ""); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), domain)); NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), domain));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
@ -474,7 +474,7 @@ class Chrome extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> signonFiles; List<AbstractFile> signonFiles;
try { try {
signonFiles = fileManager.findFiles(dataSource, "signons.sqlite", "Chrome"); signonFiles = fileManager.findFiles(dataSource, "signons.sqlite", "Chrome"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Chrome.getLogin.errMsg.errGettingFiles"); String msg = NbBundle.getMessage(this.getClass(), "Chrome.getLogin.errMsg.errGettingFiles");
logger.log(Level.SEVERE, msg, ex); logger.log(Level.SEVERE, msg, ex);
@ -483,7 +483,7 @@ class Chrome extends Extract {
} }
if (signonFiles.isEmpty()) { if (signonFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any Chrome signon files."); logger.log(Level.INFO, "Didn't find any Chrome signon files."); //NON-NLS
return; return;
} }
@ -494,11 +494,11 @@ class Chrome extends Extract {
if (signonFile.getSize() == 0) { if (signonFile.getSize() == 0) {
continue; continue;
} }
String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + signonFile.getName().toString() + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "chrome") + File.separator + signonFile.getName().toString() + j + ".db"; //NON-NLS
try { try {
ContentUtils.writeToFile(signonFile, new File(temps)); ContentUtils.writeToFile(signonFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome login artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing temp sqlite db for Chrome login artifacts.{0}", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "Chrome.getLogin.errMsg.errAnalyzingFiles", this.getName(), NbBundle.getMessage(this.getClass(), "Chrome.getLogin.errMsg.errAnalyzingFiles", this.getName(),
signonFile.getName())); signonFile.getName()));
@ -510,36 +510,36 @@ class Chrome extends Extract {
break; break;
} }
List<HashMap<String, Object>> tempList = this.dbConnect(temps, loginQuery); List<HashMap<String, Object>> tempList = this.dbConnect(temps, loginQuery);
logger.log(Level.INFO, "{0}- Now getting login information from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0}- Now getting login information from {1} with {2}artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("origin_url").toString() != null) ? result.get("origin_url").toString() : ""))); ((result.get("origin_url").toString() != null) ? result.get("origin_url").toString() : ""))); //NON-NLS
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "Recent Activity", ((result.get("origin_url").toString() != null) ? EscapeUtil.decodeURL(result.get("origin_url").toString()) : ""))); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "Recent Activity", ((result.get("origin_url").toString() != null) ? EscapeUtil.decodeURL(result.get("origin_url").toString()) : "")));
//TODO Revisit usage of deprecated constructor as per TSK-583 //TODO Revisit usage of deprecated constructor as per TSK-583
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), "Recent Activity", "Last Visited", ((Long.valueOf(result.get("last_visit_time").toString())) / 1000000))); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), "Recent Activity", "Last Visited", ((Long.valueOf(result.get("last_visit_time").toString())) / 1000000)));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((Long.valueOf(result.get("last_visit_time").toString())) / 1000000))); ((Long.valueOf(result.get("last_visit_time").toString())) / 1000000))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("from_visit").toString() != null) ? result.get("from_visit").toString() : ""))); ((result.get("from_visit").toString() != null) ? result.get("from_visit").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("title").toString() != null) ? result.get("title").toString() : ""))); ((result.get("title").toString() != null) ? result.get("title").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
NbBundle.getMessage(this.getClass(), "Chrome.moduleName"))); NbBundle.getMessage(this.getClass(), "Chrome.moduleName")));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
(Util.extractDomain((result.get("origin_url").toString() != null) ? result.get("url").toString() : "")))); (Util.extractDomain((result.get("origin_url").toString() != null) ? result.get("url").toString() : "")))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
((result.get("username_value").toString() != null) ? result.get("username_value").toString().replaceAll("'", "''") : ""))); ((result.get("username_value").toString() != null) ? result.get("username_value").toString().replaceAll("'", "''") : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"),
result.get("signon_realm").toString())); result.get("signon_realm").toString())); //NON-NLS
this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, signonFile, bbattributes); this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, signonFile, bbattributes);
} }
@ -550,10 +550,10 @@ class Chrome extends Extract {
} }
private boolean isChromePreVersion30(String temps) { private boolean isChromePreVersion30(String temps) {
String query = "PRAGMA table_info(downloads)"; String query = "PRAGMA table_info(downloads)"; //NON-NLS
List<HashMap<String, Object>> columns = this.dbConnect(temps, query); List<HashMap<String, Object>> columns = this.dbConnect(temps, query);
for (HashMap<String, Object> col : columns) { for (HashMap<String, Object> col : columns) {
if (col.get("name").equals("url")) { if (col.get("name").equals("url")) { //NON-NLS
return true; return true;
} }
} }

View File

@ -92,7 +92,7 @@ abstract class Extract {
BlackboardArtifact bbart = content.newArtifact(type); BlackboardArtifact bbart = content.newArtifact(type);
bbart.addAttributes(bbattributes); bbart.addAttributes(bbattributes);
} catch (TskException ex) { } catch (TskException ex) {
logger.log(Level.SEVERE, "Error while trying to add an artifact: {0}", ex); logger.log(Level.SEVERE, "Error while trying to add an artifact: {0}", ex); //NON-NLS
} }
} }
@ -109,14 +109,14 @@ abstract class Extract {
protected List<HashMap<String, Object>> dbConnect(String path, String query) { protected List<HashMap<String, Object>> dbConnect(String path, String query) {
ResultSet temprs; ResultSet temprs;
List<HashMap<String, Object>> list; List<HashMap<String, Object>> list;
String connectionString = "jdbc:sqlite:" + path; String connectionString = "jdbc:sqlite:" + path; //NON-NLS
try { try {
SQLiteDBConnect tempdbconnect = new SQLiteDBConnect("org.sqlite.JDBC", connectionString); SQLiteDBConnect tempdbconnect = new SQLiteDBConnect("org.sqlite.JDBC", connectionString); //NON-NLS
temprs = tempdbconnect.executeQry(query); temprs = tempdbconnect.executeQry(query);
list = this.resultSetToArrayList(temprs); list = this.resultSetToArrayList(temprs);
tempdbconnect.closeConnection(); tempdbconnect.closeConnection();
} catch (SQLException ex) { } catch (SQLException ex) {
logger.log(Level.SEVERE, "Error while trying to read into a sqlite db." + connectionString, ex); logger.log(Level.SEVERE, "Error while trying to read into a sqlite db." + connectionString, ex); //NON-NLS
errorMessages.add(NbBundle.getMessage(this.getClass(), "Extract.dbConn.errMsg.failedToQueryDb", getName())); errorMessages.add(NbBundle.getMessage(this.getClass(), "Extract.dbConn.errMsg.failedToQueryDb", getName()));
return Collections.<HashMap<String,Object>>emptyList(); return Collections.<HashMap<String,Object>>emptyList();
} }

View File

@ -71,7 +71,7 @@ class ExtractIE extends Extract {
ExtractIE() { ExtractIE() {
moduleName = NbBundle.getMessage(ExtractIE.class, "ExtractIE.moduleName.text"); moduleName = NbBundle.getMessage(ExtractIE.class, "ExtractIE.moduleName.text");
moduleTempResultsDir = RAImageIngestModule.getRATempPath(Case.getCurrentCase(), "IE") + File.separator + "results"; moduleTempResultsDir = RAImageIngestModule.getRATempPath(Case.getCurrentCase(), "IE") + File.separator + "results"; //NON-NLS
JAVA_PATH = PlatformUtil.getJavaPath(); JAVA_PATH = PlatformUtil.getJavaPath();
} }
@ -92,9 +92,9 @@ class ExtractIE extends Extract {
org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager(); org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> favoritesFiles; List<AbstractFile> favoritesFiles;
try { try {
favoritesFiles = fileManager.findFiles(dataSource, "%.url", "Favorites"); favoritesFiles = fileManager.findFiles(dataSource, "%.url", "Favorites"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error fetching 'url' files for Internet Explorer bookmarks.", ex); logger.log(Level.WARNING, "Error fetching 'url' files for Internet Explorer bookmarks.", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getBookmark.errMsg.errGettingBookmarks", NbBundle.getMessage(this.getClass(), "ExtractIE.getBookmark.errMsg.errGettingBookmarks",
this.getName())); this.getName()));
@ -102,7 +102,7 @@ class ExtractIE extends Extract {
} }
if (favoritesFiles.isEmpty()) { if (favoritesFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any IE bookmark files."); logger.log(Level.INFO, "Didn't find any IE bookmark files."); //NON-NLS
return; return;
} }
@ -154,18 +154,18 @@ class ExtractIE extends Extract {
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
// The actual shortcut line we are interested in is of the // The actual shortcut line we are interested in is of the
// form URL=http://path/to/website // form URL=http://path/to/website
if (line.startsWith("URL")) { if (line.startsWith("URL")) { //NON-NLS
url = line.substring(line.indexOf("=") + 1); url = line.substring(line.indexOf("=") + 1);
break; break;
} }
} }
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Failed to read from content: " + fav.getName(), ex); logger.log(Level.WARNING, "Failed to read from content: " + fav.getName(), ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getURLFromIEBmkFile.errMsg", this.getName(), NbBundle.getMessage(this.getClass(), "ExtractIE.getURLFromIEBmkFile.errMsg", this.getName(),
fav.getName())); fav.getName()));
} catch (IndexOutOfBoundsException ex) { } catch (IndexOutOfBoundsException ex) {
logger.log(Level.WARNING, "Failed while getting URL of IE bookmark. Unexpected format of the bookmark file: " + fav.getName(), ex); logger.log(Level.WARNING, "Failed while getting URL of IE bookmark. Unexpected format of the bookmark file: " + fav.getName(), ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getURLFromIEBmkFile.errMsg2", this.getName(), NbBundle.getMessage(this.getClass(), "ExtractIE.getURLFromIEBmkFile.errMsg2", this.getName(),
fav.getName())); fav.getName()));
@ -173,7 +173,7 @@ class ExtractIE extends Extract {
try { try {
reader.close(); reader.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Failed to close reader.", ex); logger.log(Level.WARNING, "Failed to close reader.", ex); //NON-NLS
} }
} }
@ -187,16 +187,16 @@ class ExtractIE extends Extract {
org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager(); org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> cookiesFiles; List<AbstractFile> cookiesFiles;
try { try {
cookiesFiles = fileManager.findFiles(dataSource, "%.txt", "Cookies"); cookiesFiles = fileManager.findFiles(dataSource, "%.txt", "Cookies"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error getting cookie files for IE"); logger.log(Level.WARNING, "Error getting cookie files for IE"); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getCookie.errMsg.errGettingFile", this.getName())); NbBundle.getMessage(this.getClass(), "ExtractIE.getCookie.errMsg.errGettingFile", this.getName()));
return; return;
} }
if (cookiesFiles.isEmpty()) { if (cookiesFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any IE cookies files."); logger.log(Level.INFO, "Didn't find any IE cookies files."); //NON-NLS
return; return;
} }
@ -213,7 +213,7 @@ class ExtractIE extends Extract {
try { try {
final int bytesRead = cookiesFile.read(t, 0, cookiesFile.getSize()); final int bytesRead = cookiesFile.read(t, 0, cookiesFile.getSize());
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error reading bytes of Internet Explorer cookie.", ex); logger.log(Level.SEVERE, "Error reading bytes of Internet Explorer cookie.", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getCookie.errMsg.errReadingIECookie", NbBundle.getMessage(this.getClass(), "ExtractIE.getCookie.errMsg.errReadingIECookie",
this.getName(), cookiesFile.getName())); this.getName(), cookiesFile.getName()));
@ -259,21 +259,21 @@ class ExtractIE extends Extract {
* Locates index.dat files, runs Pasco on them, and creates artifacts. * Locates index.dat files, runs Pasco on them, and creates artifacts.
*/ */
private void getHistory() { private void getHistory() {
logger.log(Level.INFO, "Pasco results path: {0}", moduleTempResultsDir); logger.log(Level.INFO, "Pasco results path: {0}", moduleTempResultsDir); //NON-NLS
boolean foundHistory = false; boolean foundHistory = false;
final File pascoRoot = InstalledFileLocator.getDefault().locate("pasco2", ExtractIE.class.getPackage().getName(), false); final File pascoRoot = InstalledFileLocator.getDefault().locate("pasco2", ExtractIE.class.getPackage().getName(), false); //NON-NLS
if (pascoRoot == null) { if (pascoRoot == null) {
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.unableToGetHist", this.getName())); NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.unableToGetHist", this.getName()));
logger.log(Level.SEVERE, "Error finding pasco program "); logger.log(Level.SEVERE, "Error finding pasco program "); //NON-NLS
return; return;
} }
final String pascoHome = pascoRoot.getAbsolutePath(); final String pascoHome = pascoRoot.getAbsolutePath();
logger.log(Level.INFO, "Pasco2 home: {0}", pascoHome); logger.log(Level.INFO, "Pasco2 home: {0}", pascoHome); //NON-NLS
PASCO_LIB_PATH = pascoHome + File.separator + "pasco2.jar" + File.pathSeparator PASCO_LIB_PATH = pascoHome + File.separator + "pasco2.jar" + File.pathSeparator //NON-NLS
+ pascoHome + File.separator + "*"; + pascoHome + File.separator + "*";
File resultsDir = new File(moduleTempResultsDir); File resultsDir = new File(moduleTempResultsDir);
@ -283,11 +283,11 @@ class ExtractIE extends Extract {
org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager(); org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> indexFiles; List<AbstractFile> indexFiles;
try { try {
indexFiles = fileManager.findFiles(dataSource, "index.dat"); indexFiles = fileManager.findFiles(dataSource, "index.dat"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
this.addErrorMessage(NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.errGettingHistFiles", this.addErrorMessage(NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.errGettingHistFiles",
this.getName())); this.getName()));
logger.log(Level.WARNING, "Error fetching 'index.data' files for Internet Explorer history."); logger.log(Level.WARNING, "Error fetching 'index.data' files for Internet Explorer history."); //NON-NLS
return; return;
} }
@ -306,9 +306,9 @@ class ExtractIE extends Extract {
// index<Number>.dat (i.e. index0.dat, index1.dat,..., indexN.dat) // index<Number>.dat (i.e. index0.dat, index1.dat,..., indexN.dat)
// Write each index.dat file to a temp directory. // Write each index.dat file to a temp directory.
//BlackboardArtifact bbart = fsc.newArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY); //BlackboardArtifact bbart = fsc.newArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY);
indexFileName = "index" + Integer.toString((int) indexFile.getId()) + ".dat"; indexFileName = "index" + Integer.toString((int) indexFile.getId()) + ".dat"; //NON-NLS
//indexFileName = "index" + Long.toString(bbart.getArtifactID()) + ".dat"; //indexFileName = "index" + Long.toString(bbart.getArtifactID()) + ".dat";
temps = RAImageIngestModule.getRATempPath(currentCase, "IE") + File.separator + indexFileName; temps = RAImageIngestModule.getRATempPath(currentCase, "IE") + File.separator + indexFileName; //NON-NLS
File datFile = new File(temps); File datFile = new File(temps);
if (context.isJobCancelled()) { if (context.isJobCancelled()) {
break; break;
@ -316,14 +316,14 @@ class ExtractIE extends Extract {
try { try {
ContentUtils.writeToFile(indexFile, datFile); ContentUtils.writeToFile(indexFile, datFile);
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.SEVERE, "Error while trying to write index.dat file " + datFile.getAbsolutePath(), e); logger.log(Level.SEVERE, "Error while trying to write index.dat file " + datFile.getAbsolutePath(), e); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.errWriteFile", this.getName(), NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.errWriteFile", this.getName(),
datFile.getAbsolutePath())); datFile.getAbsolutePath()));
continue; continue;
} }
String filename = "pasco2Result." + indexFile.getId() + ".txt"; String filename = "pasco2Result." + indexFile.getId() + ".txt"; //NON-NLS
boolean bPascProcSuccess = executePasco(temps, filename); boolean bPascProcSuccess = executePasco(temps, filename);
//At this point pasco2 proccessed the index files. //At this point pasco2 proccessed the index files.
@ -335,7 +335,7 @@ class ExtractIE extends Extract {
//Delete index<n>.dat file since it was succcessfully by Pasco //Delete index<n>.dat file since it was succcessfully by Pasco
datFile.delete(); datFile.delete();
} else { } else {
logger.log(Level.WARNING, "pasco execution failed on: {0}", this.getName()); logger.log(Level.WARNING, "pasco execution failed on: {0}", this.getName()); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.errProcHist", this.getName())); NbBundle.getMessage(this.getClass(), "ExtractIE.getHistory.errMsg.errProcHist", this.getName()));
} }
@ -359,19 +359,19 @@ class ExtractIE extends Extract {
Writer writer = null; Writer writer = null;
try { try {
final String outputFileFullPath = moduleTempResultsDir + File.separator + outputFileName; final String outputFileFullPath = moduleTempResultsDir + File.separator + outputFileName;
logger.log(Level.INFO, "Writing pasco results to: {0}", outputFileFullPath); logger.log(Level.INFO, "Writing pasco results to: {0}", outputFileFullPath); //NON-NLS
writer = new FileWriter(outputFileFullPath); writer = new FileWriter(outputFileFullPath);
execPasco = new ExecUtil(); execPasco = new ExecUtil();
execPasco.execute(writer, JAVA_PATH, execPasco.execute(writer, JAVA_PATH,
"-cp", PASCO_LIB_PATH, "-cp", PASCO_LIB_PATH, //NON-NLS
"isi.pasco2.Main", "-T", "history", indexFilePath ); "isi.pasco2.Main", "-T", "history", indexFilePath ); //NON-NLS
// @@@ Investigate use of history versus cache as type. // @@@ Investigate use of history versus cache as type.
} catch (IOException ex) { } catch (IOException ex) {
success = false; success = false;
logger.log(Level.SEVERE, "Unable to execute Pasco to process Internet Explorer web history.", ex); logger.log(Level.SEVERE, "Unable to execute Pasco to process Internet Explorer web history.", ex); //NON-NLS
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
success = false; success = false;
logger.log(Level.SEVERE, "Pasco has been interrupted, failed to extract some web history from Internet Explorer.", ex); logger.log(Level.SEVERE, "Pasco has been interrupted, failed to extract some web history from Internet Explorer.", ex); //NON-NLS
} }
finally { finally {
if (writer != null) { if (writer != null) {
@ -379,7 +379,7 @@ class ExtractIE extends Extract {
writer.flush(); writer.flush();
writer.close(); writer.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Error closing writer stream after for Pasco result", ex); logger.log(Level.WARNING, "Error closing writer stream after for Pasco result", ex); //NON-NLS
} }
} }
} }
@ -400,7 +400,7 @@ class ExtractIE extends Extract {
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.parsePascoOutput.errMsg.notFound", this.getName(), NbBundle.getMessage(this.getClass(), "ExtractIE.parsePascoOutput.errMsg.notFound", this.getName(),
file.getName())); file.getName()));
logger.log(Level.WARNING, "Pasco Output not found: {0}", file.getPath()); logger.log(Level.WARNING, "Pasco Output not found: {0}", file.getPath()); //NON-NLS
return; return;
} }
@ -417,20 +417,20 @@ class ExtractIE extends Extract {
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.parsePascoOutput.errMsg.errParsing", this.getName(), NbBundle.getMessage(this.getClass(), "ExtractIE.parsePascoOutput.errMsg.errParsing", this.getName(),
file.getName())); file.getName()));
logger.log(Level.WARNING, "Unable to find the Pasco file at " + file.getPath(), ex); logger.log(Level.WARNING, "Unable to find the Pasco file at " + file.getPath(), ex); //NON-NLS
return; return;
} }
while (fileScanner.hasNext()) { while (fileScanner.hasNext()) {
String line = fileScanner.nextLine(); String line = fileScanner.nextLine();
if (!line.startsWith("URL")) { if (!line.startsWith("URL")) { //NON-NLS
continue; continue;
} }
String[] lineBuff = line.split("\\t"); String[] lineBuff = line.split("\\t"); //NON-NLS
if (lineBuff.length < 4) { if (lineBuff.length < 4) {
logger.log(Level.INFO, "Found unrecognized IE history format."); logger.log(Level.INFO, "Found unrecognized IE history format."); //NON-NLS
continue; continue;
} }
@ -448,14 +448,14 @@ class ExtractIE extends Extract {
if (lineBuff[1].contains("@")) { if (lineBuff[1].contains("@")) {
String url[] = lineBuff[1].split("@", 2); String url[] = lineBuff[1].split("@", 2);
user = url[0]; user = url[0];
user = user.replace("Visited:", ""); user = user.replace("Visited:", ""); //NON-NLS
user = user.replace(":Host:", ""); user = user.replace(":Host:", ""); //NON-NLS
user = user.replaceAll("(:)(.*?)(:)", ""); user = user.replaceAll("(:)(.*?)(:)", "");
user = user.trim(); user = user.trim();
realurl = url[1]; realurl = url[1];
realurl = realurl.replace("Visited:", ""); realurl = realurl.replace("Visited:", ""); //NON-NLS
realurl = realurl.replaceAll(":(.*?):", ""); realurl = realurl.replaceAll(":(.*?):", "");
realurl = realurl.replace(":Host:", ""); realurl = realurl.replace(":Host:", ""); //NON-NLS
realurl = realurl.trim(); realurl = realurl.trim();
} else { } else {
user = ""; user = "";
@ -465,7 +465,7 @@ class ExtractIE extends Extract {
domain = Util.extractDomain(realurl); domain = Util.extractDomain(realurl);
if (!ddtime.isEmpty()) { if (!ddtime.isEmpty()) {
ddtime = ddtime.replace("T", " "); ddtime = ddtime.replace("T", " "); //NON-NLS
ddtime = ddtime.substring(ddtime.length() - 5); ddtime = ddtime.substring(ddtime.length() - 5);
} }
@ -478,7 +478,7 @@ class ExtractIE extends Extract {
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractIE.parsePascoOutput.errMsg.errParsingEntry", NbBundle.getMessage(this.getClass(), "ExtractIE.parsePascoOutput.errMsg.errParsingEntry",
this.getName())); this.getName()));
logger.log(Level.SEVERE, "Error parsing Pasco results.", e); logger.log(Level.SEVERE, "Error parsing Pasco results.", e); //NON-NLS
} }
} }
@ -510,7 +510,7 @@ class ExtractIE extends Extract {
"ExtractIE.parentModuleName.noSpace"), user)); "ExtractIE.parentModuleName.noSpace"), user));
bbart.addAttributes(bbattributes); bbart.addAttributes(bbattributes);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error writing Internet Explorer web history artifact to the blackboard.", ex); logger.log(Level.SEVERE, "Error writing Internet Explorer web history artifact to the blackboard.", ex); //NON-NLS
} }
} }
fileScanner.close(); fileScanner.close();

View File

@ -69,9 +69,9 @@ class ExtractRegistry extends Extract {
//hide public constructor to prevent from instantiation by ingest module loader //hide public constructor to prevent from instantiation by ingest module loader
ExtractRegistry() { ExtractRegistry() {
final File rrRoot = InstalledFileLocator.getDefault().locate("rr", ExtractRegistry.class.getPackage().getName(), false); final File rrRoot = InstalledFileLocator.getDefault().locate("rr", ExtractRegistry.class.getPackage().getName(), false); //NON-NLS
if (rrRoot == null) { if (rrRoot == null) {
logger.log(Level.SEVERE, "RegRipper not found"); logger.log(Level.SEVERE, "RegRipper not found"); //NON-NLS
rrFound = false; rrFound = false;
return; return;
} else { } else {
@ -79,29 +79,29 @@ class ExtractRegistry extends Extract {
} }
final String rrHome = rrRoot.getAbsolutePath(); final String rrHome = rrRoot.getAbsolutePath();
logger.log(Level.INFO, "RegRipper home: {0}", rrHome); logger.log(Level.INFO, "RegRipper home: {0}", rrHome); //NON-NLS
if (PlatformUtil.isWindowsOS()) { if (PlatformUtil.isWindowsOS()) {
RR_PATH = rrHome + File.separator + "rip.exe"; RR_PATH = rrHome + File.separator + "rip.exe"; //NON-NLS
} else { } else {
RR_PATH = "perl " + rrHome + File.separator + "rip.pl"; RR_PATH = "perl " + rrHome + File.separator + "rip.pl"; //NON-NLS
} }
final File rrFullRoot = InstalledFileLocator.getDefault().locate("rr-full", ExtractRegistry.class.getPackage().getName(), false); final File rrFullRoot = InstalledFileLocator.getDefault().locate("rr-full", ExtractRegistry.class.getPackage().getName(), false); //NON-NLS
if (rrFullRoot == null) { if (rrFullRoot == null) {
logger.log(Level.SEVERE, "RegRipper Full not found"); logger.log(Level.SEVERE, "RegRipper Full not found"); //NON-NLS
rrFullFound = false; rrFullFound = false;
} else { } else {
rrFullFound = true; rrFullFound = true;
} }
final String rrFullHome = rrFullRoot.getAbsolutePath(); final String rrFullHome = rrFullRoot.getAbsolutePath();
logger.log(Level.INFO, "RegRipper Full home: {0}", rrFullHome); logger.log(Level.INFO, "RegRipper Full home: {0}", rrFullHome); //NON-NLS
if (PlatformUtil.isWindowsOS()) { if (PlatformUtil.isWindowsOS()) {
RR_FULL_PATH = rrFullHome + File.separator + "rip.exe"; RR_FULL_PATH = rrFullHome + File.separator + "rip.exe"; //NON-NLS
} else { } else {
RR_FULL_PATH = "perl " + rrFullHome + File.separator + "rip.pl"; RR_FULL_PATH = "perl " + rrFullHome + File.separator + "rip.pl"; //NON-NLS
} }
} }
@ -114,17 +114,17 @@ class ExtractRegistry extends Extract {
// find the user-specific ntuser-dat files // find the user-specific ntuser-dat files
try { try {
allRegistryFiles.addAll(fileManager.findFiles(dataSource, "ntuser.dat")); allRegistryFiles.addAll(fileManager.findFiles(dataSource, "ntuser.dat")); //NON-NLS
} }
catch (TskCoreException ex) { catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error fetching 'ntuser.dat' file."); logger.log(Level.WARNING, "Error fetching 'ntuser.dat' file."); //NON-NLS
} }
// find the system hives' // find the system hives'
String[] regFileNames = new String[] {"system", "software", "security", "sam"}; String[] regFileNames = new String[] {"system", "software", "security", "sam"}; //NON-NLS
for (String regFileName : regFileNames) { for (String regFileName : regFileNames) {
try { try {
allRegistryFiles.addAll(fileManager.findFiles(dataSource, regFileName, "/system32/config")); allRegistryFiles.addAll(fileManager.findFiles(dataSource, regFileName, "/system32/config")); //NON-NLS
} }
catch (TskCoreException ex) { catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), String msg = NbBundle.getMessage(this.getClass(),
@ -145,7 +145,7 @@ class ExtractRegistry extends Extract {
// open the log file // open the log file
FileWriter logFile = null; FileWriter logFile = null;
try { try {
logFile = new FileWriter(RAImageIngestModule.getRAOutputPath(currentCase, "reg") + File.separator + "regripper-info.txt"); logFile = new FileWriter(RAImageIngestModule.getRAOutputPath(currentCase, "reg") + File.separator + "regripper-info.txt"); //NON-NLS
} catch (IOException ex) { } catch (IOException ex) {
java.util.logging.Logger.getLogger(ExtractRegistry.class.getName()).log(Level.SEVERE, null, ex); java.util.logging.Logger.getLogger(ExtractRegistry.class.getName()).log(Level.SEVERE, null, ex);
} }
@ -156,12 +156,12 @@ class ExtractRegistry extends Extract {
for (AbstractFile regFile : allRegistryFiles) { for (AbstractFile regFile : allRegistryFiles) {
String regFileName = regFile.getName(); String regFileName = regFile.getName();
String regFileNameLocal = RAImageIngestModule.getRATempPath(currentCase, "reg") + File.separator + regFileName; String regFileNameLocal = RAImageIngestModule.getRATempPath(currentCase, "reg") + File.separator + regFileName;
String outputPathBase = RAImageIngestModule.getRAOutputPath(currentCase, "reg") + File.separator + regFileName + "-regripper-" + Integer.toString(j++); String outputPathBase = RAImageIngestModule.getRAOutputPath(currentCase, "reg") + File.separator + regFileName + "-regripper-" + Integer.toString(j++); //NON-NLS
File regFileNameLocalFile = new File(regFileNameLocal); File regFileNameLocalFile = new File(regFileNameLocal);
try { try {
ContentUtils.writeToFile(regFile, regFileNameLocalFile); ContentUtils.writeToFile(regFile, regFileNameLocalFile);
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing the temp registry file. {0}", ex); logger.log(Level.SEVERE, "Error writing the temp registry file. {0}", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractRegistry.analyzeRegFiles.errMsg.errWritingTemp", NbBundle.getMessage(this.getClass(), "ExtractRegistry.analyzeRegFiles.errMsg.errWritingTemp",
this.getName(), regFileName)); this.getName(), regFileName));
@ -181,7 +181,7 @@ class ExtractRegistry extends Extract {
java.util.logging.Logger.getLogger(ExtractRegistry.class.getName()).log(Level.SEVERE, null, ex); java.util.logging.Logger.getLogger(ExtractRegistry.class.getName()).log(Level.SEVERE, null, ex);
} }
logger.log(Level.INFO, moduleName + "- Now getting registry information from " + regFileNameLocal); logger.log(Level.INFO, moduleName + "- Now getting registry information from " + regFileNameLocal); //NON-NLS
RegOutputFiles regOutputFiles = executeRegRip(regFileNameLocal, outputPathBase); RegOutputFiles regOutputFiles = executeRegRip(regFileNameLocal, outputPathBase);
if (context.isJobCancelled()) { if (context.isJobCancelled()) {
@ -226,7 +226,7 @@ class ExtractRegistry extends Extract {
try { try {
input.close(); input.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Failed to close reader.", ex); logger.log(Level.WARNING, "Failed to close reader.", ex); //NON-NLS
} }
} }
att = new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TEXT.getTypeID(), att = new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TEXT.getTypeID(),
@ -273,23 +273,23 @@ class ExtractRegistry extends Extract {
RegOutputFiles regOutputFiles = new RegOutputFiles(); RegOutputFiles regOutputFiles = new RegOutputFiles();
if (regFilePath.toLowerCase().contains("system")) { if (regFilePath.toLowerCase().contains("system")) { //NON-NLS
autopsyType = "autopsysystem"; autopsyType = "autopsysystem"; //NON-NLS
fullType = "system"; fullType = "system"; //NON-NLS
} }
else if (regFilePath.toLowerCase().contains("software")) { else if (regFilePath.toLowerCase().contains("software")) { //NON-NLS
autopsyType = "autopsysoftware"; autopsyType = "autopsysoftware"; //NON-NLS
fullType = "software"; fullType = "software"; //NON-NLS
} }
else if (regFilePath.toLowerCase().contains("ntuser")) { else if (regFilePath.toLowerCase().contains("ntuser")) { //NON-NLS
autopsyType = "autopsyntuser"; autopsyType = "autopsyntuser"; //NON-NLS
fullType = "ntuser"; fullType = "ntuser"; //NON-NLS
} }
else if (regFilePath.toLowerCase().contains("sam")) { else if (regFilePath.toLowerCase().contains("sam")) { //NON-NLS
fullType = "sam"; fullType = "sam"; //NON-NLS
} }
else if (regFilePath.toLowerCase().contains("security")) { else if (regFilePath.toLowerCase().contains("security")) { //NON-NLS
fullType = "security"; fullType = "security"; //NON-NLS
} }
else { else {
return regOutputFiles; return regOutputFiles;
@ -300,19 +300,19 @@ class ExtractRegistry extends Extract {
// TODO - add error messages // TODO - add error messages
Writer writer = null; Writer writer = null;
try { try {
regOutputFiles.autopsyPlugins = outFilePathBase + "-autopsy.txt"; regOutputFiles.autopsyPlugins = outFilePathBase + "-autopsy.txt"; //NON-NLS
logger.log(Level.INFO, "Writing RegRipper results to: " + regOutputFiles.autopsyPlugins); logger.log(Level.INFO, "Writing RegRipper results to: " + regOutputFiles.autopsyPlugins); //NON-NLS
writer = new FileWriter(regOutputFiles.autopsyPlugins); writer = new FileWriter(regOutputFiles.autopsyPlugins);
execRR = new ExecUtil(); execRR = new ExecUtil();
execRR.execute(writer, RR_PATH, execRR.execute(writer, RR_PATH,
"-r", regFilePath, "-f", autopsyType); "-r", regFilePath, "-f", autopsyType); //NON-NLS
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Unable to RegRipper and process parse some registry files.", ex); logger.log(Level.SEVERE, "Unable to RegRipper and process parse some registry files.", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile", NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile",
this.getName())); this.getName()));
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
logger.log(Level.SEVERE, "RegRipper has been interrupted, failed to parse registry.", ex); logger.log(Level.SEVERE, "RegRipper has been interrupted, failed to parse registry.", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile2", NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile2",
this.getName())); this.getName()));
@ -321,7 +321,7 @@ class ExtractRegistry extends Extract {
try { try {
writer.close(); writer.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error closing output writer after running RegRipper", ex); logger.log(Level.SEVERE, "Error closing output writer after running RegRipper", ex); //NON-NLS
} }
} }
} }
@ -331,19 +331,19 @@ class ExtractRegistry extends Extract {
if (!fullType.isEmpty() && rrFullFound) { if (!fullType.isEmpty() && rrFullFound) {
Writer writer = null; Writer writer = null;
try { try {
regOutputFiles.fullPlugins = outFilePathBase + "-full.txt"; regOutputFiles.fullPlugins = outFilePathBase + "-full.txt"; //NON-NLS
logger.log(Level.INFO, "Writing Full RegRipper results to: " + regOutputFiles.fullPlugins); logger.log(Level.INFO, "Writing Full RegRipper results to: " + regOutputFiles.fullPlugins); //NON-NLS
writer = new FileWriter(regOutputFiles.fullPlugins); writer = new FileWriter(regOutputFiles.fullPlugins);
execRR = new ExecUtil(); execRR = new ExecUtil();
execRR.execute(writer, RR_FULL_PATH, execRR.execute(writer, RR_FULL_PATH,
"-r", regFilePath, "-f", fullType); "-r", regFilePath, "-f", fullType); //NON-NLS
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Unable to run full RegRipper and process parse some registry files.", ex); logger.log(Level.SEVERE, "Unable to run full RegRipper and process parse some registry files.", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile3", NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile3",
this.getName())); this.getName()));
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
logger.log(Level.SEVERE, "RegRipper full has been interrupted, failed to parse registry.", ex); logger.log(Level.SEVERE, "RegRipper full has been interrupted, failed to parse registry.", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile4", NbBundle.getMessage(this.getClass(), "ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile4",
this.getName())); this.getName()));
@ -352,7 +352,7 @@ class ExtractRegistry extends Extract {
try { try {
writer.close(); writer.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error closing output writer after running RegRipper full", ex); logger.log(Level.SEVERE, "Error closing output writer after running RegRipper full", ex); //NON-NLS
} }
} }
} }
@ -371,14 +371,14 @@ class ExtractRegistry extends Extract {
File regfile = new File(regRecord); File regfile = new File(regRecord);
fstream = new FileInputStream(regfile); fstream = new FileInputStream(regfile);
String regString = new Scanner(fstream, "UTF-8").useDelimiter("\\Z").next(); String regString = new Scanner(fstream, "UTF-8").useDelimiter("\\Z").next(); //NON-NLS
String startdoc = "<?xml version=\"1.0\"?><document>"; String startdoc = "<?xml version=\"1.0\"?><document>"; //NON-NLS
String result = regString.replaceAll("----------------------------------------", ""); String result = regString.replaceAll("----------------------------------------", "");
result = result.replaceAll("\\n", ""); result = result.replaceAll("\\n", ""); //NON-NLS
result = result.replaceAll("\\r", ""); result = result.replaceAll("\\r", ""); //NON-NLS
result = result.replaceAll("'", "&apos;"); result = result.replaceAll("'", "&apos;"); //NON-NLS
result = result.replaceAll("&", "&amp;"); result = result.replaceAll("&", "&amp;"); //NON-NLS
String enddoc = "</document>"; String enddoc = "</document>"; //NON-NLS
String stringdoc = startdoc + result + enddoc; String stringdoc = startdoc + result + enddoc;
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(new InputSource(new StringReader(stringdoc))); Document doc = builder.parse(new InputSource(new StringReader(stringdoc)));
@ -392,7 +392,7 @@ class ExtractRegistry extends Extract {
String dataType = tempnode.getNodeName(); String dataType = tempnode.getNodeName();
NodeList timenodes = tempnode.getElementsByTagName("mtime"); NodeList timenodes = tempnode.getElementsByTagName("mtime"); //NON-NLS
Long mtime = null; Long mtime = null;
if (timenodes.getLength() > 0) { if (timenodes.getLength() > 0) {
Element timenode = (Element) timenodes.item(0); Element timenode = (Element) timenodes.item(0);
@ -403,11 +403,11 @@ class ExtractRegistry extends Extract {
String Tempdate = mtime.toString(); String Tempdate = mtime.toString();
mtime = Long.valueOf(Tempdate) / 1000; mtime = Long.valueOf(Tempdate) / 1000;
} catch (ParseException ex) { } catch (ParseException ex) {
logger.log(Level.WARNING, "Failed to parse epoch time when parsing the registry."); logger.log(Level.WARNING, "Failed to parse epoch time when parsing the registry."); //NON-NLS
} }
} }
NodeList artroots = tempnode.getElementsByTagName("artifacts"); NodeList artroots = tempnode.getElementsByTagName("artifacts"); //NON-NLS
if (artroots.getLength() == 0) { if (artroots.getLength() == 0) {
// If there isn't an artifact node, skip this entry // If there isn't an artifact node, skip this entry
continue; continue;
@ -425,7 +425,7 @@ class ExtractRegistry extends Extract {
String value = artnode.getTextContent().trim(); String value = artnode.getTextContent().trim();
Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>();
if ("recentdocs".equals(dataType)) { if ("recentdocs".equals(dataType)) { //NON-NLS
// BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_RECENT_OBJECT); // BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_RECENT_OBJECT);
// bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID(), "RecentActivity", dataType, mtime)); // bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID(), "RecentActivity", dataType, mtime));
// bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), "RecentActivity", dataType, mtimeItem)); // bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), "RecentActivity", dataType, mtimeItem));
@ -433,18 +433,18 @@ class ExtractRegistry extends Extract {
// bbart.addAttributes(bbattributes); // bbart.addAttributes(bbattributes);
// @@@ BC: Why are we ignoring this... // @@@ BC: Why are we ignoring this...
} }
else if ("usb".equals(dataType)) { else if ("usb".equals(dataType)) { //NON-NLS
try { try {
Long usbMtime = Long.parseLong(artnode.getAttribute("mtime")); Long usbMtime = Long.parseLong(artnode.getAttribute("mtime")); //NON-NLS
usbMtime = Long.valueOf(usbMtime.toString()); usbMtime = Long.valueOf(usbMtime.toString());
BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_DEVICE_ATTACHED); BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_DEVICE_ATTACHED);
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"ExtractRegistry.parentModuleName.noSpace"), usbMtime)); "ExtractRegistry.parentModuleName.noSpace"), usbMtime));
String dev = artnode.getAttribute("dev"); String dev = artnode.getAttribute("dev"); //NON-NLS
String model = dev; String model = dev;
if (dev.toLowerCase().contains("vid")) { if (dev.toLowerCase().contains("vid")) { //NON-NLS
USBInfo info = extrctr.parseAndLookup(dev); USBInfo info = extrctr.parseAndLookup(dev);
if(info.getVendor()!=null) if(info.getVendor()!=null)
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DEVICE_MAKE.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DEVICE_MAKE.getTypeID(),
@ -461,17 +461,17 @@ class ExtractRegistry extends Extract {
"ExtractRegistry.parentModuleName.noSpace"), value)); "ExtractRegistry.parentModuleName.noSpace"), value));
bbart.addAttributes(bbattributes); bbart.addAttributes(bbattributes);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error adding device attached artifact to blackboard."); logger.log(Level.SEVERE, "Error adding device attached artifact to blackboard."); //NON-NLS
} }
} }
else if ("uninstall".equals(dataType)) { else if ("uninstall".equals(dataType)) { //NON-NLS
Long itemMtime = null; Long itemMtime = null;
try { try {
Long epochtime = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy").parse(artnode.getAttribute("mtime")).getTime(); Long epochtime = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy").parse(artnode.getAttribute("mtime")).getTime(); //NON-NLS
itemMtime = epochtime.longValue(); itemMtime = epochtime.longValue();
itemMtime = itemMtime / 1000; itemMtime = itemMtime / 1000;
} catch (ParseException e) { } catch (ParseException e) {
logger.log(Level.WARNING, "Failed to parse epoch time for installed program artifact."); logger.log(Level.WARNING, "Failed to parse epoch time for installed program artifact."); //NON-NLS
} }
try { try {
@ -484,19 +484,19 @@ class ExtractRegistry extends Extract {
BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_INSTALLED_PROG); BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_INSTALLED_PROG);
bbart.addAttributes(bbattributes); bbart.addAttributes(bbattributes);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error adding installed program artifact to blackboard."); logger.log(Level.SEVERE, "Error adding installed program artifact to blackboard."); //NON-NLS
} }
} }
else if ("WinVersion".equals(dataType)) { else if ("WinVersion".equals(dataType)) { //NON-NLS
String name = artnode.getAttribute("name"); String name = artnode.getAttribute("name"); //NON-NLS
if (name.contains("ProductName")) { if (name.contains("ProductName")) { //NON-NLS
winver = value; winver = value;
} }
if (name.contains("CSDVersion")) { if (name.contains("CSDVersion")) { //NON-NLS
winver = winver + " " + value; winver = winver + " " + value;
} }
if (name.contains("InstallDate")) { if (name.contains("InstallDate")) { //NON-NLS
Long installtime = null; Long installtime = null;
try { try {
Long epochtime = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy").parse(value).getTime(); Long epochtime = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy").parse(value).getTime();
@ -504,7 +504,7 @@ class ExtractRegistry extends Extract {
String Tempdate = installtime.toString(); String Tempdate = installtime.toString();
installtime = Long.valueOf(Tempdate) / 1000; installtime = Long.valueOf(Tempdate) / 1000;
} catch (ParseException e) { } catch (ParseException e) {
logger.log(Level.SEVERE, "RegRipper::Conversion on DateTime -> ", e); logger.log(Level.SEVERE, "RegRipper::Conversion on DateTime -> ", e); //NON-NLS
} }
try { try {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
@ -516,12 +516,12 @@ class ExtractRegistry extends Extract {
BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_INSTALLED_PROG); BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_INSTALLED_PROG);
bbart.addAttributes(bbattributes); bbart.addAttributes(bbattributes);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error adding installed program artifact to blackboard."); logger.log(Level.SEVERE, "Error adding installed program artifact to blackboard."); //NON-NLS
} }
} }
} }
else if ("office".equals(dataType)) { else if ("office".equals(dataType)) { //NON-NLS
String name = artnode.getAttribute("name"); String name = artnode.getAttribute("name"); //NON-NLS
try { try {
BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_RECENT_OBJECT); BlackboardArtifact bbart = tempDb.getContentById(orgId).newArtifact(ARTIFACT_TYPE.TSK_RECENT_OBJECT);
@ -542,7 +542,7 @@ class ExtractRegistry extends Extract {
"ExtractRegistry.parentModuleName.noSpace"), artnode.getNodeName())); "ExtractRegistry.parentModuleName.noSpace"), artnode.getNodeName()));
bbart.addAttributes(bbattributes); bbart.addAttributes(bbattributes);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error adding recent object artifact to blackboard."); logger.log(Level.SEVERE, "Error adding recent object artifact to blackboard."); //NON-NLS
} }
} }
} }
@ -550,13 +550,13 @@ class ExtractRegistry extends Extract {
} }
return true; return true;
} catch (FileNotFoundException ex) { } catch (FileNotFoundException ex) {
logger.log(Level.SEVERE, "Error finding the registry file."); logger.log(Level.SEVERE, "Error finding the registry file."); //NON-NLS
} catch (SAXException ex) { } catch (SAXException ex) {
logger.log(Level.SEVERE, "Error parsing the registry XML: {0}", ex); logger.log(Level.SEVERE, "Error parsing the registry XML: {0}", ex); //NON-NLS
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error building the document parser: {0}", ex); logger.log(Level.SEVERE, "Error building the document parser: {0}", ex); //NON-NLS
} catch (ParserConfigurationException ex) { } catch (ParserConfigurationException ex) {
logger.log(Level.SEVERE, "Error configuring the registry parser: {0}", ex); logger.log(Level.SEVERE, "Error configuring the registry parser: {0}", ex); //NON-NLS
} finally { } finally {
try { try {
if (fstream != null) { if (fstream != null) {

View File

@ -53,12 +53,12 @@ import org.sleuthkit.datamodel.TskCoreException;
class Firefox extends Extract { class Firefox extends Extract {
private static final Logger logger = Logger.getLogger(Firefox.class.getName()); private static final Logger logger = Logger.getLogger(Firefox.class.getName());
private static final String historyQuery = "SELECT moz_historyvisits.id,url,title,visit_count,(visit_date/1000000) as visit_date,from_visit,(SELECT url FROM moz_places WHERE id=moz_historyvisits.from_visit) as ref FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id AND hidden = 0"; private static final String historyQuery = "SELECT moz_historyvisits.id,url,title,visit_count,(visit_date/1000000) as visit_date,from_visit,(SELECT url FROM moz_places WHERE id=moz_historyvisits.from_visit) as ref FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id AND hidden = 0"; //NON-NLS
private static final String cookieQuery = "SELECT name,value,host,expiry,(lastAccessed/1000000) as lastAccessed,(creationTime/1000000) as creationTime FROM moz_cookies"; private static final String cookieQuery = "SELECT name,value,host,expiry,(lastAccessed/1000000) as lastAccessed,(creationTime/1000000) as creationTime FROM moz_cookies"; //NON-NLS
private static final String cookieQueryV3 = "SELECT name,value,host,expiry,(lastAccessed/1000000) as lastAccessed FROM moz_cookies"; private static final String cookieQueryV3 = "SELECT name,value,host,expiry,(lastAccessed/1000000) as lastAccessed FROM moz_cookies"; //NON-NLS
private static final String bookmarkQuery = "SELECT fk, moz_bookmarks.title, url, (moz_bookmarks.dateAdded/1000000) as dateAdded FROM moz_bookmarks INNER JOIN moz_places ON moz_bookmarks.fk=moz_places.id"; private static final String bookmarkQuery = "SELECT fk, moz_bookmarks.title, url, (moz_bookmarks.dateAdded/1000000) as dateAdded FROM moz_bookmarks INNER JOIN moz_places ON moz_bookmarks.fk=moz_places.id"; //NON-NLS
private static final String downloadQuery = "SELECT target, source,(startTime/1000000) as startTime, maxBytes FROM moz_downloads"; private static final String downloadQuery = "SELECT target, source,(startTime/1000000) as startTime, maxBytes FROM moz_downloads"; //NON-NLS
private static final String downloadQueryVersion24 = "SELECT url, content as target, (lastModified/1000000) as lastModified FROM moz_places, moz_annos WHERE moz_places.id = moz_annos.place_id AND moz_annos.anno_attribute_id = 3"; private static final String downloadQueryVersion24 = "SELECT url, content as target, (lastModified/1000000) as lastModified FROM moz_places, moz_annos WHERE moz_places.id = moz_annos.place_id AND moz_annos.anno_attribute_id = 3"; //NON-NLS
private final IngestServices services = IngestServices.getInstance(); private final IngestServices services = IngestServices.getInstance();
private Content dataSource; private Content dataSource;
private IngestJobContext context; private IngestJobContext context;
@ -82,7 +82,7 @@ class Firefox extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> historyFiles; List<AbstractFile> historyFiles;
try { try {
historyFiles = fileManager.findFiles(dataSource, "places.sqlite", "Firefox"); historyFiles = fileManager.findFiles(dataSource, "places.sqlite", "Firefox"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Firefox.getHistory.errMsg.errFetchingFiles"); String msg = NbBundle.getMessage(this.getClass(), "Firefox.getHistory.errMsg.errFetchingFiles");
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
@ -105,11 +105,11 @@ class Firefox extends Extract {
} }
String fileName = historyFile.getName(); String fileName = historyFile.getName();
String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; //NON-NLS
try { try {
ContentUtils.writeToFile(historyFile, new File(temps)); ContentUtils.writeToFile(historyFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing the sqlite db for firefox web history artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing the sqlite db for firefox web history artifacts.{0}", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "Firefox.getHistory.errMsg.errAnalyzeFile", this.getName(), NbBundle.getMessage(this.getClass(), "Firefox.getHistory.errMsg.errAnalyzeFile", this.getName(),
fileName)); fileName));
@ -121,33 +121,33 @@ class Firefox extends Extract {
break; break;
} }
List<HashMap<String, Object>> tempList = this.dbConnect(temps, historyQuery); List<HashMap<String, Object>> tempList = this.dbConnect(temps, historyQuery);
logger.log(Level.INFO, "{0} - Now getting history from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0} - Now getting history from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("url").toString() != null) ? result.get("url").toString() : ""))); ((result.get("url").toString() != null) ? result.get("url").toString() : ""))); //NON-NLS
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "RecentActivity", ((result.get("url").toString() != null) ? EscapeUtil.decodeURL(result.get("url").toString()) : ""))); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "RecentActivity", ((result.get("url").toString() != null) ? EscapeUtil.decodeURL(result.get("url").toString()) : "")));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Long.valueOf(result.get("visit_date").toString())))); (Long.valueOf(result.get("visit_date").toString())))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("ref").toString() != null) ? result.get("ref").toString() : ""))); ((result.get("ref").toString() != null) ? result.get("ref").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("title").toString() != null) ? result.get("title").toString() : ""))); ((result.get("title").toString() != null) ? result.get("title").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
NbBundle.getMessage(this.getClass(), "Firefox.moduleName"))); NbBundle.getMessage(this.getClass(), "Firefox.moduleName")));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), (Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); "Firefox.parentModuleName.noSpace"), (Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); //NON-NLS
this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, historyFile, bbattributes); this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, historyFile, bbattributes);
} }
++j; ++j;
@ -166,7 +166,7 @@ class Firefox extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> bookmarkFiles; List<AbstractFile> bookmarkFiles;
try { try {
bookmarkFiles = fileManager.findFiles(dataSource, "places.sqlite", "Firefox"); bookmarkFiles = fileManager.findFiles(dataSource, "places.sqlite", "Firefox"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Firefox.getBookmark.errMsg.errFetchFiles"); String msg = NbBundle.getMessage(this.getClass(), "Firefox.getBookmark.errMsg.errFetchFiles");
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
@ -175,7 +175,7 @@ class Firefox extends Extract {
} }
if (bookmarkFiles.isEmpty()) { if (bookmarkFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any firefox bookmark files."); logger.log(Level.INFO, "Didn't find any firefox bookmark files."); //NON-NLS
return; return;
} }
@ -187,11 +187,11 @@ class Firefox extends Extract {
continue; continue;
} }
String fileName = bookmarkFile.getName(); String fileName = bookmarkFile.getName();
String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; //NON-NLS
try { try {
ContentUtils.writeToFile(bookmarkFile, new File(temps)); ContentUtils.writeToFile(bookmarkFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing the sqlite db for firefox bookmark artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing the sqlite db for firefox bookmark artifacts.{0}", ex); //NON-NLS
this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Firefox.getBookmark.errMsg.errAnalyzeFile", this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Firefox.getBookmark.errMsg.errAnalyzeFile",
this.getName(), fileName)); this.getName(), fileName));
continue; continue;
@ -202,23 +202,23 @@ class Firefox extends Extract {
break; break;
} }
List<HashMap<String, Object>> tempList = this.dbConnect(temps, bookmarkQuery); List<HashMap<String, Object>> tempList = this.dbConnect(temps, bookmarkQuery);
logger.log(Level.INFO, "{0} - Now getting bookmarks from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0} - Now getting bookmarks from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("url").toString() != null) ? result.get("url").toString() : ""))); ((result.get("url").toString() != null) ? result.get("url").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("title").toString() != null) ? result.get("title").toString() : ""))); ((result.get("title").toString() != null) ? result.get("title").toString() : ""))); //NON-NLS
if (Long.valueOf(result.get("dateAdded").toString()) > 0) { if (Long.valueOf(result.get("dateAdded").toString()) > 0) { //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Long.valueOf(result.get("dateAdded").toString())))); (Long.valueOf(result.get("dateAdded").toString())))); //NON-NLS
} }
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
@ -227,7 +227,7 @@ class Firefox extends Extract {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); (Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); //NON-NLS
this.addArtifact(ARTIFACT_TYPE.TSK_WEB_BOOKMARK, bookmarkFile, bbattributes); this.addArtifact(ARTIFACT_TYPE.TSK_WEB_BOOKMARK, bookmarkFile, bbattributes);
} }
@ -246,7 +246,7 @@ class Firefox extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> cookiesFiles; List<AbstractFile> cookiesFiles;
try { try {
cookiesFiles = fileManager.findFiles(dataSource, "cookies.sqlite", "Firefox"); cookiesFiles = fileManager.findFiles(dataSource, "cookies.sqlite", "Firefox"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Firefox.getCookie.errMsg.errFetchFile"); String msg = NbBundle.getMessage(this.getClass(), "Firefox.getCookie.errMsg.errFetchFile");
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
@ -255,7 +255,7 @@ class Firefox extends Extract {
} }
if (cookiesFiles.isEmpty()) { if (cookiesFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any Firefox cookie files."); logger.log(Level.INFO, "Didn't find any Firefox cookie files."); //NON-NLS
return; return;
} }
@ -266,11 +266,11 @@ class Firefox extends Extract {
continue; continue;
} }
String fileName = cookiesFile.getName(); String fileName = cookiesFile.getName();
String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; //NON-NLS
try { try {
ContentUtils.writeToFile(cookiesFile, new File(temps)); ContentUtils.writeToFile(cookiesFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing the sqlite db for firefox cookie artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing the sqlite db for firefox cookie artifacts.{0}", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "Firefox.getCookie.errMsg.errAnalyzeFile", this.getName(), NbBundle.getMessage(this.getClass(), "Firefox.getCookie.errMsg.errAnalyzeFile", this.getName(),
fileName)); fileName));
@ -281,7 +281,7 @@ class Firefox extends Extract {
dbFile.delete(); dbFile.delete();
break; break;
} }
boolean checkColumn = Util.checkColumn("creationTime", "moz_cookies", temps); boolean checkColumn = Util.checkColumn("creationTime", "moz_cookies", temps); //NON-NLS
String query; String query;
if (checkColumn) { if (checkColumn) {
query = cookieQuery; query = cookieQuery;
@ -290,26 +290,26 @@ class Firefox extends Extract {
} }
List<HashMap<String, Object>> tempList = this.dbConnect(temps, query); List<HashMap<String, Object>> tempList = this.dbConnect(temps, query);
logger.log(Level.INFO, "{0} - Now getting cookies from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0} - Now getting cookies from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("host").toString() != null) ? result.get("host").toString() : ""))); ((result.get("host").toString() != null) ? result.get("host").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Long.valueOf(result.get("lastAccessed").toString())))); (Long.valueOf(result.get("lastAccessed").toString())))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("name").toString() != null) ? result.get("name").toString() : ""))); ((result.get("name").toString() != null) ? result.get("name").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("value").toString() != null) ? result.get("value").toString() : ""))); ((result.get("value").toString() != null) ? result.get("value").toString() : ""))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
@ -319,9 +319,9 @@ class Firefox extends Extract {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Long.valueOf(result.get("creationTime").toString())))); (Long.valueOf(result.get("creationTime").toString())))); //NON-NLS
} }
String domain = Util.extractDomain(result.get("host").toString()); String domain = Util.extractDomain(result.get("host").toString()); //NON-NLS
domain = domain.replaceFirst("^\\.+(?!$)", ""); domain = domain.replaceFirst("^\\.+(?!$)", "");
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
@ -354,7 +354,7 @@ class Firefox extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> downloadsFiles; List<AbstractFile> downloadsFiles;
try { try {
downloadsFiles = fileManager.findFiles(dataSource, "downloads.sqlite", "Firefox"); downloadsFiles = fileManager.findFiles(dataSource, "downloads.sqlite", "Firefox"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Firefox.getDlPre24.errMsg.errFetchFiles"); String msg = NbBundle.getMessage(this.getClass(), "Firefox.getDlPre24.errMsg.errFetchFiles");
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
@ -363,7 +363,7 @@ class Firefox extends Extract {
} }
if (downloadsFiles.isEmpty()) { if (downloadsFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any pre-version-24.0 Firefox download files."); logger.log(Level.INFO, "Didn't find any pre-version-24.0 Firefox download files."); //NON-NLS
return; return;
} }
@ -374,12 +374,12 @@ class Firefox extends Extract {
continue; continue;
} }
String fileName = downloadsFile.getName(); String fileName = downloadsFile.getName();
String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + j + ".db"; //NON-NLS
int errors = 0; int errors = 0;
try { try {
ContentUtils.writeToFile(downloadsFile, new File(temps)); ContentUtils.writeToFile(downloadsFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing the sqlite db for firefox download artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing the sqlite db for firefox download artifacts.{0}", ex); //NON-NLS
this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Firefox.getDlPre24.errMsg.errAnalyzeFiles", this.addErrorMessage(NbBundle.getMessage(this.getClass(), "Firefox.getDlPre24.errMsg.errAnalyzeFiles",
this.getName(), fileName)); this.getName(), fileName));
continue; continue;
@ -391,7 +391,7 @@ class Firefox extends Extract {
} }
List<HashMap<String, Object>> tempList = this.dbConnect(temps, downloadQuery); List<HashMap<String, Object>> tempList = this.dbConnect(temps, downloadQuery);
logger.log(Level.INFO, moduleName + "- Now getting downloads from " + temps + " with " + tempList.size() + "artifacts identified."); logger.log(Level.INFO, moduleName + "- Now getting downloads from " + temps + " with " + tempList.size() + "artifacts identified."); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<BlackboardAttribute>();
@ -399,18 +399,18 @@ class Firefox extends Extract {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("source").toString() != null) ? result.get("source").toString() : ""))); ((result.get("source").toString() != null) ? result.get("source").toString() : ""))); //NON-NLS
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "RecentActivity", ((result.get("source").toString() != null) ? EscapeUtil.decodeURL(result.get("source").toString()) : ""))); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "RecentActivity", ((result.get("source").toString() != null) ? EscapeUtil.decodeURL(result.get("source").toString()) : "")));
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Long.valueOf(result.get("startTime").toString())))); (Long.valueOf(result.get("startTime").toString())))); //NON-NLS
String target = result.get("target").toString(); String target = result.get("target").toString(); //NON-NLS
if (target != null) { if (target != null) {
try { try {
String decodedTarget = URLDecoder.decode(target.toString().replaceAll("file:///", ""), "UTF-8"); String decodedTarget = URLDecoder.decode(target.toString().replaceAll("file:///", ""), "UTF-8"); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
@ -423,7 +423,7 @@ class Firefox extends Extract {
pathID)); pathID));
} }
} catch (UnsupportedEncodingException ex) { } catch (UnsupportedEncodingException ex) {
logger.log(Level.SEVERE, "Error decoding Firefox download URL in " + temps, ex); logger.log(Level.SEVERE, "Error decoding Firefox download URL in " + temps, ex); //NON-NLS
errors++; errors++;
} }
} }
@ -435,7 +435,7 @@ class Firefox extends Extract {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Util.extractDomain((result.get("source").toString() != null) ? result.get("source").toString() : "")))); (Util.extractDomain((result.get("source").toString() != null) ? result.get("source").toString() : "")))); //NON-NLS
this.addArtifact(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, downloadsFile, bbattributes); this.addArtifact(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, downloadsFile, bbattributes);
} }
@ -462,7 +462,7 @@ class Firefox extends Extract {
FileManager fileManager = currentCase.getServices().getFileManager(); FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> downloadsFiles; List<AbstractFile> downloadsFiles;
try { try {
downloadsFiles = fileManager.findFiles(dataSource, "places.sqlite", "Firefox"); downloadsFiles = fileManager.findFiles(dataSource, "places.sqlite", "Firefox"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
String msg = NbBundle.getMessage(this.getClass(), "Firefox.getDlV24.errMsg.errFetchFiles"); String msg = NbBundle.getMessage(this.getClass(), "Firefox.getDlV24.errMsg.errFetchFiles");
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
@ -471,7 +471,7 @@ class Firefox extends Extract {
} }
if (downloadsFiles.isEmpty()) { if (downloadsFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any version-24.0 Firefox download files."); logger.log(Level.INFO, "Didn't find any version-24.0 Firefox download files."); //NON-NLS
return; return;
} }
@ -482,12 +482,12 @@ class Firefox extends Extract {
continue; continue;
} }
String fileName = downloadsFile.getName(); String fileName = downloadsFile.getName();
String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + "-downloads" + j + ".db"; String temps = RAImageIngestModule.getRATempPath(currentCase, "firefox") + File.separator + fileName + "-downloads" + j + ".db"; //NON-NLS
int errors = 0; int errors = 0;
try { try {
ContentUtils.writeToFile(downloadsFile, new File(temps)); ContentUtils.writeToFile(downloadsFile, new File(temps));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing the sqlite db for firefox download artifacts.{0}", ex); logger.log(Level.SEVERE, "Error writing the sqlite db for firefox download artifacts.{0}", ex); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "Firefox.getDlV24.errMsg.errAnalyzeFile", this.getName(), NbBundle.getMessage(this.getClass(), "Firefox.getDlV24.errMsg.errAnalyzeFile", this.getName(),
fileName)); fileName));
@ -501,7 +501,7 @@ class Firefox extends Extract {
List<HashMap<String, Object>> tempList = this.dbConnect(temps, downloadQueryVersion24); List<HashMap<String, Object>> tempList = this.dbConnect(temps, downloadQueryVersion24);
logger.log(Level.INFO, "{0} - Now getting downloads from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); logger.log(Level.INFO, "{0} - Now getting downloads from {1} with {2} artifacts identified.", new Object[]{moduleName, temps, tempList.size()}); //NON-NLS
for (HashMap<String, Object> result : tempList) { for (HashMap<String, Object> result : tempList) {
Collection<BlackboardAttribute> bbattributes = new ArrayList<>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
@ -509,15 +509,15 @@ class Firefox extends Extract {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
((result.get("url").toString() != null) ? result.get("url").toString() : ""))); ((result.get("url").toString() != null) ? result.get("url").toString() : ""))); //NON-NLS
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "RecentActivity", ((result.get("source").toString() != null) ? EscapeUtil.decodeURL(result.get("source").toString()) : ""))); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED.getTypeID(), "RecentActivity", ((result.get("source").toString() != null) ? EscapeUtil.decodeURL(result.get("source").toString()) : "")));
//TODO Revisit usage of deprecated constructor as per TSK-583 //TODO Revisit usage of deprecated constructor as per TSK-583
//bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID(), "RecentActivity", "Last Visited", (Long.valueOf(result.get("startTime").toString())))); //bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID(), "RecentActivity", "Last Visited", (Long.valueOf(result.get("startTime").toString()))));
String target = result.get("target").toString(); String target = result.get("target").toString(); //NON-NLS
if (target != null) { if (target != null) {
try { try {
String decodedTarget = URLDecoder.decode(target.toString().replaceAll("file:///", ""), "UTF-8"); String decodedTarget = URLDecoder.decode(target.toString().replaceAll("file:///", ""), "UTF-8"); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
@ -530,14 +530,14 @@ class Firefox extends Extract {
pathID)); pathID));
} }
} catch (UnsupportedEncodingException ex) { } catch (UnsupportedEncodingException ex) {
logger.log(Level.SEVERE, "Error decoding Firefox download URL in " + temps, ex); logger.log(Level.SEVERE, "Error decoding Firefox download URL in " + temps, ex); //NON-NLS
errors++; errors++;
} }
} }
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
Long.valueOf(result.get("lastModified").toString()))); Long.valueOf(result.get("lastModified").toString()))); //NON-NLS
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
@ -545,7 +545,7 @@ class Firefox extends Extract {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"Firefox.parentModuleName.noSpace"), "Firefox.parentModuleName.noSpace"),
(Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); (Util.extractDomain((result.get("url").toString() != null) ? result.get("url").toString() : "")))); //NON-NLS
this.addArtifact(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, downloadsFile, bbattributes); this.addArtifact(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, downloadsFile, bbattributes);
} }

View File

@ -95,14 +95,14 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
for (int i = 0; i < extracters.size(); i++) { for (int i = 0; i < extracters.size(); i++) {
Extract extracter = extracters.get(i); Extract extracter = extracters.get(i);
if (context.isJobCancelled()) { if (context.isJobCancelled()) {
logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName()); logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName()); //NON-NLS
break; break;
} }
try { try {
extracter.process(dataSource, context); extracter.process(dataSource, context);
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.SEVERE, "Exception occurred in " + extracter.getName(), ex); logger.log(Level.SEVERE, "Exception occurred in " + extracter.getName(), ex); //NON-NLS
subCompleted.append(NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.errModFailed", subCompleted.append(NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.errModFailed",
extracter.getName())); extracter.getName()));
errors.add( errors.add(
@ -121,9 +121,9 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
errorMessage.append( errorMessage.append(
NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.errMsg.errsEncountered")); NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.errMsg.errsEncountered"));
for (String msg : errors) { for (String msg : errors) {
errorMessage.append("<li>").append(msg).append("</li>\n"); errorMessage.append("<li>").append(msg).append("</li>\n"); //NON-NLS
} }
errorMessage.append("</ul>\n"); errorMessage.append("</ul>\n"); //NON-NLS
if (errors.size() == 1) { if (errors.size() == 1) {
errorMsgSubject = NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.errMsgSub.oneErr"); errorMsgSubject = NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.errMsgSub.oneErr");
@ -146,13 +146,13 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
historyMsg.append( historyMsg.append(
NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.histMsg.title", dataSource.getName())); NbBundle.getMessage(this.getClass(), "RAImageIngestModule.process.histMsg.title", dataSource.getName()));
for (Extract module : browserExtracters) { for (Extract module : browserExtracters) {
historyMsg.append("<li>").append(module.getName()); historyMsg.append("<li>").append(module.getName()); //NON-NLS
historyMsg.append(": ").append((module.foundData()) ? NbBundle historyMsg.append(": ").append((module.foundData()) ? NbBundle
.getMessage(this.getClass(), "RAImageIngestModule.process.histMsg.found") : NbBundle .getMessage(this.getClass(), "RAImageIngestModule.process.histMsg.found") : NbBundle
.getMessage(this.getClass(), "RAImageIngestModule.process.histMsg.notFnd")); .getMessage(this.getClass(), "RAImageIngestModule.process.histMsg.notFnd"));
historyMsg.append("</li>"); historyMsg.append("</li>"); //NON-NLS
} }
historyMsg.append("</ul>"); historyMsg.append("</ul>"); //NON-NLS
final IngestMessage inboxMsg = IngestMessage.createMessage(MessageType.INFO, RecentActivityExtracterModuleFactory.getModuleName(), final IngestMessage inboxMsg = IngestMessage.createMessage(MessageType.INFO, RecentActivityExtracterModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"RAImageIngestModule.process.ingestMsg.results", "RAImageIngestModule.process.ingestMsg.results",
@ -175,7 +175,7 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
try { try {
extracter.complete(); extracter.complete();
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.SEVERE, "Exception occurred when completing " + extracter.getName(), ex); logger.log(Level.SEVERE, "Exception occurred when completing " + extracter.getName(), ex); //NON-NLS
subCompleted.append(NbBundle.getMessage(this.getClass(), "RAImageIngestModule.complete.errMsg.failed", subCompleted.append(NbBundle.getMessage(this.getClass(), "RAImageIngestModule.complete.errMsg.failed",
extracter.getName())); extracter.getName()));
} }
@ -187,10 +187,10 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
try { try {
extracter.stop(); extracter.stop();
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.SEVERE, "Exception during stop() of " + extracter.getName(), ex); logger.log(Level.SEVERE, "Exception during stop() of " + extracter.getName(), ex); //NON-NLS
} }
} }
logger.log(Level.INFO, "Recent Activity processes has been shutdown."); logger.log(Level.INFO, "Recent Activity processes has been shutdown."); //NON-NLS
} }
/** /**
@ -203,7 +203,7 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
* @return Path to directory * @return Path to directory
*/ */
protected static String getRATempPath(Case a_case, String mod) { protected static String getRATempPath(Case a_case, String mod) {
String tmpDir = a_case.getTempDirectory() + File.separator + "RecentActivity" + File.separator + mod; String tmpDir = a_case.getTempDirectory() + File.separator + "RecentActivity" + File.separator + mod; //NON-NLS
File dir = new File(tmpDir); File dir = new File(tmpDir);
if (dir.exists() == false) { if (dir.exists() == false) {
dir.mkdirs(); dir.mkdirs();
@ -221,7 +221,7 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da
* @return Path to directory * @return Path to directory
*/ */
protected static String getRAOutputPath(Case a_case, String mod) { protected static String getRAOutputPath(Case a_case, String mod) {
String tmpDir = a_case.getModulesOutputDirAbsPath() + File.separator + "RecentActivity" + File.separator + mod; String tmpDir = a_case.getModulesOutputDirAbsPath() + File.separator + "RecentActivity" + File.separator + mod; //NON-NLS
File dir = new File(tmpDir); File dir = new File(tmpDir);
if (dir.exists() == false) { if (dir.exists() == false) {
dir.mkdirs(); dir.mkdirs();

View File

@ -63,9 +63,9 @@ class RecentDocumentsByLnk extends Extract {
org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager(); org.sleuthkit.autopsy.casemodule.services.FileManager fileManager = currentCase.getServices().getFileManager();
List<AbstractFile> recentFiles; List<AbstractFile> recentFiles;
try { try {
recentFiles = fileManager.findFiles(dataSource, "%.lnk", "Recent"); recentFiles = fileManager.findFiles(dataSource, "%.lnk", "Recent"); //NON-NLS
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error searching for .lnk files."); logger.log(Level.WARNING, "Error searching for .lnk files."); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "RecentDocumentsByLnk.getRecDoc.errMsg.errGetLnkFiles", NbBundle.getMessage(this.getClass(), "RecentDocumentsByLnk.getRecDoc.errMsg.errGetLnkFiles",
this.getName())); this.getName()));
@ -73,7 +73,7 @@ class RecentDocumentsByLnk extends Extract {
} }
if (recentFiles.isEmpty()) { if (recentFiles.isEmpty()) {
logger.log(Level.INFO, "Didn't find any recent files."); logger.log(Level.INFO, "Didn't find any recent files."); //NON-NLS
return; return;
} }
@ -95,7 +95,7 @@ class RecentDocumentsByLnk extends Extract {
boolean unalloc = recentFile.isMetaFlagSet(TskData.TSK_FS_META_FLAG_ENUM.UNALLOC) boolean unalloc = recentFile.isMetaFlagSet(TskData.TSK_FS_META_FLAG_ENUM.UNALLOC)
|| recentFile.isDirNameFlagSet(TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC); || recentFile.isDirNameFlagSet(TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC);
if (unalloc == false) { if (unalloc == false) {
logger.log(Level.SEVERE, "Error lnk parsing the file to get recent files" + recentFile, e); logger.log(Level.SEVERE, "Error lnk parsing the file to get recent files" + recentFile, e); //NON-NLS
this.addErrorMessage( this.addErrorMessage(
NbBundle.getMessage(this.getClass(), "RecentDocumentsByLnk.getRecDoc.errParsingFile", NbBundle.getMessage(this.getClass(), "RecentDocumentsByLnk.getRecDoc.errParsingFile",
this.getName(), recentFile.getName())); this.getName(), recentFile.getName()));

View File

@ -63,8 +63,8 @@ import org.xml.sax.SAXException;
class SearchEngineURLQueryAnalyzer extends Extract { class SearchEngineURLQueryAnalyzer extends Extract {
private static final Logger logger = Logger.getLogger(SearchEngineURLQueryAnalyzer.class.getName()); private static final Logger logger = Logger.getLogger(SearchEngineURLQueryAnalyzer.class.getName());
private static final String XMLFILE = "SEUQAMappings.xml"; private static final String XMLFILE = "SEUQAMappings.xml"; //NON-NLS
private static final String XSDFILE = "SearchEngineSchema.xsd"; private static final String XSDFILE = "SearchEngineSchema.xsd"; //NON-NLS
private static String[] searchEngineNames; private static String[] searchEngineNames;
private static SearchEngineURLQueryAnalyzer.SearchEngine[] engines; private static SearchEngineURLQueryAnalyzer.SearchEngine[] engines;
private static Document xmlinput; private static Document xmlinput;
@ -124,19 +124,19 @@ class SearchEngineURLQueryAnalyzer extends Extract {
} }
private void createEngines() { private void createEngines() {
NodeList nlist = xmlinput.getElementsByTagName("SearchEngine"); NodeList nlist = xmlinput.getElementsByTagName("SearchEngine"); //NON-NLS
SearchEngineURLQueryAnalyzer.SearchEngine[] listEngines = new SearchEngineURLQueryAnalyzer.SearchEngine[nlist.getLength()]; SearchEngineURLQueryAnalyzer.SearchEngine[] listEngines = new SearchEngineURLQueryAnalyzer.SearchEngine[nlist.getLength()];
for (int i = 0; i < nlist.getLength(); i++) { for (int i = 0; i < nlist.getLength(); i++) {
NamedNodeMap nnm = nlist.item(i).getAttributes(); NamedNodeMap nnm = nlist.item(i).getAttributes();
String EngineName = nnm.getNamedItem("engine").getNodeValue(); String EngineName = nnm.getNamedItem("engine").getNodeValue(); //NON-NLS
String EnginedomainSubstring = nnm.getNamedItem("domainSubstring").getNodeValue(); String EnginedomainSubstring = nnm.getNamedItem("domainSubstring").getNodeValue(); //NON-NLS
Map<String, String> splits = new HashMap<>(); Map<String, String> splits = new HashMap<>();
NodeList listSplits = xmlinput.getElementsByTagName("splitToken"); NodeList listSplits = xmlinput.getElementsByTagName("splitToken"); //NON-NLS
for (int k = 0; k < listSplits.getLength(); k++) { for (int k = 0; k < listSplits.getLength(); k++) {
if (listSplits.item(k).getParentNode().getAttributes().getNamedItem("engine").getNodeValue().equals(EngineName)) { if (listSplits.item(k).getParentNode().getAttributes().getNamedItem("engine").getNodeValue().equals(EngineName)) { //NON-NLS
splits.put(listSplits.item(k).getAttributes().getNamedItem("plainToken").getNodeValue(), listSplits.item(k).getAttributes().getNamedItem("regexToken").getNodeValue()); splits.put(listSplits.item(k).getAttributes().getNamedItem("plainToken").getNodeValue(), listSplits.item(k).getAttributes().getNamedItem("regexToken").getNodeValue()); //NON-NLS
} }
} }
@ -182,7 +182,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
* @return The extracted search query. * @return The extracted search query.
*/ */
private String extractSearchEngineQuery(String url) { private String extractSearchEngineQuery(String url) {
String x = "NoQuery"; String x = "NoQuery"; //NON-NLS
SearchEngineURLQueryAnalyzer.SearchEngine eng = getSearchEngine(url); SearchEngineURLQueryAnalyzer.SearchEngine eng = getSearchEngine(url);
for (Map.Entry<String, String> kvp : eng.getSplits()) { for (Map.Entry<String, String> kvp : eng.getSplits()) {
if (url.contains(kvp.getKey())) { if (url.contains(kvp.getKey())) {
@ -191,10 +191,10 @@ class SearchEngineURLQueryAnalyzer extends Extract {
} }
} }
try { //try to decode the url try { //try to decode the url
String decoded = URLDecoder.decode(x, "UTF-8"); String decoded = URLDecoder.decode(x, "UTF-8"); //NON-NLS
return decoded; return decoded;
} catch (UnsupportedEncodingException uee) { //if it fails, return the encoded string } catch (UnsupportedEncodingException uee) { //if it fails, return the encoded string
logger.log(Level.FINE, "Error during URL decoding ", uee); logger.log(Level.FINE, "Error during URL decoding ", uee); //NON-NLS
return x; return x;
} }
} }
@ -209,7 +209,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
* *
*/ */
private String split2(String url, String value) { private String split2(String url, String value) {
String basereturn = "NoQuery"; String basereturn = "NoQuery"; //NON-NLS
String v = value; String v = value;
//Want to determine if string contains a string based on splitkey, but we want to split the string on splitKeyConverted due to regex //Want to determine if string contains a string based on splitkey, but we want to split the string on splitKeyConverted due to regex
if (value.contains("\\?")) { if (value.contains("\\?")) {
@ -230,9 +230,9 @@ class SearchEngineURLQueryAnalyzer extends Extract {
int totalQueries = 0; int totalQueries = 0;
try { try {
//from blackboard_artifacts //from blackboard_artifacts
Collection<BlackboardArtifact> listArtifacts = currentCase.getSleuthkitCase().getMatchingArtifacts("WHERE (`artifact_type_id` = '" + ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID() Collection<BlackboardArtifact> listArtifacts = currentCase.getSleuthkitCase().getMatchingArtifacts("WHERE (`artifact_type_id` = '" + ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID() //NON-NLS
+ "' OR `artifact_type_id` = '" + ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID() + "') "); //List of every 'web_history' and 'bookmark' artifact + "' OR `artifact_type_id` = '" + ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID() + "') "); //List of every 'web_history' and 'bookmark' artifact NON-NLS
logger.log(Level.INFO, "Processing {0} blackboard artifacts.", listArtifacts.size()); logger.log(Level.INFO, "Processing {0} blackboard artifacts.", listArtifacts.size()); //NON-NLS
getAll: getAll:
for (BlackboardArtifact artifact : listArtifacts) { for (BlackboardArtifact artifact : listArtifacts) {
//initializing default attributes //initializing default attributes
@ -255,7 +255,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
SearchEngineURLQueryAnalyzer.SearchEngine se = NullEngine; SearchEngineURLQueryAnalyzer.SearchEngine se = NullEngine;
//from blackboard_attributes //from blackboard_attributes
Collection<BlackboardAttribute> listAttributes = currentCase.getSleuthkitCase().getMatchingAttributes("Where `artifact_id` = " + artifact.getArtifactID()); Collection<BlackboardAttribute> listAttributes = currentCase.getSleuthkitCase().getMatchingAttributes("Where `artifact_id` = " + artifact.getArtifactID()); //NON-NLS
getAttributes: getAttributes:
for (BlackboardAttribute attribute : listAttributes) { for (BlackboardAttribute attribute : listAttributes) {
if (context.isJobCancelled()) { if (context.isJobCancelled()) {
@ -266,7 +266,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
se = getSearchEngine(urlString); se = getSearchEngine(urlString);
if (!se.equals(NullEngine)) { if (!se.equals(NullEngine)) {
query = extractSearchEngineQuery(attribute.getValueString()); query = extractSearchEngineQuery(attribute.getValueString());
if (query.equals("NoQuery") || query.equals("")) { //False positive match, artifact was not a query. if (query.equals("NoQuery") || query.equals("")) { //False positive match, artifact was not a query. NON-NLS
break getAttributes; break getAttributes;
} }
} else if (se.equals(NullEngine)) { } else if (se.equals(NullEngine)) {
@ -281,7 +281,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
} }
} }
if (!se.equals(NullEngine) && !query.equals("NoQuery") && !query.equals("")) { if (!se.equals(NullEngine) && !query.equals("NoQuery") && !query.equals("")) { //NON-NLS
Collection<BlackboardAttribute> bbattributes = new ArrayList<>(); Collection<BlackboardAttribute> bbattributes = new ArrayList<>();
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(), bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
@ -301,15 +301,15 @@ class SearchEngineURLQueryAnalyzer extends Extract {
} }
} }
} catch (TskException e) { } catch (TskException e) {
logger.log(Level.SEVERE, "Encountered error retrieving artifacts for search engine queries", e); logger.log(Level.SEVERE, "Encountered error retrieving artifacts for search engine queries", e); //NON-NLS
} finally { } finally {
if (context.isJobCancelled()) { if (context.isJobCancelled()) {
logger.info("Operation terminated by user."); logger.info("Operation terminated by user."); //NON-NLS
} }
IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent( IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(
NbBundle.getMessage(this.getClass(), "SearchEngineURLQueryAnalyzer.parentModuleName.noSpace"), NbBundle.getMessage(this.getClass(), "SearchEngineURLQueryAnalyzer.parentModuleName.noSpace"),
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY)); BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY));
logger.log(Level.INFO, "Extracted {0} queries from the blackboard", totalQueries); logger.log(Level.INFO, "Extracted {0} queries from the blackboard", totalQueries); //NON-NLS
} }
} }
@ -329,7 +329,7 @@ class SearchEngineURLQueryAnalyzer extends Extract {
this.dataSource = dataSource; this.dataSource = dataSource;
this.context = context; this.context = context;
this.getURLs(); this.getURLs();
logger.log(Level.INFO, "Search Engine stats: \n{0}", getTotals()); logger.log(Level.INFO, "Search Engine stats: \n{0}", getTotals()); //NON-NLS
} }
@Override @Override
@ -338,7 +338,8 @@ class SearchEngineURLQueryAnalyzer extends Extract {
PlatformUtil.extractResourceToUserConfigDir(SearchEngineURLQueryAnalyzer.class, XMLFILE, false); PlatformUtil.extractResourceToUserConfigDir(SearchEngineURLQueryAnalyzer.class, XMLFILE, false);
init2(); init2();
} catch (IOException e) { } catch (IOException e) {
String message = "Unable to find " + XMLFILE; String message = NbBundle
.getMessage(this.getClass(), "SearchEngineURLQueryAnalyzer.init.exception.msg", XMLFILE);
logger.log(Level.SEVERE, message, e); logger.log(Level.SEVERE, message, e);
throw new IngestModuleException(message); throw new IngestModuleException(message);
} }
@ -348,33 +349,33 @@ class SearchEngineURLQueryAnalyzer extends Extract {
try { try {
String path = PlatformUtil.getUserConfigDirectory() + File.separator + XMLFILE; String path = PlatformUtil.getUserConfigDirectory() + File.separator + XMLFILE;
File f = new File(path); File f = new File(path);
logger.log(Level.INFO, "Load successful"); logger.log(Level.INFO, "Load successful"); //NON-NLS
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder(); DocumentBuilder db = dbf.newDocumentBuilder();
Document xml = db.parse(f); Document xml = db.parse(f);
xmlinput = xml; xmlinput = xml;
if (!XMLUtil.xmlIsValid(xml, SearchEngineURLQueryAnalyzer.class, XSDFILE)) { if (!XMLUtil.xmlIsValid(xml, SearchEngineURLQueryAnalyzer.class, XSDFILE)) {
logger.log(Level.WARNING, "Error loading Search Engines: could not validate against [" + XSDFILE + "], results may not be accurate."); logger.log(Level.WARNING, "Error loading Search Engines: could not validate against [" + XSDFILE + "], results may not be accurate."); //NON-NLS
} }
createEngines(); createEngines();
getSearchEngineNames(); getSearchEngineNames();
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.SEVERE, "Was not able to load SEUQAMappings.xml", e); logger.log(Level.SEVERE, "Was not able to load SEUQAMappings.xml", e); //NON-NLS
} catch (ParserConfigurationException pce) { } catch (ParserConfigurationException pce) {
logger.log(Level.SEVERE, "Unable to build XML parser", pce); logger.log(Level.SEVERE, "Unable to build XML parser", pce); //NON-NLS
} catch (SAXException sxe) { } catch (SAXException sxe) {
logger.log(Level.SEVERE, "Unable to parse XML file", sxe); logger.log(Level.SEVERE, "Unable to parse XML file", sxe); //NON-NLS
} }
} }
@Override @Override
public void complete() { public void complete() {
logger.info("Search Engine URL Query Analyzer has completed."); logger.info("Search Engine URL Query Analyzer has completed."); //NON-NLS
} }
@Override @Override
public void stop() { public void stop() {
logger.info("Attempted to stop Search Engine URL Query Analyzer, but operation is not supported; skipping..."); logger.info("Attempted to stop Search Engine URL Query Analyzer, but operation is not supported; skipping..."); //NON-NLS
} }
} }

View File

@ -42,16 +42,16 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil;
class UsbDeviceIdMapper { class UsbDeviceIdMapper {
private static final Logger logger = Logger.getLogger(UsbDeviceIdMapper.class.getName()); private static final Logger logger = Logger.getLogger(UsbDeviceIdMapper.class.getName());
private HashMap<String, USBInfo> devices; private HashMap<String, USBInfo> devices;
private static final String DataFile = "USB_DATA.txt"; private static final String DataFile = "USB_DATA.txt"; //NON-NLS
public UsbDeviceIdMapper() { public UsbDeviceIdMapper() {
try { try {
loadDeviceMap(); loadDeviceMap();
} catch (FileNotFoundException ex) { } catch (FileNotFoundException ex) {
logger.log(Level.SEVERE, "Could not find file " + DataFile + ".", ex); logger.log(Level.SEVERE, "Could not find file " + DataFile + ".", ex); //NON-NLS
devices = null; devices = null;
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Unknown IO error occurred in method devices.", ex); logger.log(Level.SEVERE, "Unknown IO error occurred in method devices.", ex); //NON-NLS
} }
} }
@ -105,12 +105,12 @@ class UsbDeviceIdMapper {
} }
// stop once we've hitten the part of the file that starts to talk about class types // stop once we've hitten the part of the file that starts to talk about class types
if (line.startsWith("C 00")) { if (line.startsWith("C 00")) { //NON-NLS
return; return;
} }
String dvc = ""; String dvc = "";
String[] tokens = line.split("[\\t\\s]+"); String[] tokens = line.split("[\\t\\s]+"); //NON-NLS
String vID = tokens[0]; String vID = tokens[0];
for (int n = 1; n < tokens.length; n++) { for (int n = 1; n < tokens.length; n++) {
dvc += tokens[n] + " "; dvc += tokens[n] + " ";
@ -126,7 +126,7 @@ class UsbDeviceIdMapper {
line = dat.nextLine(); line = dat.nextLine();
if (line.startsWith("\t")) { if (line.startsWith("\t")) {
while (dat.hasNext() && line.startsWith("\t")) { while (dat.hasNext() && line.startsWith("\t")) {
tokens = line.split("[\\t\\s]+"); tokens = line.split("[\\t\\s]+"); //NON-NLS
// make key based on upper case version of vendor and product IDs // make key based on upper case version of vendor and product IDs
pID = vID + tokens[1]; pID = vID + tokens[1];

View File

@ -151,7 +151,7 @@ class Util {
public static String getFileName(String value) { public static String getFileName(String value) {
String filename = ""; String filename = "";
String filematch = "^([a-zA-Z]\\:)(\\\\[^\\\\/:*?<>\"|]*(?<!\\[ \\]))*(\\.[a-zA-Z]{2,6})$"; String filematch = "^([a-zA-Z]\\:)(\\\\[^\\\\/:*?<>\"|]*(?<!\\[ \\]))*(\\.[a-zA-Z]{2,6})$"; //NON-NLS
Pattern p = Pattern.compile(filematch, Pattern.CASE_INSENSITIVE | Pattern.DOTALL | Pattern.COMMENTS); Pattern p = Pattern.compile(filematch, Pattern.CASE_INSENSITIVE | Pattern.DOTALL | Pattern.COMMENTS);
Matcher m = p.matcher(value); Matcher m = p.matcher(value);
@ -168,7 +168,7 @@ class Util {
String path = ""; String path = "";
//String drive ="([a-z]:\\\\(?:[-\\w\\.\\d]+\\\\)*(?:[-\\w\\.\\d]+)?)"; // Windows drive //String drive ="([a-z]:\\\\(?:[-\\w\\.\\d]+\\\\)*(?:[-\\w\\.\\d]+)?)"; // Windows drive
String drive = "([a-z]:\\\\\\S.+)"; String drive = "([a-z]:\\\\\\S.+)"; //NON-NLS
Pattern p = Pattern.compile(drive, Pattern.CASE_INSENSITIVE | Pattern.COMMENTS); Pattern p = Pattern.compile(drive, Pattern.CASE_INSENSITIVE | Pattern.COMMENTS);
Matcher m = p.matcher(txt); Matcher m = p.matcher(txt);
if (m.find()) { if (m.find()) {
@ -176,7 +176,7 @@ class Util {
} else { } else {
String network = "(\\\\(?:\\\\[^:\\s?*\"<>|]+)+)"; // Windows network String network = "(\\\\(?:\\\\[^:\\s?*\"<>|]+)+)"; // Windows network NON-NLS
Pattern p2 = Pattern.compile(network, Pattern.CASE_INSENSITIVE | Pattern.DOTALL); Pattern p2 = Pattern.compile(network, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
Matcher m2 = p2.matcher(txt); Matcher m2 = p2.matcher(txt);
@ -202,7 +202,7 @@ class Util {
try { try {
files = fileManager.findFiles(dataSource, name, parent_path); files = fileManager.findFiles(dataSource, name, parent_path);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error fetching 'index.data' files for Internet Explorer history."); logger.log(Level.WARNING, "Error fetching 'index.data' files for Internet Explorer history."); //NON-NLS
} }
if (files == null || files.isEmpty()) { if (files == null || files.isEmpty()) {
@ -212,19 +212,19 @@ class Util {
} }
public static boolean checkColumn(String column, String tablename, String connection) { public static boolean checkColumn(String column, String tablename, String connection) {
String query = "PRAGMA table_info(" + tablename + ")"; String query = "PRAGMA table_info(" + tablename + ")"; //NON-NLS
boolean found = false; boolean found = false;
ResultSet temprs; ResultSet temprs;
try { try {
SQLiteDBConnect tempdbconnect = new SQLiteDBConnect("org.sqlite.JDBC", "jdbc:sqlite:" + connection); SQLiteDBConnect tempdbconnect = new SQLiteDBConnect("org.sqlite.JDBC", "jdbc:sqlite:" + connection); //NON-NLS
temprs = tempdbconnect.executeQry(query); temprs = tempdbconnect.executeQry(query);
while (temprs.next()) { while (temprs.next()) {
if (temprs.getString("name") == null ? column == null : temprs.getString("name").equals(column)) { if (temprs.getString("name") == null ? column == null : temprs.getString("name").equals(column)) { //NON-NLS
found = true; found = true;
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.WARNING, "Error while trying to get columns from sqlite db." + connection, ex); logger.log(Level.WARNING, "Error while trying to get columns from sqlite db." + connection, ex); //NON-NLS
} }
return found; return found;
} }
@ -232,11 +232,11 @@ class Util {
public static ResultSet runQuery(String query, String connection) { public static ResultSet runQuery(String query, String connection) {
ResultSet results = null; ResultSet results = null;
try { try {
SQLiteDBConnect tempdbconnect = new SQLiteDBConnect("org.sqlite.JDBC", "jdbc:sqlite:" + connection); SQLiteDBConnect tempdbconnect = new SQLiteDBConnect("org.sqlite.JDBC", "jdbc:sqlite:" + connection); //NON-NLS
results = tempdbconnect.executeQry(query); results = tempdbconnect.executeQry(query);
tempdbconnect.closeConnection(); tempdbconnect.closeConnection();
} catch (Exception ex) { } catch (Exception ex) {
logger.log(Level.WARNING, "Error while trying to run sql query: " + query + " : " + connection, ex); logger.log(Level.WARNING, "Error while trying to run sql query: " + query + " : " + connection, ex); //NON-NLS
} }
return results; return results;
} }

View File

@ -53,9 +53,9 @@ import org.sleuthkit.datamodel.Volume;
class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileIngestModule { class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileIngestModule {
private static final Logger logger = Logger.getLogger(ScalpelCarverIngestModule.class.getName()); private static final Logger logger = Logger.getLogger(ScalpelCarverIngestModule.class.getName());
private final String MODULE_OUTPUT_DIR_NAME = "ScalpelCarver"; private final String MODULE_OUTPUT_DIR_NAME = "ScalpelCarver"; //NON-NLS
private String moduleOutputDirPath; private String moduleOutputDirPath;
private final String configFileName = "scalpel.conf"; private final String configFileName = "scalpel.conf"; //NON-NLS
private String configFilePath; private String configFilePath;
private boolean initialized = false; private boolean initialized = false;
private ScalpelCarver carver; private ScalpelCarver carver;
@ -69,8 +69,8 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
this.context = context; this.context = context;
// make sure this is Windows // make sure this is Windows
String os = System.getProperty("os.name"); String os = System.getProperty("os.name"); //NON-NLS
if (!os.startsWith("Windows")) { if (!os.startsWith("Windows")) { //NON-NLS
String message = NbBundle.getMessage(this.getClass(), "ScalpelCarverIngestModule.startUp.exception.msg1"); String message = NbBundle.getMessage(this.getClass(), "ScalpelCarverIngestModule.startUp.exception.msg1");
logger.log(Level.SEVERE, message); logger.log(Level.SEVERE, message);
throw new IngestModuleException(message); throw new IngestModuleException(message);
@ -132,7 +132,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
File scalpelOutputDir = new File(scalpelOutputDirPath); File scalpelOutputDir = new File(scalpelOutputDirPath);
if (!scalpelOutputDir.exists()) { if (!scalpelOutputDir.exists()) {
if (!scalpelOutputDir.mkdir()) { if (!scalpelOutputDir.mkdir()) {
logger.log(Level.SEVERE, "Could not create Scalpel output directory: {0}", scalpelOutputDirPath); logger.log(Level.SEVERE, "Could not create Scalpel output directory: {0}", scalpelOutputDirPath); //NON-NLS
return ProcessResult.OK; return ProcessResult.OK;
} }
} }
@ -143,7 +143,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
try { try {
parent = abstractFile.getParent(); parent = abstractFile.getParent();
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Exception while trying to get parent of AbstractFile.", ex); logger.log(Level.SEVERE, "Exception while trying to get parent of AbstractFile.", ex); //NON-NLS
} }
while (parent != null) { while (parent != null) {
if (parent instanceof FileSystem if (parent instanceof FileSystem
@ -155,13 +155,13 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
try { try {
parent = parent.getParent(); parent = parent.getParent();
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Exception while trying to get parent of Content object.", ex); logger.log(Level.SEVERE, "Exception while trying to get parent of Content object.", ex); //NON-NLS
} }
} }
// make sure we have a valid systemID // make sure we have a valid systemID
if (id == -1) { if (id == -1) {
logger.log(Level.SEVERE, "Could not get an ID for a FileSystem, Volume or Image for the given AbstractFile."); logger.log(Level.SEVERE, "Could not get an ID for a FileSystem, Volume or Image for the given AbstractFile."); //NON-NLS
return ProcessResult.OK; return ProcessResult.OK;
} }
@ -170,7 +170,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
try { try {
output = carver.carve(abstractFile, configFilePath, scalpelOutputDirPath); output = carver.carve(abstractFile, configFilePath, scalpelOutputDirPath);
} catch (ScalpelException ex) { } catch (ScalpelException ex) {
logger.log(Level.SEVERE, "Error when attempting to carved data from AbstractFile with ID {0}", abstractFile.getId()); logger.log(Level.SEVERE, "Error when attempting to carved data from AbstractFile with ID {0}", abstractFile.getId()); //NON-NLS
return ProcessResult.OK; return ProcessResult.OK;
} }
@ -184,7 +184,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
try { try {
byteOffset = abstractFile.convertToImgOffset(carvedFileMeta.getByteStart()); byteOffset = abstractFile.convertToImgOffset(carvedFileMeta.getByteStart());
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Could not calculate the image byte offset of AbstractFile ({0})", abstractFile.getName()); logger.log(Level.SEVERE, "Could not calculate the image byte offset of AbstractFile ({0})", abstractFile.getName()); //NON-NLS
break; break;
} }
@ -199,7 +199,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
try { try {
carvedFiles.add(db.addCarvedFile(carvedFileMeta.getFileName(), size, id, data)); carvedFiles.add(db.addCarvedFile(carvedFileMeta.getFileName(), size, id, data));
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "There was a problem while trying to add a carved file to the database.", ex); logger.log(Level.SEVERE, "There was a problem while trying to add a carved file to the database.", ex); //NON-NLS
} }
} }
@ -212,7 +212,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
try { try {
carvedFileDir = carvedFiles.get(0).getParent(); carvedFileDir = carvedFiles.get(0).getParent();
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "There was a problem while trying to obtain the carved files directory.", ex); logger.log(Level.SEVERE, "There was a problem while trying to obtain the carved files directory.", ex); //NON-NLS
} }
} }
@ -220,7 +220,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
if (carvedFileDir != null) { if (carvedFileDir != null) {
is.fireModuleContentEvent(new ModuleContentEvent(carvedFileDir)); is.fireModuleContentEvent(new ModuleContentEvent(carvedFileDir));
} else { } else {
logger.log(Level.SEVERE, "Could not obtain the carved files directory."); logger.log(Level.SEVERE, "Could not obtain the carved files directory."); //NON-NLS
} }
// reschedule carved files // reschedule carved files

View File

@ -37,8 +37,8 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
*/ */
public class ScalpelCarver { public class ScalpelCarver {
private static final String SCALPEL_JNI_LIB = "libscalpel_jni"; private static final String SCALPEL_JNI_LIB = "libscalpel_jni"; //NON-NLS
private static final String SCALPEL_OUTPUT_FILE_NAME = "audit.txt"; private static final String SCALPEL_OUTPUT_FILE_NAME = "audit.txt"; //NON-NLS
private static volatile boolean initialized = false; private static volatile boolean initialized = false;
private static final Logger logger = Logger.getLogger(ScalpelCarver.class.getName()); private static final Logger logger = Logger.getLogger(ScalpelCarver.class.getName());
@ -53,16 +53,16 @@ public class ScalpelCarver {
return true; return true;
} }
initialized = true; initialized = true;
for (String library : Arrays.asList("libtre-4", "pthreadGC2", SCALPEL_JNI_LIB)) { for (String library : Arrays.asList("libtre-4", "pthreadGC2", SCALPEL_JNI_LIB)) { //NON-NLS
if (!loadLib(library)) { if (!loadLib(library)) {
initialized = false; initialized = false;
logger.log(Level.SEVERE, "Failed initializing " + ScalpelCarver.class.getName() + " due to failure loading library: " + library); logger.log(Level.SEVERE, "Failed initializing " + ScalpelCarver.class.getName() + " due to failure loading library: " + library); //NON-NLS
break; break;
} }
} }
if (initialized) { if (initialized) {
logger.log(Level.INFO, ScalpelCarver.class.getName() + " JNI initialized successfully. "); logger.log(Level.INFO, ScalpelCarver.class.getName() + " JNI initialized successfully. "); //NON-NLS
} }
return initialized; return initialized;
@ -147,14 +147,14 @@ public class ScalpelCarver {
carveNat(carverInputId, carverInput, configFilePath, outputFolderPath); carveNat(carverInputId, carverInput, configFilePath, outputFolderPath);
} }
catch (Exception e) { catch (Exception e) {
logger.log(Level.SEVERE, "Error while caving file " + file, e); logger.log(Level.SEVERE, "Error while caving file " + file, e); //NON-NLS
throw new ScalpelException(e); throw new ScalpelException(e);
} }
finally { finally {
try { try {
carverInput.close(); carverInput.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Error closing input stream after carving, file: " + file, ex); logger.log(Level.SEVERE, "Error closing input stream after carving, file: " + file, ex); //NON-NLS
} }
} }
@ -166,9 +166,9 @@ public class ScalpelCarver {
try { try {
output = ScalpelOutputParser.parse(outputFile); output = ScalpelOutputParser.parse(outputFile);
} catch (FileNotFoundException ex) { } catch (FileNotFoundException ex) {
logger.log(Level.SEVERE, "Could not find scalpel output file.", ex); logger.log(Level.SEVERE, "Could not find scalpel output file.", ex); //NON-NLS
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "IOException while processing scalpel output file.", ex); logger.log(Level.SEVERE, "IOException while processing scalpel output file.", ex); //NON-NLS
} }
return output; return output;

View File

@ -96,7 +96,7 @@ public class ScalpelOutputParser {
while (!line.isEmpty()) { while (!line.isEmpty()) {
// split the line into tokens // split the line into tokens
String[] fields = line.split("\\s+"); String[] fields = line.split("\\s+"); //NON-NLS
// get the fields of interest // get the fields of interest
String fileName = fields[0]; String fileName = fields[0];

View File

@ -71,7 +71,7 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
/** /**
* The mime type string for html text. * The mime type string for html text.
*/ */
private static final String HTML_TYPE = "text/html"; private static final String HTML_TYPE = "text/html"; //NON-NLS
/** /**
* The local path of the mbox file. * The local path of the mbox file.
@ -89,7 +89,7 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
} }
static boolean isValidMimeTypeMbox(byte[] buffer) { static boolean isValidMimeTypeMbox(byte[] buffer) {
return (new String(buffer)).startsWith("From "); return (new String(buffer)).startsWith("From "); //NON-NLS
} }
/** /**
@ -115,7 +115,7 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
// Not the right encoder // Not the right encoder
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "couldn't find mbox file.", ex); logger.log(Level.WARNING, "couldn't find mbox file.", ex); //NON-NLS
addErrorMessage(NbBundle.getMessage(this.getClass(), "MboxParser.parse.errMsg.failedToReadFile")); addErrorMessage(NbBundle.getMessage(this.getClass(), "MboxParser.parse.errMsg.failedToReadFile"));
return new ArrayList<>(); return new ArrayList<>();
} }
@ -136,7 +136,7 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
Message msg = messageBuilder.parseMessage(message.asInputStream(theEncoder.charset())); Message msg = messageBuilder.parseMessage(message.asInputStream(theEncoder.charset()));
emails.add(extractEmail(msg)); emails.add(extractEmail(msg));
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Failed to get message from mbox: {0}", ex.getMessage()); logger.log(Level.WARNING, "Failed to get message from mbox: {0}", ex.getMessage()); //NON-NLS
failCount++; failCount++;
} }
} }
@ -236,7 +236,7 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
break; break;
} }
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Error getting text body of mbox message", ex); logger.log(Level.WARNING, "Error getting text body of mbox message", ex); //NON-NLS
} }
} }
@ -259,7 +259,7 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
addErrorMessage( addErrorMessage(
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"MboxParser.handleAttch.errMsg.failedToCreateOnDisk", filename)); "MboxParser.handleAttch.errMsg.failedToCreateOnDisk", filename));
logger.log(Level.INFO, "Failed to create file output stream for: " + outPath, ex); logger.log(Level.INFO, "Failed to create file output stream for: " + outPath, ex); //NON-NLS
return; return;
} }
@ -272,14 +272,14 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
// This could potentially be other types. Only seen this once. // This could potentially be other types. Only seen this once.
} }
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.INFO, "Failed to write mbox email attachment to disk.", ex); logger.log(Level.INFO, "Failed to write mbox email attachment to disk.", ex); //NON-NLS
addErrorMessage(NbBundle.getMessage(this.getClass(), "MboxParser.handleAttch.failedWriteToDisk", filename)); addErrorMessage(NbBundle.getMessage(this.getClass(), "MboxParser.handleAttch.failedWriteToDisk", filename));
return; return;
} finally { } finally {
try { try {
fos.close(); fos.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.INFO, "Failed to close file output stream", ex); logger.log(Level.INFO, "Failed to close file output stream", ex); //NON-NLS
} }
} }
@ -338,7 +338,7 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
try { try {
is = new BufferedInputStream(new FileInputStream(mboxFile)); is = new BufferedInputStream(new FileInputStream(mboxFile));
} catch (FileNotFoundException ex) { } catch (FileNotFoundException ex) {
logger.log(Level.WARNING, "Failed to find mbox file while detecting charset"); logger.log(Level.WARNING, "Failed to find mbox file while detecting charset"); //NON-NLS
return possibleEncoders; return possibleEncoders;
} }
@ -355,18 +355,18 @@ import org.sleuthkit.autopsy.ingest.IngestServices;
} }
return possibleEncoders; return possibleEncoders;
} catch (IOException | IllegalArgumentException ex) { } catch (IOException | IllegalArgumentException ex) {
logger.log(Level.WARNING, "Failed to detect charset of mbox file.", ex); logger.log(Level.WARNING, "Failed to detect charset of mbox file.", ex); //NON-NLS
return possibleEncoders; return possibleEncoders;
} finally { } finally {
try { try {
is.close(); is.close();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.INFO, "Failed to close input stream"); logger.log(Level.INFO, "Failed to close input stream"); //NON-NLS
} }
} }
} }
private void addErrorMessage(String msg) { private void addErrorMessage(String msg) {
errors.append("<li>").append(msg).append("</li>"); errors.append("<li>").append(msg).append("</li>"); //NON-NLS
} }
} }

View File

@ -88,11 +88,11 @@ class PstParser {
} }
return ParseResult.OK; return ParseResult.OK;
} catch (PSTException | IOException ex) { } catch (PSTException | IOException ex) {
String msg = file.getName() + ": Failed to create internal java-libpst PST file to parse:\n" + ex.getMessage(); String msg = file.getName() + ": Failed to create internal java-libpst PST file to parse:\n" + ex.getMessage(); //NON-NLS
logger.log(Level.WARNING, msg); logger.log(Level.WARNING, msg);
return ParseResult.ERROR; return ParseResult.ERROR;
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
logger.log(Level.INFO, "Found encrypted PST file."); logger.log(Level.INFO, "Found encrypted PST file."); //NON-NLS
return ParseResult.ENCRYPT; return ParseResult.ENCRYPT;
} }
} }
@ -130,7 +130,7 @@ class PstParser {
subFolders = folder.getSubFolders(); subFolders = folder.getSubFolders();
} catch (PSTException | IOException ex) { } catch (PSTException | IOException ex) {
subFolders = new ArrayList<>(); subFolders = new ArrayList<>();
logger.log(Level.INFO, "java-libpst exception while getting subfolders: {0}", ex.getMessage()); logger.log(Level.INFO, "java-libpst exception while getting subfolders: {0}", ex.getMessage()); //NON-NLS
} }
for (PSTFolder f : subFolders) { for (PSTFolder f : subFolders) {
@ -147,7 +147,7 @@ class PstParser {
} }
} catch (PSTException | IOException ex) { } catch (PSTException | IOException ex) {
failCount++; failCount++;
logger.log(Level.INFO, "java-libpst exception while getting emails from a folder: {0}", ex.getMessage()); logger.log(Level.INFO, "java-libpst exception while getting emails from a folder: {0}", ex.getMessage()); //NON-NLS
} }
} }
@ -174,7 +174,7 @@ class PstParser {
try { try {
rtf = msg.getRTFBody(); rtf = msg.getRTFBody();
} catch (PSTException | IOException ex) { } catch (PSTException | IOException ex) {
logger.log(Level.INFO, "Failed to get RTF content from pst email."); logger.log(Level.INFO, "Failed to get RTF content from pst email."); //NON-NLS
} }
email.setRtfBody(rtf); email.setRtfBody(rtf);
email.setLocalPath(localPath); email.setLocalPath(localPath);
@ -229,7 +229,7 @@ class PstParser {
addErrorMessage( addErrorMessage(
NbBundle.getMessage(this.getClass(), "PstParser.extractAttch.errMsg.failedToExtractToDisk", NbBundle.getMessage(this.getClass(), "PstParser.extractAttch.errMsg.failedToExtractToDisk",
filename)); filename));
logger.log(Level.WARNING, "Failed to extract attachment from pst file.", ex); logger.log(Level.WARNING, "Failed to extract attachment from pst file.", ex); //NON-NLS
} }
} }
} }
@ -294,12 +294,12 @@ class PstParser {
ByteBuffer bb = ByteBuffer.wrap(buffer); ByteBuffer bb = ByteBuffer.wrap(buffer);
return bb.getInt() == PST_HEADER; return bb.getInt() == PST_HEADER;
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.WARNING, "Exception while detecting if a file is a pst file."); logger.log(Level.WARNING, "Exception while detecting if a file is a pst file."); //NON-NLS
return false; return false;
} }
} }
private void addErrorMessage(String msg) { private void addErrorMessage(String msg) {
errors.append("<li>").append(msg).append("</li>"); errors.append("<li>").append(msg).append("</li>"); //NON-NLS
} }
} }

View File

@ -120,7 +120,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
File file = new File(fileName); File file = new File(fileName);
if (abstractFile.getSize() >= services.getFreeDiskSpace()) { if (abstractFile.getSize() >= services.getFreeDiskSpace()) {
logger.log(Level.WARNING, "Not enough disk space to write file to disk."); logger.log(Level.WARNING, "Not enough disk space to write file to disk."); //NON-NLS
IngestMessage msg = IngestMessage.createErrorMessage(EmailParserModuleFactory.getModuleName(), EmailParserModuleFactory.getModuleName(), IngestMessage msg = IngestMessage.createErrorMessage(EmailParserModuleFactory.getModuleName(), EmailParserModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processPst.errMsg.outOfDiskSpace", "ThunderbirdMboxFileIngestModule.processPst.errMsg.outOfDiskSpace",
@ -132,7 +132,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
try { try {
ContentUtils.writeToFile(abstractFile, file); ContentUtils.writeToFile(abstractFile, file);
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Failed writing pst file to disk.", ex); logger.log(Level.WARNING, "Failed writing pst file to disk.", ex); //NON-NLS
return ProcessResult.OK; return ProcessResult.OK;
} }
@ -150,7 +150,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
EmailParserModuleFactory.getModuleName(), EmailParserModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.encryptionFileLevel"))); NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.encryptionFileLevel")));
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.INFO, "Failed to add encryption attribute to file: {0}", abstractFile.getName()); logger.log(Level.INFO, "Failed to add encryption attribute to file: {0}", abstractFile.getName()); //NON-NLS
} }
} else { } else {
// parsing error: log message // parsing error: log message
@ -159,12 +159,12 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
abstractFile.getName()), abstractFile.getName()),
NbBundle.getMessage(this.getClass(), NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processPst.errProcFile.details")); "ThunderbirdMboxFileIngestModule.processPst.errProcFile.details"));
logger.log(Level.INFO, "PSTParser failed to parse {0}", abstractFile.getName()); logger.log(Level.INFO, "PSTParser failed to parse {0}", abstractFile.getName()); //NON-NLS
return ProcessResult.ERROR; return ProcessResult.ERROR;
} }
if (file.delete() == false) { if (file.delete() == false) {
logger.log(Level.INFO, "Failed to delete temp file: {0}", file.getName()); logger.log(Level.INFO, "Failed to delete temp file: {0}", file.getName()); //NON-NLS
} }
String errors = parser.getErrors(); String errors = parser.getErrors();
@ -190,20 +190,20 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
// use the local path to determine the e-mail folder structure // use the local path to determine the e-mail folder structure
String emailFolder = ""; String emailFolder = "";
// email folder is everything after "Mail" or ImapMail // email folder is everything after "Mail" or ImapMail
if (mboxParentDir.contains("/Mail/")) { if (mboxParentDir.contains("/Mail/")) { //NON-NLS
emailFolder = mboxParentDir.substring(mboxParentDir.indexOf("/Mail/") + 5); emailFolder = mboxParentDir.substring(mboxParentDir.indexOf("/Mail/") + 5); //NON-NLS
} else if (mboxParentDir.contains("/ImapMail/")) { } else if (mboxParentDir.contains("/ImapMail/")) { //NON-NLS
emailFolder = mboxParentDir.substring(mboxParentDir.indexOf("/ImapMail/") + 9); emailFolder = mboxParentDir.substring(mboxParentDir.indexOf("/ImapMail/") + 9); //NON-NLS
} }
emailFolder = emailFolder + mboxFileName; emailFolder = emailFolder + mboxFileName;
emailFolder = emailFolder.replaceAll(".sbd", ""); emailFolder = emailFolder.replaceAll(".sbd", ""); //NON-NLS
String fileName = getTempPath() + File.separator + abstractFile.getName() String fileName = getTempPath() + File.separator + abstractFile.getName()
+ "-" + String.valueOf(abstractFile.getId()); + "-" + String.valueOf(abstractFile.getId());
File file = new File(fileName); File file = new File(fileName);
if (abstractFile.getSize() >= services.getFreeDiskSpace()) { if (abstractFile.getSize() >= services.getFreeDiskSpace()) {
logger.log(Level.WARNING, "Not enough disk space to write file to disk."); logger.log(Level.WARNING, "Not enough disk space to write file to disk."); //NON-NLS
postErrorMessage( postErrorMessage(
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.processMBox.errProcFile.msg", NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.processMBox.errProcFile.msg",
abstractFile.getName()), abstractFile.getName()),
@ -215,7 +215,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
try { try {
ContentUtils.writeToFile(abstractFile, file); ContentUtils.writeToFile(abstractFile, file);
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Failed writing mbox file to disk.", ex); logger.log(Level.WARNING, "Failed writing mbox file to disk.", ex); //NON-NLS
return ProcessResult.OK; return ProcessResult.OK;
} }
@ -225,7 +225,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
processEmails(emails, abstractFile); processEmails(emails, abstractFile);
if (file.delete() == false) { if (file.delete() == false) {
logger.log(Level.INFO, "Failed to delete temp file: {0}", file.getName()); logger.log(Level.INFO, "Failed to delete temp file: {0}", file.getName()); //NON-NLS
} }
String errors = parser.getErrors(); String errors = parser.getErrors();
@ -245,7 +245,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
*/ */
public static String getTempPath() { public static String getTempPath() {
String tmpDir = Case.getCurrentCase().getTempDirectory() + File.separator String tmpDir = Case.getCurrentCase().getTempDirectory() + File.separator
+ "EmailParser"; + "EmailParser"; //NON-NLS
File dir = new File(tmpDir); File dir = new File(tmpDir);
if (dir.exists() == false) { if (dir.exists() == false) {
dir.mkdirs(); dir.mkdirs();
@ -383,7 +383,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i
if (localPath.isEmpty() == false) { if (localPath.isEmpty() == false) {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), EmailParserModuleFactory.getModuleName(), localPath)); bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), EmailParserModuleFactory.getModuleName(), localPath));
} else { } else {
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), EmailParserModuleFactory.getModuleName(), "/foo/bar")); bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH.getTypeID(), EmailParserModuleFactory.getModuleName(), "/foo/bar")); //NON-NLS
} }
try { try {