mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-02 09:15:56 +00:00
Merge remote-tracking branch 'upstream/develop' into 5537-file-encryption-handle-asec-files-better
This commit is contained in:
@@ -3,6 +3,7 @@ file.reference.apache-mime4j-core-0.8.2.jar=release\\modules\\ext\\apache-mime4j
|
||||
file.reference.apache-mime4j-dom-0.8.2.jar=release\\modules\\ext\\apache-mime4j-dom-0.8.2.jar
|
||||
file.reference.asm-7.0.jar=release\\modules\\ext\\asm-7.0.jar
|
||||
file.reference.bcmail-jdk15on-1.60.jar=release\\modules\\ext\\bcmail-jdk15on-1.60.jar
|
||||
file.reference.bcpkix-jdk15on-1.60.jar=release\\modules\\ext\\bcpkix-jdk15on-1.60.jar
|
||||
file.reference.bcprov-jdk15on-1.60.jar=release\\modules\\ext\\bcprov-jdk15on-1.60.jar
|
||||
file.reference.boilerpipe-1.1.0.jar=release\\modules\\ext\\boilerpipe-1.1.0.jar
|
||||
file.reference.c3p0-0.9.5.jar=release/modules/ext/c3p0-0.9.5.jar
|
||||
@@ -16,7 +17,6 @@ file.reference.commons-io-2.6.jar=release\\modules\\ext\\commons-io-2.6.jar
|
||||
file.reference.commons-lang3-3.8.1.jar=release\\modules\\ext\\commons-lang3-3.8.1.jar
|
||||
file.reference.commons-pool2-2.4.2.jar=release/modules/ext/commons-pool2-2.4.2.jar
|
||||
file.reference.cxf-rt-rs-client-3.3.0.jar=release\\modules\\ext\\cxf-rt-rs-client-3.3.0.jar
|
||||
file.reference.dd-plist-1.20.jar=release/modules/ext/dd-plist-1.20.jar
|
||||
file.reference.dec-0.1.2.jar=release\\modules\\ext\\dec-0.1.2.jar
|
||||
file.reference.fontbox-2.0.13.jar=release\\modules\\ext\\fontbox-2.0.13.jar
|
||||
file.reference.geoapi-3.0.1.jar=release\\modules\\ext\\geoapi-3.0.1.jar
|
||||
@@ -55,7 +55,7 @@ file.reference.mchange-commons-java-0.2.9.jar=release/modules/ext/mchange-common
|
||||
file.reference.metadata-extractor-2.11.0.jar=release\\modules\\ext\\metadata-extractor-2.11.0.jar
|
||||
file.reference.netcdf4-4.5.5.jar=release\\modules\\ext\\netcdf4-4.5.5.jar
|
||||
file.reference.openjson-1.0.10.jar=release\\modules\\ext\\openjson-1.0.10.jar
|
||||
file.reference.opennlp-tools-1.9.0.jar=release\\modules\\ext\\opennlp-tools-1.9.0.jar
|
||||
file.reference.opennlp-tools-1.9.1.jar=release\\modules\\ext\\opennlp-tools-1.9.1.jar
|
||||
file.reference.parso-2.0.10.jar=release\\modules\\ext\\parso-2.0.10.jar
|
||||
file.reference.pdfbox-2.0.13.jar=release\\modules\\ext\\pdfbox-2.0.13.jar
|
||||
file.reference.pdfbox-tools-2.0.13.jar=release\\modules\\ext\\pdfbox-tools-2.0.13.jar
|
||||
|
||||
@@ -350,49 +350,29 @@
|
||||
<binary-origin>release\modules\ext\commons-lang3-3.8.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jempbox-1.8.16.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jempbox-1.8.16.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackcess-2.2.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackcess-2.2.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jericho-html-3.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jericho-html-3.3.jar</binary-origin>
|
||||
<runtime-relative-path>ext/gax-grpc-1.44.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/gax-grpc-1.44.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/cdm-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\cdm-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpservices-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\httpservices-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/xz-1.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\xz-1.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-validator-1.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-validator-1.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sis-utility-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\sis-utility-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jna-5.1.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jna-5.1.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/opencensus-api-0.19.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/opencensus-api-0.19.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/gax-httpjson-0.61.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/gax-httpjson-0.61.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/boilerpipe-1.1.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\boilerpipe-1.1.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jbig2-imageio-3.0.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jbig2-imageio-3.0.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jsoup-1.11.3.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jsoup-1.11.3.jar</binary-origin>
|
||||
@@ -401,22 +381,10 @@
|
||||
<runtime-relative-path>ext/sevenzipjbinding.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sevenzipjbinding.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/apache-mime4j-dom-0.8.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\apache-mime4j-dom-0.8.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/mchange-commons-java-0.2.9.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/mchange-commons-java-0.2.9.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/pdfbox-2.0.13.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\pdfbox-2.0.13.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/xmlbeans-3.0.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\xmlbeans-3.0.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackson-databind-2.9.7.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackson-databind-2.9.7.jar</binary-origin>
|
||||
@@ -425,41 +393,33 @@
|
||||
<runtime-relative-path>ext/jai-imageio-core-1.4.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jai-imageio-core-1.4.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/api-common-1.7.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/api-common-1.7.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jcl-over-slf4j-1.7.25.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jcl-over-slf4j-1.7.25.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/curator-recipes-2.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/curator-recipes-2.8.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/okhttp-2.7.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/okhttp-2.7.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/tika-core-1.20.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\tika-core-1.20.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/tagsoup-1.2.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\tagsoup-1.2.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/StixLib.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/StixLib.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackson-core-2.9.7.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackson-core-2.9.7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sis-metadata-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\sis-metadata-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/bcprov-jdk15on-1.60.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\bcprov-jdk15on-1.60.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/parso-2.0.10.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\parso-2.0.10.jar</binary-origin>
|
||||
<runtime-relative-path>ext/google-auth-library-credentials-0.15.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-auth-library-credentials-0.15.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/json-simple-1.1.1.jar</runtime-relative-path>
|
||||
@@ -473,18 +433,10 @@
|
||||
<runtime-relative-path>ext/commons-codec-1.11.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-codec-1.11.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/apache-mime4j-core-0.8.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\apache-mime4j-core-0.8.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jmatio-1.5.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jmatio-1.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sleuthkit-postgresql-4.6.7.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sleuthkit-postgresql-4.6.7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/tika-parsers-1.20.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\tika-parsers-1.20.jar</binary-origin>
|
||||
@@ -497,18 +449,10 @@
|
||||
<runtime-relative-path>ext/commons-pool2-2.4.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-pool2-2.4.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-io-2.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-io-2.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jdom-2.0.5-contrib.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jdom-2.0.5-contrib.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/SparseBitSet-1.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/SparseBitSet-1.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/openjson-1.0.10.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\openjson-1.0.10.jar</binary-origin>
|
||||
@@ -517,38 +461,18 @@
|
||||
<runtime-relative-path>ext/isoparser-1.1.22.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\isoparser-1.1.22.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/c3p0-0.9.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/c3p0-0.9.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/xmpcore-5.1.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/xmpcore-5.1.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/zookeeper-3.4.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/zookeeper-3.4.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/javax.activation-1.2.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\javax.activation-1.2.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-csv-1.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-csv-1.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jdom-2.0.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jdom-2.0.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/rome-1.12.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\rome-1.12.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackson-annotations-2.9.7.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackson-annotations-2.9.7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/javax.annotation-api-1.3.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\javax.annotation-api-1.3.2.jar</binary-origin>
|
||||
@@ -557,49 +481,25 @@
|
||||
<runtime-relative-path>ext/vorbis-java-core-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\vorbis-java-core-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/netcdf4-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\netcdf4-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/java-libpst-0.8.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\java-libpst-0.8.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/opennlp-tools-1.9.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\opennlp-tools-1.9.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sis-netcdf-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\sis-netcdf-0.8.jar</binary-origin>
|
||||
<runtime-relative-path>ext/okio-1.6.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/okio-1.6.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/curator-framework-2.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/curator-framework-2.8.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sentiment-analysis-parser-0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\sentiment-analysis-parser-0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-collections4-4.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-collections4-4.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-dbcp2-2.1.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-dbcp2-2.1.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jgraphx-v3.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jgraphx-v3.8.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/juniversalchardet-1.0.3.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\juniversalchardet-1.0.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jython-standalone-2.7.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jython-standalone-2.7.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/google-http-client-appengine-1.29.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-http-client-appengine-1.29.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/uimafit-core-2.4.0.jar</runtime-relative-path>
|
||||
@@ -609,26 +509,30 @@
|
||||
<runtime-relative-path>ext/jackcess-encrypt-2.1.4.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackcess-encrypt-2.1.4.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jhighlight-1.0.3.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jhighlight-1.0.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/junrar-2.0.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\junrar-2.0.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jul-to-slf4j-1.7.25.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jul-to-slf4j-1.7.25.jar</binary-origin>
|
||||
<runtime-relative-path>ext/google-http-client-1.29.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-http-client-1.29.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/postgresql-9.4.1211.jre7.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/postgresql-9.4.1211.jre7.jar</binary-origin>
|
||||
<runtime-relative-path>ext/bcpkix-jdk15on-1.60.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\bcpkix-jdk15on-1.60.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/opennlp-tools-1.9.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\opennlp-tools-1.9.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/slf4j-api-1.7.25.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\slf4j-api-1.7.25.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-cloud-core-1.70.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-cloud-core-1.70.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/geoapi-3.0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\geoapi-3.0.1.jar</binary-origin>
|
||||
@@ -641,18 +545,10 @@
|
||||
<runtime-relative-path>ext/jdom2-2.0.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jdom2-2.0.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpclient-4.5.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\httpclient-4.5.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/uimaj-core-3.0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\uimaj-core-3.0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/curator-client-2.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/curator-client-2.8.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sqlite-jdbc-3.25.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sqlite-jdbc-3.25.2.jar</binary-origin>
|
||||
@@ -670,65 +566,133 @@
|
||||
<binary-origin>release\modules\ext\grib-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/fontbox-2.0.13.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\fontbox-2.0.13.jar</binary-origin>
|
||||
<runtime-relative-path>ext/gax-1.44.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/gax-1.44.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/activemq-all-5.11.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/activemq-all-5.11.1.jar</binary-origin>
|
||||
<runtime-relative-path>ext/jempbox-1.8.16.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jempbox-1.8.16.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/dec-0.1.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\dec-0.1.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/Rejistry-1.1-SNAPSHOT.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/Rejistry-1.1-SNAPSHOT.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/dd-plist-1.20.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/dd-plist-1.20.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sevenzipjbinding-AllPlatforms.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sevenzipjbinding-AllPlatforms.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/bcmail-jdk15on-1.60.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\bcmail-jdk15on-1.60.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/vorbis-java-tika-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\vorbis-java-tika-0.8.jar</binary-origin>
|
||||
<runtime-relative-path>ext/jackcess-2.2.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackcess-2.2.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/grpc-context-1.19.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/grpc-context-1.19.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/gax-grpc-1.44.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/gax-grpc-1.44.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/jericho-html-3.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jericho-html-3.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/opencensus-api-0.19.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/opencensus-api-0.19.2.jar</binary-origin>
|
||||
<runtime-relative-path>ext/httpservices-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\httpservices-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/gax-httpjson-0.61.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/gax-httpjson-0.61.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/xz-1.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\xz-1.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/api-common-1.7.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/api-common-1.7.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/commons-validator-1.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-validator-1.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-auth-library-credentials-0.15.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-auth-library-credentials-0.15.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/jna-5.1.0.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jna-5.1.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jbig2-imageio-3.0.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jbig2-imageio-3.0.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sleuthkit-postgresql-4.6.7.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sleuthkit-postgresql-4.6.7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/apache-mime4j-dom-0.8.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\apache-mime4j-dom-0.8.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/pdfbox-2.0.13.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\pdfbox-2.0.13.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/xmlbeans-3.0.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\xmlbeans-3.0.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/curator-recipes-2.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/curator-recipes-2.8.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/tagsoup-1.2.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\tagsoup-1.2.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackson-core-2.9.7.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackson-core-2.9.7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sis-metadata-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\sis-metadata-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/parso-2.0.10.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\parso-2.0.10.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/apache-mime4j-core-0.8.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\apache-mime4j-core-0.8.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-io-2.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-io-2.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/SparseBitSet-1.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/SparseBitSet-1.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/c3p0-0.9.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/c3p0-0.9.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/zookeeper-3.4.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/zookeeper-3.4.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-csv-1.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-csv-1.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jdom-2.0.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jdom-2.0.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jackson-annotations-2.9.7.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jackson-annotations-2.9.7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-api-client-1.27.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-api-client-1.27.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/netcdf4-4.5.5.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\netcdf4-4.5.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sis-netcdf-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\sis-netcdf-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/sentiment-analysis-parser-0.1.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\sentiment-analysis-parser-0.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/commons-collections4-4.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\commons-collections4-4.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/opencensus-contrib-http-util-0.19.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/opencensus-contrib-http-util-0.19.2.jar</binary-origin>
|
||||
@@ -738,21 +702,57 @@
|
||||
<binary-origin>release/modules/ext/google-auth-library-oauth2-http-0.15.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-http-client-appengine-1.29.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-http-client-appengine-1.29.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/jgraphx-v3.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jgraphx-v3.8.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-http-client-1.29.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-http-client-1.29.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/juniversalchardet-1.0.3.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\juniversalchardet-1.0.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-cloud-core-1.70.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-cloud-core-1.70.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/jython-standalone-2.7.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jython-standalone-2.7.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jhighlight-1.0.3.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jhighlight-1.0.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jul-to-slf4j-1.7.25.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\jul-to-slf4j-1.7.25.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/postgresql-9.4.1211.jre7.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/postgresql-9.4.1211.jre7.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/httpclient-4.5.6.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\httpclient-4.5.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/curator-client-2.8.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/curator-client-2.8.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/fontbox-2.0.13.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\fontbox-2.0.13.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/activemq-all-5.11.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/activemq-all-5.11.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-cloud-core-http-1.70.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-cloud-core-http-1.70.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/Rejistry-1.1-SNAPSHOT.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/Rejistry-1.1-SNAPSHOT.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/dec-0.1.2.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\dec-0.1.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-http-client-jackson2-1.29.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-http-client-jackson2-1.29.0.jar</binary-origin>
|
||||
@@ -766,20 +766,20 @@
|
||||
<binary-origin>release/modules/ext/google-cloud-translate-1.70.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/gax-1.44.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/gax-1.44.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/sevenzipjbinding-AllPlatforms.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/sevenzipjbinding-AllPlatforms.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/google-api-services-translate-v2-rev20170525-1.27.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/google-api-services-translate-v2-rev20170525-1.27.0.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/okhttp-2.7.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/okhttp-2.7.5.jar</binary-origin>
|
||||
<runtime-relative-path>ext/bcmail-jdk15on-1.60.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\bcmail-jdk15on-1.60.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/okio-1.6.0.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/okio-1.6.0.jar</binary-origin>
|
||||
<runtime-relative-path>ext/vorbis-java-tika-0.8.jar</runtime-relative-path>
|
||||
<binary-origin>release\modules\ext\vorbis-java-tika-0.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
</data>
|
||||
</configuration>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
|
||||
/**
|
||||
* Class for methods to check if access should be limited to a feature
|
||||
*
|
||||
*/
|
||||
final class AccessLimiterUtils {
|
||||
|
||||
private final static String MULTI_USER_ACCESS_FILE_NAME = "mualimit"; // NON-NLS
|
||||
private final static String MULTI_USER_ACCESS_FILE_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), MULTI_USER_ACCESS_FILE_NAME).toString();
|
||||
|
||||
/**
|
||||
* Check if privileges regarding multi-user cases should be restricted.
|
||||
*
|
||||
* @return True if privileges should be restricted, false otherwise.
|
||||
*/
|
||||
static boolean limitMultiUserAccess() {
|
||||
return new File(MULTI_USER_ACCESS_FILE_PATH).exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* Private constructor for a utility class
|
||||
*/
|
||||
private AccessLimiterUtils() {
|
||||
//private constructer left empty intentionally
|
||||
}
|
||||
}
|
||||
@@ -1049,7 +1049,7 @@ public class Case {
|
||||
/*
|
||||
* Enable the case-specific actions.
|
||||
*/
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(Case.getCurrentCase().getMetadata().getCaseType() == CaseType.SINGLE_USER_CASE || !AccessLimiterUtils.limitMultiUserAccess());
|
||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseDetailsAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(DataSourceSummaryAction.class).setEnabled(true);
|
||||
|
||||
@@ -61,7 +61,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
*/
|
||||
void readSettings() {
|
||||
caseNameTextField.setText("");
|
||||
if (UserPreferences.getIsMultiUserModeEnabled()) {
|
||||
if (UserPreferences.getIsMultiUserModeEnabled() && !AccessLimiterUtils.limitMultiUserAccess()) {
|
||||
multiUserCaseRadioButton.setEnabled(true);
|
||||
multiUserCaseRadioButton.setSelected(true);
|
||||
} else {
|
||||
|
||||
@@ -80,7 +80,7 @@ public class Services implements Closeable {
|
||||
/**
|
||||
* Gets the artifacts blackboard for the current case.
|
||||
*
|
||||
* @return @org.sleuthkit.datamodel.Blackboard Blackboard for the current
|
||||
* @return org.sleuthkit.datamodel.Blackboard Blackboard for the current
|
||||
* case.
|
||||
*/
|
||||
public org.sleuthkit.datamodel.Blackboard getArtifactsBlackboard() {
|
||||
|
||||
@@ -2,16 +2,12 @@ OpenIDE-Module-Name=CommandLineAutopsy
|
||||
OptionsCategory_Keywords_Command_Line_Ingest_Settings=Command Line Ingest Settings
|
||||
OptionsCategory_Keywords_General=Options
|
||||
OptionsCategory_Name_Command_Line_Ingest=Command Line Ingest
|
||||
CommandLineIngestSettingsPanel.ResultsDirectoryUnspecified=Output folder must be set
|
||||
CommandLineIngestSettingsPanel.PathInvalid=Path is not valid
|
||||
CommandLineIngestSettingsPanel.CannotAccess=Cannot access
|
||||
CommandLineIngestSettingsPanel.CheckPermissions=Check permissions.
|
||||
CommandLineIngestSettingsPanel.jLabelSelectOutputFolder.text=Select output folder:
|
||||
CommandLineIngestSettingsPanel.jLabelInvalidResultsFolder.text=jLabelInvalidOutputFolder
|
||||
CommandLineIngestSettingsPanel.outputPathTextField.toolTipText=Output folder for command line processing, i.e., the location where case folder will be created by command line processing mode.
|
||||
CommandLineIngestSettingsPanel.outputPathTextField.text=
|
||||
CommandLineIngestSettingsPanel.browseOutputFolderButton.text=Browse
|
||||
CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText=Ingest job settings for the command line processing mode context.
|
||||
CommandLineIngestSettingsPanel.bnEditIngestSettings.text=Ingest Module Settings
|
||||
CommandLinePanel.jLabel1.text=Ingest is running from command line
|
||||
CommandLineStartupWindow.title.text=Running in Command Line Mode
|
||||
CommandLineIngestSettingsPanel.bnEditReportSettings.actionCommand=Report Module Settings
|
||||
CommandLineIngestSettingsPanel.bnEditReportSettings.toolTipText=Report generation settings for the command line processing mode context.
|
||||
CommandLineIngestSettingsPanel.bnEditReportSettings.text=Report Module Settings
|
||||
CommandLineIngestSettingsPanel.jLabelReportConfig.text=Configure Report Generation for Command Line Ingest:
|
||||
CommandLineIngestSettingsPanel.jLabelBaselineConfig.text=Configure Baseline Configuration for Command Line Ingest:
|
||||
|
||||
@@ -2,16 +2,12 @@ OpenIDE-Module-Name=CommandLineAutopsy
|
||||
OptionsCategory_Keywords_Command_Line_Ingest_Settings=Command Line Ingest Settings
|
||||
OptionsCategory_Keywords_General=Options
|
||||
OptionsCategory_Name_Command_Line_Ingest=Command Line Ingest
|
||||
CommandLineIngestSettingsPanel.ResultsDirectoryUnspecified=Output folder must be set
|
||||
CommandLineIngestSettingsPanel.PathInvalid=Path is not valid
|
||||
CommandLineIngestSettingsPanel.CannotAccess=Cannot access
|
||||
CommandLineIngestSettingsPanel.CheckPermissions=Check permissions.
|
||||
CommandLineIngestSettingsPanel.jLabelSelectOutputFolder.text=Select output folder:
|
||||
CommandLineIngestSettingsPanel.jLabelInvalidResultsFolder.text=jLabelInvalidOutputFolder
|
||||
CommandLineIngestSettingsPanel.outputPathTextField.toolTipText=Output folder for command line processing, i.e., the location where case folder will be created by command line processing mode.
|
||||
CommandLineIngestSettingsPanel.outputPathTextField.text=
|
||||
CommandLineIngestSettingsPanel.browseOutputFolderButton.text=Browse
|
||||
CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText=Ingest job settings for the command line processing mode context.
|
||||
CommandLineIngestSettingsPanel.bnEditIngestSettings.text=Ingest Module Settings
|
||||
CommandLinePanel.jLabel1.text=Ingest is running from command line
|
||||
CommandLineStartupWindow.title.text=Running in Command Line Mode
|
||||
CommandLineIngestSettingsPanel.bnEditReportSettings.actionCommand=Report Module Settings
|
||||
CommandLineIngestSettingsPanel.bnEditReportSettings.toolTipText=Report generation settings for the command line processing mode context.
|
||||
CommandLineIngestSettingsPanel.bnEditReportSettings.text=Report Module Settings
|
||||
CommandLineIngestSettingsPanel.jLabelReportConfig.text=Configure Report Generation for Command Line Ingest:
|
||||
CommandLineIngestSettingsPanel.jLabelBaselineConfig.text=Configure Baseline Configuration for Command Line Ingest:
|
||||
|
||||
82
Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineCommand.java
Executable file
82
Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineCommand.java
Executable file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019-2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.commandlineingest;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Class that contains list of input parameters passed in via command line.
|
||||
*/
|
||||
class CommandLineCommand {
|
||||
|
||||
/**
|
||||
* An enumeration of command types.
|
||||
*/
|
||||
static enum CommandType {
|
||||
CREATE_CASE,
|
||||
ADD_DATA_SOURCE,
|
||||
RUN_INGEST,
|
||||
LIST_ALL_DATA_SOURCES,
|
||||
GENERATE_REPORTS;
|
||||
}
|
||||
|
||||
/**
|
||||
* An enumeration of input types.
|
||||
*/
|
||||
static enum InputType {
|
||||
CASE_NAME,
|
||||
CASES_BASE_DIR_PATH,
|
||||
CASE_FOLDER_PATH,
|
||||
DATA_SOURCE_PATH,
|
||||
DATA_SOURCE_ID,
|
||||
INGEST_PROFILE_NAME;
|
||||
}
|
||||
|
||||
private final CommandType type;
|
||||
private final Map<String, String> inputs = new HashMap<>();
|
||||
|
||||
CommandLineCommand(CommandType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an parameter to the command.
|
||||
*
|
||||
* @param inputName Input parameter name
|
||||
* @param inputValue Input parameter value
|
||||
*/
|
||||
void addInputValue(String inputName, String inputValue) {
|
||||
inputs.put(inputName, inputValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the inputs
|
||||
*/
|
||||
Map<String, String> getInputs() {
|
||||
return inputs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the type
|
||||
*/
|
||||
CommandType getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,14 @@ import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import org.netbeans.spi.sendopts.OptionProcessor;
|
||||
@@ -38,9 +41,11 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseActionException;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseDetails;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseMetadata;
|
||||
import static org.sleuthkit.autopsy.casemodule.CaseMetadata.getFileExtension;
|
||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
|
||||
import static org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS;
|
||||
import static org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult.NO_ERRORS;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.TimeStampUtils;
|
||||
@@ -54,21 +59,26 @@ import org.sleuthkit.autopsy.ingest.IngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobStartResult;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleError;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
import org.sleuthkit.autopsy.report.caseuco.CaseUcoFormatExporter;
|
||||
import org.sleuthkit.autopsy.report.caseuco.ReportCaseUco;
|
||||
import org.sleuthkit.autopsy.ingest.IngestProfiles;
|
||||
import org.sleuthkit.autopsy.modules.interestingitems.FilesSet;
|
||||
import org.sleuthkit.autopsy.modules.interestingitems.FilesSetsManager;
|
||||
import org.sleuthkit.autopsy.report.infrastructure.ReportProgressLogger;
|
||||
import org.sleuthkit.autopsy.report.infrastructure.ReportGenerator;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* Allows Autopsy to be invoked with a command line arguments. Causes Autopsy to
|
||||
* create a case, add a specified data source, run ingest on that data source,
|
||||
* produce a CASE/UCO report and exit.
|
||||
* create a case, add a specified data source, run ingest on that data source,
|
||||
* list all data source in a case, generate reports.
|
||||
*/
|
||||
public class CommandLineIngestManager {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(CommandLineIngestManager.class.getName());
|
||||
private static final Set<IngestManager.IngestJobEvent> INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.CANCELLED, IngestManager.IngestJobEvent.COMPLETED);
|
||||
private Path rootOutputDirectory;
|
||||
private Case caseForJob = null;
|
||||
private AutoIngestDataSource dataSource = null;
|
||||
private static final String LOG_DIR_NAME = "Command Output";
|
||||
|
||||
public CommandLineIngestManager() {
|
||||
}
|
||||
@@ -103,6 +113,10 @@ public class CommandLineIngestManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests the list of command line commands from command line options
|
||||
* processor and executes the commands one by one.
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
LOGGER.log(Level.INFO, "Job processing task started");
|
||||
@@ -110,8 +124,7 @@ public class CommandLineIngestManager {
|
||||
try {
|
||||
// read command line inputs
|
||||
LOGGER.log(Level.INFO, "Autopsy is running from command line"); //NON-NLS
|
||||
String dataSourcePath = "";
|
||||
String baseCaseName = "";
|
||||
List<CommandLineCommand> commands = null;
|
||||
|
||||
// first look up all OptionProcessors and get input data from CommandLineOptionProcessor
|
||||
Collection<? extends OptionProcessor> optionProcessors = Lookup.getDefault().lookupAll(OptionProcessor.class);
|
||||
@@ -120,86 +133,172 @@ public class CommandLineIngestManager {
|
||||
// find CommandLineOptionProcessor
|
||||
OptionProcessor processor = optionsIterator.next();
|
||||
if (processor instanceof CommandLineOptionProcessor) {
|
||||
// check if we are running from command line
|
||||
dataSourcePath = ((CommandLineOptionProcessor) processor).getPathToDataSource();
|
||||
baseCaseName = ((CommandLineOptionProcessor) processor).getBaseCaseName();
|
||||
// check if we are running from command line
|
||||
commands = ((CommandLineOptionProcessor) processor).getCommands();
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER.log(Level.INFO, "Data source path = {0}", dataSourcePath); //NON-NLS
|
||||
LOGGER.log(Level.INFO, "Case name = {0}", baseCaseName); //NON-NLS
|
||||
System.out.println("Data source path = " + dataSourcePath);
|
||||
System.out.println("Case name = " + baseCaseName);
|
||||
|
||||
// verify inputs
|
||||
if (dataSourcePath.isEmpty()) {
|
||||
LOGGER.log(Level.SEVERE, "Data source path not specified");
|
||||
System.out.println("Data source path not specified");
|
||||
if (commands == null || commands.isEmpty()) {
|
||||
LOGGER.log(Level.SEVERE, "No command line commands specified");
|
||||
System.err.println("No command line commands specified");
|
||||
return;
|
||||
}
|
||||
|
||||
if (baseCaseName.isEmpty()) {
|
||||
LOGGER.log(Level.SEVERE, "Case name not specified");
|
||||
System.out.println("Case name not specified");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(new File(dataSourcePath).exists())) {
|
||||
LOGGER.log(Level.SEVERE, "Data source file not found {0}", dataSourcePath);
|
||||
System.out.println("Data source file not found " + dataSourcePath);
|
||||
return;
|
||||
}
|
||||
|
||||
// read options panel configuration
|
||||
String rootOutputDir = UserPreferences.getCommandLineModeResultsFolder();
|
||||
LOGGER.log(Level.INFO, "Output directory = {0}", rootOutputDir); //NON-NLS
|
||||
System.out.println("Output directory = " + rootOutputDir);
|
||||
|
||||
if (rootOutputDir.isEmpty()) {
|
||||
LOGGER.log(Level.SEVERE, "Output directory not specified, please configure Command Line Options Panel (in Tools -> Options)");
|
||||
System.out.println("Output directory not specified, please configure Command Line Options Panel (in Tools -> Options)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(new File(rootOutputDir).exists())) {
|
||||
LOGGER.log(Level.SEVERE, "The output directory doesn't exist {0}", rootOutputDir);
|
||||
System.out.println("The output directory doesn't exist " + rootOutputDir);
|
||||
return;
|
||||
}
|
||||
rootOutputDirectory = Paths.get(rootOutputDir);
|
||||
|
||||
// open case
|
||||
Case caseForJob;
|
||||
try {
|
||||
caseForJob = openCase(baseCaseName);
|
||||
} catch (CaseActionException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error creating or opening case " + baseCaseName, ex);
|
||||
System.out.println("Error creating or opening case " + baseCaseName);
|
||||
return;
|
||||
}
|
||||
// Commands are already stored in order in which they should be executed
|
||||
for (CommandLineCommand command : commands) {
|
||||
CommandLineCommand.CommandType type = command.getType();
|
||||
switch (type) {
|
||||
case CREATE_CASE:
|
||||
try {
|
||||
LOGGER.log(Level.INFO, "Processing 'Create Case' command");
|
||||
System.out.println("Processing 'Create Case' command");
|
||||
Map<String, String> inputs = command.getInputs();
|
||||
String baseCaseName = inputs.get(CommandLineCommand.InputType.CASE_NAME.name());
|
||||
String rootOutputDirectory = inputs.get(CommandLineCommand.InputType.CASES_BASE_DIR_PATH.name());
|
||||
openCase(baseCaseName, rootOutputDirectory);
|
||||
|
||||
if (caseForJob == null) {
|
||||
LOGGER.log(Level.SEVERE, "Error creating or opening case {0}", baseCaseName);
|
||||
System.out.println("Error creating or opening case " + baseCaseName);
|
||||
return;
|
||||
}
|
||||
String outputDirPath = getOutputDirPath(caseForJob);
|
||||
OutputGenerator.saveCreateCaseOutput(caseForJob, outputDirPath, baseCaseName);
|
||||
} catch (CaseActionException ex) {
|
||||
String baseCaseName = command.getInputs().get(CommandLineCommand.InputType.CASE_NAME.name());
|
||||
LOGGER.log(Level.SEVERE, "Error creating or opening case " + baseCaseName, ex);
|
||||
System.err.println("Error creating or opening case " + baseCaseName);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case ADD_DATA_SOURCE:
|
||||
try {
|
||||
LOGGER.log(Level.INFO, "Processing 'Add Data Source' command");
|
||||
System.out.println("Processing 'Add Data Source' command");
|
||||
Map<String, String> inputs = command.getInputs();
|
||||
|
||||
AutoIngestDataSource dataSource = new AutoIngestDataSource("", Paths.get(dataSourcePath));
|
||||
try {
|
||||
// run data source processor
|
||||
runDataSourceProcessor(caseForJob, dataSource);
|
||||
// open the case, if it hasn't been already opened by CREATE_CASE command
|
||||
if (caseForJob == null) {
|
||||
String caseDirPath = inputs.get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
openCase(caseDirPath);
|
||||
}
|
||||
|
||||
// run ingest manager
|
||||
analyze(dataSource);
|
||||
String dataSourcePath = inputs.get(CommandLineCommand.InputType.DATA_SOURCE_PATH.name());
|
||||
dataSource = new AutoIngestDataSource("", Paths.get(dataSourcePath));
|
||||
runDataSourceProcessor(caseForJob, dataSource);
|
||||
|
||||
// generate CASE-UCO report
|
||||
Long selectedDataSourceId = getDataSourceId(dataSource);
|
||||
Path reportFolderPath = Paths.get(caseForJob.getReportDirectory(), "CASE-UCO", "Data_Source_ID_" + selectedDataSourceId.toString() + "_" + TimeStampUtils.createTimeStamp(), ReportCaseUco.getReportFileName()); //NON_NLS
|
||||
ReportProgressPanel progressPanel = new ReportProgressPanel("CASE_UCO", rootOutputDir); // dummy progress panel
|
||||
CaseUcoFormatExporter.generateReport(selectedDataSourceId, reportFolderPath.toString(), progressPanel);
|
||||
} catch (InterruptedException | AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException | AnalysisStartupException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to ingest data source " + dataSourcePath + ". Exiting...", ex);
|
||||
System.out.println("Unable to ingest data source " + dataSourcePath + ". Exiting...");
|
||||
String outputDirPath = getOutputDirPath(caseForJob);
|
||||
OutputGenerator.saveAddDataSourceOutput(caseForJob, dataSource, outputDirPath);
|
||||
} catch (InterruptedException | AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException | CaseActionException ex) {
|
||||
String dataSourcePath = command.getInputs().get(CommandLineCommand.InputType.DATA_SOURCE_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error adding data source " + dataSourcePath, ex);
|
||||
System.err.println("Error adding data source " + dataSourcePath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case RUN_INGEST:
|
||||
try {
|
||||
LOGGER.log(Level.INFO, "Processing 'Run Ingest' command");
|
||||
System.out.println("Processing 'Run Ingest' command");
|
||||
Map<String, String> inputs = command.getInputs();
|
||||
|
||||
// open the case, if it hasn't been already opened by CREATE_CASE or ADD_DATA_SOURCE commands
|
||||
if (caseForJob == null) {
|
||||
String caseDirPath = inputs.get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
openCase(caseDirPath);
|
||||
}
|
||||
|
||||
// populate the AutoIngestDataSource structure, if that hasn't been done by ADD_DATA_SOURCE command
|
||||
if (dataSource == null) {
|
||||
|
||||
String dataSourceId = inputs.get(CommandLineCommand.InputType.DATA_SOURCE_ID.name());
|
||||
Long dataSourceObjId = Long.valueOf(dataSourceId);
|
||||
|
||||
// get Content object for the data source
|
||||
Content content = null;
|
||||
try {
|
||||
content = Case.getCurrentCaseThrows().getSleuthkitCase().getContentById(dataSourceObjId);
|
||||
} catch (TskCoreException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Exception while trying to find data source with object ID " + dataSourceId, ex);
|
||||
System.err.println("Exception while trying to find data source with object ID " + dataSourceId);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
|
||||
if (content == null) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to find data source with object ID {0}", dataSourceId);
|
||||
System.out.println("Unable to find data source with object ID " + dataSourceId);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
|
||||
// populate the AutoIngestDataSource structure
|
||||
dataSource = new AutoIngestDataSource("", Paths.get(content.getName()));
|
||||
List<Content> contentList = Arrays.asList(new Content[]{content});
|
||||
List<String> errorList = new ArrayList<>();
|
||||
dataSource.setDataSourceProcessorOutput(NO_ERRORS, errorList, contentList);
|
||||
}
|
||||
|
||||
// run ingest
|
||||
String ingestProfile = inputs.get(CommandLineCommand.InputType.INGEST_PROFILE_NAME.name());
|
||||
analyze(dataSource, ingestProfile);
|
||||
} catch (InterruptedException | CaseActionException ex) {
|
||||
String dataSourcePath = command.getInputs().get(CommandLineCommand.InputType.DATA_SOURCE_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error running ingest on data source " + dataSourcePath, ex);
|
||||
System.err.println("Error running ingest on data source " + dataSourcePath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case LIST_ALL_DATA_SOURCES:
|
||||
try {
|
||||
LOGGER.log(Level.INFO, "Processing 'List All Data Sources' command");
|
||||
System.out.println("Processing 'List All Data Sources' command");
|
||||
Map<String, String> inputs = command.getInputs();
|
||||
|
||||
// open the case, if it hasn't been already opened by previous command
|
||||
if (caseForJob == null) {
|
||||
String caseDirPath = inputs.get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
openCase(caseDirPath);
|
||||
}
|
||||
|
||||
String outputDirPath = getOutputDirPath(caseForJob);
|
||||
OutputGenerator.listAllDataSources(caseForJob, outputDirPath);
|
||||
} catch (CaseActionException ex) {
|
||||
String caseDirPath = command.getInputs().get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error opening case in case directory: " + caseDirPath, ex);
|
||||
System.err.println("Error opening case in case directory: " + caseDirPath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case GENERATE_REPORTS:
|
||||
try {
|
||||
LOGGER.log(Level.INFO, "Processing 'Generate Reports' command");
|
||||
System.out.println("Processing 'Generate Reports' command");
|
||||
Map<String, String> inputs = command.getInputs();
|
||||
|
||||
// open the case, if it hasn't been already opened by previous command
|
||||
if (caseForJob == null) {
|
||||
String caseDirPath = inputs.get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
openCase(caseDirPath);
|
||||
}
|
||||
|
||||
// generate reports
|
||||
ReportGenerator generator = new ReportGenerator(CommandLineIngestSettingsPanel.getReportingConfigName(), new ReportProgressLogger()); //NON-NLS
|
||||
generator.generateReports();
|
||||
} catch (CaseActionException ex) {
|
||||
String caseDirPath = command.getInputs().get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
|
||||
LOGGER.log(Level.SEVERE, "Error opening case in case directory: " + caseDirPath, ex);
|
||||
System.err.println("Error opening case in case directory: " + caseDirPath);
|
||||
// Do not process any other commands
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
/*
|
||||
* Unexpected runtime exceptions firewall. This task is
|
||||
@@ -208,15 +307,15 @@ public class CommandLineIngestManager {
|
||||
* Future<Void>, so this ensures that such errors get
|
||||
* logged.
|
||||
*/
|
||||
LOGGER.log(Level.SEVERE, "Unexpected error while ingesting data source " + dataSourcePath, ex);
|
||||
System.out.println("Unexpected error while ingesting data source " + dataSourcePath + ". Exiting...");
|
||||
LOGGER.log(Level.SEVERE, "Unexpected error", ex);
|
||||
System.err.println("Unexpected error. Exiting...");
|
||||
|
||||
} finally {
|
||||
try {
|
||||
Case.closeCurrentCase();
|
||||
} catch (CaseActionException ex) {
|
||||
LOGGER.log(Level.WARNING, "Exception while closing case", ex);
|
||||
System.out.println("Exception while closing case");
|
||||
System.err.println("Exception while closing case");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,29 +329,24 @@ public class CommandLineIngestManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides object ID of the data source by reading it from Content
|
||||
* object.
|
||||
* Creates a new case using arguments passed in from command line
|
||||
* CREATE_CASE command.
|
||||
*
|
||||
* @param dataSource DataSource object
|
||||
*
|
||||
* @return object ID
|
||||
* @param baseCaseName Case name
|
||||
* @param rootOutputDirectory Full path to directory in which case
|
||||
* output folder will be created
|
||||
* @throws CaseActionException
|
||||
*/
|
||||
private Long getDataSourceId(AutoIngestDataSource dataSource) {
|
||||
Content content = dataSource.getContent().get(0);
|
||||
return content.getId();
|
||||
}
|
||||
private void openCase(String baseCaseName, String rootOutputDirectory) throws CaseActionException {
|
||||
|
||||
private Case openCase(String baseCaseName) throws CaseActionException {
|
||||
|
||||
LOGGER.log(Level.INFO, "Opening case {0}", baseCaseName);
|
||||
|
||||
Path caseDirectoryPath = findCaseDirectory(rootOutputDirectory, baseCaseName);
|
||||
LOGGER.log(Level.INFO, "Opening case {0} in directory {1}", new Object[]{baseCaseName, rootOutputDirectory});
|
||||
Path caseDirectoryPath = findCaseDirectory(Paths.get(rootOutputDirectory), baseCaseName);
|
||||
if (null != caseDirectoryPath) {
|
||||
// found an existing case directory for same case name. the input case name must be unique. Exit.
|
||||
LOGGER.log(Level.SEVERE, "Case {0} already exists. Case name must be unique. Exiting", baseCaseName);
|
||||
throw new CaseActionException("Case " + baseCaseName + " already exists. Case name must be unique. Exiting");
|
||||
} else {
|
||||
caseDirectoryPath = createCaseFolderPath(rootOutputDirectory, baseCaseName);
|
||||
caseDirectoryPath = createCaseFolderPath(Paths.get(rootOutputDirectory), baseCaseName);
|
||||
|
||||
// Create the case directory
|
||||
Case.createCaseDirectory(caseDirectoryPath.toString(), Case.CaseType.SINGLE_USER_CASE);
|
||||
@@ -261,9 +355,56 @@ public class CommandLineIngestManager {
|
||||
Case.createAsCurrentCase(Case.CaseType.SINGLE_USER_CASE, caseDirectoryPath.toString(), caseDetails);
|
||||
}
|
||||
|
||||
Case caseForJob = Case.getCurrentCase();
|
||||
caseForJob = Case.getCurrentCase();
|
||||
LOGGER.log(Level.INFO, "Opened case {0}", caseForJob.getName());
|
||||
return caseForJob;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens existing case.
|
||||
*
|
||||
* @param caseFolderPath full path to case directory
|
||||
* @throws CaseActionException
|
||||
*/
|
||||
private void openCase(String caseFolderPath) throws CaseActionException {
|
||||
|
||||
LOGGER.log(Level.INFO, "Opening case in directory {0}", caseFolderPath);
|
||||
|
||||
String metadataFilePath = findAutFile(caseFolderPath);
|
||||
Case.openAsCurrentCase(metadataFilePath);
|
||||
|
||||
caseForJob = Case.getCurrentCase();
|
||||
LOGGER.log(Level.INFO, "Opened case {0}", caseForJob.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the .aut file for the specified case directory.
|
||||
*
|
||||
* @param caseDirectory the directory to check for a .aut file
|
||||
*
|
||||
* @return the path to the first .aut file found in the directory
|
||||
*
|
||||
* @throws CaseActionException if there was an issue finding a .aut file
|
||||
*/
|
||||
private String findAutFile(String caseDirectory) throws CaseActionException {
|
||||
File caseFolder = Paths.get(caseDirectory).toFile();
|
||||
if (caseFolder.exists()) {
|
||||
/*
|
||||
* Search for '*.aut' files.
|
||||
*/
|
||||
File[] fileArray = caseFolder.listFiles();
|
||||
if (fileArray == null) {
|
||||
throw new CaseActionException("No files found in case directory");
|
||||
}
|
||||
String autFilePath = null;
|
||||
for (File file : fileArray) {
|
||||
String name = file.getName().toLowerCase();
|
||||
if (autFilePath == null && name.endsWith(getFileExtension())) {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
throw new CaseActionException("No .aut files found in case directory");
|
||||
}
|
||||
throw new CaseActionException("Case directory was not found");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -375,9 +516,12 @@ public class CommandLineIngestManager {
|
||||
/**
|
||||
* Analyzes the data source content returned by the data source
|
||||
* processor using the configured set of data source level and file
|
||||
* level analysis modules.
|
||||
* level analysis modules. If an ingest profile is specified, load that
|
||||
* profile (profile = ingest context + ingest filter) for ingest.
|
||||
* Otherwise use baseline configuration.
|
||||
*
|
||||
* @param dataSource The data source to analyze.
|
||||
* @param ingestProfileName Name of ingest profile to use (optional)
|
||||
*
|
||||
* @throws AnalysisStartupException if there is an error analyzing the
|
||||
* data source.
|
||||
@@ -385,14 +529,46 @@ public class CommandLineIngestManager {
|
||||
* task is interrupted while blocked, i.e., if auto ingest is shutting
|
||||
* down.
|
||||
*/
|
||||
private void analyze(AutoIngestDataSource dataSource) throws AnalysisStartupException, InterruptedException {
|
||||
private void analyze(AutoIngestDataSource dataSource, String ingestProfileName) throws AnalysisStartupException, InterruptedException {
|
||||
|
||||
LOGGER.log(Level.INFO, "Starting ingest modules analysis for {0} ", dataSource.getPath());
|
||||
|
||||
// configure ingest profile and file filter
|
||||
IngestProfiles.IngestProfile selectedProfile = null;
|
||||
FilesSet selectedFileSet = null;
|
||||
if (!ingestProfileName.isEmpty()) {
|
||||
selectedProfile = getSelectedProfile(ingestProfileName);
|
||||
if (selectedProfile == null) {
|
||||
// unable to find the user specified profile
|
||||
LOGGER.log(Level.SEVERE, "Unable to find ingest profile: {0}. Ingest cancelled!", ingestProfileName);
|
||||
System.err.println("Unable to find ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||
return;
|
||||
}
|
||||
|
||||
// get FileSet filter associated with this profile
|
||||
selectedFileSet = getSelectedFilter(selectedProfile.getFileIngestFilter());
|
||||
if (selectedFileSet == null) {
|
||||
// unable to find the user specified profile
|
||||
LOGGER.log(Level.SEVERE, "Unable to find file filter {0} for ingest profile: {1}. Ingest cancelled!", new Object[]{selectedProfile.getFileIngestFilter(), ingestProfileName});
|
||||
System.err.println("Unable to find file filter " + selectedProfile.getFileIngestFilter() + " for ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
IngestJobEventListener ingestJobEventListener = new IngestJobEventListener();
|
||||
IngestManager.getInstance().addIngestJobEventListener(INGEST_JOB_EVENTS_OF_INTEREST, ingestJobEventListener);
|
||||
try {
|
||||
synchronized (ingestLock) {
|
||||
IngestJobSettings ingestJobSettings = new IngestJobSettings(UserPreferences.getCommandLineModeIngestModuleContextString());
|
||||
IngestJobSettings ingestJobSettings;
|
||||
if (selectedProfile == null || selectedFileSet == null) {
|
||||
// use baseline configuration
|
||||
ingestJobSettings = new IngestJobSettings(UserPreferences.getCommandLineModeIngestModuleContextString());
|
||||
} else {
|
||||
// load the custom ingest
|
||||
ingestJobSettings = new IngestJobSettings(selectedProfile.toString());
|
||||
ingestJobSettings.setFileFilter(selectedFileSet);
|
||||
}
|
||||
|
||||
List<String> settingsWarnings = ingestJobSettings.getWarnings();
|
||||
if (settingsWarnings.isEmpty()) {
|
||||
IngestJobStartResult ingestJobStartResult = IngestManager.getInstance().beginIngestJob(dataSource.getContent(), ingestJobSettings);
|
||||
@@ -447,6 +623,48 @@ public class CommandLineIngestManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the specified ingest profile from the list of all existing
|
||||
* ingest profiles.
|
||||
*
|
||||
* @param ingestProfileName Ingest profile name
|
||||
* @return IngestProfile object, or NULL if the profile doesn't exist
|
||||
*/
|
||||
private IngestProfiles.IngestProfile getSelectedProfile(String ingestProfileName) {
|
||||
|
||||
IngestProfiles.IngestProfile selectedProfile = null;
|
||||
// lookup the profile by name
|
||||
for (IngestProfiles.IngestProfile profile : IngestProfiles.getIngestProfiles()) {
|
||||
if (profile.toString().equalsIgnoreCase(ingestProfileName)) {
|
||||
// found the profile
|
||||
selectedProfile = profile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return selectedProfile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the specified file filter from the list of all existing file
|
||||
* filters (custom and standard).
|
||||
*
|
||||
* @param filterName Name of the file filter
|
||||
* @return FilesSet object, or NULL if the filter doesn't exist
|
||||
*/
|
||||
private FilesSet getSelectedFilter(String filterName) {
|
||||
try {
|
||||
Map<String, FilesSet> fileIngestFilters = FilesSetsManager.getInstance()
|
||||
.getCustomFileIngestFilters();
|
||||
for (FilesSet fSet : FilesSetsManager.getStandardFileIngestFilters()) {
|
||||
fileIngestFilters.put(fSet.getName(), fSet);
|
||||
}
|
||||
return fileIngestFilters.get(filterName);
|
||||
} catch (FilesSetsManager.FilesSetsManagerException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to get file ingest filter: " + filterName, ex); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a case folder path. Does not create the folder described by
|
||||
* the path.
|
||||
@@ -456,7 +674,7 @@ public class CommandLineIngestManager {
|
||||
*
|
||||
* @return A case folder path with a time stamp suffix.
|
||||
*/
|
||||
Path createCaseFolderPath(Path caseFoldersPath, String caseName) {
|
||||
private Path createCaseFolderPath(Path caseFoldersPath, String caseName) {
|
||||
String folderName = caseName + "_" + TimeStampUtils.createTimeStamp();
|
||||
return Paths.get(caseFoldersPath.toString(), folderName);
|
||||
}
|
||||
@@ -471,7 +689,7 @@ public class CommandLineIngestManager {
|
||||
*
|
||||
* @return The path of the case folder, or null if it is not found.
|
||||
*/
|
||||
Path findCaseDirectory(Path folderToSearch, String caseName) {
|
||||
private Path findCaseDirectory(Path folderToSearch, String caseName) {
|
||||
File searchFolder = new File(folderToSearch.toString());
|
||||
if (!searchFolder.isDirectory()) {
|
||||
return null;
|
||||
@@ -489,6 +707,16 @@ public class CommandLineIngestManager {
|
||||
return caseFolderPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns full path to directory where command outputs should be saved.
|
||||
*
|
||||
* @param caseForJob Case object
|
||||
* @return Full path to directory where command outputs should be saved
|
||||
*/
|
||||
private String getOutputDirPath(Case caseForJob) {
|
||||
return caseForJob.getCaseDirectory() + File.separator + LOG_DIR_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* An ingest job event listener that allows the job processing task to
|
||||
* block until the analysis of a data source by the data source level
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[810, 422]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
@@ -16,7 +21,7 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="nodeScrollPane" alignment="1" pref="864" max="32767" attributes="0"/>
|
||||
<Component id="nodeScrollPane" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
@@ -31,6 +36,9 @@
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[0, 0]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[803, 553]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
@@ -40,46 +48,38 @@
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[100, 100]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[801, 551]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="outputPathTextField" min="-2" pref="630" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="browseOutputFolderButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="bnEditIngestSettings" alignment="0" min="-2" pref="155" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabelSelectOutputFolder" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jLabelInvalidResultsFolder" min="-2" pref="544" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabelBaselineConfig" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabelReportConfig" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnEditReportSettings" alignment="0" min="-2" pref="155" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="355" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="362" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="40" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabelSelectOutputFolder" alignment="3" min="-2" pref="21" max="-2" attributes="0"/>
|
||||
<Component id="jLabelInvalidResultsFolder" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="browseOutputFolderButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="outputPathTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
|
||||
<Component id="jLabelBaselineConfig" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="bnEditIngestSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="389" max="32767" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jLabelReportConfig" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="bnEditReportSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="376" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -88,10 +88,10 @@
|
||||
<Component class="javax.swing.JButton" name="bnEditIngestSettings">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/commandline/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditIngestSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditIngestSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/commandline/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditIngestSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
@@ -101,58 +101,35 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnEditIngestSettingsActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="browseOutputFolderButton">
|
||||
<Component class="javax.swing.JLabel" name="jLabelBaselineConfig">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/commandline/Bundle.properties" key="CommandLineIngestSettingsPanel.browseOutputFolderButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.jLabelBaselineConfig.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.browseOutputFolderButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseOutputFolderButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="outputPathTextField">
|
||||
<Component class="javax.swing.JLabel" name="jLabelReportConfig">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/commandline/Bundle.properties" key="CommandLineIngestSettingsPanel.outputPathTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.jLabelReportConfig.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnEditReportSettings">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditReportSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/commandline/Bundle.properties" key="CommandLineIngestSettingsPanel.outputPathTextField.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditReportSettings.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.bnEditReportSettings.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelInvalidResultsFolder">
|
||||
<Properties>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/commandline/Bundle.properties" key="CommandLineIngestSettingsPanel.jLabelInvalidResultsFolder.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.jLabelInvalidResultsFolder.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelSelectOutputFolder">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/commandline/Bundle.properties" key="CommandLineIngestSettingsPanel.jLabelSelectOutputFolder.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="3"/>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/commandlineingest/Bundle.properties" key="CommandLineIngestSettingsPanel.jLabelSelectOutputFolder.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnEditReportSettingsActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
|
||||
@@ -20,20 +20,13 @@ package org.sleuthkit.autopsy.commandlineingest;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Cursor;
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel;
|
||||
import java.nio.file.Paths;
|
||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import static org.sleuthkit.autopsy.report.infrastructure.ReportWizardAction.doReportWizard;
|
||||
|
||||
/**
|
||||
* Configuration panel for auto ingest settings.
|
||||
@@ -41,10 +34,12 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
|
||||
|
||||
private final CommandLineIngestSettingsPanelController controller;
|
||||
private final JFileChooser fc = new JFileChooser();
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger logger = Logger.getLogger(CommandLineIngestSettingsPanel.class.getName());
|
||||
|
||||
private static final String REPORTING_CONFIGURATION_NAME = "CommandLineIngest";
|
||||
private static final boolean DISPLAY_CASE_SPECIFIC_DATA = false; // do not try to display case specific data
|
||||
private static final boolean RUN_REPORTS = false; // do not generate reports as part of running the report wizard
|
||||
|
||||
/**
|
||||
* Creates new form AutoIngestSettingsPanel
|
||||
@@ -52,171 +47,14 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
|
||||
* @param theController Controller to notify of changes.
|
||||
*/
|
||||
public CommandLineIngestSettingsPanel(CommandLineIngestSettingsPanelController theController) {
|
||||
controller = theController;
|
||||
initComponents();
|
||||
|
||||
load(true);
|
||||
outputPathTextField.getDocument().addDocumentListener(new MyDocumentListener());
|
||||
jLabelInvalidResultsFolder.setText("");
|
||||
}
|
||||
|
||||
private class MyDocumentListener implements DocumentListener {
|
||||
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
valid();
|
||||
controller.changed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
valid();
|
||||
controller.changed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
valid();
|
||||
controller.changed();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Load mode from persistent storage.
|
||||
*
|
||||
* @param inStartup True if we're doing the initial population of the UI
|
||||
* @return the REPORTING_CONFIGURATION_NAME
|
||||
*/
|
||||
final void load(boolean inStartup) {
|
||||
|
||||
String results = org.sleuthkit.autopsy.commandlineingest.UserPreferences.getCommandLineModeResultsFolder();
|
||||
if (results != null) {
|
||||
outputPathTextField.setText(results);
|
||||
} else {
|
||||
outputPathTextField.setText("");
|
||||
}
|
||||
|
||||
valid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save mode to persistent storage.
|
||||
*/
|
||||
void store() {
|
||||
String resultsFolderPath = getNormalizedFolderPath(outputPathTextField.getText().trim());
|
||||
org.sleuthkit.autopsy.commandlineingest.UserPreferences.setCommandLineModeResultsFolder(resultsFolderPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate current panel settings.
|
||||
*/
|
||||
boolean valid() {
|
||||
|
||||
if (validateResultsPath()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a path to make sure there are no "space" characters at the end
|
||||
*
|
||||
* @param path Path to a directory
|
||||
*
|
||||
* @return Path without "space" characters at the end
|
||||
*/
|
||||
String normalizePath(String path) {
|
||||
|
||||
while (path.length() > 0) {
|
||||
if (path.charAt(path.length() - 1) == ' ') {
|
||||
path = path.substring(0, path.length() - 1);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates that a path is valid and points to a folder.
|
||||
*
|
||||
* @param path A path to be validated
|
||||
*
|
||||
* @return boolean returns true if valid and points to a folder, false
|
||||
* otherwise
|
||||
*/
|
||||
boolean isFolderPathValid(String path) {
|
||||
try {
|
||||
File file = new File(normalizePath(path));
|
||||
|
||||
// check if it's a symbolic link
|
||||
if (Files.isSymbolicLink(file.toPath())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// local folder
|
||||
if (file.exists() && file.isDirectory()) {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
// Files.isSymbolicLink (and other "files" methods) throw exceptions on seemingly innocent inputs.
|
||||
// For example, it will throw an exception when either " " is last character in path or
|
||||
// a path starting with ":".
|
||||
// We can just ignore these exceptions as they occur in process of user typing in the path.
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a path that was normalized by file system.
|
||||
*
|
||||
* @param path A path to be normalized. Normalization occurs inside a call
|
||||
* to new File().
|
||||
*
|
||||
* @return String returns normalized OS path
|
||||
*/
|
||||
String getNormalizedFolderPath(String path) {
|
||||
// removes "/", "\", and " " characters at the end of path string.
|
||||
// normalizePath() removes spaces at the end of path and a call to "new File()"
|
||||
// internally formats the path string to remove "/" and "\" characters at the end of path.
|
||||
File file = new File(normalizePath(path));
|
||||
return file.getPath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate results path. Display warnings if invalid.
|
||||
*/
|
||||
boolean validateResultsPath() {
|
||||
|
||||
String outputPath = outputPathTextField.getText().trim();
|
||||
|
||||
if (outputPath.isEmpty()) {
|
||||
jLabelInvalidResultsFolder.setVisible(true);
|
||||
jLabelInvalidResultsFolder.setText(NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.ResultsDirectoryUnspecified"));
|
||||
/*
|
||||
NOTE: JIRA-4850: Returning false disables OK and Apply buttons for the entire
|
||||
Tools->Options bar until the path is set. It was decided to only validate
|
||||
the path if the path is set.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isFolderPathValid(outputPath)) {
|
||||
jLabelInvalidResultsFolder.setVisible(true);
|
||||
jLabelInvalidResultsFolder.setText(NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.PathInvalid"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (false == permissionsAppropriate(outputPath)) {
|
||||
jLabelInvalidResultsFolder.setVisible(true);
|
||||
jLabelInvalidResultsFolder.setText(NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.CannotAccess")
|
||||
+ " " + outputPath + " "
|
||||
+ NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.CheckPermissions"));
|
||||
return false;
|
||||
}
|
||||
|
||||
jLabelInvalidResultsFolder.setVisible(false);
|
||||
return true;
|
||||
public static String getReportingConfigName() {
|
||||
return REPORTING_CONFIGURATION_NAME;
|
||||
}
|
||||
|
||||
private void displayIngestJobSettingsPanel() {
|
||||
@@ -261,14 +99,17 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
|
||||
nodeScrollPane = new javax.swing.JScrollPane();
|
||||
nodePanel = new javax.swing.JPanel();
|
||||
bnEditIngestSettings = new javax.swing.JButton();
|
||||
browseOutputFolderButton = new javax.swing.JButton();
|
||||
outputPathTextField = new javax.swing.JTextField();
|
||||
jLabelInvalidResultsFolder = new javax.swing.JLabel();
|
||||
jLabelSelectOutputFolder = new javax.swing.JLabel();
|
||||
jLabelBaselineConfig = new javax.swing.JLabel();
|
||||
jLabelReportConfig = new javax.swing.JLabel();
|
||||
bnEditReportSettings = new javax.swing.JButton();
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(810, 422));
|
||||
|
||||
nodeScrollPane.setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
nodeScrollPane.setPreferredSize(new java.awt.Dimension(803, 553));
|
||||
|
||||
nodePanel.setMinimumSize(new java.awt.Dimension(100, 100));
|
||||
nodePanel.setPreferredSize(new java.awt.Dimension(801, 551));
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnEditIngestSettings, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditIngestSettings.text")); // NOI18N
|
||||
bnEditIngestSettings.setToolTipText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText")); // NOI18N
|
||||
@@ -279,22 +120,19 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(browseOutputFolderButton, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.browseOutputFolderButton.text")); // NOI18N
|
||||
browseOutputFolderButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabelBaselineConfig, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jLabelBaselineConfig.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabelReportConfig, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jLabelReportConfig.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnEditReportSettings, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditReportSettings.text")); // NOI18N
|
||||
bnEditReportSettings.setToolTipText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditReportSettings.toolTipText")); // NOI18N
|
||||
bnEditReportSettings.setActionCommand(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditReportSettings.actionCommand")); // NOI18N
|
||||
bnEditReportSettings.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
browseOutputFolderButtonActionPerformed(evt);
|
||||
bnEditReportSettingsActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
outputPathTextField.setText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.outputPathTextField.text")); // NOI18N
|
||||
outputPathTextField.setToolTipText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.outputPathTextField.toolTipText")); // NOI18N
|
||||
|
||||
jLabelInvalidResultsFolder.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabelInvalidResultsFolder, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jLabelInvalidResultsFolder.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabelSelectOutputFolder, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jLabelSelectOutputFolder.text")); // NOI18N
|
||||
jLabelSelectOutputFolder.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
|
||||
|
||||
javax.swing.GroupLayout nodePanelLayout = new javax.swing.GroupLayout(nodePanel);
|
||||
nodePanel.setLayout(nodePanelLayout);
|
||||
nodePanelLayout.setHorizontalGroup(
|
||||
@@ -302,44 +140,33 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
|
||||
.addGroup(nodePanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(nodePanelLayout.createSequentialGroup()
|
||||
.addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 630, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(browseOutputFolderButton))
|
||||
.addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(nodePanelLayout.createSequentialGroup()
|
||||
.addComponent(jLabelSelectOutputFolder)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabelInvalidResultsFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 544, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(355, Short.MAX_VALUE))
|
||||
.addComponent(jLabelBaselineConfig)
|
||||
.addComponent(jLabelReportConfig)
|
||||
.addComponent(bnEditReportSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(362, Short.MAX_VALUE))
|
||||
);
|
||||
nodePanelLayout.setVerticalGroup(
|
||||
nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(nodePanelLayout.createSequentialGroup()
|
||||
.addGap(40, 40, 40)
|
||||
.addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabelSelectOutputFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabelInvalidResultsFolder))
|
||||
.addGap(1, 1, 1)
|
||||
.addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(browseOutputFolderButton)
|
||||
.addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(25, 25, 25)
|
||||
.addGap(27, 27, 27)
|
||||
.addComponent(jLabelBaselineConfig)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(bnEditIngestSettings)
|
||||
.addContainerGap(389, Short.MAX_VALUE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabelReportConfig)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(bnEditReportSettings)
|
||||
.addContainerGap(376, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
browseOutputFolderButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.browseOutputFolderButton.text")); // NOI18N
|
||||
jLabelInvalidResultsFolder.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jLabelInvalidResultsFolder.text")); // NOI18N
|
||||
jLabelSelectOutputFolder.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jLabelSelectOutputFolder.text")); // NOI18N
|
||||
|
||||
nodeScrollPane.setViewportView(nodePanel);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(nodeScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 864, Short.MAX_VALUE)
|
||||
.addComponent(nodeScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -347,54 +174,22 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void browseOutputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseOutputFolderButtonActionPerformed
|
||||
String oldText = outputPathTextField.getText().trim();
|
||||
// set the current directory of the FileChooser if the oldText is valid
|
||||
File currentDir = new File(oldText);
|
||||
if (currentDir.exists()) {
|
||||
fc.setCurrentDirectory(currentDir);
|
||||
}
|
||||
|
||||
fc.setDialogTitle("Select case output folder:");
|
||||
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||
|
||||
int retval = fc.showOpenDialog(this);
|
||||
if (retval == JFileChooser.APPROVE_OPTION) {
|
||||
String path = fc.getSelectedFile().getPath();
|
||||
outputPathTextField.setText(path);
|
||||
valid();
|
||||
controller.changed();
|
||||
}
|
||||
}//GEN-LAST:event_browseOutputFolderButtonActionPerformed
|
||||
private void bnEditReportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnEditReportSettingsActionPerformed
|
||||
this.getParent().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
doReportWizard(getReportingConfigName(), DISPLAY_CASE_SPECIFIC_DATA, RUN_REPORTS);
|
||||
this.getParent().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}//GEN-LAST:event_bnEditReportSettingsActionPerformed
|
||||
|
||||
private void bnEditIngestSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnEditIngestSettingsActionPerformed
|
||||
displayIngestJobSettingsPanel();
|
||||
}//GEN-LAST:event_bnEditIngestSettingsActionPerformed
|
||||
|
||||
boolean permissionsAppropriate(String path) {
|
||||
return FileUtil.hasReadWriteAccess(Paths.get(path));
|
||||
}
|
||||
|
||||
private void resetUI() {
|
||||
load(true);
|
||||
controller.changed();
|
||||
}
|
||||
|
||||
void setEnabledState(boolean enabled) {
|
||||
bnEditIngestSettings.setEnabled(enabled);
|
||||
browseOutputFolderButton.setEnabled(enabled);
|
||||
jLabelInvalidResultsFolder.setEnabled(enabled);
|
||||
jLabelSelectOutputFolder.setEnabled(enabled);
|
||||
outputPathTextField.setEnabled(enabled);
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton bnEditIngestSettings;
|
||||
private javax.swing.JButton browseOutputFolderButton;
|
||||
private javax.swing.JLabel jLabelInvalidResultsFolder;
|
||||
private javax.swing.JLabel jLabelSelectOutputFolder;
|
||||
private javax.swing.JButton bnEditReportSettings;
|
||||
private javax.swing.JLabel jLabelBaselineConfig;
|
||||
private javax.swing.JLabel jLabelReportConfig;
|
||||
private javax.swing.JPanel nodePanel;
|
||||
private javax.swing.JScrollPane nodeScrollPane;
|
||||
private javax.swing.JTextField outputPathTextField;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
@@ -43,13 +43,11 @@ public final class CommandLineIngestSettingsPanelController extends OptionsPanel
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
getPanel().load(false);
|
||||
changed = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyChanges() {
|
||||
getPanel().store();
|
||||
changed = false;
|
||||
}
|
||||
|
||||
@@ -59,7 +57,7 @@ public final class CommandLineIngestSettingsPanelController extends OptionsPanel
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getPanel().valid();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
package org.sleuthkit.autopsy.commandlineingest;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
@@ -37,19 +39,36 @@ import org.openide.util.lookup.ServiceProvider;
|
||||
public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(CommandLineOptionProcessor.class.getName());
|
||||
private final Option pathToDataSourceOption = Option.optionalArgument('l', "inputPath");
|
||||
private final Option caseNameOption = Option.optionalArgument('2', "caseName");
|
||||
private final Option runFromCommandLineOption = Option.optionalArgument('3', "runFromCommandLine");
|
||||
private String pathToDataSource;
|
||||
private String baseCaseName;
|
||||
private final Option caseNameOption = Option.requiredArgument('n', "caseName");
|
||||
private final Option caseBaseDirOption = Option.requiredArgument('o', "caseBaseDir");
|
||||
private final Option createCaseCommandOption = Option.withoutArgument('c', "createCase");
|
||||
private final Option dataSourcePathOption = Option.requiredArgument('s', "dataSourcePath");
|
||||
private final Option dataSourceObjectIdOption = Option.requiredArgument('i', "dataSourceObjectId");
|
||||
private final Option addDataSourceCommandOption = Option.withoutArgument('a', "addDataSource");
|
||||
private final Option caseDirOption = Option.requiredArgument('d', "caseDir");
|
||||
private final Option runIngestCommandOption = Option.withoutArgument('r', "runIngest");
|
||||
private final Option ingestProfileOption = Option.requiredArgument('p', "ingestProfile");
|
||||
private final Option listAllDataSourcesCommandOption = Option.withoutArgument('l', "listAllDataSources");
|
||||
private final Option generateReportsOption = Option.withoutArgument('g', "generateReports");
|
||||
|
||||
private boolean runFromCommandLine = false;
|
||||
|
||||
private final List<CommandLineCommand> commands = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected Set<Option> getOptions() {
|
||||
Set<Option> set = new HashSet<>();
|
||||
set.add(pathToDataSourceOption);
|
||||
set.add(createCaseCommandOption);
|
||||
set.add(caseNameOption);
|
||||
set.add(runFromCommandLineOption);
|
||||
set.add(caseBaseDirOption);
|
||||
set.add(dataSourcePathOption);
|
||||
set.add(addDataSourceCommandOption);
|
||||
set.add(dataSourceObjectIdOption);
|
||||
set.add(caseDirOption);
|
||||
set.add(runIngestCommandOption);
|
||||
set.add(ingestProfileOption);
|
||||
set.add(listAllDataSourcesCommandOption);
|
||||
set.add(generateReportsOption);
|
||||
return set;
|
||||
}
|
||||
|
||||
@@ -57,106 +76,268 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
protected void process(Env env, Map<Option, String[]> values) throws CommandException {
|
||||
logger.log(Level.INFO, "Processing Autopsy command line options"); //NON-NLS
|
||||
System.out.println("Processing Autopsy command line options");
|
||||
if (values.containsKey(pathToDataSourceOption) && values.containsKey(caseNameOption) && values.containsKey(runFromCommandLineOption)) {
|
||||
// parse input parameters
|
||||
String inputPath;
|
||||
String inputCaseName;
|
||||
String modeString;
|
||||
if (values.size() < 3) {
|
||||
logger.log(Level.SEVERE, "Insufficient number of input arguments to run command line ingest");
|
||||
System.out.println("Insufficient number of input arguments to run command line ingest");
|
||||
this.runFromCommandLine = false;
|
||||
return;
|
||||
} else {
|
||||
String[] argDirs = values.get(pathToDataSourceOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'inputPath'");
|
||||
System.out.println("Missing argument 'inputPath'");
|
||||
this.runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
inputPath = argDirs[0];
|
||||
runFromCommandLine = false;
|
||||
|
||||
argDirs = values.get(caseNameOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseName'");
|
||||
System.out.println("Missing argument 'caseName'");
|
||||
this.runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
inputCaseName = argDirs[0];
|
||||
|
||||
argDirs = values.get(runFromCommandLineOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'runFromCommandLine'");
|
||||
System.out.println("Missing argument 'runFromCommandLine'");
|
||||
this.runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
modeString = argDirs[0];
|
||||
// input arguments must contain at least one command
|
||||
if (!(values.containsKey(createCaseCommandOption) || values.containsKey(addDataSourceCommandOption)
|
||||
|| values.containsKey(runIngestCommandOption) || values.containsKey(listAllDataSourcesCommandOption)
|
||||
|| values.containsKey(generateReportsOption))) {
|
||||
// not running from command line
|
||||
logger.log(Level.INFO, "No command line commands passed in as inputs. Not running from command line."); //NON-NLS
|
||||
System.err.println("No command line commands passed in as inputs. Not running from command line.");
|
||||
return;
|
||||
}
|
||||
|
||||
// verify inputs
|
||||
if (modeString == null || modeString.isEmpty()) {
|
||||
this.runFromCommandLine = false;
|
||||
System.out.println("runFromCommandLine argument is empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (modeString.equalsIgnoreCase("true")) {
|
||||
this.runFromCommandLine = true;
|
||||
}
|
||||
|
||||
System.out.println("runFromCommandLine = " + this.runFromCommandLine);
|
||||
}
|
||||
|
||||
// verify inputs
|
||||
if (inputPath == null || inputPath.isEmpty() || !(new File(inputPath).exists())) {
|
||||
logger.log(Level.SEVERE, "Input file {0} doesn''t exist", inputPath);
|
||||
System.out.println("Input file " + inputPath + " doesn't exist");
|
||||
this.runFromCommandLine = false;
|
||||
// parse input parameters
|
||||
String[] argDirs;
|
||||
String inputCaseName = "";
|
||||
if (values.containsKey(caseNameOption)) {
|
||||
argDirs = values.get(caseNameOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseName'");
|
||||
System.err.println("Missing argument 'caseName'");
|
||||
return;
|
||||
}
|
||||
inputCaseName = argDirs[0];
|
||||
|
||||
if (inputCaseName == null || inputCaseName.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Case name argument is empty");
|
||||
System.out.println("Case name argument is empty");
|
||||
this.runFromCommandLine = false;
|
||||
logger.log(Level.SEVERE, "'caseName' argument is empty");
|
||||
System.err.println("'caseName' argument is empty");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String caseBaseDir = "";
|
||||
if (values.containsKey(caseBaseDirOption)) {
|
||||
argDirs = values.get(caseBaseDirOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseBaseDir'");
|
||||
System.err.println("Missing argument 'caseBaseDir'");
|
||||
return;
|
||||
}
|
||||
caseBaseDir = argDirs[0];
|
||||
|
||||
if (caseBaseDir == null || caseBaseDir.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseBaseDir'");
|
||||
System.err.println("Missing argument 'caseBaseDir'");
|
||||
return;
|
||||
}
|
||||
|
||||
// save the inputs
|
||||
this.pathToDataSource = inputPath;
|
||||
this.baseCaseName = inputCaseName;
|
||||
logger.log(Level.INFO, "Input file = {0}", this.pathToDataSource); //NON-NLS
|
||||
logger.log(Level.INFO, "Case name = {0}", this.baseCaseName); //NON-NLS
|
||||
logger.log(Level.INFO, "runFromCommandLine = {0}", this.runFromCommandLine); //NON-NLS
|
||||
System.out.println("Input file = " + this.pathToDataSource);
|
||||
System.out.println("Case name = " + this.baseCaseName);
|
||||
System.out.println("runFromCommandLine = " + this.runFromCommandLine);
|
||||
} else {
|
||||
System.out.println("Missing input arguments to run command line ingest");
|
||||
logger.log(Level.SEVERE, "Missing input arguments to run command line ingest");
|
||||
if (!(new File(caseBaseDir).exists()) || !(new File(caseBaseDir).isDirectory())) {
|
||||
logger.log(Level.SEVERE, "''caseBaseDir'' {0} directory doesn''t exist or is not a directory", caseBaseDir);
|
||||
System.err.println("'caseBaseDir' directory doesn't exist or is not a directory: " + caseBaseDir);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String dataSourcePath = "";
|
||||
if (values.containsKey(dataSourcePathOption)) {
|
||||
|
||||
argDirs = values.get(dataSourcePathOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'dataSourcePath'");
|
||||
System.err.println("Missing argument 'dataSourcePath'");
|
||||
return;
|
||||
}
|
||||
dataSourcePath = argDirs[0];
|
||||
|
||||
// verify inputs
|
||||
if (dataSourcePath == null || dataSourcePath.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'dataSourcePath'");
|
||||
System.err.println("Missing argument 'dataSourcePath'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(new File(dataSourcePath).exists())) {
|
||||
logger.log(Level.SEVERE, "Input data source file {0} doesn''t exist", dataSourcePath);
|
||||
System.err.println("Input data source file " + dataSourcePath + " doesn't exist");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String dataSourceId = "";
|
||||
if (values.containsKey(dataSourceObjectIdOption)) {
|
||||
|
||||
argDirs = values.get(dataSourceObjectIdOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'dataSourceObjectIdOption'");
|
||||
System.err.println("Missing argument 'dataSourceObjectIdOption'");
|
||||
return;
|
||||
}
|
||||
dataSourceId = argDirs[0];
|
||||
|
||||
// verify inputs
|
||||
if (dataSourceId == null || dataSourceId.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Input data source id is empty");
|
||||
System.err.println("Input data source id is empty");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String caseDir = "";
|
||||
if (values.containsKey(caseDirOption)) {
|
||||
|
||||
argDirs = values.get(caseDirOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseDirOption'");
|
||||
System.err.println("Missing argument 'caseDirOption'");
|
||||
return;
|
||||
}
|
||||
caseDir = argDirs[0];
|
||||
|
||||
// verify inputs
|
||||
if (caseDir == null || caseDir.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'caseDirOption'");
|
||||
System.err.println("Missing argument 'caseDirOption'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(new File(caseDir).exists()) || !(new File(caseDir).isDirectory())) {
|
||||
logger.log(Level.SEVERE, "Case directory {0} doesn''t exist or is not a directory", caseDir);
|
||||
System.err.println("Case directory " + caseDir + " doesn't exist or is not a directory");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String ingestProfile = "";
|
||||
if (values.containsKey(ingestProfileOption)) {
|
||||
|
||||
argDirs = values.get(ingestProfileOption);
|
||||
if (argDirs.length < 1) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'ingestProfile'");
|
||||
System.err.println("Missing argument 'ingestProfile'");
|
||||
return;
|
||||
}
|
||||
ingestProfile = argDirs[0];
|
||||
|
||||
// verify inputs
|
||||
if (ingestProfile == null || ingestProfile.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "Missing argument 'ingestProfile'");
|
||||
System.err.println("Missing argument 'ingestProfile'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Create commands in order in which they should be executed:
|
||||
// First create the "CREATE_CASE" command, if present
|
||||
if (values.containsKey(createCaseCommandOption)) {
|
||||
|
||||
// 'caseName' must always be specified for "CREATE_CASE" command
|
||||
if (inputCaseName.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'caseName' argument is empty");
|
||||
System.out.println("'caseName' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 'caseBaseDir' must always be specified for "CREATE_CASE" command
|
||||
if (caseBaseDir.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'caseBaseDir' argument is empty");
|
||||
System.err.println("'caseBaseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
CommandLineCommand newCommand = new CommandLineCommand(CommandLineCommand.CommandType.CREATE_CASE);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.CASE_NAME.name(), inputCaseName);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.CASES_BASE_DIR_PATH.name(), caseBaseDir);
|
||||
commands.add(newCommand);
|
||||
runFromCommandLine = true;
|
||||
}
|
||||
|
||||
// Add ADD_DATA_SOURCE command, if present
|
||||
if (values.containsKey(addDataSourceCommandOption)) {
|
||||
|
||||
// 'caseDir' must only be specified if the case is not being created during the current run
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 'dataSourcePath' must always be specified for "ADD_DATA_SOURCE" command
|
||||
if (dataSourcePath.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "'dataSourcePath' argument is empty");
|
||||
System.err.println("'dataSourcePath' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
CommandLineCommand newCommand = new CommandLineCommand(CommandLineCommand.CommandType.ADD_DATA_SOURCE);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.CASE_FOLDER_PATH.name(), caseDir);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.DATA_SOURCE_PATH.name(), dataSourcePath);
|
||||
commands.add(newCommand);
|
||||
runFromCommandLine = true;
|
||||
}
|
||||
|
||||
// Add RUN_INGEST command, if present
|
||||
if (values.containsKey(runIngestCommandOption)) {
|
||||
|
||||
// 'caseDir' must only be specified if the case is not being created during the current run
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// if new data source is being added during this run, then 'dataSourceId' is not specified
|
||||
if (!values.containsKey(addDataSourceCommandOption) && dataSourceId.isEmpty()) {
|
||||
// data source is not being added during this run, so 'dataSourceId' should have been specified
|
||||
logger.log(Level.SEVERE, "'dataSourceId' argument is empty");
|
||||
System.err.println("'dataSourceId' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
CommandLineCommand newCommand = new CommandLineCommand(CommandLineCommand.CommandType.RUN_INGEST);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.CASE_FOLDER_PATH.name(), caseDir);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.DATA_SOURCE_ID.name(), dataSourceId);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.INGEST_PROFILE_NAME.name(), ingestProfile);
|
||||
commands.add(newCommand);
|
||||
runFromCommandLine = true;
|
||||
}
|
||||
|
||||
// Add "LIST_ALL_DATA_SOURCES" command, if present
|
||||
if (values.containsKey(listAllDataSourcesCommandOption)) {
|
||||
|
||||
// 'caseDir' must only be specified if the case is not being created during the current run
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
CommandLineCommand newCommand = new CommandLineCommand(CommandLineCommand.CommandType.LIST_ALL_DATA_SOURCES);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.CASE_FOLDER_PATH.name(), caseDir);
|
||||
commands.add(newCommand);
|
||||
runFromCommandLine = true;
|
||||
}
|
||||
|
||||
// Add "GENERATE_REPORTS" command, if present
|
||||
if (values.containsKey(generateReportsOption)) {
|
||||
|
||||
// 'caseDir' must only be specified if the case is not being created during the current run
|
||||
if (!values.containsKey(createCaseCommandOption) && caseDir.isEmpty()) {
|
||||
// new case is not being created during this run, so 'caseDir' should have been specified
|
||||
logger.log(Level.SEVERE, "'caseDir' argument is empty");
|
||||
System.err.println("'caseDir' argument is empty");
|
||||
runFromCommandLine = false;
|
||||
return;
|
||||
}
|
||||
|
||||
CommandLineCommand newCommand = new CommandLineCommand(CommandLineCommand.CommandType.GENERATE_REPORTS);
|
||||
newCommand.addInputValue(CommandLineCommand.InputType.CASE_FOLDER_PATH.name(), caseDir);
|
||||
commands.add(newCommand);
|
||||
runFromCommandLine = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns user specified path to data source
|
||||
*
|
||||
* @return the inputPath
|
||||
*/
|
||||
String getPathToDataSource() {
|
||||
return pathToDataSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns user specified case name
|
||||
*
|
||||
* @return the inputCaseName
|
||||
*/
|
||||
String getBaseCaseName() {
|
||||
return baseCaseName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether Autopsy should be running in command line mode or not.
|
||||
*
|
||||
@@ -164,5 +345,14 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
||||
*/
|
||||
public boolean isRunFromCommandLine() {
|
||||
return runFromCommandLine;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of all commands passed in via command line.
|
||||
*
|
||||
* @return list of input commands
|
||||
*/
|
||||
List<CommandLineCommand> getCommands() {
|
||||
return commands;
|
||||
}
|
||||
}
|
||||
|
||||
282
Core/src/org/sleuthkit/autopsy/commandlineingest/OutputGenerator.java
Executable file
282
Core/src/org/sleuthkit/autopsy/commandlineingest/OutputGenerator.java
Executable file
@@ -0,0 +1,282 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019-2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.commandlineingest;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonEncoding;
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.util.DefaultIndenter;
|
||||
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.TimeStampUtils;
|
||||
import org.sleuthkit.autopsy.datamodel.utils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.datasourceprocessors.AutoIngestDataSource;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.Image;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* Generates JSON output
|
||||
*/
|
||||
class OutputGenerator {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(OutputGenerator.class.getName());
|
||||
|
||||
private OutputGenerator() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves output of "Create Case" command to JSON output file.
|
||||
*
|
||||
* @param caseForJob Case object
|
||||
* @param outputDirPath Full path to a directory where JSON output should be
|
||||
* saved
|
||||
* @param baseCaseName Case name
|
||||
*/
|
||||
static void saveCreateCaseOutput(Case caseForJob, String outputDirPath, String baseCaseName) {
|
||||
JsonFactory jsonGeneratorFactory = new JsonFactory();
|
||||
String reportOutputPath = outputDirPath + File.separator + "createCase_" + TimeStampUtils.createTimeStamp() + ".json";
|
||||
java.io.File reportFile = Paths.get(reportOutputPath).toFile();
|
||||
try {
|
||||
Files.createDirectories(Paths.get(reportFile.getParent()));
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to create output file " + reportFile.toString() + " for 'Create Case' command", ex); //NON-NLS
|
||||
System.err.println("Unable to create output file " + reportFile.toString() + " for 'Create Case' command"); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
JsonGenerator jsonGenerator = null;
|
||||
try {
|
||||
jsonGenerator = jsonGeneratorFactory.createGenerator(reportFile, JsonEncoding.UTF8);
|
||||
// instert \n after each field for more readable formatting
|
||||
jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter().withObjectIndenter(new DefaultIndenter(" ", "\n")));
|
||||
|
||||
// save command output
|
||||
jsonGenerator.writeStartObject();
|
||||
jsonGenerator.writeStringField("@caseName", baseCaseName);
|
||||
jsonGenerator.writeStringField("@caseDir", caseForJob.getCaseDirectory());
|
||||
jsonGenerator.writeEndObject();
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to create JSON output for 'Create Case' command", ex); //NON-NLS
|
||||
System.err.println("Failed to create JSON output for 'Create Case' command"); //NON-NLS
|
||||
} finally {
|
||||
if (jsonGenerator != null) {
|
||||
try {
|
||||
jsonGenerator.close();
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Failed to close JSON output file for 'Create Case' command", ex); //NON-NLS
|
||||
System.err.println("Failed to close JSON output file for 'Create Case' command"); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves output of "Add data source" command to JSON output file.
|
||||
*
|
||||
* @param caseForJob Case object
|
||||
* @param outputDirPath Full path to a directory where JSON output should be
|
||||
* saved
|
||||
* @param dataSource AutoIngestDataSource object for the data source
|
||||
*/
|
||||
static void saveAddDataSourceOutput(Case caseForJob, AutoIngestDataSource dataSource, String outputDirPath) {
|
||||
|
||||
List<Content> contentObjects = dataSource.getContent();
|
||||
if (contentObjects == null || contentObjects.isEmpty()) {
|
||||
logger.log(Level.SEVERE, "No content objects for 'Add Data Source' command"); //NON-NLS
|
||||
System.err.println("No content objects for 'Add Data Source' command"); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
JsonFactory jsonGeneratorFactory = new JsonFactory();
|
||||
String reportOutputPath = outputDirPath + File.separator + "addDataSource_" + TimeStampUtils.createTimeStamp() + ".json";
|
||||
java.io.File reportFile = Paths.get(reportOutputPath).toFile();
|
||||
try {
|
||||
Files.createDirectories(Paths.get(reportFile.getParent()));
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to create output file " + reportFile.toString() + " for 'Add Data Source' command", ex); //NON-NLS
|
||||
System.err.println("Unable to create output file " + reportFile.toString() + " for 'Add Data Source' command"); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
JsonGenerator jsonGenerator = null;
|
||||
try {
|
||||
jsonGenerator = jsonGeneratorFactory.createGenerator(reportFile, JsonEncoding.UTF8);
|
||||
// instert \n after each field for more readable formatting
|
||||
jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter().withObjectIndenter(new DefaultIndenter(" ", "\n")));
|
||||
|
||||
// save command output
|
||||
for (Content content : contentObjects) {
|
||||
String dataSourceName;
|
||||
if (content.getDataSource() instanceof Image) {
|
||||
// image data source. Need to get display name
|
||||
dataSourceName = getImageDisplayName(caseForJob, content.getId());
|
||||
if (dataSourceName == null) {
|
||||
// some image data sources do not have "display_name" set, use data source name instead
|
||||
dataSourceName = content.getName();
|
||||
}
|
||||
} else {
|
||||
// logical data source. The only way I found that works for all types of logical
|
||||
// data sources is to get AbstractFile from database and use it's name.
|
||||
// Content.getName() works for most but not all scenarios.
|
||||
AbstractFile file = caseForJob.getSleuthkitCase().getAbstractFileById(content.getId());
|
||||
dataSourceName = file.getName();
|
||||
}
|
||||
|
||||
// save the JSON output
|
||||
saveDataSourceInfoToFile(jsonGenerator, dataSourceName, content.getId());
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to create JSON output for 'Add Data Source' command", ex); //NON-NLS
|
||||
System.err.println("Failed to create JSON output for 'Add Data Source' command"); //NON-NLS
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to get data source info for 'Add Data Source' command output", ex); //NON-NLS
|
||||
System.err.println("Failed to get data source info for 'Add Data Source' command output"); //NON-NLS
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to get data source display name for 'Add Data Source' command output", ex); //NON-NLS
|
||||
System.err.println("Failed to get data source display name for 'Add Data Source' command output"); //NON-NLS
|
||||
} finally {
|
||||
if (jsonGenerator != null) {
|
||||
try {
|
||||
jsonGenerator.close();
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Failed to close JSON output file for 'Add Data Source' command", ex); //NON-NLS
|
||||
System.err.println("Failed to close JSON output file for 'Add Data Source' command"); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the list of all data sources in a case and then saves their info to
|
||||
* JSON output file.
|
||||
*
|
||||
* @param caseForJob Case object
|
||||
* @param outputDirPath Full path to a directory where JSON output should be
|
||||
* saved
|
||||
*/
|
||||
static void listAllDataSources(Case caseForJob, String outputDirPath) {
|
||||
JsonFactory jsonGeneratorFactory = new JsonFactory();
|
||||
String reportOutputPath = outputDirPath + File.separator + "listAllDataSources_" + TimeStampUtils.createTimeStamp() + ".json";
|
||||
java.io.File reportFile = Paths.get(reportOutputPath).toFile();
|
||||
try {
|
||||
Files.createDirectories(Paths.get(reportFile.getParent()));
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to create output file " + reportFile.toString() + " for 'List All Data Sources' command", ex); //NON-NLS
|
||||
System.err.println("Unable to create output file " + reportFile.toString() + " for 'List All Data Sources' command"); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
JsonGenerator jsonGenerator = null;
|
||||
try {
|
||||
jsonGenerator = jsonGeneratorFactory.createGenerator(reportFile, JsonEncoding.UTF8);
|
||||
// instert \n after each field for more readable formatting
|
||||
jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter().withObjectIndenter(new DefaultIndenter(" ", "\n")));
|
||||
|
||||
// list all image data sources
|
||||
Map<Long, String> imageDataSources = DataSourceLoader.getImageDataSources(caseForJob.getSleuthkitCase());
|
||||
for (Map.Entry<Long, String> entry : imageDataSources.entrySet()) {
|
||||
String dataSourceName;
|
||||
Long dataSourceObjOd = entry.getKey();
|
||||
dataSourceName = getImageDisplayName(caseForJob, dataSourceObjOd);
|
||||
if (dataSourceName == null) {
|
||||
// some image data sources do not have "display_name" set, use data source name instead
|
||||
dataSourceName = entry.getValue();
|
||||
}
|
||||
saveDataSourceInfoToFile(jsonGenerator, dataSourceName, dataSourceObjOd);
|
||||
}
|
||||
|
||||
// list all logical data sources
|
||||
Map<Long, String> logicalDataSources = DataSourceLoader.getLogicalDataSources(caseForJob.getSleuthkitCase());
|
||||
for (Map.Entry<Long, String> entry : logicalDataSources.entrySet()) {
|
||||
String dataSourceName = entry.getValue();
|
||||
Long dataSourceObjOd = entry.getKey();
|
||||
saveDataSourceInfoToFile(jsonGenerator, dataSourceName, dataSourceObjOd);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to create JSON output for 'List All Data Sources' command", ex); //NON-NLS
|
||||
System.err.println("Failed to create JSON output for 'List All Data Sources' command"); //NON-NLS
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to get data source info for 'List All Data Sources' command output", ex); //NON-NLS
|
||||
System.err.println("Failed to get data source info for 'List All Data Sources' command output"); //NON-NLS
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to get data source display name for 'List All Data Sources' command output", ex); //NON-NLS
|
||||
System.err.println("Failed to get data source display name for 'List All Data Sources' command output"); //NON-NLS
|
||||
} finally {
|
||||
if (jsonGenerator != null) {
|
||||
try {
|
||||
jsonGenerator.close();
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Failed to close JSON output file for 'List All Data Sources' command", ex); //NON-NLS
|
||||
System.err.println("Failed to close JSON output file for 'List All Data Sources' command"); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves data source info in JSON output file
|
||||
*
|
||||
* @param jsonGenerator Fully initialized JsonGenerator object
|
||||
* @param dataSourceName Name of the data source
|
||||
* @param dataSourceObjId Object Id of the data source
|
||||
* @throws IOException
|
||||
*/
|
||||
private static void saveDataSourceInfoToFile(JsonGenerator jsonGenerator, String dataSourceName, long dataSourceObjId) throws IOException {
|
||||
jsonGenerator.writeStartObject();
|
||||
jsonGenerator.writeStringField("@dataSourceName", dataSourceName);
|
||||
jsonGenerator.writeStringField("@dataSourceObjectId", String.valueOf(dataSourceObjId));
|
||||
jsonGenerator.writeEndObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets display_name from tsk_image_info table for Image data sources
|
||||
*
|
||||
* @param caseForJob Case object
|
||||
* @param dataSourceId object ID of the data source
|
||||
* @return
|
||||
* @throws TskCoreException
|
||||
* @throws SQLException
|
||||
*/
|
||||
private static String getImageDisplayName(Case caseForJob, Long dataSourceId) throws TskCoreException, SQLException {
|
||||
String getImageDataSourceQuery = "select display_name from tsk_image_info where obj_id = " + dataSourceId;
|
||||
try (SleuthkitCase.CaseDbQuery queryResult = caseForJob.getSleuthkitCase().executeQuery(getImageDataSourceQuery)) {
|
||||
ResultSet resultSet = queryResult.getResultSet();
|
||||
// check if we got a result
|
||||
while (resultSet.next()) {
|
||||
// we got a result so the data source was an image data source
|
||||
return resultSet.getString(1);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -491,8 +491,7 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer
|
||||
|
||||
@Override
|
||||
protected Map<Long, String> doInBackground() throws NoCurrentCaseException, TskCoreException, SQLException {
|
||||
DataSourceLoader loader = new DataSourceLoader();
|
||||
return loader.getDataSourceMap();
|
||||
return DataSourceLoader.getAllDataSources();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -70,7 +70,7 @@ final class ContactNode extends BlackboardArtifactNode {
|
||||
|
||||
@Override
|
||||
protected Sheet createSheet() {
|
||||
Sheet sheet = super.createSheet();
|
||||
Sheet sheet = new Sheet();
|
||||
|
||||
final BlackboardArtifact artifact = getArtifact();
|
||||
BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
|
||||
@@ -116,10 +116,6 @@ final class ContactNode extends BlackboardArtifactNode {
|
||||
sheetSet.put(new NodeProperty<>(bba.getAttributeType().getTypeName(), bba.getAttributeType().getDisplayName(), "", bba.getDisplayString()));
|
||||
}
|
||||
|
||||
// Don't need these values to appear in the Contact property sheet.
|
||||
sheetSet.remove("S");
|
||||
sheetSet.remove("C");
|
||||
|
||||
List<Content> children = artifact.getChildren();
|
||||
if(children != null) {
|
||||
int count = 0;
|
||||
|
||||
@@ -117,7 +117,7 @@ public class FileViewer extends javax.swing.JPanel implements DataContentViewer
|
||||
}
|
||||
|
||||
AbstractFile file = selectedNode.getLookup().lookup(AbstractFile.class);
|
||||
if (file == null) {
|
||||
if ((file == null) || (file.isDir())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class FileViewer extends javax.swing.JPanel implements DataContentViewer
|
||||
}
|
||||
|
||||
AbstractFile aFile = node.getLookup().lookup(AbstractFile.class);
|
||||
if (aFile == null) {
|
||||
if ((aFile == null) || (aFile.isDir())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,8 +220,8 @@
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-ingest-RunIngestAction.instance"/>
|
||||
</file>
|
||||
</folder>
|
||||
<!--<file name="org-sleuthkit-autopsy-report-ReportWizardAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-report-ReportWizardAction.instance"/>
|
||||
<!--<file name="org-sleuthkit-autopsy-report-infrastructure-ReportWizardAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-report-infrastructure-ReportWizardAction.instance"/>
|
||||
<attr name="position" intvalue="100"/>
|
||||
</file>-->
|
||||
<!--<file name="Separator1.instance_hidden"/>
|
||||
@@ -311,39 +311,39 @@
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.directorytree.FileSearchProvider"/>
|
||||
<attr name="position" intvalue="250"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-report-ReportHTML.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.TableReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.ReportHTML.getDefault"/>
|
||||
<file name="org-sleuthkit-autopsy-report-modules-html-HTMLReport.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.infrastructure.TableReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.modules.html.HTMLReport.getDefault"/>
|
||||
<attr name="position" intvalue="900"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-report-ReportExcel.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.TableReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.ReportExcel.getDefault"/>
|
||||
<file name="org-sleuthkit-autopsy-report-modules-excel.ExcelReport.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.infrastructure.TableReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.modules.excel.ExcelReport.getDefault"/>
|
||||
<attr name="position" intvalue="901"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-report-ReportBodyFile.instance">
|
||||
<file name="org-sleuthkit-autopsy-report-modules-bodyfile-BodyFileReport.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.GeneralReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.ReportBodyFile.getDefault"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.modules.bodyfile.BodyFileReport.getDefault"/>
|
||||
<attr name="position" intvalue="902"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-report-FileReportText.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.FileReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.FileReportText.getDefault"/>
|
||||
<file name="org-sleuthkit-autopsy-report-modules-file-FileReportText.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.infrastructure.FileReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.modules.file.FileReportText.getDefault"/>
|
||||
<attr name="position" intvalue="903"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-report-ReportKML.instance">
|
||||
<file name="org-sleuthkit-autopsy-report-modules-kml-KMLReport.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.GeneralReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.ReportKML.getDefault"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.modules.kml.KMLReport.getDefault"/>
|
||||
<attr name="position" intvalue="904"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-modules-stix-STIXReportModule.instance">
|
||||
<file name="org-sleuthkit-autopsy-report-modules-stix-STIXReportModule.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.GeneralReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.modules.stix.STIXReportModule.getDefault"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.modules.stix.STIXReportModule.getDefault"/>
|
||||
<attr name="position" intvalue="910"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-report-caseuco-ReportCaseUco.instance">
|
||||
<file name="org-sleuthkit-autopsy-report-modules-caseuco-CaseUcoReport.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.report.GeneralReportModule"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.caseuco.ReportCaseUco.getDefault"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.report.modules.caseuco.CaseUcoReport.getDefault"/>
|
||||
<attr name="position" intvalue="911"/>
|
||||
</file>
|
||||
<!--<folder name="JavaHelp">
|
||||
@@ -391,9 +391,9 @@
|
||||
<attr name="position" intvalue="10000"/>
|
||||
</file>
|
||||
<!--
|
||||
<file name="org-sleuthkit-autopsy-report-ReportWizardAction.shadow">
|
||||
<attr name="displayName" bundlevalue="org.sleuthkit.autopsy.report.Bundle#Toolbars/Reports/org-sleuthkit-autopsy-report-ReportWizardAction.shadow"/>
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-report-ReportWizardAction.instance"/>
|
||||
<file name="org-sleuthkit-autopsy-report-infrastructure-ReportWizardAction.shadow">
|
||||
<attr name="displayName" bundlevalue="org.sleuthkit.autopsy.report.Bundle#Toolbars/Reports/org-sleuthkit-autopsy-report-infrastructure-ReportWizardAction.shadow"/>
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-report-infrastructure-ReportWizardAction.instance"/>
|
||||
<attr name="position" intvalue="103"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-casemodule-CaseCloseAction.instance">
|
||||
|
||||
@@ -892,6 +892,8 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
"DataResultViewerTable.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0}",
|
||||
"DataResultViewerTable.goToPageTextField.err=Invalid page number"})
|
||||
void gotoPage() {
|
||||
int originalPage = currentPage;
|
||||
|
||||
try {
|
||||
currentPage = Integer.decode(gotoPageTextField.getText());
|
||||
} catch (NumberFormatException e) {
|
||||
@@ -900,7 +902,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
}
|
||||
|
||||
if (currentPage > totalPages || currentPage < 1) {
|
||||
currentPage = 1;
|
||||
currentPage = originalPage;
|
||||
JOptionPane.showMessageDialog(DataResultViewerTable.this,
|
||||
Bundle.DataResultViewerTable_goToPageTextField_msgDlg(totalPages),
|
||||
Bundle.DataResultViewerTable_goToPageTextField_err(),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -95,8 +95,8 @@ public final class AppSQLiteDB implements Closeable {
|
||||
* AppSQLiteDB to help query the DB.
|
||||
*
|
||||
* A list of AppSQLiteDB instances is returned, one for each
|
||||
* match found.,
|
||||
* .
|
||||
* match found.
|
||||
*
|
||||
* @param dataSource data source to search in
|
||||
* @param dbName db file name to search
|
||||
* @param matchExactName whether to look for exact file name or a pattern match
|
||||
@@ -174,7 +174,7 @@ public final class AppSQLiteDB implements Closeable {
|
||||
* @param dbName db file name to search
|
||||
* @param matchExactName whether to look for exact file name or a pattern match
|
||||
* @param dbPath path to match
|
||||
* @param matchExactName whether to look for exact path name or a substring match
|
||||
* @param matchExactPath whether to look for exact path name or a substring match
|
||||
*
|
||||
* @return a collection of AppSQLiteDBFileBundle
|
||||
*
|
||||
|
||||
@@ -206,7 +206,7 @@ public final class ExecUtil {
|
||||
* @param terminator The ProcessTerminator used to determine if the process
|
||||
* should be killed.
|
||||
*
|
||||
* @returnthe exit value of the process
|
||||
* @return the exit value of the process
|
||||
*
|
||||
* @throws SecurityException if a security manager exists and vetoes any
|
||||
* aspect of running the process.
|
||||
|
||||
@@ -42,7 +42,19 @@ public class DataSourceLoader {
|
||||
|
||||
private static final String SELECT_DATA_SOURCES_IMAGE = "select obj_id, name from tsk_image_names where obj_id in (SELECT obj_id FROM tsk_objects WHERE obj_id in (select obj_id from data_source_info))";
|
||||
|
||||
private void loadLogicalSources(SleuthkitCase tskDb, Map<Long, String> dataSouceMap) throws TskCoreException, SQLException {
|
||||
/**
|
||||
* Query case database for a list of all existing logical data sources and
|
||||
* their object IDs.
|
||||
*
|
||||
* @param tskDb SleuthkitCase database handle
|
||||
*
|
||||
* @return Map of Long (id) to String (data source file name only)
|
||||
* @throws TskCoreException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public static Map<Long, String> getLogicalDataSources(SleuthkitCase tskDb) throws TskCoreException, SQLException {
|
||||
|
||||
Map<Long, String> dataSourceMap = new HashMap<>();
|
||||
//try block releases resources - exceptions are handled in done()
|
||||
try (
|
||||
SleuthkitCase.CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_LOGICAL);
|
||||
@@ -50,12 +62,25 @@ public class DataSourceLoader {
|
||||
while (resultSet.next()) {
|
||||
Long objectId = resultSet.getLong(1);
|
||||
String dataSourceName = resultSet.getString(2);
|
||||
dataSouceMap.put(objectId, dataSourceName);
|
||||
dataSourceMap.put(objectId, dataSourceName);
|
||||
}
|
||||
}
|
||||
return dataSourceMap;
|
||||
}
|
||||
|
||||
private void loadImageSources(SleuthkitCase tskDb, Map<Long, String> dataSourceMap) throws SQLException, TskCoreException {
|
||||
/**
|
||||
* Query case database for a list of all existing image data sources and
|
||||
* their object IDs.
|
||||
*
|
||||
* @param tskDb SleuthkitCase database handle
|
||||
*
|
||||
* @return Map of Long (id) to String (data source file name only)
|
||||
* @throws SQLException
|
||||
* @throws TskCoreException
|
||||
*/
|
||||
public static Map<Long, String> getImageDataSources(SleuthkitCase tskDb) throws SQLException, TskCoreException {
|
||||
|
||||
Map<Long, String> dataSourceMap = new HashMap<>();
|
||||
//try block releases resources - exceptions are handled in done()
|
||||
try (
|
||||
SleuthkitCase.CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_IMAGE);
|
||||
@@ -71,27 +96,29 @@ public class DataSourceLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
return dataSourceMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a map of data source Ids to their string names for the current case.
|
||||
* Get a map of all data source Ids to their string names (data source file
|
||||
* name only) for the current case.
|
||||
*
|
||||
* @return Map of Long (id) to String (name)
|
||||
* @return Map of Long (id) to String (data source file name only)
|
||||
*
|
||||
* @throws NoCurrentCaseException
|
||||
* @throws TskCoreException
|
||||
* @throws SQLException
|
||||
*/
|
||||
public Map<Long, String> getDataSourceMap() throws NoCurrentCaseException, TskCoreException, SQLException {
|
||||
Map<Long, String> dataSouceMap = new HashMap<>();
|
||||
public static Map<Long, String> getAllDataSources() throws NoCurrentCaseException, TskCoreException, SQLException {
|
||||
Map<Long, String> dataSourceMap = new HashMap<>();
|
||||
|
||||
Case currentCase = Case.getCurrentCaseThrows();
|
||||
SleuthkitCase tskDb = currentCase.getSleuthkitCase();
|
||||
|
||||
loadLogicalSources(tskDb, dataSouceMap);
|
||||
dataSourceMap.putAll(getLogicalDataSources(tskDb));
|
||||
|
||||
loadImageSources(tskDb, dataSouceMap);
|
||||
dataSourceMap.putAll(getImageDataSources(tskDb));
|
||||
|
||||
return dataSouceMap;
|
||||
return dataSourceMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.RunIngestModulesAction
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JMenuItem;
|
||||
import org.openide.awt.DynamicMenuContent;
|
||||
@@ -54,11 +53,11 @@ final class RunIngestSubMenu extends JMenuItem implements DynamicMenuContent {
|
||||
|
||||
try {
|
||||
dataSources = Case.getCurrentCaseThrows().getDataSources();
|
||||
} catch (IllegalStateException ex) {
|
||||
} catch (IllegalStateException | NoCurrentCaseException ex) {
|
||||
// No open Cases, create a disabled empty menu
|
||||
return getEmpty();
|
||||
} catch (TskCoreException | NoCurrentCaseException e) {
|
||||
logger.log(Level.INFO, "Exception getting images: " + e.getMessage());
|
||||
} catch (TskCoreException e) {
|
||||
System.out.println("Exception getting images: " + e.getMessage()); //NON-NLS
|
||||
}
|
||||
JComponent[] comps = new JComponent[dataSources.size()];
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
@@ -63,6 +64,8 @@ final class AddLogicalImageTask implements Runnable {
|
||||
private final static String MODULE_NAME = "Logical Imager"; //NON-NLS
|
||||
private final static String ROOT_STR = "root"; // NON-NLS
|
||||
private final static String VHD_EXTENSION = ".vhd"; // NON-NLS
|
||||
private final static int REPORT_PROGRESS_INTERVAL = 100;
|
||||
private final static int POST_ARTIFACT_INTERVAL = 1000;
|
||||
private final String deviceId;
|
||||
private final String timeZone;
|
||||
private final File src;
|
||||
@@ -144,7 +147,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS, errorList, emptyDataSources);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Add the SearchResults.txt and users.txt to the case report
|
||||
String resultsFilename;
|
||||
if (Paths.get(dest.toString(), SEARCH_RESULTS_TXT).toFile().exists()) {
|
||||
@@ -198,6 +201,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
}
|
||||
|
||||
List<Content> newDataSources = new ArrayList<>();
|
||||
Map<String, List<Long>> interestingFileMap = new HashMap<>();
|
||||
|
||||
if (imagePaths.isEmpty()) {
|
||||
createVHD = false;
|
||||
@@ -214,7 +218,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
|
||||
try {
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingExtractedFiles());
|
||||
addExtractedFiles(dest, resultsPath, newDataSources);
|
||||
interestingFileMap = addExtractedFiles(dest, resultsPath, newDataSources);
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_doneAddingExtractedFiles());
|
||||
} catch (IOException | TskCoreException ex) {
|
||||
errorList.add(ex.getMessage());
|
||||
@@ -239,8 +243,16 @@ final class AddLogicalImageTask implements Runnable {
|
||||
if (addMultipleImagesTask.getResult() == DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to add VHD datasource"); // NON-NLS
|
||||
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS, addMultipleImagesTask.getErrorMessages(), emptyDataSources);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
interestingFileMap = getInterestingFileMapForVHD(Paths.get(dest.toString(), resultsFilename));
|
||||
} catch (TskCoreException | IOException ex) {
|
||||
errorList.add(Bundle.AddLogicalImageTask_failedToAddInterestingFiles(ex.getMessage()));
|
||||
LOGGER.log(Level.SEVERE, "Failed to add interesting files", ex); // NON-NLS
|
||||
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.NONCRITICAL_ERRORS, errorList, emptyDataSources);
|
||||
}
|
||||
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
String msg = Bundle.AddLogicalImageTask_noCurrentCase();
|
||||
errorList.add(msg);
|
||||
@@ -251,7 +263,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
|
||||
if (cancelled) {
|
||||
if (!createVHD) {
|
||||
// TODO: When 5453 is fixed, we should be able to delete it when adding VHD.
|
||||
// TODO: When 5453 is fixed, we should be able to delete it when adding VHD.
|
||||
deleteDestinationDirectory();
|
||||
}
|
||||
errorList.add(Bundle.AddLogicalImageTask_addImageCancelled());
|
||||
@@ -261,7 +273,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
|
||||
try {
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingInterestingFiles());
|
||||
addInterestingFiles(Paths.get(dest.toString(), resultsFilename), createVHD);
|
||||
addInterestingFiles(interestingFileMap);
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_doneAddingInterestingFiles());
|
||||
if (createVHD) {
|
||||
callback.done(addMultipleImagesTask.getResult(), addMultipleImagesTask.getErrorMessages(), addMultipleImagesTask.getNewDataSources());
|
||||
@@ -332,13 +344,69 @@ final class AddLogicalImageTask implements Runnable {
|
||||
"# {0} - target image path", "AddLogicalImageTask.cannotFindDataSourceObjId=Cannot find obj_id in tsk_image_names for {0}",
|
||||
"# {0} - file number", "# {1} - total files", "AddLogicalImageTask.addingInterestingFile=Adding interesting files ({0}/{1})"
|
||||
})
|
||||
private void addInterestingFiles(Path resultsPath, boolean createVHD) throws IOException, TskCoreException {
|
||||
private void addInterestingFiles(Map<String, List<Long>> interestingFileMap) throws IOException, TskCoreException {
|
||||
int lineNumber = 0;
|
||||
List<BlackboardArtifact> artifacts = new ArrayList<>();
|
||||
|
||||
Iterator<Map.Entry<String, List<Long>>> iterator = interestingFileMap.entrySet().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
|
||||
if (cancelled) {
|
||||
// Don't delete destination directory once we started adding interesting files.
|
||||
// At this point the database and destination directory are complete.
|
||||
break;
|
||||
}
|
||||
|
||||
Map.Entry<String, List<Long>> entry = iterator.next();
|
||||
String key = entry.getKey();
|
||||
String ruleSetName;
|
||||
String ruleName;
|
||||
String[] split = key.split("\t");
|
||||
ruleSetName = split[0];
|
||||
ruleName = split[1];
|
||||
|
||||
List<Long> fileIds = entry.getValue();
|
||||
for (Long fileId: fileIds) {
|
||||
if (cancelled) {
|
||||
postArtifacts(artifacts);
|
||||
return;
|
||||
}
|
||||
if (lineNumber % REPORT_PROGRESS_INTERVAL == 0) {
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingInterestingFile(lineNumber, totalFiles));
|
||||
}
|
||||
if (lineNumber % POST_ARTIFACT_INTERVAL == 0) {
|
||||
postArtifacts(artifacts);
|
||||
artifacts.clear();
|
||||
}
|
||||
addInterestingFileToArtifacts(fileId, ruleSetName, ruleName, artifacts);
|
||||
lineNumber++;
|
||||
}
|
||||
iterator.remove();
|
||||
}
|
||||
postArtifacts(artifacts);
|
||||
}
|
||||
|
||||
private void addInterestingFileToArtifacts(long fileId, String ruleSetName, String ruleName, List<BlackboardArtifact> artifacts) throws TskCoreException {
|
||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||
BlackboardAttribute setNameAttribute = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME, MODULE_NAME, ruleSetName);
|
||||
attributes.add(setNameAttribute);
|
||||
BlackboardAttribute ruleNameAttribute = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_CATEGORY, MODULE_NAME, ruleName);
|
||||
attributes.add(ruleNameAttribute);
|
||||
BlackboardArtifact artifact = this.currentCase.getSleuthkitCase().newBlackboardArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, fileId);
|
||||
artifact.addAttributes(attributes);
|
||||
artifacts.add(artifact);
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"# {0} - file number", "# {1} - total files", "AddLogicalImageTask.searchingInterestingFile=Searching for interesting files ({0}/{1})"
|
||||
})
|
||||
private Map<String, List<Long>> getInterestingFileMapForVHD(Path resultsPath) throws TskCoreException, IOException {
|
||||
Map<Long, List<String>> objIdToimagePathsMap = currentCase.getSleuthkitCase().getImagePaths();
|
||||
imagePathToObjIdMap = imagePathsToDataSourceObjId(objIdToimagePathsMap);
|
||||
Map<String, List<Long>> interestingFileMap = new HashMap<>();
|
||||
|
||||
try (BufferedReader br = new BufferedReader(new InputStreamReader(
|
||||
new FileInputStream(resultsPath.toFile()), "UTF8"))) { // NON-NLS
|
||||
List<BlackboardArtifact> artifacts = new ArrayList<>();
|
||||
String line;
|
||||
br.readLine(); // skip the header line
|
||||
int lineNumber = 2;
|
||||
@@ -362,47 +430,44 @@ final class AddLogicalImageTask implements Runnable {
|
||||
String filename = fields[7];
|
||||
String parentPath = fields[8];
|
||||
|
||||
if (lineNumber % 100 == 0) {
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingInterestingFile(lineNumber, totalFiles));
|
||||
if (lineNumber % REPORT_PROGRESS_INTERVAL == 0) {
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_searchingInterestingFile(lineNumber, totalFiles));
|
||||
}
|
||||
String query = makeQuery(createVHD, vhdFilename, fileMetaAddressStr, parentPath, filename);
|
||||
|
||||
// TODO - findAllFilesWhere should SQL-escape the query
|
||||
String query = makeQuery(vhdFilename, fileMetaAddressStr, parentPath, filename);
|
||||
List<AbstractFile> matchedFiles = Case.getCurrentCase().getSleuthkitCase().findAllFilesWhere(query);
|
||||
List<Long> fileIds = new ArrayList<>();
|
||||
for (AbstractFile file : matchedFiles) {
|
||||
addInterestingFileToArtifacts(file, ruleSetName, ruleName, artifacts);
|
||||
fileIds.add(file.getId());
|
||||
}
|
||||
String key = String.format("%s\t%s", ruleSetName, ruleName);
|
||||
if (interestingFileMap.containsKey(key)) {
|
||||
interestingFileMap.get(key).addAll(fileIds);
|
||||
} else {
|
||||
interestingFileMap.put(key, fileIds);
|
||||
}
|
||||
lineNumber++;
|
||||
} // end reading file
|
||||
|
||||
try {
|
||||
// index the artifact for keyword search
|
||||
blackboard.postArtifacts(artifacts, MODULE_NAME);
|
||||
} catch (Blackboard.BlackboardException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to post artifacts to blackboard", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
return interestingFileMap;
|
||||
}
|
||||
|
||||
private void addInterestingFileToArtifacts(AbstractFile file, String ruleSetName, String ruleName, List<BlackboardArtifact> artifacts) throws TskCoreException {
|
||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||
BlackboardAttribute setNameAttribute = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME, MODULE_NAME, ruleSetName);
|
||||
attributes.add(setNameAttribute);
|
||||
BlackboardAttribute ruleNameAttribute = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_CATEGORY, MODULE_NAME, ruleName);
|
||||
attributes.add(ruleNameAttribute);
|
||||
if (!blackboard.artifactExists(file, BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, attributes)) {
|
||||
BlackboardArtifact artifact = this.currentCase.getSleuthkitCase().newBlackboardArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, file.getId());
|
||||
artifact.addAttributes(attributes);
|
||||
artifacts.add(artifact);
|
||||
private void postArtifacts(List<BlackboardArtifact> artifacts) {
|
||||
try {
|
||||
// index the artifact for keyword search
|
||||
blackboard.postArtifacts(artifacts, MODULE_NAME);
|
||||
} catch (Blackboard.BlackboardException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Unable to post artifacts to blackboard", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"# {0} - file number", "# {1} - total files", "AddLogicalImageTask.addingExtractedFile=Adding extracted files ({0}/{1})"
|
||||
})
|
||||
private void addExtractedFiles(File src, Path resultsPath, List<Content> newDataSources) throws TskCoreException, IOException {
|
||||
private Map<String, List<Long>> addExtractedFiles(File src, Path resultsPath, List<Content> newDataSources) throws TskCoreException, IOException {
|
||||
SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase();
|
||||
SleuthkitCase.CaseDbTransaction trans = null;
|
||||
Map<String, List<Long>> interestingFileMap = new HashMap<>();
|
||||
|
||||
try {
|
||||
trans = skCase.beginTransaction();
|
||||
@@ -417,7 +482,7 @@ final class AddLogicalImageTask implements Runnable {
|
||||
while ((line = br.readLine()) != null) {
|
||||
if (cancelled) {
|
||||
rollbackTransaction(trans);
|
||||
return;
|
||||
return new HashMap<>();
|
||||
}
|
||||
String[] fields = line.split("\t", -1); // NON-NLS
|
||||
if (fields.length != 14) {
|
||||
@@ -428,8 +493,8 @@ final class AddLogicalImageTask implements Runnable {
|
||||
// String fileSystemOffsetStr = fields[1];
|
||||
// String fileMetaAddressStr = fields[2];
|
||||
// String extractStatusStr = fields[3];
|
||||
// String ruleSetName = fields[4];
|
||||
// String ruleName = fields[5];
|
||||
String ruleSetName = fields[4];
|
||||
String ruleName = fields[5];
|
||||
// String description = fields[6];
|
||||
String filename = fields[7];
|
||||
String parentPath = fields[8];
|
||||
@@ -440,12 +505,12 @@ final class AddLogicalImageTask implements Runnable {
|
||||
String ctime = fields[13];
|
||||
parentPath = ROOT_STR + "/" + vhdFilename + "/" + parentPath;
|
||||
|
||||
if (lineNumber % 100 == 0) {
|
||||
if (lineNumber % REPORT_PROGRESS_INTERVAL == 0) {
|
||||
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingExtractedFile(lineNumber, totalFiles));
|
||||
}
|
||||
|
||||
//addLocalFile here
|
||||
fileImporter.addLocalFile(
|
||||
AbstractFile fileAdded = fileImporter.addLocalFile(
|
||||
Paths.get(src.toString(), extractedFilePath).toFile(),
|
||||
filename,
|
||||
parentPath,
|
||||
@@ -454,12 +519,19 @@ final class AddLogicalImageTask implements Runnable {
|
||||
Long.parseLong(atime),
|
||||
Long.parseLong(mtime),
|
||||
localFilesDataSource);
|
||||
|
||||
String key = String.format("%s\t%s", ruleSetName, ruleName);
|
||||
List<Long> value = new ArrayList<>();
|
||||
if (interestingFileMap.containsKey(key)) {
|
||||
value = interestingFileMap.get(key);
|
||||
}
|
||||
value.add(fileAdded.getId());
|
||||
interestingFileMap.put(key, value);
|
||||
lineNumber++;
|
||||
} // end reading file
|
||||
}
|
||||
trans.commit();
|
||||
newDataSources.add(localFilesDataSource);
|
||||
return interestingFileMap;
|
||||
|
||||
} catch (NumberFormatException | TskCoreException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error adding extracted files", ex); // NON-NLS
|
||||
@@ -489,21 +561,16 @@ final class AddLogicalImageTask implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
String makeQuery(boolean createVHD, String vhdFilename, String fileMetaAddressStr, String parentPath, String filename) throws TskCoreException {
|
||||
String makeQuery(String vhdFilename, String fileMetaAddressStr, String parentPath, String filename) throws TskCoreException {
|
||||
String query;
|
||||
if (createVHD) {
|
||||
String targetImagePath = Paths.get(dest.toString(), vhdFilename).toString();
|
||||
Long dataSourceObjId = imagePathToObjIdMap.get(targetImagePath);
|
||||
if (dataSourceObjId == null) {
|
||||
throw new TskCoreException(Bundle.AddLogicalImageTask_cannotFindDataSourceObjId(targetImagePath));
|
||||
}
|
||||
query = String.format("data_source_obj_id = '%s' AND meta_addr = '%s' AND name = '%s'", // NON-NLS
|
||||
dataSourceObjId.toString(), fileMetaAddressStr, filename.replace("'", "''"));
|
||||
} else {
|
||||
String newParentPath = "/" + ROOT_STR + "/" + vhdFilename + "/" + parentPath;
|
||||
query = String.format("name = '%s' AND parent_path = '%s'", // NON-NLS
|
||||
filename.replace("'", "''"), newParentPath.replace("'", "''"));
|
||||
String targetImagePath = Paths.get(dest.toString(), vhdFilename).toString();
|
||||
Long dataSourceObjId = imagePathToObjIdMap.get(targetImagePath);
|
||||
if (dataSourceObjId == null) {
|
||||
throw new TskCoreException(Bundle.AddLogicalImageTask_cannotFindDataSourceObjId(targetImagePath));
|
||||
}
|
||||
query = String.format("data_source_obj_id = '%s' AND meta_addr = '%s' AND name = '%s'", // NON-NLS
|
||||
dataSourceObjId.toString(), fileMetaAddressStr, filename.replace("'", "''"));
|
||||
// TODO - findAllFilesWhere should SQL-escape the query
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ AddLogicalImageTask.noCurrentCase=No current case
|
||||
# {1} - fields length
|
||||
# {2} - expected length
|
||||
AddLogicalImageTask.notEnoughFields=File does not contain enough fields at line {0}, got {1}, expecting {2}
|
||||
# {0} - file number
|
||||
# {1} - total files
|
||||
AddLogicalImageTask.searchingInterestingFile=Searching for interesting files ({0}/{1})
|
||||
# {0} - imageFilePath
|
||||
AddMultipleImagesTask.adding=Adding: {0}
|
||||
# {0} - file
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -692,7 +693,9 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public static abstract class HashDb {
|
||||
public static abstract class HashDb implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Indicates how files with hashes stored in a particular hash database
|
||||
@@ -791,7 +794,7 @@ public class HashDbManager implements PropertyChangeListener {
|
||||
* Instances of this class represent hash databases used to classify files
|
||||
* as known or know bad.
|
||||
*/
|
||||
class SleuthkitHashSet extends HashDb{
|
||||
class SleuthkitHashSet extends HashDb {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final int handle;
|
||||
|
||||
@@ -1,272 +1,4 @@
|
||||
OpenIDE-Module-Name=Report
|
||||
CTL_ReportWizardAction=Run Report
|
||||
ArtifactSelectionDialog.titleLabel.text=Select which artifacts you would like to report on:
|
||||
ArtifactSelectionDialog.okButton.text=OK
|
||||
ReportVisualPanel1.reportModulesLabel.text=Report Modules:
|
||||
ReportVisualPanel1.invalidModuleWarning=Encountered an invalid Report Module ({0})
|
||||
DefaultReportConfigurationPanel.infoLabel.text=This report will be configured on the next screen.
|
||||
ReportVisualPanel2.dataLabel.text=Select which data to report on:
|
||||
ReportVisualPanel2.deselectAllButton.text=Deselect All
|
||||
ReportVisualPanel2.selectAllButton.text=Select All
|
||||
ReportVisualPanel2.advancedButton.text=Data Types
|
||||
ArtifactSelectionDialog.deselectAllButton.text=Deselect All
|
||||
ArtifactSelectionDialog.selectAllButton.text=Select All
|
||||
ReportGenerationPanel.closeButton.text=Close
|
||||
ReportProgressPanel.reportLabel.text=reportLabel
|
||||
ReportProgressPanel.pathLabel.text=pathLabel
|
||||
ReportProgressPanel.separationLabel.text=:
|
||||
ReportProgressPanel.statusMessageLabel.text=processingLabel
|
||||
ReportGenerationPanel.titleLabel.text=Report Generation Progress
|
||||
ReportVisualPanel2.taggedResultsRadioButton.text=Tagged Results
|
||||
ReportVisualPanel2.allResultsRadioButton.text=All Results
|
||||
ReportWizardFileOptionsVisualPanel.selectAllButton.text=Select All
|
||||
ReportWizardFileOptionsVisualPanel.deselectAllButton.text=Deselect All
|
||||
ReportWizardFileOptionsVisualPanel.jLabel1.text=Select items to include in File Report:
|
||||
ArtifactSelectionDialog.dlgTitle.text=Advanced Artifact Selection
|
||||
FileReportDataTypes.filename.text=Name
|
||||
FileReportDataTypes.fileExt.text=File Extension
|
||||
FileReportDataTypes.fileType.text=File Type
|
||||
FileReportDataTypes.isDel.text=Is Deleted
|
||||
FileReportDataTypes.aTime.text=Last Accessed
|
||||
FileReportDataTypes.crTime.text=File Created
|
||||
FileReportDataTypes.mTime.text=Last Modified
|
||||
FileReportDataTypes.size.text=Size
|
||||
FileReportDataTypes.address.text=Address
|
||||
FileReportDataTypes.hash.text=Hash Value
|
||||
FileReportDataTypes.knownStatus.text=Known Status
|
||||
FileReportDataTypes.perms.text=Permissions
|
||||
FileReportDataTypes.path.text=Full Path
|
||||
FileReportText.getName.text=Files - Text
|
||||
FileReportText.getDesc.text=A delimited text file containing information about individual files in the case.
|
||||
ReportBodyFile.progress.querying=Querying files...
|
||||
ReportBodyFile.ingestWarning.text=Warning, this report was run before ingest services completed\!
|
||||
ReportBodyFile.progress.loading=Loading files...
|
||||
ReportBodyFile.progress.processing=Now processing {0}...
|
||||
ReportBodyFile.getName.text=TSK Body File
|
||||
ReportBodyFile.getDesc.text=Body file format report with MAC times for every file. This format can be used for a timeline view.
|
||||
ReportBodyFile.getFilePath.text=BodyFile.txt
|
||||
ReportKML.progress.querying=Querying files...
|
||||
ReportKML.progress.loading=Loading files...
|
||||
ReportKML.getName.text=Google Earth KML
|
||||
ReportKML.getDesc.text=KML format report with coordinates for relevant files. This format can be used for google earth views.
|
||||
ReportKML.getFilePath.text=ReportKML.kml
|
||||
ReportBranding.defaultReportTitle.text=Autopsy Forensic Report
|
||||
ReportBranding.defaultReportFooter.text=Powered by Autopsy Open Source Digital Forensics Platform - www.sleuthkit.org
|
||||
ReportExcel.numAartifacts.text=Number of artifacts:
|
||||
ReportExcel.getName.text=Excel Report
|
||||
ReportExcel.getDesc.text=A report about results and tagged items in Excel (XLS) format.
|
||||
ReportExcel.sheetName.text=Summary
|
||||
ReportExcel.cellVal.summary=Summary
|
||||
ReportExcel.cellVal.caseName=Case Name:
|
||||
ReportExcel.cellVal.caseNum=Case Number:
|
||||
ReportExcel.cellVal.examiner=Examiner:
|
||||
ReportExcel.cellVal.numImages=Number of Images:
|
||||
ReportGenerationPanel.confDlg.sureToClose.msg=Are you sure you'd like to close the dialog?\nAll reports will be canceled.
|
||||
ReportGenerationPanel.confDlg.title.closing=Closing
|
||||
ReportGenerationPanel.confDlg.cancelReport.msg=Are you sure you'd like to cancel the report?
|
||||
ReportGenerator.displayProgress.title.text=Report Generation Progress...
|
||||
ReportGenerator.progress.queryingDb.text=Querying database...
|
||||
ReportGenerator.progress.processingFile.text=Now processing {0}
|
||||
ReportGenerator.artifactTable.taggedResults.text=Contains results that were tagged with one of the following:
|
||||
ReportGenerator.progress.processing=Now processing {0}...
|
||||
ReportGenerator.msgShow.skippingArtType.title=Skipping artifact type {0} in reports
|
||||
ReportGenerator.msgShow.skippingArtType.msg=Unknown columns to report on
|
||||
ReportGenerator.makeContTagTab.taggedFiles.msg=Contains files that were tagged with one of the following:
|
||||
ReportGenerator.makeBbArtTagTab.taggedRes.msg=This report only includes results tagged with:
|
||||
ReportGenerator.tagTable.header.resultType=Result Type
|
||||
ReportGenerator.tagTable.header.tag=Tag
|
||||
ReportGenerator.tagTable.header.comment=Comment
|
||||
ReportGenerator.tagTable.header.srcFile=Source File
|
||||
ReportGenerator.progress.createdThumb.text=Creating thumbnails...
|
||||
ReportGenerator.htmlOutput.header.file=File
|
||||
ReportGenerator.htmlOutput.header.tag=Tag
|
||||
ReportGenerator.htmlOutput.header.comment=Comment
|
||||
ReportGenerator.htmlOutput.header.timeModified=Modified Time
|
||||
ReportGenerator.htmlOutput.header.timeChanged=Changed Time
|
||||
ReportGenerator.htmlOutput.header.timeAccessed=Accessed Time
|
||||
ReportGenerator.htmlOutput.header.timeCreated=Created Time
|
||||
ReportGenerator.htmlOutput.header.size=Size (Bytes)
|
||||
ReportGenerator.htmlOutput.header.hash=Hash
|
||||
ReportGenerator.thumbnailTable.name=Tagged Images
|
||||
ReportGenerator.thumbnailTable.desc=Contains thumbnails of images that are associated with tagged files and results.
|
||||
ReportGenerator.writeKwHits.userSrchs=User Searches
|
||||
ReportGenerator.progress.processingList=Now processing {0} ({1})...
|
||||
ReportGenerator.artTableColHdr.url=URL
|
||||
ReportGenerator.artTableColHdr.title=Title
|
||||
ReportGenerator.artTableColHdr.dateCreated=Date Created
|
||||
ReportGenerator.artTableColHdr.program=Program
|
||||
ReportGenerator.artTableColHdr.urlDomainDecoded=URL Domain
|
||||
ReportGenerator.artTableColHdr.srcFile=Source File
|
||||
ReportGenerator.artTableColHdr.dateTime=Date/Time
|
||||
ReportGenerator.artTableColHdr.name=Name
|
||||
ReportGenerator.artTableColHdr.value=Value
|
||||
ReportGenerator.artTableColHdr.dateAccessed=Date Accessed
|
||||
ReportGenerator.artTableColHdr.referrer=Referrer
|
||||
ReportGenerator.artTableColHdr.dest=Destination
|
||||
ReportGenerator.artTableColHdr.sourceUrl=Source URL
|
||||
ReportGenerator.artTableColHdr.path=Path
|
||||
ReportGenerator.artTableColHdr.progName=Program Name
|
||||
ReportGenerator.artTableColHdr.instDateTime=Install Date/Time
|
||||
ReportGenerator.artTableColHdr.preview=Preview
|
||||
ReportGenerator.artTableColHdr.file=File
|
||||
ReportGenerator.artTableColHdr.size=Size
|
||||
ReportGenerator.artTableColHdr.deviceId=Device ID
|
||||
ReportGenerator.artTableColHdr.text=Text
|
||||
ReportGenerator.artTableColHdr.domain=Domain
|
||||
ReportGenerator.artTableColHdr.dateTaken=Date Taken
|
||||
ReportGenerator.artTableColHdr.devManufacturer=Device Manufacturer
|
||||
ReportGenerator.artTableColHdr.devMake=Device Make
|
||||
ReportGenerator.artTableColHdr.devModel=Device Model
|
||||
ReportGenerator.artTableColHdr.latitude=Latitude
|
||||
ReportGenerator.artTableColHdr.longitude=Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeStart=Starting Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeStart=Starting Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeEnd=Ending Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeEnd=Ending Longitude
|
||||
ReportGenerator.artTableColHdr.associatedArtifact=Associated Artifact
|
||||
ReportGenerator.artTableColHdr.count=Count
|
||||
ReportGenerator.artTableColHdr.personName=Person Name
|
||||
ReportGenerator.artTableColHdr.phoneNumber=Phone Number
|
||||
ReportGenerator.artTableColHdr.phoneNumHome=Phone Number (Home)
|
||||
ReportGenerator.artTableColHdr.phoneNumOffice=Phone Number (Office)
|
||||
ReportGenerator.artTableColHdr.phoneNumMobile=Phone Number (Mobile)
|
||||
ReportGenerator.artTableColHdr.email=Email
|
||||
ReportGenerator.artTableColHdr.msgType=Message Type
|
||||
ReportGenerator.artTableColHdr.direction=Direction
|
||||
ReportGenerator.artTableColHdr.readStatus=Read Status
|
||||
ReportGenerator.artTableColHdr.fromPhoneNum=From Phone Number
|
||||
ReportGenerator.artTableColHdr.fromEmail=From Email
|
||||
ReportGenerator.artTableColHdr.toPhoneNum=To Phone Number
|
||||
ReportGenerator.artTableColHdr.toEmail=To Email
|
||||
ReportGenerator.artTableColHdr.subject=Subject
|
||||
ReportGenerator.artTableColHdr.tskEmailTo=E-Mail To
|
||||
ReportGenerator.artTableColHdr.tskEmailCc=E-Mail CC
|
||||
ReportGenerator.artTableColHdr.tskEmailBcc=E-Mail BCC
|
||||
ReportGenerator.artTableColHdr.tskEmailFrom=E-Mail From
|
||||
ReportGenerator.artTableColHdr.tskMsgId=Message ID
|
||||
ReportGenerator.artTableColHdr.tskDateTimeRcvd=Date Received
|
||||
ReportGenerator.artTableColHdr.tskDateTimeSent=Date Sent
|
||||
ReportGenerator.artTableColHdr.tskSubject=Subject
|
||||
ReportGenerator.artTableColHdr.tskSetName=Set Name
|
||||
ReportGenerator.artTableColHdr.tskInterestingFilesCategory=Rule
|
||||
ReportGenerator.artTableColHdr.tskGpsRouteCategory=Category
|
||||
ReportGenerator.artTableColHdr.tskPath=Path
|
||||
ReportGenerator.artTableColHdr.calendarEntryType=Calendar Entry Type
|
||||
ReportGenerator.artTableColHdr.description=Description
|
||||
ReportGenerator.artTableColHdr.startDateTime=Start Date/Time
|
||||
ReportGenerator.artTableColHdr.endDateTime=End Date/Time
|
||||
ReportGenerator.artTableColHdr.location=Location
|
||||
ReportGenerator.artTableColHdr.shortCut=Short Cut
|
||||
ReportGenerator.artTableColHdr.deviceName=Device Name
|
||||
ReportGenerator.artTableColHdr.deviceAddress=Device Address
|
||||
ReportGenerator.artTableColHdr.altitude=Altitude
|
||||
ReportGenerator.artTableColHdr.locationAddress=Location Address
|
||||
ReportGenerator.artTableColHdr.category=Category
|
||||
ReportGenerator.artTableColHdr.userId=User ID
|
||||
ReportGenerator.artTableColHdr.userName=User Name
|
||||
ReportGenerator.artTableColHdr.password=Password
|
||||
ReportGenerator.artTableColHdr.appName=App Name
|
||||
ReportGenerator.artTableColHdr.appPath=App Path
|
||||
ReportGenerator.artTableColHdr.replytoAddress=ReplyTo Address
|
||||
ReportGenerator.artTableColHdr.mailServer=Mail Server
|
||||
ReportGenerator.artTableColHdr.tags=Tags
|
||||
ReportGenerator.artTableColHdr.localPath=Local path
|
||||
ReportGenerator.artTableColHdr.remotePath=Remote path
|
||||
ReportGenerator.errors.reportErrorTitle=Error generating report
|
||||
ReportGenerator.errors.reportErrorText=Error generating report:
|
||||
ReportHTML.addThumbRows.dataType.title=Tagged Images - {0}
|
||||
ReportHTML.addThumbRows.dataType.msg=Tagged Results and Contents that contain images.
|
||||
ReportHTML.thumbLink.tags=Tags:
|
||||
ReportHTML.getName.text=HTML Report
|
||||
ReportHTML.getDesc.text=A report about results and tagged items in HTML format.
|
||||
ReportHTML.writeIndex.title=for case {0}
|
||||
ReportHTML.writeIndex.noFrames.msg=Your browser is not compatible with our frame setup.
|
||||
ReportHTML.writeIndex.noFrames.seeNav=Please see <a href\="content\nav.html">the navigation page</a> for artifact links,
|
||||
ReportHTML.writeIndex.seeSum=and <a href\="content\summary.html">the summary page</a> for a case summary.
|
||||
ReportHTML.writeNav.title=Report Navigation
|
||||
ReportHTML.writeNav.h1=Report Navigation
|
||||
ReportHTML.writeNav.summary=Case Summary
|
||||
ReportHTML.writeSum.title=Case Summary
|
||||
ReportHTML.writeSum.warningMsg=<span>Warning, this report was run before ingest services completed\!</span>
|
||||
#
|
||||
# autopsy/test/scripts/regression.py._html_report_diff() uses reportGenOn.text, caseName, caseNum,
|
||||
# examiner as a regex signature to skip report.html and summary.html
|
||||
#
|
||||
ReportHTML.writeSum.reportGenOn.text=HTML Report Generated on {0}
|
||||
ReportHTML.writeSum.imageInfoHeading=<h2>Image Information:</h2>
|
||||
ReportHTML.writeSum.softwareInfoHeading=<h2>Software Information:</h2>
|
||||
ReportHTML.writeSum.ingestHistoryHeading=<h2>Ingest History:</h2>
|
||||
ReportHTML.writeSum.modulesEnabledHeading=Enabled Modules:
|
||||
ReportHTML.writeSum.autopsyVersion=Autopsy Version:
|
||||
ReportHTML.writeSum.timezone=Timezone:
|
||||
ReportHTML.writeSum.path=Path:
|
||||
ReportProgressPanel.progress.queuing=Queuing...
|
||||
ReportProgressPanel.initPathLabel.noFile=<html><u>No report file</u></html>
|
||||
ReportProgressPanel.start.cancelButton.text=Cancel
|
||||
ReportProgressPanel.start.progress.text=Starting report...
|
||||
ReportProgressPanel.complete.processLbl.text=Complete
|
||||
ReportProgressPanel.complete.processLb2.text=Completed with error
|
||||
ReportProgressPanel.complete.cancelButton.text=Complete
|
||||
ReportProgressPanel.cancel.cancelButton.toolTipText=Canceled
|
||||
ReportProgressPanel.cancel.procLbl.text=Canceled
|
||||
ReportVisualPanel1.getName.text=Select and Configure Report Modules
|
||||
ReportVisualPanel2.getName.text=Configure Artifact Reports
|
||||
ReportWizardAction.actionName.text=Generate Report
|
||||
ReportWizardAction.reportWiz.title=Generate Report
|
||||
ReportWizardAction.toolBarButton.text=Generate Report
|
||||
ReportWizardFileOptionsPanel.finishButton.text=Finish
|
||||
ReportWizardFileOptionsVisualPanel.getName.text=Configure File Report
|
||||
ReportWizardPanel1.nextButton.text=Next >
|
||||
ReportWizardPanel1.finishButton.text=Finish
|
||||
ReportWizardPanel2.finishButton.text=Finish
|
||||
ReportWizardPanel2.nextButton.text=Next >
|
||||
ReportBodyFile.generateReport.srcModuleName.text=TSK Body File
|
||||
ReportExcel.endReport.srcModuleName.text=Excel Report
|
||||
ReportHTML.writeIndex.srcModuleName.text=HTML Report
|
||||
ReportKML.genReport.srcModuleName.text=Geospatial Data
|
||||
ReportKML.genReport.reportName=KML Report
|
||||
ReportGenerator.artTableColHdr.extension.text=Extension
|
||||
ReportGenerator.artTableColHdr.mimeType.text=MIME Type
|
||||
ReportGenerator.artTableColHdr.processorArchitecture.text=Processor Architecture
|
||||
ReportGenerator.artTableColHdr.osName.text=Operating System Name
|
||||
ReportGenerator.artTableColHdr.osInstallDate.text=Install Date
|
||||
ReportGenerator.errList.failedMakeRptFolder=Failed to make report folder, may be unable to generate reports.
|
||||
ReportGenerator.notifyErr.errsDuringRptGen=Errors during report generation:
|
||||
ReportGenerator.errList.failedGetContentTags=Failed to get content tags.
|
||||
ReportGenerator.errList.failedGetBBArtifactTags=Failed to get blackboard artifact tags.
|
||||
ReportGenerator.errList.errGetContentFromBBArtifact=Error while getting content from a blackboard artifact to report on.
|
||||
ReportGenerator.errList.failedGetBBAttribs=Failed to get Blackboard Attributes when generating report.
|
||||
ReportGenerator.errList.failedGetBBArtifacts=Failed to get Blackboard Artifacts when generating report.
|
||||
ReportGenerator.errList.failedQueryKWLists=Failed to query keyword lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileByID=Failed to get Abstract File by ID.
|
||||
ReportGenerator.errList.failedQueryKWs=Failed to query keywords.
|
||||
ReportGenerator.errList.failedQueryHashsetLists=Failed to query hashset lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileFromID=Failed to get Abstract File from ID.
|
||||
ReportGenerator.errList.failedQueryHashsetHits=Failed to query hashsets hits.
|
||||
ReportGenerator.errList.coreExceptionWhileGenRptRow=Core exception while generating row data for artifact report.
|
||||
ReportKML.latLongStartPoint={0};{1};;{2} (Start)\n
|
||||
ReportKML.latLongEndPoint={0};{1};;{2} (End)\n
|
||||
ReportGenerationPanel.cancelButton.actionCommand=Cancel
|
||||
ReportGenerationPanel.cancelButton.text=Cancel
|
||||
ReportHTMLConfigurationPanel.headerTextField.text=
|
||||
ReportHTMLConfigurationPanel.footerTextField.text=
|
||||
ReportHTMLConfigurationPanel.headerLabel.text=Header:
|
||||
ReportHTMLConfigurationPanel.footerLabel.text=Footer:
|
||||
CreatePortableCasePanel.selectAllButton.text=Select All
|
||||
CreatePortableCasePanel.deselectAllButton.text=Deselect All
|
||||
CreatePortableCasePanel.outputFolderTextField.text=jTextField1
|
||||
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
|
||||
CreatePortableCasePanel.jLabel1.text=Export files tagged as:
|
||||
CreatePortableCasePanel.jLabel2.text=Select output folder:
|
||||
CreatePortableCasePanel.errorLabel.text_1=Windows only
|
||||
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into an archive:
|
||||
PortableCaseTagsListPanel.deselectButton.text=Deselect All
|
||||
PortableCaseTagsListPanel.selectButton.text=Select All
|
||||
PortableCaseInterestingItemsListPanel.selectButton.text=Select All
|
||||
PortableCaseInterestingItemsListPanel.deselectButton.text=Deselect All
|
||||
ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
|
||||
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
|
||||
PortableCaseTagsListPanel.descLabel.text=Include the following tags:
|
||||
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText=
|
||||
ReportBranding.defaultReportFooter.text=Powered by Autopsy Open Source Digital Forensics Platform - www.sleuthkit.org
|
||||
@@ -1,337 +1,4 @@
|
||||
OpenIDE-Module-Name=Report
|
||||
CTL_ReportWizardAction=Run Report
|
||||
ArtifactSelectionDialog.titleLabel.text=Select which artifacts you would like to report on:
|
||||
ArtifactSelectionDialog.okButton.text=OK
|
||||
PortableCaseInterestingItemsListPanel.error.errorLoadingTags=Error loading interesting item set names
|
||||
PortableCaseInterestingItemsListPanel.error.errorTitle=Error getting intesting item set names for case
|
||||
PortableCaseInterestingItemsListPanel.error.noOpenCase=There is no case open
|
||||
PortableCaseReportModule.compressCase.canceled=Compression canceled by user
|
||||
PortableCaseReportModule.compressCase.errorCompressingCase=Error compressing case
|
||||
# {0} - Temp folder path
|
||||
PortableCaseReportModule.compressCase.errorCreatingTempFolder=Could not create temporary folder {0}
|
||||
PortableCaseReportModule.compressCase.errorFinding7zip=Could not locate 7-Zip executable
|
||||
# {0} - File name
|
||||
PortableCaseReportModule.copyContentToPortableCase.copyingFile=Copying file {0}
|
||||
# {0} - case folder
|
||||
PortableCaseReportModule.createCase.caseDirExists=Case folder {0} already exists
|
||||
PortableCaseReportModule.createCase.errorCreatingCase=Error creating case
|
||||
# {0} - folder
|
||||
PortableCaseReportModule.createCase.errorCreatingFolder=Error creating folder {0}
|
||||
PortableCaseReportModule.createCase.errorStoringMaxIds=Error storing maximum database IDs
|
||||
PortableCaseReportModule.generateReport.caseClosed=Current case has been closed
|
||||
PortableCaseReportModule.generateReport.compressingCase=Compressing case...
|
||||
# {0} - tag name
|
||||
PortableCaseReportModule.generateReport.copyingArtifacts=Copying artifacts tagged as {0}...
|
||||
# {0} - tag name
|
||||
PortableCaseReportModule.generateReport.copyingFiles=Copying files tagged as {0}...
|
||||
PortableCaseReportModule.generateReport.copyingTags=Copying tags...
|
||||
PortableCaseReportModule.generateReport.creatingCase=Creating portable case database...
|
||||
PortableCaseReportModule.generateReport.errorCopyingArtifacts=Error copying tagged artifacts
|
||||
PortableCaseReportModule.generateReport.errorCopyingFiles=Error copying tagged files
|
||||
PortableCaseReportModule.generateReport.errorCopyingInterestingFiles=Error copying interesting files
|
||||
PortableCaseReportModule.generateReport.errorCopyingInterestingResults=Error copying interesting results
|
||||
PortableCaseReportModule.generateReport.errorCopyingTags=Error copying tags
|
||||
PortableCaseReportModule.generateReport.errorCreatingImageTagTable=Error creating image tags table
|
||||
PortableCaseReportModule.generateReport.errorCreatingReportFolder=Could not make report folder
|
||||
PortableCaseReportModule.generateReport.errorGeneratingUCOreport=Problem while generating CASE-UCO report
|
||||
# {0} - attribute type name
|
||||
PortableCaseReportModule.generateReport.errorLookingUpAttrType=Error looking up attribute type {0}
|
||||
PortableCaseReportModule.generateReport.interestingItemError=Error loading intersting items
|
||||
PortableCaseReportModule.generateReport.noContentToCopy=No interesting files, results, or tagged items to copy
|
||||
# {0} - output folder
|
||||
PortableCaseReportModule.generateReport.outputDirDoesNotExist=Output folder {0} does not exist
|
||||
# {0} - output folder
|
||||
PortableCaseReportModule.generateReport.outputDirIsNotDir=Output folder {0} is not a folder
|
||||
PortableCaseReportModule.generateReport.verifying=Verifying selected parameters...
|
||||
PortableCaseReportModule.getDescription.description=Copies selected items to a new single-user case that can be easily shared
|
||||
PortableCaseReportModule.getName.name=Portable Case
|
||||
PortableCaseTagsListPanel.error.errorLoadingTags=Error loading tags
|
||||
PortableCaseTagsListPanel.error.errorTitle=Error getting tag names for case
|
||||
PortableCaseTagsListPanel.error.noOpenCase=There is no case open
|
||||
ReportExcel.exceptionMessage.dataTooLarge=Value is too long to fit into an Excel cell.
|
||||
ReportExcel.exceptionMessage.errorText=Error showing data into an Excel cell.
|
||||
ReportExcel.writeSummary.caseName=Case Name:
|
||||
ReportExcel.writeSummary.caseNotes=Case Notes:
|
||||
ReportExcel.writeSummary.caseNum=Case Number:
|
||||
ReportExcel.writeSummary.examiner=Examiner:
|
||||
ReportExcel.writeSummary.numImages=Number of Images:
|
||||
ReportExcel.writeSummary.sheetName=Summary
|
||||
ReportExcel.writeSummary.summary=Summary
|
||||
ReportGenerator.artTableColHdr.comment=Comment
|
||||
ReportGenerator.errList.noOpenCase=No open case available.
|
||||
ReportGenerator.tagTable.header.userName=User Name
|
||||
ReportHTML.writeSum.case=Case:
|
||||
ReportHTML.writeSum.caseNotes=Notes:
|
||||
ReportHTML.writeSum.caseNumber=Case Number:
|
||||
ReportHTML.writeSum.caseNumImages=Number of Images:
|
||||
ReportHTML.writeSum.examiner=Examiner:
|
||||
ReportVisualPanel1.reportModulesLabel.text=Report Modules:
|
||||
ReportVisualPanel1.invalidModuleWarning=Encountered an invalid Report Module ({0})
|
||||
DefaultReportConfigurationPanel.infoLabel.text=This report will be configured on the next screen.
|
||||
ReportVisualPanel2.dataLabel.text=Select which data to report on:
|
||||
ReportVisualPanel2.deselectAllButton.text=Deselect All
|
||||
ReportVisualPanel2.selectAllButton.text=Select All
|
||||
ReportVisualPanel2.advancedButton.text=Data Types
|
||||
ArtifactSelectionDialog.deselectAllButton.text=Deselect All
|
||||
ArtifactSelectionDialog.selectAllButton.text=Select All
|
||||
ReportGenerationPanel.closeButton.text=Close
|
||||
ReportProgressPanel.reportLabel.text=reportLabel
|
||||
ReportProgressPanel.pathLabel.text=pathLabel
|
||||
ReportProgressPanel.separationLabel.text=:
|
||||
ReportProgressPanel.statusMessageLabel.text=processingLabel
|
||||
ReportGenerationPanel.titleLabel.text=Report Generation Progress
|
||||
ReportVisualPanel2.taggedResultsRadioButton.text=Tagged Results
|
||||
ReportVisualPanel2.allResultsRadioButton.text=All Results
|
||||
ReportWizardFileOptionsVisualPanel.selectAllButton.text=Select All
|
||||
ReportWizardFileOptionsVisualPanel.deselectAllButton.text=Deselect All
|
||||
ReportWizardFileOptionsVisualPanel.jLabel1.text=Select items to include in File Report:
|
||||
ArtifactSelectionDialog.dlgTitle.text=Advanced Artifact Selection
|
||||
FileReportDataTypes.filename.text=Name
|
||||
FileReportDataTypes.fileExt.text=File Extension
|
||||
FileReportDataTypes.fileType.text=File Type
|
||||
FileReportDataTypes.isDel.text=Is Deleted
|
||||
FileReportDataTypes.aTime.text=Last Accessed
|
||||
FileReportDataTypes.crTime.text=File Created
|
||||
FileReportDataTypes.mTime.text=Last Modified
|
||||
FileReportDataTypes.size.text=Size
|
||||
FileReportDataTypes.address.text=Address
|
||||
FileReportDataTypes.hash.text=Hash Value
|
||||
FileReportDataTypes.knownStatus.text=Known Status
|
||||
FileReportDataTypes.perms.text=Permissions
|
||||
FileReportDataTypes.path.text=Full Path
|
||||
FileReportText.getName.text=Files - Text
|
||||
FileReportText.getDesc.text=A delimited text file containing information about individual files in the case.
|
||||
ReportBodyFile.progress.querying=Querying files...
|
||||
ReportBodyFile.ingestWarning.text=Warning, this report was run before ingest services completed\!
|
||||
ReportBodyFile.progress.loading=Loading files...
|
||||
ReportBodyFile.progress.processing=Now processing {0}...
|
||||
ReportBodyFile.getName.text=TSK Body File
|
||||
ReportBodyFile.getDesc.text=Body file format report with MAC times for every file. This format can be used for a timeline view.
|
||||
ReportBodyFile.getFilePath.text=BodyFile.txt
|
||||
ReportKML.progress.querying=Querying files...
|
||||
ReportKML.progress.loading=Loading files...
|
||||
ReportKML.getName.text=Google Earth KML
|
||||
ReportKML.getDesc.text=KML format report with coordinates for relevant files. This format can be used for google earth views.
|
||||
ReportKML.getFilePath.text=ReportKML.kml
|
||||
ReportBranding.defaultReportTitle.text=Autopsy Forensic Report
|
||||
ReportBranding.defaultReportFooter.text=Powered by Autopsy Open Source Digital Forensics Platform - www.sleuthkit.org
|
||||
ReportExcel.numAartifacts.text=Number of artifacts:
|
||||
ReportExcel.getName.text=Excel Report
|
||||
ReportExcel.getDesc.text=A report about results and tagged items in Excel (XLS) format.
|
||||
ReportExcel.sheetName.text=Summary
|
||||
ReportExcel.cellVal.summary=Summary
|
||||
ReportExcel.cellVal.caseName=Case Name:
|
||||
ReportExcel.cellVal.caseNum=Case Number:
|
||||
ReportExcel.cellVal.examiner=Examiner:
|
||||
ReportExcel.cellVal.numImages=Number of Images:
|
||||
ReportGenerationPanel.confDlg.sureToClose.msg=Are you sure you'd like to close the dialog?\nAll reports will be canceled.
|
||||
ReportGenerationPanel.confDlg.title.closing=Closing
|
||||
ReportGenerationPanel.confDlg.cancelReport.msg=Are you sure you'd like to cancel the report?
|
||||
ReportGenerator.displayProgress.title.text=Report Generation Progress...
|
||||
ReportGenerator.progress.queryingDb.text=Querying database...
|
||||
ReportGenerator.progress.processingFile.text=Now processing {0}
|
||||
ReportGenerator.artifactTable.taggedResults.text=Contains results that were tagged with one of the following:
|
||||
ReportGenerator.progress.processing=Now processing {0}...
|
||||
ReportGenerator.msgShow.skippingArtType.title=Skipping artifact type {0} in reports
|
||||
ReportGenerator.msgShow.skippingArtType.msg=Unknown columns to report on
|
||||
ReportGenerator.makeContTagTab.taggedFiles.msg=Contains files that were tagged with one of the following:
|
||||
ReportGenerator.makeBbArtTagTab.taggedRes.msg=This report only includes results tagged with:
|
||||
ReportGenerator.tagTable.header.resultType=Result Type
|
||||
ReportGenerator.tagTable.header.tag=Tag
|
||||
ReportGenerator.tagTable.header.comment=Comment
|
||||
ReportGenerator.tagTable.header.srcFile=Source File
|
||||
ReportGenerator.progress.createdThumb.text=Creating thumbnails...
|
||||
ReportGenerator.htmlOutput.header.file=File
|
||||
ReportGenerator.htmlOutput.header.tag=Tag
|
||||
ReportGenerator.htmlOutput.header.comment=Comment
|
||||
ReportGenerator.htmlOutput.header.timeModified=Modified Time
|
||||
ReportGenerator.htmlOutput.header.timeChanged=Changed Time
|
||||
ReportGenerator.htmlOutput.header.timeAccessed=Accessed Time
|
||||
ReportGenerator.htmlOutput.header.timeCreated=Created Time
|
||||
ReportGenerator.htmlOutput.header.size=Size (Bytes)
|
||||
ReportGenerator.htmlOutput.header.hash=Hash
|
||||
ReportGenerator.thumbnailTable.name=Tagged Images
|
||||
ReportGenerator.thumbnailTable.desc=Contains thumbnails of images that are associated with tagged files and results.
|
||||
ReportGenerator.writeKwHits.userSrchs=User Searches
|
||||
ReportGenerator.progress.processingList=Now processing {0} ({1})...
|
||||
ReportGenerator.artTableColHdr.url=URL
|
||||
ReportGenerator.artTableColHdr.title=Title
|
||||
ReportGenerator.artTableColHdr.dateCreated=Date Created
|
||||
ReportGenerator.artTableColHdr.program=Program
|
||||
ReportGenerator.artTableColHdr.urlDomainDecoded=URL Domain
|
||||
ReportGenerator.artTableColHdr.srcFile=Source File
|
||||
ReportGenerator.artTableColHdr.dateTime=Date/Time
|
||||
ReportGenerator.artTableColHdr.name=Name
|
||||
ReportGenerator.artTableColHdr.value=Value
|
||||
ReportGenerator.artTableColHdr.dateAccessed=Date Accessed
|
||||
ReportGenerator.artTableColHdr.referrer=Referrer
|
||||
ReportGenerator.artTableColHdr.dest=Destination
|
||||
ReportGenerator.artTableColHdr.sourceUrl=Source URL
|
||||
ReportGenerator.artTableColHdr.path=Path
|
||||
ReportGenerator.artTableColHdr.progName=Program Name
|
||||
ReportGenerator.artTableColHdr.instDateTime=Install Date/Time
|
||||
ReportGenerator.artTableColHdr.preview=Preview
|
||||
ReportGenerator.artTableColHdr.file=File
|
||||
ReportGenerator.artTableColHdr.size=Size
|
||||
ReportGenerator.artTableColHdr.deviceId=Device ID
|
||||
ReportGenerator.artTableColHdr.text=Text
|
||||
ReportGenerator.artTableColHdr.domain=Domain
|
||||
ReportGenerator.artTableColHdr.dateTaken=Date Taken
|
||||
ReportGenerator.artTableColHdr.devManufacturer=Device Manufacturer
|
||||
ReportGenerator.artTableColHdr.devMake=Device Make
|
||||
ReportGenerator.artTableColHdr.devModel=Device Model
|
||||
ReportGenerator.artTableColHdr.latitude=Latitude
|
||||
ReportGenerator.artTableColHdr.longitude=Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeStart=Starting Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeStart=Starting Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeEnd=Ending Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeEnd=Ending Longitude
|
||||
ReportGenerator.artTableColHdr.associatedArtifact=Associated Artifact
|
||||
ReportGenerator.artTableColHdr.count=Count
|
||||
ReportGenerator.artTableColHdr.personName=Person Name
|
||||
ReportGenerator.artTableColHdr.phoneNumber=Phone Number
|
||||
ReportGenerator.artTableColHdr.phoneNumHome=Phone Number (Home)
|
||||
ReportGenerator.artTableColHdr.phoneNumOffice=Phone Number (Office)
|
||||
ReportGenerator.artTableColHdr.phoneNumMobile=Phone Number (Mobile)
|
||||
ReportGenerator.artTableColHdr.email=Email
|
||||
ReportGenerator.artTableColHdr.msgType=Message Type
|
||||
ReportGenerator.artTableColHdr.direction=Direction
|
||||
ReportGenerator.artTableColHdr.readStatus=Read Status
|
||||
ReportGenerator.artTableColHdr.fromPhoneNum=From Phone Number
|
||||
ReportGenerator.artTableColHdr.fromEmail=From Email
|
||||
ReportGenerator.artTableColHdr.toPhoneNum=To Phone Number
|
||||
ReportGenerator.artTableColHdr.toEmail=To Email
|
||||
ReportGenerator.artTableColHdr.subject=Subject
|
||||
ReportGenerator.artTableColHdr.tskEmailTo=E-Mail To
|
||||
ReportGenerator.artTableColHdr.tskEmailCc=E-Mail CC
|
||||
ReportGenerator.artTableColHdr.tskEmailBcc=E-Mail BCC
|
||||
ReportGenerator.artTableColHdr.tskEmailFrom=E-Mail From
|
||||
ReportGenerator.artTableColHdr.tskMsgId=Message ID
|
||||
ReportGenerator.artTableColHdr.tskDateTimeRcvd=Date Received
|
||||
ReportGenerator.artTableColHdr.tskDateTimeSent=Date Sent
|
||||
ReportGenerator.artTableColHdr.tskSubject=Subject
|
||||
ReportGenerator.artTableColHdr.tskSetName=Set Name
|
||||
ReportGenerator.artTableColHdr.tskInterestingFilesCategory=Rule
|
||||
ReportGenerator.artTableColHdr.tskGpsRouteCategory=Category
|
||||
ReportGenerator.artTableColHdr.tskPath=Path
|
||||
ReportGenerator.artTableColHdr.calendarEntryType=Calendar Entry Type
|
||||
ReportGenerator.artTableColHdr.description=Description
|
||||
ReportGenerator.artTableColHdr.startDateTime=Start Date/Time
|
||||
ReportGenerator.artTableColHdr.endDateTime=End Date/Time
|
||||
ReportGenerator.artTableColHdr.location=Location
|
||||
ReportGenerator.artTableColHdr.shortCut=Short Cut
|
||||
ReportGenerator.artTableColHdr.deviceName=Device Name
|
||||
ReportGenerator.artTableColHdr.deviceAddress=Device Address
|
||||
ReportGenerator.artTableColHdr.altitude=Altitude
|
||||
ReportGenerator.artTableColHdr.locationAddress=Location Address
|
||||
ReportGenerator.artTableColHdr.category=Category
|
||||
ReportGenerator.artTableColHdr.userId=User ID
|
||||
ReportGenerator.artTableColHdr.userName=User Name
|
||||
ReportGenerator.artTableColHdr.password=Password
|
||||
ReportGenerator.artTableColHdr.appName=App Name
|
||||
ReportGenerator.artTableColHdr.appPath=App Path
|
||||
ReportGenerator.artTableColHdr.replytoAddress=ReplyTo Address
|
||||
ReportGenerator.artTableColHdr.mailServer=Mail Server
|
||||
ReportGenerator.artTableColHdr.tags=Tags
|
||||
ReportGenerator.artTableColHdr.localPath=Local path
|
||||
ReportGenerator.artTableColHdr.remotePath=Remote path
|
||||
ReportGenerator.errors.reportErrorTitle=Error generating report
|
||||
ReportGenerator.errors.reportErrorText=Error generating report:
|
||||
ReportHTML.addThumbRows.dataType.title=Tagged Images - {0}
|
||||
ReportHTML.addThumbRows.dataType.msg=Tagged Results and Contents that contain images.
|
||||
ReportHTML.thumbLink.tags=Tags:
|
||||
ReportHTML.getName.text=HTML Report
|
||||
ReportHTML.getDesc.text=A report about results and tagged items in HTML format.
|
||||
ReportHTML.writeIndex.title=for case {0}
|
||||
ReportHTML.writeIndex.noFrames.msg=Your browser is not compatible with our frame setup.
|
||||
ReportHTML.writeIndex.noFrames.seeNav=Please see <a href\="content\nav.html">the navigation page</a> for artifact links,
|
||||
ReportHTML.writeIndex.seeSum=and <a href\="content\summary.html">the summary page</a> for a case summary.
|
||||
ReportHTML.writeNav.title=Report Navigation
|
||||
ReportHTML.writeNav.h1=Report Navigation
|
||||
ReportHTML.writeNav.summary=Case Summary
|
||||
ReportHTML.writeSum.title=Case Summary
|
||||
ReportHTML.writeSum.warningMsg=<span>Warning, this report was run before ingest services completed\!</span>
|
||||
#
|
||||
# autopsy/test/scripts/regression.py._html_report_diff() uses reportGenOn.text, caseName, caseNum,
|
||||
# examiner as a regex signature to skip report.html and summary.html
|
||||
#
|
||||
ReportHTML.writeSum.reportGenOn.text=HTML Report Generated on {0}
|
||||
ReportHTML.writeSum.imageInfoHeading=<h2>Image Information:</h2>
|
||||
ReportHTML.writeSum.softwareInfoHeading=<h2>Software Information:</h2>
|
||||
ReportHTML.writeSum.ingestHistoryHeading=<h2>Ingest History:</h2>
|
||||
ReportHTML.writeSum.modulesEnabledHeading=Enabled Modules:
|
||||
ReportHTML.writeSum.autopsyVersion=Autopsy Version:
|
||||
ReportHTML.writeSum.timezone=Timezone:
|
||||
ReportHTML.writeSum.path=Path:
|
||||
ReportProgressPanel.progress.queuing=Queuing...
|
||||
ReportProgressPanel.initPathLabel.noFile=<html><u>No report file</u></html>
|
||||
ReportProgressPanel.start.cancelButton.text=Cancel
|
||||
ReportProgressPanel.start.progress.text=Starting report...
|
||||
ReportProgressPanel.complete.processLbl.text=Complete
|
||||
ReportProgressPanel.complete.processLb2.text=Completed with error
|
||||
ReportProgressPanel.complete.cancelButton.text=Complete
|
||||
ReportProgressPanel.cancel.cancelButton.toolTipText=Canceled
|
||||
ReportProgressPanel.cancel.procLbl.text=Canceled
|
||||
ReportVisualPanel1.getName.text=Select and Configure Report Modules
|
||||
ReportVisualPanel2.getName.text=Configure Artifact Reports
|
||||
ReportWizardAction.actionName.text=Generate Report
|
||||
ReportWizardAction.reportWiz.title=Generate Report
|
||||
ReportWizardAction.toolBarButton.text=Generate Report
|
||||
ReportWizardFileOptionsPanel.finishButton.text=Finish
|
||||
ReportWizardFileOptionsVisualPanel.getName.text=Configure File Report
|
||||
ReportWizardPanel1.nextButton.text=Next >
|
||||
ReportWizardPanel1.finishButton.text=Finish
|
||||
ReportWizardPanel2.finishButton.text=Finish
|
||||
ReportWizardPanel2.nextButton.text=Next >
|
||||
ReportBodyFile.generateReport.srcModuleName.text=TSK Body File
|
||||
ReportExcel.endReport.srcModuleName.text=Excel Report
|
||||
ReportHTML.writeIndex.srcModuleName.text=HTML Report
|
||||
ReportKML.genReport.srcModuleName.text=Geospatial Data
|
||||
ReportKML.genReport.reportName=KML Report
|
||||
ReportGenerator.artTableColHdr.extension.text=Extension
|
||||
ReportGenerator.artTableColHdr.mimeType.text=MIME Type
|
||||
ReportGenerator.artTableColHdr.processorArchitecture.text=Processor Architecture
|
||||
ReportGenerator.artTableColHdr.osName.text=Operating System Name
|
||||
ReportGenerator.artTableColHdr.osInstallDate.text=Install Date
|
||||
ReportGenerator.errList.failedMakeRptFolder=Failed to make report folder, may be unable to generate reports.
|
||||
ReportGenerator.notifyErr.errsDuringRptGen=Errors during report generation:
|
||||
ReportGenerator.errList.failedGetContentTags=Failed to get content tags.
|
||||
ReportGenerator.errList.failedGetBBArtifactTags=Failed to get blackboard artifact tags.
|
||||
ReportGenerator.errList.errGetContentFromBBArtifact=Error while getting content from a blackboard artifact to report on.
|
||||
ReportGenerator.errList.failedGetBBAttribs=Failed to get Blackboard Attributes when generating report.
|
||||
ReportGenerator.errList.failedGetBBArtifacts=Failed to get Blackboard Artifacts when generating report.
|
||||
ReportGenerator.errList.failedQueryKWLists=Failed to query keyword lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileByID=Failed to get Abstract File by ID.
|
||||
ReportGenerator.errList.failedQueryKWs=Failed to query keywords.
|
||||
ReportGenerator.errList.failedQueryHashsetLists=Failed to query hashset lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileFromID=Failed to get Abstract File from ID.
|
||||
ReportGenerator.errList.failedQueryHashsetHits=Failed to query hashsets hits.
|
||||
ReportGenerator.errList.coreExceptionWhileGenRptRow=Core exception while generating row data for artifact report.
|
||||
ReportKML.latLongStartPoint={0};{1};;{2} (Start)\n
|
||||
ReportKML.latLongEndPoint={0};{1};;{2} (End)\n
|
||||
ReportGenerationPanel.cancelButton.actionCommand=Cancel
|
||||
ReportGenerationPanel.cancelButton.text=Cancel
|
||||
ReportHTMLConfigurationPanel.headerTextField.text=
|
||||
ReportHTMLConfigurationPanel.footerTextField.text=
|
||||
ReportHTMLConfigurationPanel.headerLabel.text=Header:
|
||||
ReportHTMLConfigurationPanel.footerLabel.text=Footer:
|
||||
CreatePortableCasePanel.selectAllButton.text=Select All
|
||||
CreatePortableCasePanel.deselectAllButton.text=Deselect All
|
||||
CreatePortableCasePanel.outputFolderTextField.text=jTextField1
|
||||
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
|
||||
CreatePortableCasePanel.jLabel1.text=Export files tagged as:
|
||||
CreatePortableCasePanel.jLabel2.text=Select output folder:
|
||||
CreatePortableCasePanel.errorLabel.text_1=Windows only
|
||||
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into an archive:
|
||||
PortableCaseTagsListPanel.deselectButton.text=Deselect All
|
||||
PortableCaseTagsListPanel.selectButton.text=Select All
|
||||
PortableCaseInterestingItemsListPanel.selectButton.text=Select All
|
||||
PortableCaseInterestingItemsListPanel.deselectButton.text=Deselect All
|
||||
ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
|
||||
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
|
||||
PortableCaseTagsListPanel.descLabel.text=Include the following tags:
|
||||
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText=
|
||||
ReportWizardPortableCaseOptionsVisualPanel.getName.title=Choose Portable Case settings
|
||||
TableReportGenerator.StatusColumn.Header=Review Status
|
||||
ReportBranding.defaultReportFooter.text=Powered by Autopsy Open Source Digital Forensics Platform - www.sleuthkit.org
|
||||
@@ -1,246 +1,4 @@
|
||||
OpenIDE-Module-Name=\u30ec\u30dd\u30fc\u30c8
|
||||
CTL_ReportWizardAction=\u30ec\u30dd\u30fc\u30c8\u3092\u5b9f\u884c
|
||||
ArtifactSelectionDialog.titleLabel.text=\u3069\u306e\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306b\u3064\u3044\u3066\u30ec\u30dd\u30fc\u30c8\u3059\u308b\u304b\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\uff1a
|
||||
ArtifactSelectionDialog.okButton.text=OK
|
||||
ReportVisualPanel1.reportModulesLabel.text=\u30ec\u30dd\u30fc\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb\uff1a
|
||||
DefaultReportConfigurationPanel.infoLabel.text=\u3053\u306e\u30ec\u30dd\u30fc\u30c8\u306f\u6b21\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u3067\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002
|
||||
ReportVisualPanel2.dataLabel.text=\u3069\u306e\u30c7\u30fc\u30bf\u306b\u3064\u3044\u3066\u30ec\u30dd\u30fc\u30c8\u3059\u308b\u304b\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\uff1a
|
||||
ReportVisualPanel2.deselectAllButton.text=\u5168\u3066\u9078\u629e\u89e3\u9664
|
||||
ReportVisualPanel2.selectAllButton.text=\u5168\u3066\u9078\u629e
|
||||
ReportVisualPanel2.advancedButton.text=\u30c7\u30fc\u30bf\u30bf\u30a4\u30d7
|
||||
ArtifactSelectionDialog.deselectAllButton.text=\u5168\u3066\u9078\u629e\u89e3\u9664
|
||||
ArtifactSelectionDialog.selectAllButton.text=\u5168\u3066\u9078\u629e
|
||||
ReportGenerationPanel.closeButton.text=\u9589\u3058\u308b
|
||||
ReportProgressPanel.reportLabel.text=\u30ec\u30dd\u30fc\u30c8\u30e9\u30d9\u30eb
|
||||
ReportProgressPanel.pathLabel.text=\u30d1\u30b9\u30e9\u30d9\u30eb
|
||||
ReportProgressPanel.separationLabel.text=:
|
||||
ReportProgressPanel.statusMessageLabel.text=\u30d7\u30ed\u30bb\u30b7\u30f3\u30b0\u30e9\u30d9\u30eb
|
||||
ReportGenerationPanel.titleLabel.text=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u30d7\u30ed\u30b0\u30ec\u30b9
|
||||
ReportVisualPanel2.taggedResultsRadioButton.text=\u30bf\u30b0\u3055\u308c\u305f\u7d50\u679c
|
||||
ReportVisualPanel2.allResultsRadioButton.text=\u5168\u3066\u306e\u7d50\u679c
|
||||
ReportWizardFileOptionsVisualPanel.selectAllButton.text=\u5168\u3066\u9078\u629e
|
||||
ReportWizardFileOptionsVisualPanel.deselectAllButton.text=\u5168\u3066\u9078\u629e\u89e3\u9664
|
||||
ReportWizardFileOptionsVisualPanel.jLabel1.text=\u30d5\u30a1\u30a4\u30eb\u30ec\u30dd\u30fc\u30c8\u306b\u542b\u3081\u308b\u30a2\u30a4\u30c6\u30e0\u3092\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\uff1a
|
||||
ArtifactSelectionDialog.dlgTitle.text=\u30a2\u30c9\u30d0\u30f3\u30b9\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u9078\u629e
|
||||
FileReportDataTypes.filename.text=\u540d\u524d
|
||||
FileReportDataTypes.fileExt.text=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50
|
||||
FileReportDataTypes.fileType.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7
|
||||
FileReportDataTypes.isDel.text=\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f
|
||||
FileReportDataTypes.aTime.text=\u6700\u5f8c\u306e\u30a2\u30af\u30bb\u30b9
|
||||
FileReportDataTypes.crTime.text=\u4f5c\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb
|
||||
FileReportDataTypes.mTime.text=\u6700\u5f8c\u306e\u4fee\u6b63
|
||||
FileReportDataTypes.size.text=\u30b5\u30a4\u30ba
|
||||
FileReportDataTypes.address.text=\u30a2\u30c9\u30ec\u30b9
|
||||
FileReportDataTypes.hash.text=\u30cf\u30c3\u30b7\u30e5\u5024
|
||||
FileReportDataTypes.knownStatus.text=\u65e2\u77e5\u30b9\u30c6\u30fc\u30bf\u30b9
|
||||
FileReportDataTypes.perms.text=\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3
|
||||
FileReportDataTypes.path.text=\u30d5\u30eb\u30d1\u30b9
|
||||
FileReportText.getName.text=\u30d5\u30a1\u30a4\u30eb - \u30c6\u30ad\u30b9\u30c8
|
||||
FileReportText.getDesc.text=\u30b1\u30fc\u30b9\u306e\u500b\u5225\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3092\u6301\u3064\u3001\u30bf\u30d6\u533a\u5207\u308a\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3002
|
||||
ReportBodyFile.progress.querying=\u30d5\u30a1\u30a4\u30eb\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u2026
|
||||
ReportBodyFile.ingestWarning.text=\u8b66\u544a\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30b5\u30fc\u30d3\u30b9\u304c\u5b8c\u4e86\u3059\u308b\u524d\u306b\u30ec\u30dd\u30fc\u30c8\u304c\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\uff01
|
||||
ReportBodyFile.progress.loading=\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u4e2d\u2026
|
||||
ReportBodyFile.progress.processing={0}\u3092\u51e6\u7406\u4e2d\u2026
|
||||
ReportBodyFile.getName.text=TSK\u30dc\u30c7\u30a3\u30d5\u30a1\u30a4\u30eb
|
||||
ReportBodyFile.getDesc.text=\u5404\u30d5\u30a1\u30a4\u30eb\u306eMAC\u30bf\u30a4\u30e0\u3092\u542b\u3080\u3001\u30dc\u30c7\u30a3\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u30ec\u30dd\u30fc\u30c8\u3002\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u30d3\u30e5\u30fc\u306b\u3053\u306e\u5f62\u5f0f\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002
|
||||
ReportBodyFile.getFilePath.text=BodyFile.txt
|
||||
ReportBranding.defaultReportTitle.text=Autopsy\u30d5\u30a9\u30ec\u30f3\u30b8\u30c3\u30af\u30ec\u30dd\u30fc\u30c8
|
||||
ReportBranding.defaultReportFooter.text=Autopsy\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30fb\u30c7\u30b8\u30bf\u30eb\u30fb\u30d5\u30a9\u30ec\u30f3\u30b8\u30c3\u30af\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u3088\u308a\u63d0\u4f9b - www.sleuthkit.org
|
||||
ReportExcel.numAartifacts.text=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u6570\uff1a
|
||||
ReportExcel.getName.text=\u7d50\u679c - Excel
|
||||
ReportExcel.getDesc.text=\u7d50\u679c\u306b\u95a2\u3059\u308b\u30ec\u30dd\u30fc\u30c8\u3002Excel(XLS)\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u30a2\u30a4\u30c6\u30e0\u306e\u30bf\u30b0\u4ed8\u3051\u304c\u3055\u308c\u3066\u3044\u307e\u3059\u3002
|
||||
ReportExcel.sheetName.text=\u30b5\u30de\u30ea\u30fc
|
||||
ReportExcel.cellVal.summary=\u30b5\u30de\u30ea\u30fc
|
||||
ReportExcel.cellVal.caseName=\u30b1\u30fc\u30b9\u540d\uff1a
|
||||
ReportExcel.cellVal.caseNum=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a
|
||||
ReportExcel.cellVal.examiner=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a
|
||||
ReportExcel.cellVal.numImages=\u30a4\u30e1\u30fc\u30b8\u6570\uff1a
|
||||
ReportGenerationPanel.confDlg.sureToClose.msg=\u3053\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u672c\u5f53\u306b\u9589\u3058\u307e\u3059\u304b\uff1f\n\u5168\u3066\u306e\u30ec\u30dd\u30fc\u30c8\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3059\u3002
|
||||
ReportGenerationPanel.confDlg.title.closing=\u9589\u3058\u3066\u3044\u307e\u3059
|
||||
ReportGenerator.displayProgress.title.text=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u30d7\u30ed\u30b0\u30ec\u30b9\u2026
|
||||
ReportGenerator.progress.queryingDb.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u2026
|
||||
ReportGenerator.progress.processingFile.text={0}\u3092\u51e6\u7406\u4e2d
|
||||
ReportGenerator.artifactTable.taggedResults.text=\u6b21\u306e\u4e2d\u306e\u4e00\u3064\u3067\u30bf\u30b0\u3055\u308c\u305f\u7d50\u679c\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\uff1a
|
||||
ReportGenerator.progress.processing={0}\u3092\u51e6\u7406\u4e2d\u2026
|
||||
ReportGenerator.msgShow.skippingArtType.title=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30bf\u30a4\u30d7{0}\u3092\u30ec\u30dd\u30fc\u30c8\u3067\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059
|
||||
ReportGenerator.msgShow.skippingArtType.msg=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u3059\u308b\u306e\u306b\u4e0d\u660e\u306a\u30b3\u30e9\u30e0
|
||||
ReportGenerator.msgShow.skippingArtRow.title=\u30bf\u30a4\u30d7{0}\u306e\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u884c\u3092\u30ec\u30dd\u30fc\u30c8\u3067\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059
|
||||
ReportGenerator.msgShow.skippingArtRow.msg=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u3059\u308b\u306e\u306b\u4e0d\u660e\u306a\u30b3\u30e9\u30e0
|
||||
ReportGenerator.makeContTagTab.taggedFiles.msg=\u306e\u4e2d\u306e\u4e00\u3064\u3067\u30bf\u30b0\u3055\u308c\u305f\u7d50\u679c\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\uff1a
|
||||
ReportGenerator.makeBbArtTagTab.taggedRes.msg=\u3053\u306e\u30ec\u30dd\u30fc\u30c8\u306b\u306f\u6b21\u3067\u30bf\u30b0\u3055\u308c\u305f\u7d50\u679c\u3057\u304b\u542b\u307e\u308c\u307e\u305b\u3093\uff1a
|
||||
ReportGenerator.tagTable.header.resultType=\u7d50\u679c\u30bf\u30a4\u30d7
|
||||
ReportGenerator.tagTable.header.tag=\u30bf\u30b0
|
||||
ReportGenerator.tagTable.header.comment=\u30b3\u30e1\u30f3\u30c8
|
||||
ReportGenerator.tagTable.header.srcFile=\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.progress.createdThumb.text=\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u4f5c\u6210\u4e2d\u2026
|
||||
ReportGenerator.thumbnailTable.name=\u30b5\u30e0\u30cd\u30a4\u30eb
|
||||
ReportGenerator.thumbnailTable.desc=\u30bf\u30b0\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3084\u7d50\u679c\u306b\u95a2\u9023\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u304c\u542b\u307e\u308c\u307e\u3059\u3002
|
||||
ReportGenerator.writeKwHits.userSrchs=\u30e6\u30fc\u30b6\u691c\u7d22
|
||||
ReportGenerator.progress.processingList={0} ({1})\u3092\u51e6\u7406\u4e2d\u2026
|
||||
ReportGenerator.artTableColHdr.url=URL
|
||||
ReportGenerator.artTableColHdr.title=\u30bf\u30a4\u30c8\u30eb
|
||||
ReportGenerator.artTableColHdr.dateCreated=\u4f5c\u6210\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.program=\u30d7\u30ed\u30b0\u30e9\u30e0
|
||||
ReportGenerator.artTableColHdr.srcFile=\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.artTableColHdr.dateTime=\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.name=\u540d\u524d
|
||||
ReportGenerator.artTableColHdr.value=\u30d0\u30ea\u30e5\u30fc
|
||||
ReportGenerator.artTableColHdr.dateAccessed=\u30a2\u30af\u30bb\u30b9\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.referrer=\u30ea\u30d5\u30a1\u30e9
|
||||
ReportGenerator.artTableColHdr.dest=\u30c7\u30b9\u30c6\u30a3\u30cd\u30fc\u30b7\u30e7\u30f3
|
||||
ReportGenerator.artTableColHdr.sourceUrl=\u30bd\u30fc\u30b9URL
|
||||
ReportGenerator.artTableColHdr.path=\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.progName=\u30d7\u30ed\u30b0\u30e9\u30e0\u540d
|
||||
ReportGenerator.artTableColHdr.instDateTime=\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.preview=\u30d7\u30ec\u30d3\u30e5\u30fc
|
||||
ReportGenerator.artTableColHdr.file=\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.artTableColHdr.size=\u30b5\u30a4\u30ba
|
||||
ReportGenerator.artTableColHdr.deviceId=\u6a5f\u5668ID
|
||||
ReportGenerator.artTableColHdr.text=\u30c6\u30ad\u30b9\u30c8
|
||||
ReportGenerator.artTableColHdr.domain=\u30c9\u30e1\u30a4\u30f3
|
||||
ReportGenerator.artTableColHdr.devManufacturer=\u6a5f\u5668\u30e1\u30fc\u30ab\u30fc
|
||||
ReportGenerator.artTableColHdr.devModel=\u6a5f\u5668\u30e2\u30c7\u30eb
|
||||
ReportGenerator.artTableColHdr.personName=\u4eba\u540d
|
||||
ReportGenerator.artTableColHdr.phoneNumber=\u96fb\u8a71\u756a\u53f7
|
||||
ReportGenerator.artTableColHdr.phoneNumHome=\u96fb\u8a71\u756a\u53f7\uff08\u81ea\u5b85\uff09
|
||||
ReportGenerator.artTableColHdr.phoneNumOffice=\u96fb\u8a71\u756a\u53f7\uff08\u4f1a\u793e\uff09
|
||||
ReportGenerator.artTableColHdr.phoneNumMobile=\u96fb\u8a71\u756a\u53f7\uff08\u643a\u5e2f\uff09
|
||||
ReportGenerator.artTableColHdr.email=Email
|
||||
ReportGenerator.artTableColHdr.msgType=\u30e1\u30c3\u30bb\u30fc\u30b8\u30bf\u30a4\u30d7
|
||||
ReportGenerator.artTableColHdr.latitude=\u7def\u5ea6
|
||||
ReportGenerator.artTableColHdr.longitude=\u7d4c\u5ea6
|
||||
ReportGenerator.artTableColHdr.dateTaken=\u64ae\u5f71\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.subject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
|
||||
ReportGenerator.artTableColHdr.calendarEntryType=\u30ab\u30ec\u30f3\u30c0\u30fc\u30a8\u30f3\u30c8\u30ea\u30bf\u30a4\u30d7
|
||||
ReportGenerator.artTableColHdr.description=\u8aac\u660e
|
||||
ReportGenerator.artTableColHdr.startDateTime=\u958b\u59cb\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.shortCut=\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8
|
||||
ReportGenerator.artTableColHdr.endDateTime=\u4fee\u4e86\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.location=\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3
|
||||
ReportGenerator.artTableColHdr.deviceName=\u6a5f\u5668\u540d
|
||||
ReportGenerator.artTableColHdr.deviceAddress=\u6a5f\u5668\u30a2\u30c9\u30ec\u30b9
|
||||
ReportGenerator.artTableColHdr.altitude=\u6a19\u9ad8
|
||||
ReportGenerator.artTableColHdr.locationAddress=\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30c9\u30ec\u30b9
|
||||
ReportGenerator.artTableColHdr.category=\u30ab\u30c6\u30b4\u30ea\u30fc
|
||||
ReportGenerator.artTableColHdr.userId=\u30e6\u30fc\u30b6ID
|
||||
ReportGenerator.artTableColHdr.password=\u30d1\u30b9\u30ef\u30fc\u30c9
|
||||
ReportGenerator.artTableColHdr.replytoAddress=\u8fd4\u4fe1\u30a2\u30c9\u30ec\u30b9
|
||||
ReportGenerator.artTableColHdr.mailServer=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0
|
||||
ReportGenerator.artTableColHdr.tags=\u30bf\u30b0
|
||||
ReportHTML.addThumbRows.dataType.title=\u30bf\u30b0\u4ed8\u3051\u3055\u308c\u305f\u30a4\u30e1\u30fc\u30b8 - {0}
|
||||
ReportHTML.addThumbRows.dataType.msg=\u30a4\u30e1\u30fc\u30b8\u3092\u542b\u3080\u30bf\u30b0\u4ed8\u3051\u3055\u308c\u305f\u7d50\u679c\u304a\u3088\u3073\u30b3\u30f3\u30c6\u30f3\u30c4\u3002
|
||||
ReportHTML.thumbLink.tags=\u30bf\u30b0\uff1a
|
||||
ReportHTML.getName.text=\u7d50\u679c - HTML
|
||||
ReportHTML.getDesc.text=HTML\u5f62\u5f0f\u306e\u7d50\u679c\u304a\u3088\u3073\u30bf\u30b0\u4ed8\u3051\u3055\u308c\u305f\u30a2\u30a4\u30c6\u30e0\u306e\u30ec\u30dd\u30fc\u30c8
|
||||
ReportHTML.writeIndex.title=\u30b1\u30fc\u30b9{0}\u306eAutopsy\u30ec\u30dd\u30fc\u30c8
|
||||
ReportHTML.writeNav.title=\u30ec\u30dd\u30fc\u30c8\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3
|
||||
ReportHTML.writeNav.h1=\u30ec\u30dd\u30fc\u30c8\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3
|
||||
ReportHTML.writeNav.summary=\u30b1\u30fc\u30b9\u30b5\u30de\u30ea\u30fc
|
||||
ReportHTML.writeSum.title=\u30b1\u30fc\u30b9\u30b5\u30de\u30ea\u30fc
|
||||
ReportHTML.writeSum.caseName=\u30b1\u30fc\u30b9\uff1a
|
||||
ReportHTML.writeSum.caseNum=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a
|
||||
ReportHTML.writeSum.examiner=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a
|
||||
ReportHTML.writeSum.numImages=\u30a4\u30e1\u30fc\u30b8\u6570\uff1a
|
||||
ReportHTML.writeSum.path=\u30d1\u30b9\uff1a
|
||||
ReportProgressPanel.start.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
ReportProgressPanel.complete.processLbl.text=\u5b8c\u4e86
|
||||
ReportProgressPanel.complete.cancelButton.text=\u5b8c\u4e86
|
||||
ReportProgressPanel.cancel.cancelButton.toolTipText=\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f
|
||||
ReportWizardAction.actionName.text=\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210
|
||||
ReportWizardAction.reportWiz.title=\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210
|
||||
ReportWizardAction.toolBarButton.text=\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210
|
||||
ReportWizardPanel1.nextButton.text=\u6b21 >
|
||||
ReportWizardPanel2.nextButton.text=\u6b21 >
|
||||
ReportGenerator.artTableColHdr.direction=\u65b9\u5411
|
||||
ReportGenerator.artTableColHdr.fromEmail=\u9001\u4fe1\u5143E\u30e1\u30fc\u30eb
|
||||
ReportGenerator.artTableColHdr.toEmail=\u9001\u4fe1\u5148E\u30e1\u30fc\u30eb
|
||||
ReportGenerator.artTableColHdr.fromPhoneNum=\u767a\u4fe1\u8005\u96fb\u8a71\u756a\u53f7
|
||||
ReportGenerator.artTableColHdr.toPhoneNum=\u7740\u4fe1\u8005\u96fb\u8a71\u756a\u53f7
|
||||
ReportGenerator.artTableColHdr.appName=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540d
|
||||
ReportGenerator.artTableColHdr.appPath=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9
|
||||
ReportHTML.writeIndex.noFrames.msg=\u4f7f\u7528\u3057\u3066\u3044\u308b\u30d6\u30e9\u30a6\u30b6\u306f\u5f0a\u793e\u306e\u30d5\u30ec\u30fc\u30e0\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3068\u306e\u4e92\u63db\u6027\u304c\u3042\u308a\u307e\u305b\u3093\u3002
|
||||
ReportHTML.writeIndex.noFrames.seeNav=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30ea\u30f3\u30af\u306f\u4e0b\u8a18\u306e\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30da\u30fc\u30b8</a>\u3092\u3054\u89a7\u4e0b\u3055\u3044<a href\="nav.html">
|
||||
ReportHTML.writeIndex.seeSum=\u307e\u305f\u3001\u30b1\u30fc\u30b9\u30b5\u30de\u30ea\u30fc\u306f\u4e0b\u8a18\u306e\u30b5\u30de\u30ea\u30fc\u30da\u30fc\u30b8</a>\u3092\u3054\u89a7\u4e0b\u3055\u3044\u3002<a href\="summary.html">
|
||||
ReportHTML.writeSum.warningMsg=<span>\u8b66\u544a\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30b5\u30fc\u30d3\u30b9\u304c\u5b8c\u4e86\u3059\u308b\u524d\u306b\u30ec\u30dd\u30fc\u30c8\u304c\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\uff01</span>
|
||||
ReportHTML.writeSum.noExaminer=<i>\u8abf\u67fb\u62c5\u5f53\u8005\u7121\u3057</i>
|
||||
ReportHTML.writeSum.imageInfoHeading=<h2>\u30a4\u30e1\u30fc\u30b8\u60c5\u5831\uff1a</h2>
|
||||
ReportHTML.writeSum.timezone=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\uff1a
|
||||
ReportProgressPanel.progress.queuing=\u30ad\u30e5\u30fc\u30a4\u30f3\u30b0\u2026
|
||||
ReportProgressPanel.initPathLabel.noFile=<html><u>\u30ec\u30dd\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u7121\u3057</u></html>
|
||||
ReportProgressPanel.start.progress.text=\u30ec\u30dd\u30fc\u30c8\u958b\u59cb\u4e2d\u2026
|
||||
ReportProgressPanel.cancel.procLbl.text=\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f
|
||||
ReportVisualPanel1.getName.text=\u30ec\u30dd\u30fc\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u9078\u629e\u304a\u3088\u3073\u8a2d\u5b9a
|
||||
ReportVisualPanel2.getName.text=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30ec\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a
|
||||
ReportWizardFileOptionsPanel.finishButton.text=\u7d42\u4e86
|
||||
ReportWizardFileOptionsVisualPanel.getName.text=\u30d5\u30a1\u30a4\u30eb\u30ec\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a
|
||||
ReportWizardPanel1.finishButton.text=\u7d42\u4e86
|
||||
ReportWizardPanel2.finishButton.text=\u7d42\u4e86
|
||||
ReportHTML.writeSum.reportGenOn.text={0}\u306bHTML\u30ec\u30dd\u30fc\u30c8\u306f\u751f\u6210\u3055\u308c\u307e\u3057\u305f
|
||||
ReportHTML.writeSum.noCaseNum=<i>\u30b1\u30fc\u30b9\u756a\u53f7\u304c\u3042\u308a\u307e\u305b\u3093</i>
|
||||
ReportGenerator.errors.reportErrorTitle=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
|
||||
ReportGenerator.errors.reportErrorText=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a
|
||||
ReportKML.getDesc.text=\u95a2\u9023\u30d5\u30a1\u30a4\u30eb\u306e\u5ea7\u6a19\u3092\u542b\u3080KML\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u30ec\u30dd\u30fc\u30c8\u3002\u3053\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306fGoogle Earth\u30d3\u30e5\u30fc\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002
|
||||
ReportKML.getName.text=Google Earth/KML
|
||||
ReportKML.progress.loading=\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u4e2d\u2026
|
||||
ReportKML.progress.querying=\u30d5\u30a1\u30a4\u30eb\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u2026
|
||||
ReportBodyFile.generateReport.srcModuleName.text=TSK\u30dc\u30c7\u30a3\u30d5\u30a1\u30a4\u30eb
|
||||
ReportExcel.endReport.srcModuleName.text=Excel\u30ec\u30dd\u30fc\u30c8
|
||||
ReportGenerator.artTableColHdr.extension.text=\u62e1\u5f35\u5b50
|
||||
ReportGenerator.artTableColHdr.mimeType.text=MIME\u30bf\u30a4\u30d7
|
||||
ReportHTML.writeIndex.srcModuleName.text=HTML\u30ec\u30dd\u30fc\u30c8
|
||||
ReportKML.genReport.reportName=KML\u30ec\u30dd\u30fc\u30c8
|
||||
ReportGenerator.artTableColHdr.associatedArtifact=\u95a2\u4fc2\u3059\u308b\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8
|
||||
ReportGenerator.artTableColHdr.count=\u30ab\u30a6\u30f3\u30c8
|
||||
ReportGenerator.artTableColHdr.devMake=\u6a5f\u5668\u578b\u540d
|
||||
ReportGenerator.artTableColHdr.latitudeEnd=\u5230\u7740\u7def\u5ea6
|
||||
ReportGenerator.artTableColHdr.latitudeStart=\u51fa\u767a\u7def\u5ea6
|
||||
ReportGenerator.artTableColHdr.localPath=\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.longitudeEnd=\u5230\u7740\u7d4c\u5ea6
|
||||
ReportGenerator.artTableColHdr.longitudeStart=\u51fa\u767a\u7d4c\u5ea6
|
||||
ReportGenerator.artTableColHdr.osInstallDate.text=\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.osName.text=\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u540d
|
||||
ReportGenerator.artTableColHdr.processorArchitecture.text=\u30d7\u30ed\u30bb\u30c3\u30b5\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3
|
||||
ReportGenerator.artTableColHdr.readStatus=\u8aad\u307f\u53d6\u308a\u4e2d\u30b9\u30c6\u30fc\u30bf\u30b9
|
||||
ReportGenerator.artTableColHdr.remotePath=\u30ea\u30e2\u30fc\u30c8\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.tskDateTimeRcvd=\u53d7\u4fe1\u65e5
|
||||
ReportGenerator.artTableColHdr.tskDateTimeSent=\u9001\u4fe1\u65e5
|
||||
ReportGenerator.artTableColHdr.tskEmailBcc=E-Mail BCC
|
||||
ReportGenerator.artTableColHdr.tskEmailCc=E-Mail CC
|
||||
ReportGenerator.artTableColHdr.tskEmailFrom=E-Mail\u9001\u4fe1\u5143
|
||||
ReportGenerator.artTableColHdr.tskEmailTo=E-Mail\u9001\u4fe1\u5148
|
||||
ReportGenerator.artTableColHdr.tskGpsRouteCategory=\u30ab\u30c6\u30b4\u30ea
|
||||
ReportGenerator.artTableColHdr.tskInterestingFilesCategory=\u30eb\u30fc\u30eb
|
||||
ReportGenerator.artTableColHdr.tskMsgId=\u30e1\u30c3\u30bb\u30fc\u30b8ID
|
||||
ReportGenerator.artTableColHdr.tskPath=\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.tskSetName=\u30bb\u30c3\u30c8\u540d
|
||||
ReportGenerator.artTableColHdr.tskSubject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
|
||||
ReportGenerator.artTableColHdr.urlDomainDecoded=URL\u30c9\u30e1\u30a4\u30f3
|
||||
ReportGenerator.artTableColHdr.userName=\u30e6\u30fc\u30b6\u540d
|
||||
ReportGenerator.errList.coreExceptionWhileGenRptRow=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30ec\u30dd\u30fc\u30c8\u7528\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u751f\u6210\u4e2d\u306b\u30b3\u30a2\u30a8\u30af\u30bb\u30d7\u30b7\u30e7\u30f3\uff08\u4f8b\u5916\uff09\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f
|
||||
ReportGenerator.errList.errGetContentFromBBArtifact=Blackboard\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u304b\u3089\u30ec\u30dd\u30fc\u30c8\u7528\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u53d6\u5f97\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetAbstractFileByID=ID\u306b\u57fa\u3065\u304d\u30a2\u30d6\u30b9\u30c8\u30e9\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3059\u308b\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f
|
||||
ReportGenerator.errList.failedGetBBArtifacts=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306bBlackboard\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetBBArtifactTags=Blackboard\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30bf\u30b0\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetBBAttribs=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306bBlackboard\u5c5e\u6027\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetContentTags=\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30b0\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedMakeRptFolder=\u30ec\u30dd\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u304c\u3067\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
|
||||
ReportGenerator.errList.failedQueryHashsetHits=\u30cf\u30c3\u30b7\u30e5\u30bb\u30c3\u30c8\u30d2\u30c3\u30c8\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedQueryHashsetLists=\u30cf\u30c3\u30b7\u30e5\u30bb\u30c3\u30c8\u30ea\u30b9\u30c8\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedQueryKWLists=\u30ad\u30fc\u30ef\u30fc\u30c9\u30ea\u30b9\u30c8\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedQueryKWs=\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.htmlOutput.header.comment=\u30b3\u30e1\u30f3\u30c8
|
||||
ReportGenerator.htmlOutput.header.file=\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.htmlOutput.header.hash=\u30cf\u30c3\u30b7\u30e5
|
||||
ReportGenerator.htmlOutput.header.size=\u30b5\u30a4\u30ba\uff08\u30d0\u30a4\u30c8\uff09
|
||||
ReportGenerator.htmlOutput.header.tag=\u30bf\u30b0
|
||||
ReportGenerator.htmlOutput.header.timeAccessed=\u30a2\u30af\u30bb\u30b9\u65e5\u6642
|
||||
ReportGenerator.htmlOutput.header.timeCreated=\u4f5c\u6210\u65e5\u6642
|
||||
ReportGenerator.htmlOutput.header.timeModified=\u4fee\u6b63\u65e5\u6642
|
||||
ReportGenerator.notifyErr.errsDuringRptGen=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306e\u30a8\u30e9\u30fc\uff1a
|
||||
ReportGenerator.errList.failedGetAbstractFileFromID=ID\u306b\u57fa\u3065\u304d\u30a2\u30d6\u30b9\u30c8\u30e9\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3059\u308b\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f
|
||||
ReportKML.getFilePath.text=\u30ec\u30dd\u30fc\u30c8KML.kml
|
||||
ReportVisualPanel1.invalidModuleWarning=\u7121\u52b9\u306a\u30ec\u30dd\u30fc\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb({0})\u306b\u906d\u9047\u3057\u307e\u3057\u305f
|
||||
ReportGenerationPanel.confDlg.cancelReport.msg=\u672c\u5f53\u306b\u30ec\u30dd\u30fc\u30c8\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u307e\u3059\u304b\uff1f
|
||||
ReportProgressPanel.complete.processLb2.text=\u5b8c\u4e86\u3057\u307e\u3057\u305f\u304c\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
|
||||
ReportGenerationPanel.cancelButton.actionCommand=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
ReportGenerationPanel.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
|
||||
44
Core/src/org/sleuthkit/autopsy/report/NoReportModuleSettings.java
Executable file
44
Core/src/org/sleuthkit/autopsy/report/NoReportModuleSettings.java
Executable file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
|
||||
/**
|
||||
* Implementation of the ReportModuleSettings interface for use by report
|
||||
* modules that do not have settings.
|
||||
*/
|
||||
public final class NoReportModuleSettings implements ReportModuleSettings {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final String setting = "None"; //NON-NLS
|
||||
|
||||
@Override
|
||||
public long getVersionNumber() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string used as a report options placeholder for serialization
|
||||
* purposes.
|
||||
*
|
||||
* @return The string "None"
|
||||
*/
|
||||
String getSetting() {
|
||||
return setting;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
|
||||
import org.sleuthkit.autopsy.report.infrastructure.ReportGenerator;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@@ -21,7 +21,7 @@ package org.sleuthkit.autopsy.report;
|
||||
/**
|
||||
* Interface to implement by reports to add on custom branding, logos, etc
|
||||
*/
|
||||
interface ReportBrandingProviderI {
|
||||
public interface ReportBrandingProviderI {
|
||||
|
||||
/**
|
||||
* Get the generator logo path on the local disk (previously set or
|
||||
|
||||
@@ -1,324 +0,0 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
class ReportGenerator {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportGenerator.class.getName());
|
||||
|
||||
/**
|
||||
* Progress reportGenerationPanel that can be used to check for
|
||||
* cancellation.
|
||||
*/
|
||||
private ReportProgressPanel progressPanel;
|
||||
|
||||
private static final String REPORT_PATH_FMT_STR = "%s" + File.separator + "%s %s %s" + File.separator;
|
||||
private final ReportGenerationPanel reportGenerationPanel = new ReportGenerationPanel();
|
||||
|
||||
static final String REPORTS_DIR = "Reports"; //NON-NLS
|
||||
|
||||
private List<String> errorList;
|
||||
|
||||
/**
|
||||
* Displays the list of errors during report generation in user-friendly
|
||||
* way. MessageNotifyUtil used to display bubble notification.
|
||||
*/
|
||||
private void displayReportErrors() {
|
||||
if (!errorList.isEmpty()) {
|
||||
String errorString = "";
|
||||
for (String error : errorList) {
|
||||
errorString += error + "\n";
|
||||
}
|
||||
MessageNotifyUtil.Notify.error(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.notifyErr.errsDuringRptGen"), errorString);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a report generator.
|
||||
*/
|
||||
ReportGenerator() {
|
||||
this.errorList = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the progress panels to the user, and add actions to close the
|
||||
* parent dialog.
|
||||
*/
|
||||
private void displayProgressPanel() {
|
||||
final JDialog dialog = new JDialog((JFrame) WindowManager.getDefault().getMainWindow(), true);
|
||||
dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
|
||||
dialog.setTitle(NbBundle.getMessage(this.getClass(), "ReportGenerator.displayProgress.title.text"));
|
||||
dialog.add(this.reportGenerationPanel);
|
||||
dialog.pack();
|
||||
|
||||
reportGenerationPanel.addCloseAction(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
dialog.dispose();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
reportGenerationPanel.close();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
dialog.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the GeneralReportModules using a SwingWorker.
|
||||
*/
|
||||
void generateGeneralReport(GeneralReportModule generalReportModule) throws IOException {
|
||||
if (generalReportModule != null) {
|
||||
String reportDir = createReportDirectory(generalReportModule);
|
||||
setupProgressPanel(generalReportModule, reportDir);
|
||||
ReportWorker worker = new ReportWorker(() -> {
|
||||
generalReportModule.generateReport(reportDir, progressPanel);
|
||||
});
|
||||
worker.execute();
|
||||
displayProgressPanel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the TableReportModules using a SwingWorker.
|
||||
*
|
||||
* @param artifactTypeSelections the enabled/disabled state of the artifact
|
||||
* types to be included in the report
|
||||
* @param tagSelections the enabled/disabled state of the tag names to be
|
||||
* included in the report
|
||||
*/
|
||||
void generateTableReport(TableReportModule tableReport, Map<BlackboardArtifact.Type, Boolean> artifactTypeSelections, Map<String, Boolean> tagNameSelections) throws IOException {
|
||||
if (tableReport != null && null != artifactTypeSelections) {
|
||||
String reportDir = createReportDirectory(tableReport);
|
||||
setupProgressPanel(tableReport, reportDir);
|
||||
ReportWorker worker = new ReportWorker(() -> {
|
||||
tableReport.startReport(reportDir);
|
||||
TableReportGenerator generator = new TableReportGenerator(artifactTypeSelections, tagNameSelections, progressPanel, tableReport);
|
||||
generator.execute();
|
||||
tableReport.endReport();
|
||||
// finish progress, wrap up
|
||||
progressPanel.complete(ReportProgressPanel.ReportStatus.COMPLETE);
|
||||
errorList = generator.getErrorList();
|
||||
});
|
||||
worker.execute();
|
||||
displayProgressPanel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the FileReportModules using a SwingWorker.
|
||||
*
|
||||
* @param enabledInfo the Information that should be included about each
|
||||
* file in the report.
|
||||
*/
|
||||
void generateFileListReport(FileReportModule fileReportModule, Map<FileReportDataTypes, Boolean> enabledInfo) throws IOException {
|
||||
if (fileReportModule != null && null != enabledInfo) {
|
||||
String reportDir = createReportDirectory(fileReportModule);
|
||||
List<FileReportDataTypes> enabled = new ArrayList<>();
|
||||
for (Entry<FileReportDataTypes, Boolean> e : enabledInfo.entrySet()) {
|
||||
if (e.getValue()) {
|
||||
enabled.add(e.getKey());
|
||||
}
|
||||
}
|
||||
setupProgressPanel(fileReportModule, reportDir);
|
||||
ReportWorker worker = new ReportWorker(() -> {
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
progressPanel.start();
|
||||
progressPanel.updateStatusLabel(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.progress.queryingDb.text"));
|
||||
}
|
||||
|
||||
List<AbstractFile> files = getFiles();
|
||||
int numFiles = files.size();
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
fileReportModule.startReport(reportDir);
|
||||
fileReportModule.startTable(enabled);
|
||||
}
|
||||
progressPanel.setIndeterminate(false);
|
||||
progressPanel.setMaximumProgress(numFiles);
|
||||
|
||||
int i = 0;
|
||||
// Add files to report.
|
||||
for (AbstractFile file : files) {
|
||||
// Check to see if any reports have been cancelled.
|
||||
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||
return;
|
||||
} else {
|
||||
fileReportModule.addRow(file, enabled);
|
||||
progressPanel.increment();
|
||||
}
|
||||
|
||||
if ((i % 100) == 0) {
|
||||
progressPanel.updateStatusLabel(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.progress.processingFile.text",
|
||||
file.getName()));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
fileReportModule.endTable();
|
||||
fileReportModule.endReport();
|
||||
progressPanel.complete(ReportStatus.COMPLETE);
|
||||
});
|
||||
worker.execute();
|
||||
displayProgressPanel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the Portable Case Report Module
|
||||
*/
|
||||
void generatePortableCaseReport(PortableCaseReportModule portableCaseReportModule, PortableCaseReportModule.PortableCaseOptions options) throws IOException {
|
||||
if (portableCaseReportModule != null) {
|
||||
String reportDir = createReportDirectory(portableCaseReportModule);
|
||||
setupProgressPanel(portableCaseReportModule, reportDir);
|
||||
ReportWorker worker = new ReportWorker(() -> {
|
||||
portableCaseReportModule.generateReport(reportDir, options, progressPanel);
|
||||
});
|
||||
worker.execute();
|
||||
displayProgressPanel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all files in the image.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private List<AbstractFile> getFiles() {
|
||||
List<AbstractFile> absFiles;
|
||||
try {
|
||||
SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
absFiles = skCase.findAllFilesWhere("meta_type != " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getValue()); //NON-NLS
|
||||
return absFiles;
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
MessageNotifyUtil.Notify.show(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.errors.reportErrorTitle"),
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.errors.reportErrorText") + ex.getLocalizedMessage(),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
logger.log(Level.SEVERE, "failed to generate reports. Unable to get all files in the image.", ex); //NON-NLS
|
||||
return Collections.<AbstractFile>emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
private void setupProgressPanel(ReportModule module, String reportDir) {
|
||||
String reportFilePath = module.getRelativeFilePath();
|
||||
if (reportFilePath == null) {
|
||||
this.progressPanel = reportGenerationPanel.addReport(module.getName(), null);
|
||||
} else if (reportFilePath.isEmpty()) {
|
||||
this.progressPanel = reportGenerationPanel.addReport(module.getName(), reportDir);
|
||||
} else {
|
||||
this.progressPanel = reportGenerationPanel.addReport(module.getName(), reportDir + reportFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
private static String createReportDirectory(ReportModule module) throws IOException {
|
||||
Case currentCase;
|
||||
try {
|
||||
currentCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new IOException("Exception while getting open case.", ex);
|
||||
}
|
||||
// Create the root reports directory path of the form: <CASE DIRECTORY>/Reports/<Case fileName> <Timestamp>/
|
||||
DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss");
|
||||
Date date = new Date();
|
||||
String dateNoTime = dateFormat.format(date);
|
||||
String reportPath = String.format(REPORT_PATH_FMT_STR, currentCase.getReportDirectory(), currentCase.getDisplayName(), module.getName(), dateNoTime);
|
||||
// Create the root reports directory.
|
||||
try {
|
||||
FileUtil.createFolder(new File(reportPath));
|
||||
} catch (IOException ex) {
|
||||
throw new IOException("Failed to make report folder, unable to generate reports.", ex);
|
||||
}
|
||||
return reportPath;
|
||||
}
|
||||
|
||||
private class ReportWorker extends SwingWorker<Void, Void> {
|
||||
|
||||
private final Runnable doInBackground;
|
||||
|
||||
private ReportWorker(Runnable doInBackground) {
|
||||
this.doInBackground = doInBackground;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
doInBackground.run();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
get();
|
||||
} catch (InterruptedException | ExecutionException ex) {
|
||||
MessageNotifyUtil.Notify.show(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.errors.reportErrorTitle"),
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.errors.reportErrorText") + ex.getLocalizedMessage(),
|
||||
MessageNotifyUtil.MessageType.ERROR);
|
||||
logger.log(Level.SEVERE, "failed to generate reports", ex); //NON-NLS
|
||||
} // catch and ignore if we were cancelled
|
||||
catch (java.util.concurrent.CancellationException ex) {
|
||||
} finally {
|
||||
displayReportErrors();
|
||||
errorList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ import javax.swing.JPanel;
|
||||
/**
|
||||
* Interface for report modules that plug in to the reporting infrastructure.
|
||||
*/
|
||||
interface ReportModule {
|
||||
public interface ReportModule {
|
||||
|
||||
/**
|
||||
* Get the name of the report this module generates.
|
||||
@@ -61,4 +61,31 @@ interface ReportModule {
|
||||
public default JPanel getConfigurationPanel() {
|
||||
return new DefaultReportConfigurationPanel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default configuration for this report module.
|
||||
*
|
||||
* @return Object which contains default report module settings.
|
||||
*/
|
||||
public default ReportModuleSettings getDefaultConfiguration() {
|
||||
return new NoReportModuleSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current configuration for this report module.
|
||||
*
|
||||
* @return Object which contains current report module settings.
|
||||
*/
|
||||
public default ReportModuleSettings getConfiguration() {
|
||||
return new NoReportModuleSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set report module configuration.
|
||||
*
|
||||
* @param settings Object which contains report module settings.
|
||||
*/
|
||||
public default void setConfiguration(ReportModuleSettings settings) {
|
||||
// NO-OP
|
||||
}
|
||||
}
|
||||
|
||||
39
Core/src/org/sleuthkit/autopsy/report/ReportModuleSettings.java
Executable file
39
Core/src/org/sleuthkit/autopsy/report/ReportModuleSettings.java
Executable file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* An interface for defining report module settings. The settings are
|
||||
* serializable to support persistence of settings for different configurations
|
||||
* and between invocations of the application. Report module writers will
|
||||
* implement their own settings classes conforming to this interface.
|
||||
*/
|
||||
public interface ReportModuleSettings extends Serializable {
|
||||
|
||||
/**
|
||||
* Returns the version number of the settings object. The version number
|
||||
* should be a private final static long per the documentation of the
|
||||
* Serializable interface.
|
||||
*
|
||||
* @return A serialization version number.
|
||||
*/
|
||||
long getVersionNumber();
|
||||
}
|
||||
305
Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java
Normal file → Executable file
305
Core/src/org/sleuthkit/autopsy/report/ReportProgressPanel.java
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Copyright 2011-2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -18,31 +18,13 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import java.awt.Color;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* A panel used by a report generation module to show progress.
|
||||
* This interface is necessary in order to not break backwards compatibility
|
||||
* of GeneralReportModule interface. See JIRA-5354.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public class ReportProgressPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger logger = Logger.getLogger(ReportProgressPanel.class.getName());
|
||||
private static final Color GREEN = new Color(50, 205, 50);
|
||||
private static final Color RED = new Color(178, 34, 34);
|
||||
private volatile ReportStatus status;
|
||||
|
||||
/**
|
||||
public interface ReportProgressPanel {
|
||||
|
||||
/**
|
||||
* Used by a report generation module to communicate report generation
|
||||
* status to this panel and its listeners.
|
||||
*/
|
||||
@@ -53,125 +35,39 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
||||
COMPLETE,
|
||||
CANCELED,
|
||||
ERROR
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a panel used by report generation module to show progress.
|
||||
*
|
||||
* @param reportName The name of the report being generated.
|
||||
* @param reportPath The path to the report file.
|
||||
*/
|
||||
public ReportProgressPanel(String reportName, String reportPath) {
|
||||
initComponents();
|
||||
reportProgressBar.setIndeterminate(true);
|
||||
reportProgressBar.setMaximum(100);
|
||||
reportLabel.setText(reportName);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.progress.queuing"));
|
||||
status = ReportStatus.QUEUING;
|
||||
if (null != reportPath) {
|
||||
pathLabel.setText("<html><u>" + shortenPath(reportPath) + "</u></html>"); //NON-NLS
|
||||
pathLabel.setToolTipText(reportPath);
|
||||
String linkPath = reportPath;
|
||||
pathLabel.addMouseListener(new MouseListener() {
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent mouseEvent) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent mouseEvent) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent mouseEvent) {
|
||||
File file = new File(linkPath);
|
||||
try {
|
||||
Desktop.getDesktop().open(file);
|
||||
} catch (IOException ioex) {
|
||||
logger.log(Level.SEVERE, "Error opening report file", ioex);
|
||||
} catch (IllegalArgumentException iaEx) {
|
||||
logger.log(Level.SEVERE, "Error opening report file", iaEx);
|
||||
try {
|
||||
Desktop.getDesktop().open(file.getParentFile());
|
||||
} catch (IOException ioEx2) {
|
||||
logger.log(Level.SEVERE, "Error opening report file parent", ioEx2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e3) {
|
||||
pathLabel.setForeground(Color.DARK_GRAY);
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent e4) {
|
||||
pathLabel.setForeground(Color.BLACK);
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
pathLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.initPathLabel.noFile"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current status of the generation of the report.
|
||||
*
|
||||
* @return The report generation status as a ReportStatus enum.
|
||||
*/
|
||||
public ReportStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
public ReportStatus getStatus();
|
||||
|
||||
/**
|
||||
* Starts the progress bar component of this panel.
|
||||
*/
|
||||
public void start() {
|
||||
EventQueue.invokeLater(() -> {
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.start.progress.text"));
|
||||
status = ReportStatus.RUNNING;
|
||||
});
|
||||
}
|
||||
public void start();
|
||||
|
||||
/**
|
||||
* Sets the maximum value of the progress bar component of this panel.
|
||||
*
|
||||
* @param max The maximum value.
|
||||
*/
|
||||
public void setMaximumProgress(int max) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setMaximum(max);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void setMaximumProgress(int max);
|
||||
|
||||
/**
|
||||
* Increments the current value of the progress bar component of this panel
|
||||
* by one unit.
|
||||
*/
|
||||
public void increment() {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setValue(reportProgressBar.getValue() + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void increment();
|
||||
|
||||
/**
|
||||
* Sets the current value of the progress bar component of this panel.
|
||||
*
|
||||
* @param value The value to be set.
|
||||
*/
|
||||
public void setProgress(int value) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setValue(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void setProgress(int value);
|
||||
|
||||
/**
|
||||
* Changes the the progress bar component of this panel to be determinate or
|
||||
@@ -180,13 +76,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
||||
* @param indeterminate True if the progress bar should be set to
|
||||
* indeterminate.
|
||||
*/
|
||||
public void setIndeterminate(boolean indeterminate) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setIndeterminate(indeterminate);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void setIndeterminate(boolean indeterminate);
|
||||
|
||||
/**
|
||||
* Changes the status message label component of this panel to show a given
|
||||
@@ -195,13 +85,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
||||
*
|
||||
* @param statusMessage String to use as label text.
|
||||
*/
|
||||
public void updateStatusLabel(String statusMessage) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
statusMessageLabel.setText(statusMessage);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void updateStatusLabel(String statusMessage);
|
||||
|
||||
/**
|
||||
* Makes the components of this panel indicate the final status of
|
||||
@@ -209,159 +93,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
||||
*
|
||||
* @param reportStatus The final status, must be COMPLETE or ERROR.
|
||||
*/
|
||||
public void complete(ReportStatus reportStatus) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
reportProgressBar.setIndeterminate(false);
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
switch (reportStatus) {
|
||||
case COMPLETE: {
|
||||
ReportStatus oldValue = status;
|
||||
status = ReportStatus.COMPLETE;
|
||||
statusMessageLabel.setForeground(Color.BLACK);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.complete.processLbl.text"));
|
||||
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
||||
reportProgressBar.setStringPainted(true);
|
||||
reportProgressBar.setForeground(GREEN);
|
||||
reportProgressBar.setString("Complete"); //NON-NLS
|
||||
firePropertyChange(ReportStatus.COMPLETE.toString(), oldValue, status);
|
||||
break;
|
||||
}
|
||||
case ERROR: {
|
||||
ReportStatus oldValue = status;
|
||||
status = ReportStatus.ERROR;
|
||||
statusMessageLabel.setForeground(RED);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.complete.processLb2.text"));
|
||||
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
||||
reportProgressBar.setStringPainted(true);
|
||||
reportProgressBar.setForeground(RED);
|
||||
reportProgressBar.setString("Error"); //NON-NLS
|
||||
firePropertyChange(ReportStatus.COMPLETE.toString(), oldValue, status);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the components of this panel indicate generation of the report was
|
||||
* cancelled.
|
||||
*/
|
||||
void cancel() {
|
||||
switch (status) {
|
||||
case COMPLETE:
|
||||
break;
|
||||
case CANCELED:
|
||||
break;
|
||||
case ERROR:
|
||||
break;
|
||||
default:
|
||||
ReportStatus oldValue = status;
|
||||
status = ReportStatus.CANCELED;
|
||||
reportProgressBar.setIndeterminate(false);
|
||||
reportProgressBar.setValue(0);
|
||||
reportProgressBar.setStringPainted(true);
|
||||
reportProgressBar.setForeground(RED); // Red
|
||||
reportProgressBar.setString("Cancelled"); //NON-NLS
|
||||
firePropertyChange(ReportStatus.CANCELED.toString(), oldValue, status);
|
||||
statusMessageLabel.setForeground(RED);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.cancel.procLbl.text"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a shortened version of a file path.
|
||||
*
|
||||
* @param path The path to shorten.
|
||||
*
|
||||
* @return The shortened path.
|
||||
*/
|
||||
private String shortenPath(String path) {
|
||||
if (path.length() > 100) {
|
||||
return path.substring(0, 10 + path.substring(10).indexOf(File.separator) + 1) + "..."
|
||||
+ path.substring((path.length() - 70) + path.substring(path.length() - 70).indexOf(File.separator));
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
reportProgressBar = new javax.swing.JProgressBar();
|
||||
reportLabel = new javax.swing.JLabel();
|
||||
pathLabel = new javax.swing.JLabel();
|
||||
separationLabel = new javax.swing.JLabel();
|
||||
statusMessageLabel = new javax.swing.JLabel();
|
||||
|
||||
setFont(getFont().deriveFont(getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
setMinimumSize(new java.awt.Dimension(486, 68));
|
||||
|
||||
reportProgressBar.setFont(reportProgressBar.getFont().deriveFont(reportProgressBar.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
|
||||
reportLabel.setFont(reportLabel.getFont().deriveFont(reportLabel.getFont().getStyle() | java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(reportLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.reportLabel.text")); // NOI18N
|
||||
|
||||
pathLabel.setFont(pathLabel.getFont().deriveFont(pathLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(pathLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.pathLabel.text")); // NOI18N
|
||||
pathLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
|
||||
separationLabel.setFont(separationLabel.getFont().deriveFont(separationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(separationLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.separationLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(statusMessageLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.statusMessageLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(statusMessageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(reportProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(reportLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(separationLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(reportProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(reportLabel)
|
||||
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(separationLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(statusMessageLabel)
|
||||
.addGap(13, 13, 13))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel pathLabel;
|
||||
private javax.swing.JLabel reportLabel;
|
||||
private javax.swing.JProgressBar reportProgressBar;
|
||||
private javax.swing.JLabel separationLabel;
|
||||
private javax.swing.JLabel statusMessageLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
public void complete(ReportStatus reportStatus);
|
||||
|
||||
/**
|
||||
* Makes the components of this panel indicate the generation of the report
|
||||
@@ -370,8 +102,5 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
||||
* @deprecated Use {@link #complete(ReportStatus)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void complete() {
|
||||
complete(ReportStatus.COMPLETE);
|
||||
}
|
||||
|
||||
public void complete();
|
||||
}
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
*
|
||||
* Copyright 2012 42six Solutions.
|
||||
* Contact: aebadirad <at> 42six <dot> com
|
||||
* Project Contact/Architect: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.io.IOException;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Map;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import org.openide.DialogDisplayer;
|
||||
import org.openide.NotifyDescriptor;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.awt.ActionID;
|
||||
import org.openide.awt.ActionReference;
|
||||
import org.openide.awt.ActionReferences;
|
||||
import org.openide.awt.ActionRegistration;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.openide.util.actions.Presenter;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
|
||||
@ActionID(category = "Tools", id = "org.sleuthkit.autopsy.report.ReportWizardAction")
|
||||
@ActionRegistration(displayName = "#CTL_ReportWizardAction", lazy = false)
|
||||
@ActionReferences(value = {
|
||||
@ActionReference(path = "Menu/Tools", position = 301, separatorAfter = 399),
|
||||
@ActionReference(path = "Toolbars/Case", position = 105)})
|
||||
public final class ReportWizardAction extends CallableSystemAction implements Presenter.Toolbar, ActionListener {
|
||||
|
||||
private final JButton toolbarButton = new JButton();
|
||||
private static final String ACTION_NAME = NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.actionName.text");
|
||||
|
||||
/**
|
||||
* When the Generate Report button or menu item is selected, open the
|
||||
* reporting wizard. When the wizard is finished, create a ReportGenerator
|
||||
* with the wizard information, and start all necessary reports.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void doReportWizard() {
|
||||
WizardDescriptor wiz = new WizardDescriptor(new ReportWizardIterator());
|
||||
wiz.setTitleFormat(new MessageFormat("{0} {1}"));
|
||||
wiz.setTitle(NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.reportWiz.title"));
|
||||
if (DialogDisplayer.getDefault().notify(wiz) == WizardDescriptor.FINISH_OPTION) {
|
||||
ReportGenerator generator = new ReportGenerator(); //NON-NLS
|
||||
TableReportModule tableReport = (TableReportModule) wiz.getProperty("tableModule");
|
||||
GeneralReportModule generalReport = (GeneralReportModule) wiz.getProperty("generalModule");
|
||||
FileReportModule fileReport = (FileReportModule) wiz.getProperty("fileModule");
|
||||
PortableCaseReportModule portableCaseReport = (PortableCaseReportModule) wiz.getProperty("portableCaseModule"); // NON-NLS
|
||||
try {
|
||||
if (tableReport != null) {
|
||||
generator.generateTableReport(tableReport, (Map<BlackboardArtifact.Type, Boolean>) wiz.getProperty("artifactStates"), (Map<String, Boolean>) wiz.getProperty("tagStates")); //NON-NLS
|
||||
} else if (generalReport != null) {
|
||||
generator.generateGeneralReport(generalReport);
|
||||
} else if (fileReport != null) {
|
||||
generator.generateFileListReport(fileReport, (Map<FileReportDataTypes, Boolean>) wiz.getProperty("fileReportOptions")); //NON-NLS
|
||||
} else if (portableCaseReport != null) {
|
||||
generator.generatePortableCaseReport(portableCaseReport, (PortableCaseReportModule.PortableCaseOptions) wiz.getProperty("portableCaseReportOptions"));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
NotifyDescriptor descriptor = new NotifyDescriptor.Message(e.getMessage(), NotifyDescriptor.ERROR_MESSAGE);
|
||||
DialogDisplayer.getDefault().notify(descriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ReportWizardAction() {
|
||||
setEnabled(false);
|
||||
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> {
|
||||
if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) {
|
||||
Case newCase = (Case) evt.getNewValue();
|
||||
setEnabled(newCase != null && RuntimeProperties.runningWithGUI());
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize the Generate Report button
|
||||
toolbarButton.addActionListener(ReportWizardAction.this::actionPerformed);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
doReportWizard();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performAction() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ACTION_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HelpCtx getHelpCtx() {
|
||||
return HelpCtx.DEFAULT_HELP;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the tool bar component of this action
|
||||
*
|
||||
* @return component the tool bar button
|
||||
*/
|
||||
@Override
|
||||
public Component getToolbarPresenter() {
|
||||
ImageIcon icon = new ImageIcon(getClass().getResource("images/btn_icon_generate_report.png")); //NON-NLS
|
||||
toolbarButton.setIcon(icon);
|
||||
toolbarButton.setText(NbBundle.getMessage(this.getClass(), "ReportWizardAction.toolBarButton.text"));
|
||||
return toolbarButton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this action to be enabled/disabled
|
||||
*
|
||||
* @param value whether to enable this action or not
|
||||
*/
|
||||
@Override
|
||||
public void setEnabled(boolean value) {
|
||||
super.setEnabled(value);
|
||||
toolbarButton.setEnabled(value);
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabelSelectDataSource" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="selectDataSourceComboBox" pref="348" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||
<Component id="jLabelSelectDataSource" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="selectDataSourceComboBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="130" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JComboBox" name="selectDataSourceComboBox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="dataSourcesList" type="code"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabelSelectDataSource">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/caseuco/Bundle.properties" key="ReportCaseUcoConfigPanel.jLabelSelectDataSource.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019-2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.caseuco;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import javax.swing.ComboBoxModel;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.datamodel.utils.DataSourceLoader;
|
||||
import org.sleuthkit.autopsy.guiutils.DataSourceComboBoxModel;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
* UI controls for CASE-UCO report. It is a panel which provides the
|
||||
* ability to select a single datasource from a dropdown list
|
||||
* of sources in the current case.
|
||||
*/
|
||||
final class ReportCaseUcoConfigPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
static final long NO_DATA_SOURCE_SELECTED = -1;
|
||||
private ComboBoxModel<String> dataSourcesList = new DataSourceComboBoxModel();
|
||||
private final Map<Long, String> dataSourceMap;
|
||||
private final DataSourceLoader dataSourceLoader;
|
||||
|
||||
/**
|
||||
* Creates new form ReportCaseUcoConfigPanel
|
||||
*/
|
||||
ReportCaseUcoConfigPanel() throws NoCurrentCaseException, TskCoreException, SQLException {
|
||||
initComponents();
|
||||
this.dataSourceLoader = new DataSourceLoader();
|
||||
this.dataSourceMap = dataSourceLoader.getDataSourceMap();
|
||||
|
||||
String[] dataSourcesNames = new String[dataSourceMap.size()];
|
||||
if (dataSourcesNames.length > 0) {
|
||||
dataSourcesNames = dataSourceMap.values().toArray(dataSourcesNames);
|
||||
setDatasourceComboboxModel(new DataSourceComboBoxModel(dataSourcesNames));
|
||||
|
||||
selectDataSourceComboBox.setEnabled(true);
|
||||
selectDataSourceComboBox.setSelectedIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ID for the datasource selected in the combo box.
|
||||
*
|
||||
* @return the selected datasource ID or
|
||||
ReportCaseUcoConfigPanel.NO_DATA_SOURCE_SELECTED if none is selected
|
||||
*/
|
||||
Long getSelectedDataSourceId() {
|
||||
for (Entry<Long, String> entry : this.dataSourceMap.entrySet()) {
|
||||
if (entry.getValue().equals(this.selectDataSourceComboBox.getSelectedItem())) {
|
||||
return entry.getKey();
|
||||
}
|
||||
}
|
||||
return ReportCaseUcoConfigPanel.NO_DATA_SOURCE_SELECTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
selectDataSourceComboBox = new javax.swing.JComboBox<>();
|
||||
jLabelSelectDataSource = new javax.swing.JLabel();
|
||||
|
||||
selectDataSourceComboBox.setModel(dataSourcesList);
|
||||
selectDataSourceComboBox.setEnabled(false);
|
||||
|
||||
jLabelSelectDataSource.setText(org.openide.util.NbBundle.getMessage(ReportCaseUcoConfigPanel.class, "ReportCaseUcoConfigPanel.jLabelSelectDataSource.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(21, 21, 21)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabelSelectDataSource)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addComponent(selectDataSourceComboBox, 0, 348, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(11, 11, 11)
|
||||
.addComponent(jLabelSelectDataSource)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(selectDataSourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(130, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLabelSelectDataSource;
|
||||
private javax.swing.JComboBox<String> selectDataSourceComboBox;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
* Set the datamodel for the combo box which displays the data sources in
|
||||
* the current case
|
||||
*
|
||||
* @param dataSourceComboBoxModel the DataSourceComboBoxModel to use
|
||||
*/
|
||||
void setDatasourceComboboxModel(DataSourceComboBoxModel dataSourceComboBoxModel) {
|
||||
this.dataSourcesList = dataSourceComboBoxModel;
|
||||
this.selectDataSourceComboBox.setModel(dataSourcesList);
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="titleLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="221" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="195" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
@@ -95,7 +95,7 @@
|
||||
<Component class="javax.swing.JButton" name="okButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ArtifactSelectionDialog.okButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ArtifactSelectionDialog.okButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -105,14 +105,17 @@
|
||||
<Component class="javax.swing.JLabel" name="titleLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ArtifactSelectionDialog.titleLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ArtifactSelectionDialog.titleLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ArtifactSelectionDialog.titleLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="selectAllButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ArtifactSelectionDialog.selectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ArtifactSelectionDialog.selectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -122,7 +125,7 @@
|
||||
<Component class="javax.swing.JButton" name="deselectAllButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ArtifactSelectionDialog.deselectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ArtifactSelectionDialog.deselectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.MouseAdapter;
|
||||
@@ -45,20 +45,20 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
* Allow examiner to select artifacts on which to report.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public class ArtifactSelectionDialog extends javax.swing.JDialog {
|
||||
class ArtifactSelectionDialog extends javax.swing.JDialog {
|
||||
|
||||
private ArtifactModel model;
|
||||
private ArtifactRenderer renderer;
|
||||
private Map<BlackboardArtifact.Type, Boolean> artifactTypeSelections;
|
||||
private List<BlackboardArtifact.Type> artifactTypes;
|
||||
private Map<BlackboardArtifact.Type, Boolean> artifactTypeSelections = new HashMap<>();
|
||||
private List<BlackboardArtifact.Type> artifactTypes = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Creates new form ArtifactSelectionDialog
|
||||
*
|
||||
*
|
||||
* @param parent The parent window
|
||||
* @param modal Block user-input to other top-level windows.
|
||||
*/
|
||||
public ArtifactSelectionDialog(java.awt.Frame parent, boolean modal) {
|
||||
ArtifactSelectionDialog(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
initComponents();
|
||||
populateList();
|
||||
@@ -95,7 +95,10 @@ public class ArtifactSelectionDialog extends javax.swing.JDialog {
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ArtifactSelectionDialog.class.getName()).log(Level.SEVERE, "Error getting list of artifacts in use: {0}", ex.getLocalizedMessage()); //NON-NLS
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(ArtifactSelectionDialog.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex.getLocalizedMessage()); //NON-NLS
|
||||
// There may not be a case open, for example when configuring Command Line reports
|
||||
if (Case.isCaseOpen()) {
|
||||
Logger.getLogger(ArtifactSelectionDialog.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex.getLocalizedMessage()); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,9 +113,11 @@ public class ArtifactSelectionDialog extends javax.swing.JDialog {
|
||||
@Override
|
||||
public void mousePressed(MouseEvent evt) {
|
||||
int index = artifactList.locationToIndex(evt.getPoint());
|
||||
BlackboardArtifact.Type type = model.getElementAt(index);
|
||||
artifactTypeSelections.put(type, !artifactTypeSelections.get(type));
|
||||
artifactList.repaint();
|
||||
if (index >= 0) {
|
||||
BlackboardArtifact.Type type = model.getElementAt(index);
|
||||
artifactTypeSelections.put(type, !artifactTypeSelections.get(type));
|
||||
artifactList.repaint();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -159,6 +164,7 @@ public class ArtifactSelectionDialog extends javax.swing.JDialog {
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle.getMessage(ArtifactSelectionDialog.class, "ArtifactSelectionDialog.titleLabel.text")); // NOI18N
|
||||
titleLabel.setToolTipText(org.openide.util.NbBundle.getMessage(ArtifactSelectionDialog.class, "ArtifactSelectionDialog.titleLabel.toolTipText")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(selectAllButton, org.openide.util.NbBundle.getMessage(ArtifactSelectionDialog.class, "ArtifactSelectionDialog.selectAllButton.text")); // NOI18N
|
||||
selectAllButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -189,7 +195,7 @@ public class ArtifactSelectionDialog extends javax.swing.JDialog {
|
||||
.addComponent(selectAllButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(titleLabel)
|
||||
.addGap(0, 221, Short.MAX_VALUE))
|
||||
.addGap(0, 195, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addComponent(okButton)))
|
||||
215
Core/src/org/sleuthkit/autopsy/report/infrastructure/Bundle.properties
Executable file
215
Core/src/org/sleuthkit/autopsy/report/infrastructure/Bundle.properties
Executable file
@@ -0,0 +1,215 @@
|
||||
OpenIDE-Module-Name=Report
|
||||
CTL_ReportWizardAction=Run Report
|
||||
ReportWizardFileOptionsVisualPanel.jLabel1.text=Select items to include in File Report:
|
||||
ReportWizardFileOptionsVisualPanel.deselectAllButton.text=Deselect All
|
||||
ReportWizardFileOptionsVisualPanel.selectAllButton.text=Select All
|
||||
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText=
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into an archive:
|
||||
ReportProgressDialog.reportLabel.text=reportLabel
|
||||
ReportProgressDialog.statusMessageLabel.text=processingLabel
|
||||
ReportProgressDialog.separationLabel.text=:
|
||||
ReportProgressDialog.pathLabel.text=pathLabel
|
||||
PortableCaseTagsListPanel.jAllTagsCheckBox.text=All Tagged Results
|
||||
PortableCaseTagsListPanel.deselectButton.text=Deselect All
|
||||
PortableCaseTagsListPanel.selectButton.text=Select All
|
||||
PortableCaseTagsListPanel.descLabel.text=Include the following tags:
|
||||
ReportGenerationPanel.cancelButton.actionCommand=Cancel
|
||||
ReportGenerationPanel.cancelButton.text=Cancel
|
||||
ReportGenerationPanel.closeButton.text=Close
|
||||
PortableCaseInterestingItemsListPanel.deselectButton.text=Deselect All
|
||||
PortableCaseInterestingItemsListPanel.selectButton.text=Select All
|
||||
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:
|
||||
PortableCaseInterestingItemsListPanel.jAllSetsCheckBox.text=All Interesting Items
|
||||
ReportVisualPanel2.allTaggedResultsRadioButton.text=All Tagged Results
|
||||
ReportVisualPanel2.advancedButton.text=Result Types
|
||||
ReportVisualPanel2.deselectAllButton.text=Deselect All
|
||||
ReportVisualPanel2.selectAllButton.text=Select All
|
||||
ReportVisualPanel2.dataLabel.text=Select which data to report on:
|
||||
ReportVisualPanel2.allResultsRadioButton.text=All Results
|
||||
ReportVisualPanel2.specificTaggedResultsRadioButton.text=Specific Tagged Results
|
||||
ReportVisualPanel1.reportModulesLabel.text=Report Modules:
|
||||
ArtifactSelectionDialog.okButton.text=OK
|
||||
ArtifactSelectionDialog.deselectAllButton.text=Deselect All
|
||||
ArtifactSelectionDialog.selectAllButton.text=Select All
|
||||
ArtifactSelectionDialog.titleLabel.toolTipText=
|
||||
ArtifactSelectionDialog.titleLabel.text=Select which result types you would like to report on:
|
||||
ArtifactSelectionDialog.dlgTitle.text=Result Type Selection
|
||||
ReportVisualPanel1.invalidModuleWarning=Encountered an invalid Report Module ({0})
|
||||
ReportGenerationPanel.titleLabel.text=Report Generation Progress
|
||||
ReportGenerationPanel.confDlg.sureToClose.msg=Are you sure you'd like to close the dialog?\nAll reports will be canceled.
|
||||
ReportGenerationPanel.confDlg.title.closing=Closing
|
||||
ReportGenerationPanel.confDlg.cancelReport.msg=Are you sure you'd like to cancel the report?
|
||||
ReportGenerator.displayProgress.title.text=Report Generation Progress...
|
||||
ReportGenerator.progress.queryingDb.text=Querying database...
|
||||
ReportGenerator.progress.readingTagsArtifacts.text=Reading tags and artifacts from case database
|
||||
ReportGenerator.progress.processingFile.text=Now processing {0}
|
||||
ReportGenerator.artifactTable.taggedResults.text=Contains results that were tagged with one of the following:
|
||||
ReportGenerator.progress.processing=Now processing {0}...
|
||||
ReportGenerator.msgShow.skippingArtType.title=Skipping artifact type {0} in reports
|
||||
ReportGenerator.msgShow.skippingArtType.msg=Unknown columns to report on
|
||||
ReportGenerator.makeContTagTab.taggedFiles.msg=Contains files that were tagged with one of the following:
|
||||
ReportGenerator.makeBbArtTagTab.taggedRes.msg=This report only includes results tagged with:
|
||||
ReportGenerator.tagTable.header.resultType=Result Type
|
||||
ReportGenerator.tagTable.header.tag=Tag
|
||||
ReportGenerator.tagTable.header.comment=Comment
|
||||
ReportGenerator.tagTable.header.srcFile=Source File
|
||||
ReportGenerator.progress.createdThumb.text=Creating thumbnails...
|
||||
ReportGenerator.htmlOutput.header.file=File
|
||||
ReportGenerator.htmlOutput.header.tag=Tag
|
||||
ReportGenerator.htmlOutput.header.comment=Comment
|
||||
ReportGenerator.htmlOutput.header.timeModified=Modified Time
|
||||
ReportGenerator.htmlOutput.header.timeChanged=Changed Time
|
||||
ReportGenerator.htmlOutput.header.timeAccessed=Accessed Time
|
||||
ReportGenerator.htmlOutput.header.timeCreated=Created Time
|
||||
ReportGenerator.htmlOutput.header.size=Size (Bytes)
|
||||
ReportGenerator.htmlOutput.header.hash=Hash
|
||||
ReportGenerator.thumbnailTable.name=Tagged Images
|
||||
ReportGenerator.thumbnailTable.desc=Contains thumbnails of images that are associated with tagged files and results.
|
||||
ReportGenerator.writeKwHits.userSrchs=User Searches
|
||||
ReportGenerator.progress.processingList=Now processing {0} ({1})...
|
||||
ReportGenerator.artTableColHdr.url=URL
|
||||
ReportGenerator.artTableColHdr.title=Title
|
||||
ReportGenerator.artTableColHdr.dateCreated=Date Created
|
||||
ReportGenerator.artTableColHdr.program=Program
|
||||
ReportGenerator.artTableColHdr.urlDomainDecoded=URL Domain
|
||||
ReportGenerator.artTableColHdr.srcFile=Source File
|
||||
ReportGenerator.artTableColHdr.dateTime=Date/Time
|
||||
ReportGenerator.artTableColHdr.name=Name
|
||||
ReportGenerator.artTableColHdr.value=Value
|
||||
ReportGenerator.artTableColHdr.dateAccessed=Date Accessed
|
||||
ReportGenerator.artTableColHdr.referrer=Referrer
|
||||
ReportGenerator.artTableColHdr.dest=Destination
|
||||
ReportGenerator.artTableColHdr.sourceUrl=Source URL
|
||||
ReportGenerator.artTableColHdr.path=Path
|
||||
ReportGenerator.artTableColHdr.progName=Program Name
|
||||
ReportGenerator.artTableColHdr.instDateTime=Install Date/Time
|
||||
ReportGenerator.artTableColHdr.preview=Preview
|
||||
ReportGenerator.artTableColHdr.file=File
|
||||
ReportGenerator.artTableColHdr.size=Size
|
||||
ReportGenerator.artTableColHdr.deviceId=Device ID
|
||||
ReportGenerator.artTableColHdr.text=Text
|
||||
ReportGenerator.artTableColHdr.domain=Domain
|
||||
ReportGenerator.artTableColHdr.dateTaken=Date Taken
|
||||
ReportGenerator.artTableColHdr.devManufacturer=Device Manufacturer
|
||||
ReportGenerator.artTableColHdr.devMake=Device Make
|
||||
ReportGenerator.artTableColHdr.devModel=Device Model
|
||||
ReportGenerator.artTableColHdr.latitude=Latitude
|
||||
ReportGenerator.artTableColHdr.longitude=Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeStart=Starting Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeStart=Starting Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeEnd=Ending Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeEnd=Ending Longitude
|
||||
ReportGenerator.artTableColHdr.associatedArtifact=Associated Artifact
|
||||
ReportGenerator.artTableColHdr.count=Count
|
||||
ReportGenerator.artTableColHdr.personName=Person Name
|
||||
ReportGenerator.artTableColHdr.phoneNumber=Phone Number
|
||||
ReportGenerator.artTableColHdr.phoneNumHome=Phone Number (Home)
|
||||
ReportGenerator.artTableColHdr.phoneNumOffice=Phone Number (Office)
|
||||
ReportGenerator.artTableColHdr.phoneNumMobile=Phone Number (Mobile)
|
||||
ReportGenerator.artTableColHdr.email=Email
|
||||
ReportGenerator.artTableColHdr.msgType=Message Type
|
||||
ReportGenerator.artTableColHdr.direction=Direction
|
||||
ReportGenerator.artTableColHdr.readStatus=Read Status
|
||||
ReportGenerator.artTableColHdr.fromPhoneNum=From Phone Number
|
||||
ReportGenerator.artTableColHdr.fromEmail=From Email
|
||||
ReportGenerator.artTableColHdr.toPhoneNum=To Phone Number
|
||||
ReportGenerator.artTableColHdr.toEmail=To Email
|
||||
ReportGenerator.artTableColHdr.subject=Subject
|
||||
ReportGenerator.artTableColHdr.tskEmailTo=E-Mail To
|
||||
ReportGenerator.artTableColHdr.tskEmailCc=E-Mail CC
|
||||
ReportGenerator.artTableColHdr.tskEmailBcc=E-Mail BCC
|
||||
ReportGenerator.artTableColHdr.tskEmailFrom=E-Mail From
|
||||
ReportGenerator.artTableColHdr.tskMsgId=Message ID
|
||||
ReportGenerator.artTableColHdr.tskDateTimeRcvd=Date Received
|
||||
ReportGenerator.artTableColHdr.tskDateTimeSent=Date Sent
|
||||
ReportGenerator.artTableColHdr.tskSubject=Subject
|
||||
ReportGenerator.artTableColHdr.tskSetName=Set Name
|
||||
ReportGenerator.artTableColHdr.tskInterestingFilesCategory=Rule
|
||||
ReportGenerator.artTableColHdr.tskGpsRouteCategory=Category
|
||||
ReportGenerator.artTableColHdr.tskPath=Path
|
||||
ReportGenerator.artTableColHdr.calendarEntryType=Calendar Entry Type
|
||||
ReportGenerator.artTableColHdr.description=Description
|
||||
ReportGenerator.artTableColHdr.startDateTime=Start Date/Time
|
||||
ReportGenerator.artTableColHdr.endDateTime=End Date/Time
|
||||
ReportGenerator.artTableColHdr.location=Location
|
||||
ReportGenerator.artTableColHdr.shortCut=Short Cut
|
||||
ReportGenerator.artTableColHdr.deviceName=Device Name
|
||||
ReportGenerator.artTableColHdr.deviceAddress=Device Address
|
||||
ReportGenerator.artTableColHdr.altitude=Altitude
|
||||
ReportGenerator.artTableColHdr.locationAddress=Location Address
|
||||
ReportGenerator.artTableColHdr.category=Category
|
||||
ReportGenerator.artTableColHdr.userId=User ID
|
||||
ReportGenerator.artTableColHdr.userName=User Name
|
||||
ReportGenerator.artTableColHdr.password=Password
|
||||
ReportGenerator.artTableColHdr.appName=App Name
|
||||
ReportGenerator.artTableColHdr.appPath=App Path
|
||||
ReportGenerator.artTableColHdr.replytoAddress=ReplyTo Address
|
||||
ReportGenerator.artTableColHdr.mailServer=Mail Server
|
||||
ReportGenerator.artTableColHdr.tags=Tags
|
||||
ReportGenerator.artTableColHdr.localPath=Local path
|
||||
ReportGenerator.artTableColHdr.remotePath=Remote path
|
||||
ReportGenerator.errors.reportErrorTitle=Error generating report
|
||||
ReportGenerator.errors.reportErrorText=Error generating report:
|
||||
ReportProgressDialog.progress.queuing=Queuing...
|
||||
ReportProgressDialog.initPathLabel.noFile=<html><u>No report file</u></html>
|
||||
ReportProgressDialog.start.cancelButton.text=Cancel
|
||||
ReportProgressDialog.start.progress.text=Starting report...
|
||||
ReportProgressDialog.complete.processLbl.text=Complete
|
||||
ReportProgressDialog.complete.processLb2.text=Completed with error
|
||||
ReportProgressDialog.complete.cancelButton.text=Complete
|
||||
ReportProgressDialog.cancel.cancelButton.toolTipText=Canceled
|
||||
ReportProgressDialog.cancel.procLbl.text=Canceled
|
||||
ReportVisualPanel1.getName.text=Select and Configure Report Modules
|
||||
ReportVisualPanel2.getName.text=Configure Report
|
||||
ReportWizardAction.actionName.text=Generate Report
|
||||
ReportWizardAction.reportWiz.title=Generate Report
|
||||
ReportWizardAction.toolBarButton.text=Generate Report
|
||||
ReportWizardAction.unableToSaveConfig.errorLabel.text=Failed to save reporting configuration
|
||||
ReportWizardFileOptionsPanel.finishButton.text=Finish
|
||||
ReportWizardFileOptionsVisualPanel.getName.text=Configure File Report
|
||||
ReportWizardPanel1.nextButton.text=Next >
|
||||
ReportWizardPanel1.finishButton.text=Finish
|
||||
ReportWizardPanel2.finishButton.text=Finish
|
||||
ReportWizardPanel2.nextButton.text=Next >
|
||||
ReportGenerator.artTableColHdr.extension.text=Extension
|
||||
ReportGenerator.artTableColHdr.mimeType.text=MIME Type
|
||||
ReportGenerator.artTableColHdr.processorArchitecture.text=Processor Architecture
|
||||
ReportGenerator.artTableColHdr.osName.text=Operating System Name
|
||||
ReportGenerator.artTableColHdr.osInstallDate.text=Install Date
|
||||
ReportGenerator.errList.failedMakeRptFolder=Failed to make report folder, may be unable to generate reports.
|
||||
ReportGenerator.notifyErr.errsDuringRptGen=Errors during report generation:
|
||||
ReportGenerator.errList.failedGetAllTagsArtifacts=Failed get all possible tag names and artifact types.
|
||||
ReportGenerator.errList.noReportSettings=Report settings have not been configured.
|
||||
ReportGenerator.errList.failedGetContentTags=Failed to get content tags.
|
||||
ReportGenerator.errList.failedGetBBArtifactTags=Failed to get blackboard artifact tags.
|
||||
ReportGenerator.errList.errGetContentFromBBArtifact=Error while getting content from a blackboard artifact to report on.
|
||||
ReportGenerator.errList.failedGetBBAttribs=Failed to get Blackboard Attributes when generating report.
|
||||
ReportGenerator.errList.failedGetBBArtifacts=Failed to get Blackboard Artifacts when generating report.
|
||||
ReportGenerator.errList.failedQueryKWLists=Failed to query keyword lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileByID=Failed to get Abstract File by ID.
|
||||
ReportGenerator.errList.failedQueryKWs=Failed to query keywords.
|
||||
ReportGenerator.errList.failedQueryHashsetLists=Failed to query hashset lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileFromID=Failed to get Abstract File from ID.
|
||||
ReportGenerator.errList.failedQueryHashsetHits=Failed to query hashsets hits.
|
||||
ReportGenerator.errList.coreExceptionWhileGenRptRow=Core exception while generating row data for artifact report.
|
||||
CreatePortableCasePanel.selectAllButton.text=Select All
|
||||
CreatePortableCasePanel.deselectAllButton.text=Deselect All
|
||||
CreatePortableCasePanel.outputFolderTextField.text=jTextField1
|
||||
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
|
||||
CreatePortableCasePanel.jLabel1.text=Export files tagged as:
|
||||
CreatePortableCasePanel.jLabel2.text=Select output folder:
|
||||
CreatePortableCasePanel.errorLabel.text_1=Windows only
|
||||
FileReportDataTypes.filename.text=Name
|
||||
FileReportDataTypes.fileExt.text=File Extension
|
||||
FileReportDataTypes.fileType.text=File Type
|
||||
FileReportDataTypes.isDel.text=Is Deleted
|
||||
FileReportDataTypes.aTime.text=Last Accessed
|
||||
FileReportDataTypes.crTime.text=File Created
|
||||
FileReportDataTypes.mTime.text=Last Modified
|
||||
FileReportDataTypes.size.text=Size
|
||||
FileReportDataTypes.address.text=Address
|
||||
FileReportDataTypes.hash.text=Hash Value
|
||||
FileReportDataTypes.knownStatus.text=Known Status
|
||||
FileReportDataTypes.perms.text=Permissions
|
||||
FileReportDataTypes.path.text=Full Path
|
||||
226
Core/src/org/sleuthkit/autopsy/report/infrastructure/Bundle.properties-MERGED
Executable file
226
Core/src/org/sleuthkit/autopsy/report/infrastructure/Bundle.properties-MERGED
Executable file
@@ -0,0 +1,226 @@
|
||||
OpenIDE-Module-Name=Report
|
||||
CTL_ReportWizardAction=Run Report
|
||||
PortableCaseInterestingItemsListPanel.error.errorLoadingTags=Error loading interesting item set names
|
||||
PortableCaseInterestingItemsListPanel.error.errorTitle=Error getting intesting item set names for case
|
||||
PortableCaseInterestingItemsListPanel.error.noOpenCase=There is no case open
|
||||
PortableCaseTagsListPanel.error.errorLoadingTags=Error loading tags
|
||||
PortableCaseTagsListPanel.error.errorTitle=Error getting tag names for case
|
||||
PortableCaseTagsListPanel.error.noOpenCase=There is no case open
|
||||
ReportGenerator.artTableColHdr.comment=Comment
|
||||
ReportGenerator.errList.noOpenCase=No open case available.
|
||||
ReportGenerator.tagTable.header.userName=User Name
|
||||
ReportWizardFileOptionsVisualPanel.jLabel1.text=Select items to include in File Report:
|
||||
ReportWizardFileOptionsVisualPanel.deselectAllButton.text=Deselect All
|
||||
ReportWizardFileOptionsVisualPanel.selectAllButton.text=Select All
|
||||
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText=
|
||||
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into an archive:
|
||||
ReportProgressDialog.reportLabel.text=reportLabel
|
||||
ReportProgressDialog.statusMessageLabel.text=processingLabel
|
||||
ReportProgressDialog.separationLabel.text=:
|
||||
ReportProgressDialog.pathLabel.text=pathLabel
|
||||
PortableCaseTagsListPanel.jAllTagsCheckBox.text=All Tagged Results
|
||||
PortableCaseTagsListPanel.deselectButton.text=Deselect All
|
||||
PortableCaseTagsListPanel.selectButton.text=Select All
|
||||
PortableCaseTagsListPanel.descLabel.text=Include the following tags:
|
||||
ReportGenerationPanel.cancelButton.actionCommand=Cancel
|
||||
ReportGenerationPanel.cancelButton.text=Cancel
|
||||
ReportGenerationPanel.closeButton.text=Close
|
||||
PortableCaseInterestingItemsListPanel.deselectButton.text=Deselect All
|
||||
PortableCaseInterestingItemsListPanel.selectButton.text=Select All
|
||||
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:
|
||||
PortableCaseInterestingItemsListPanel.jAllSetsCheckBox.text=All Interesting Items
|
||||
ReportVisualPanel2.allTaggedResultsRadioButton.text=All Tagged Results
|
||||
ReportVisualPanel2.advancedButton.text=Result Types
|
||||
ReportVisualPanel2.deselectAllButton.text=Deselect All
|
||||
ReportVisualPanel2.selectAllButton.text=Select All
|
||||
ReportVisualPanel2.dataLabel.text=Select which data to report on:
|
||||
ReportVisualPanel2.allResultsRadioButton.text=All Results
|
||||
ReportVisualPanel2.specificTaggedResultsRadioButton.text=Specific Tagged Results
|
||||
ReportVisualPanel1.reportModulesLabel.text=Report Modules:
|
||||
ArtifactSelectionDialog.okButton.text=OK
|
||||
ArtifactSelectionDialog.deselectAllButton.text=Deselect All
|
||||
ArtifactSelectionDialog.selectAllButton.text=Select All
|
||||
ArtifactSelectionDialog.titleLabel.toolTipText=
|
||||
ArtifactSelectionDialog.titleLabel.text=Select which result types you would like to report on:
|
||||
ArtifactSelectionDialog.dlgTitle.text=Result Type Selection
|
||||
ReportVisualPanel1.invalidModuleWarning=Encountered an invalid Report Module ({0})
|
||||
ReportGenerationPanel.titleLabel.text=Report Generation Progress
|
||||
ReportGenerationPanel.confDlg.sureToClose.msg=Are you sure you'd like to close the dialog?\nAll reports will be canceled.
|
||||
ReportGenerationPanel.confDlg.title.closing=Closing
|
||||
ReportGenerationPanel.confDlg.cancelReport.msg=Are you sure you'd like to cancel the report?
|
||||
ReportGenerator.displayProgress.title.text=Report Generation Progress...
|
||||
ReportGenerator.progress.queryingDb.text=Querying database...
|
||||
ReportGenerator.progress.readingTagsArtifacts.text=Reading tags and artifacts from case database
|
||||
ReportGenerator.progress.processingFile.text=Now processing {0}
|
||||
ReportGenerator.artifactTable.taggedResults.text=Contains results that were tagged with one of the following:
|
||||
ReportGenerator.progress.processing=Now processing {0}...
|
||||
ReportGenerator.msgShow.skippingArtType.title=Skipping artifact type {0} in reports
|
||||
ReportGenerator.msgShow.skippingArtType.msg=Unknown columns to report on
|
||||
ReportGenerator.makeContTagTab.taggedFiles.msg=Contains files that were tagged with one of the following:
|
||||
ReportGenerator.makeBbArtTagTab.taggedRes.msg=This report only includes results tagged with:
|
||||
ReportGenerator.tagTable.header.resultType=Result Type
|
||||
ReportGenerator.tagTable.header.tag=Tag
|
||||
ReportGenerator.tagTable.header.comment=Comment
|
||||
ReportGenerator.tagTable.header.srcFile=Source File
|
||||
ReportGenerator.progress.createdThumb.text=Creating thumbnails...
|
||||
ReportGenerator.htmlOutput.header.file=File
|
||||
ReportGenerator.htmlOutput.header.tag=Tag
|
||||
ReportGenerator.htmlOutput.header.comment=Comment
|
||||
ReportGenerator.htmlOutput.header.timeModified=Modified Time
|
||||
ReportGenerator.htmlOutput.header.timeChanged=Changed Time
|
||||
ReportGenerator.htmlOutput.header.timeAccessed=Accessed Time
|
||||
ReportGenerator.htmlOutput.header.timeCreated=Created Time
|
||||
ReportGenerator.htmlOutput.header.size=Size (Bytes)
|
||||
ReportGenerator.htmlOutput.header.hash=Hash
|
||||
ReportGenerator.thumbnailTable.name=Tagged Images
|
||||
ReportGenerator.thumbnailTable.desc=Contains thumbnails of images that are associated with tagged files and results.
|
||||
ReportGenerator.writeKwHits.userSrchs=User Searches
|
||||
ReportGenerator.progress.processingList=Now processing {0} ({1})...
|
||||
ReportGenerator.artTableColHdr.url=URL
|
||||
ReportGenerator.artTableColHdr.title=Title
|
||||
ReportGenerator.artTableColHdr.dateCreated=Date Created
|
||||
ReportGenerator.artTableColHdr.program=Program
|
||||
ReportGenerator.artTableColHdr.urlDomainDecoded=URL Domain
|
||||
ReportGenerator.artTableColHdr.srcFile=Source File
|
||||
ReportGenerator.artTableColHdr.dateTime=Date/Time
|
||||
ReportGenerator.artTableColHdr.name=Name
|
||||
ReportGenerator.artTableColHdr.value=Value
|
||||
ReportGenerator.artTableColHdr.dateAccessed=Date Accessed
|
||||
ReportGenerator.artTableColHdr.referrer=Referrer
|
||||
ReportGenerator.artTableColHdr.dest=Destination
|
||||
ReportGenerator.artTableColHdr.sourceUrl=Source URL
|
||||
ReportGenerator.artTableColHdr.path=Path
|
||||
ReportGenerator.artTableColHdr.progName=Program Name
|
||||
ReportGenerator.artTableColHdr.instDateTime=Install Date/Time
|
||||
ReportGenerator.artTableColHdr.preview=Preview
|
||||
ReportGenerator.artTableColHdr.file=File
|
||||
ReportGenerator.artTableColHdr.size=Size
|
||||
ReportGenerator.artTableColHdr.deviceId=Device ID
|
||||
ReportGenerator.artTableColHdr.text=Text
|
||||
ReportGenerator.artTableColHdr.domain=Domain
|
||||
ReportGenerator.artTableColHdr.dateTaken=Date Taken
|
||||
ReportGenerator.artTableColHdr.devManufacturer=Device Manufacturer
|
||||
ReportGenerator.artTableColHdr.devMake=Device Make
|
||||
ReportGenerator.artTableColHdr.devModel=Device Model
|
||||
ReportGenerator.artTableColHdr.latitude=Latitude
|
||||
ReportGenerator.artTableColHdr.longitude=Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeStart=Starting Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeStart=Starting Longitude
|
||||
ReportGenerator.artTableColHdr.latitudeEnd=Ending Latitude
|
||||
ReportGenerator.artTableColHdr.longitudeEnd=Ending Longitude
|
||||
ReportGenerator.artTableColHdr.associatedArtifact=Associated Artifact
|
||||
ReportGenerator.artTableColHdr.count=Count
|
||||
ReportGenerator.artTableColHdr.personName=Person Name
|
||||
ReportGenerator.artTableColHdr.phoneNumber=Phone Number
|
||||
ReportGenerator.artTableColHdr.phoneNumHome=Phone Number (Home)
|
||||
ReportGenerator.artTableColHdr.phoneNumOffice=Phone Number (Office)
|
||||
ReportGenerator.artTableColHdr.phoneNumMobile=Phone Number (Mobile)
|
||||
ReportGenerator.artTableColHdr.email=Email
|
||||
ReportGenerator.artTableColHdr.msgType=Message Type
|
||||
ReportGenerator.artTableColHdr.direction=Direction
|
||||
ReportGenerator.artTableColHdr.readStatus=Read Status
|
||||
ReportGenerator.artTableColHdr.fromPhoneNum=From Phone Number
|
||||
ReportGenerator.artTableColHdr.fromEmail=From Email
|
||||
ReportGenerator.artTableColHdr.toPhoneNum=To Phone Number
|
||||
ReportGenerator.artTableColHdr.toEmail=To Email
|
||||
ReportGenerator.artTableColHdr.subject=Subject
|
||||
ReportGenerator.artTableColHdr.tskEmailTo=E-Mail To
|
||||
ReportGenerator.artTableColHdr.tskEmailCc=E-Mail CC
|
||||
ReportGenerator.artTableColHdr.tskEmailBcc=E-Mail BCC
|
||||
ReportGenerator.artTableColHdr.tskEmailFrom=E-Mail From
|
||||
ReportGenerator.artTableColHdr.tskMsgId=Message ID
|
||||
ReportGenerator.artTableColHdr.tskDateTimeRcvd=Date Received
|
||||
ReportGenerator.artTableColHdr.tskDateTimeSent=Date Sent
|
||||
ReportGenerator.artTableColHdr.tskSubject=Subject
|
||||
ReportGenerator.artTableColHdr.tskSetName=Set Name
|
||||
ReportGenerator.artTableColHdr.tskInterestingFilesCategory=Rule
|
||||
ReportGenerator.artTableColHdr.tskGpsRouteCategory=Category
|
||||
ReportGenerator.artTableColHdr.tskPath=Path
|
||||
ReportGenerator.artTableColHdr.calendarEntryType=Calendar Entry Type
|
||||
ReportGenerator.artTableColHdr.description=Description
|
||||
ReportGenerator.artTableColHdr.startDateTime=Start Date/Time
|
||||
ReportGenerator.artTableColHdr.endDateTime=End Date/Time
|
||||
ReportGenerator.artTableColHdr.location=Location
|
||||
ReportGenerator.artTableColHdr.shortCut=Short Cut
|
||||
ReportGenerator.artTableColHdr.deviceName=Device Name
|
||||
ReportGenerator.artTableColHdr.deviceAddress=Device Address
|
||||
ReportGenerator.artTableColHdr.altitude=Altitude
|
||||
ReportGenerator.artTableColHdr.locationAddress=Location Address
|
||||
ReportGenerator.artTableColHdr.category=Category
|
||||
ReportGenerator.artTableColHdr.userId=User ID
|
||||
ReportGenerator.artTableColHdr.userName=User Name
|
||||
ReportGenerator.artTableColHdr.password=Password
|
||||
ReportGenerator.artTableColHdr.appName=App Name
|
||||
ReportGenerator.artTableColHdr.appPath=App Path
|
||||
ReportGenerator.artTableColHdr.replytoAddress=ReplyTo Address
|
||||
ReportGenerator.artTableColHdr.mailServer=Mail Server
|
||||
ReportGenerator.artTableColHdr.tags=Tags
|
||||
ReportGenerator.artTableColHdr.localPath=Local path
|
||||
ReportGenerator.artTableColHdr.remotePath=Remote path
|
||||
ReportGenerator.errors.reportErrorTitle=Error generating report
|
||||
ReportGenerator.errors.reportErrorText=Error generating report:
|
||||
ReportProgressDialog.progress.queuing=Queuing...
|
||||
ReportProgressDialog.initPathLabel.noFile=<html><u>No report file</u></html>
|
||||
ReportProgressDialog.start.cancelButton.text=Cancel
|
||||
ReportProgressDialog.start.progress.text=Starting report...
|
||||
ReportProgressDialog.complete.processLbl.text=Complete
|
||||
ReportProgressDialog.complete.processLb2.text=Completed with error
|
||||
ReportProgressDialog.complete.cancelButton.text=Complete
|
||||
ReportProgressDialog.cancel.cancelButton.toolTipText=Canceled
|
||||
ReportProgressDialog.cancel.procLbl.text=Canceled
|
||||
ReportVisualPanel1.getName.text=Select and Configure Report Modules
|
||||
ReportVisualPanel2.getName.text=Configure Report
|
||||
ReportWizardAction.actionName.text=Generate Report
|
||||
ReportWizardAction.reportWiz.title=Generate Report
|
||||
ReportWizardAction.toolBarButton.text=Generate Report
|
||||
ReportWizardAction.unableToSaveConfig.errorLabel.text=Failed to save reporting configuration
|
||||
ReportWizardFileOptionsPanel.finishButton.text=Finish
|
||||
ReportWizardFileOptionsVisualPanel.getName.text=Configure File Report
|
||||
ReportWizardPanel1.nextButton.text=Next >
|
||||
ReportWizardPanel1.finishButton.text=Finish
|
||||
ReportWizardPanel2.finishButton.text=Finish
|
||||
ReportWizardPanel2.nextButton.text=Next >
|
||||
ReportGenerator.artTableColHdr.extension.text=Extension
|
||||
ReportGenerator.artTableColHdr.mimeType.text=MIME Type
|
||||
ReportGenerator.artTableColHdr.processorArchitecture.text=Processor Architecture
|
||||
ReportGenerator.artTableColHdr.osName.text=Operating System Name
|
||||
ReportGenerator.artTableColHdr.osInstallDate.text=Install Date
|
||||
ReportGenerator.errList.failedMakeRptFolder=Failed to make report folder, may be unable to generate reports.
|
||||
ReportGenerator.notifyErr.errsDuringRptGen=Errors during report generation:
|
||||
ReportGenerator.errList.failedGetAllTagsArtifacts=Failed get all possible tag names and artifact types.
|
||||
ReportGenerator.errList.noReportSettings=Report settings have not been configured.
|
||||
ReportGenerator.errList.failedGetContentTags=Failed to get content tags.
|
||||
ReportGenerator.errList.failedGetBBArtifactTags=Failed to get blackboard artifact tags.
|
||||
ReportGenerator.errList.errGetContentFromBBArtifact=Error while getting content from a blackboard artifact to report on.
|
||||
ReportGenerator.errList.failedGetBBAttribs=Failed to get Blackboard Attributes when generating report.
|
||||
ReportGenerator.errList.failedGetBBArtifacts=Failed to get Blackboard Artifacts when generating report.
|
||||
ReportGenerator.errList.failedQueryKWLists=Failed to query keyword lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileByID=Failed to get Abstract File by ID.
|
||||
ReportGenerator.errList.failedQueryKWs=Failed to query keywords.
|
||||
ReportGenerator.errList.failedQueryHashsetLists=Failed to query hashset lists.
|
||||
ReportGenerator.errList.failedGetAbstractFileFromID=Failed to get Abstract File from ID.
|
||||
ReportGenerator.errList.failedQueryHashsetHits=Failed to query hashsets hits.
|
||||
ReportGenerator.errList.coreExceptionWhileGenRptRow=Core exception while generating row data for artifact report.
|
||||
CreatePortableCasePanel.selectAllButton.text=Select All
|
||||
CreatePortableCasePanel.deselectAllButton.text=Deselect All
|
||||
CreatePortableCasePanel.outputFolderTextField.text=jTextField1
|
||||
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
|
||||
CreatePortableCasePanel.jLabel1.text=Export files tagged as:
|
||||
CreatePortableCasePanel.jLabel2.text=Select output folder:
|
||||
CreatePortableCasePanel.errorLabel.text_1=Windows only
|
||||
FileReportDataTypes.filename.text=Name
|
||||
FileReportDataTypes.fileExt.text=File Extension
|
||||
FileReportDataTypes.fileType.text=File Type
|
||||
FileReportDataTypes.isDel.text=Is Deleted
|
||||
FileReportDataTypes.aTime.text=Last Accessed
|
||||
FileReportDataTypes.crTime.text=File Created
|
||||
FileReportDataTypes.mTime.text=Last Modified
|
||||
FileReportDataTypes.size.text=Size
|
||||
FileReportDataTypes.address.text=Address
|
||||
FileReportDataTypes.hash.text=Hash Value
|
||||
FileReportDataTypes.knownStatus.text=Known Status
|
||||
FileReportDataTypes.perms.text=Permissions
|
||||
FileReportDataTypes.path.text=Full Path
|
||||
ReportWizardPortableCaseOptionsVisualPanel.getName.title=Choose Portable Case settings
|
||||
TableReportGenerator.StatusColumn.Header=Review Status
|
||||
190
Core/src/org/sleuthkit/autopsy/report/infrastructure/Bundle_ja.properties
Executable file
190
Core/src/org/sleuthkit/autopsy/report/infrastructure/Bundle_ja.properties
Executable file
@@ -0,0 +1,190 @@
|
||||
CTL_ReportWizardAction=\u30ec\u30dd\u30fc\u30c8\u3092\u5b9f\u884c
|
||||
ReportWizardFileOptionsVisualPanel.selectAllButton.text=\u5168\u3066\u9078\u629e
|
||||
ReportWizardFileOptionsVisualPanel.jLabel1.text=\u30d5\u30a1\u30a4\u30eb\u30ec\u30dd\u30fc\u30c8\u306b\u542b\u3081\u308b\u30a2\u30a4\u30c6\u30e0\u3092\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\uff1a
|
||||
ReportWizardFileOptionsVisualPanel.deselectAllButton.text=\u5168\u3066\u9078\u629e\u89e3\u9664
|
||||
ReportProgressDialog.pathLabel.text=\u30d1\u30b9\u30e9\u30d9\u30eb
|
||||
ReportProgressDialog.reportLabel.text=\u30ec\u30dd\u30fc\u30c8\u30e9\u30d9\u30eb
|
||||
ReportProgressDialog.statusMessageLabel.text=\u30d7\u30ed\u30bb\u30b7\u30f3\u30b0\u30e9\u30d9\u30eb
|
||||
ReportProgressDialog.separationLabel.text=:
|
||||
ReportGenerationPanel.closeButton.text=\u9589\u3058\u308b
|
||||
ReportGenerationPanel.cancelButton.actionCommand=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
ReportGenerationPanel.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
ReportVisualPanel2.allResultsRadioButton.text=\u5168\u3066\u306e\u7d50\u679c
|
||||
ReportVisualPanel2.advancedButton.text=\u30c7\u30fc\u30bf\u30bf\u30a4\u30d7
|
||||
ReportVisualPanel2.deselectAllButton.text=\u5168\u3066\u9078\u629e\u89e3\u9664
|
||||
ReportVisualPanel2.selectAllButton.text=\u5168\u3066\u9078\u629e
|
||||
ReportVisualPanel2.dataLabel.text=\u3069\u306e\u30c7\u30fc\u30bf\u306b\u3064\u3044\u3066\u30ec\u30dd\u30fc\u30c8\u3059\u308b\u304b\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\uff1a
|
||||
ReportVisualPanel1.reportModulesLabel.text=\u30ec\u30dd\u30fc\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb\uff1a
|
||||
ArtifactSelectionDialog.deselectAllButton.text=\u5168\u3066\u9078\u629e\u89e3\u9664
|
||||
ArtifactSelectionDialog.selectAllButton.text=\u5168\u3066\u9078\u629e
|
||||
ArtifactSelectionDialog.titleLabel.text=\u3069\u306e\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306b\u3064\u3044\u3066\u30ec\u30dd\u30fc\u30c8\u3059\u308b\u304b\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\uff1a
|
||||
ArtifactSelectionDialog.okButton.text=OK
|
||||
ReportGenerationPanel.titleLabel.text=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u30d7\u30ed\u30b0\u30ec\u30b9
|
||||
ArtifactSelectionDialog.dlgTitle.text=\u30a2\u30c9\u30d0\u30f3\u30b9\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u9078\u629e
|
||||
ReportGenerationPanel.confDlg.sureToClose.msg=\u3053\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u672c\u5f53\u306b\u9589\u3058\u307e\u3059\u304b\uff1f\n\u5168\u3066\u306e\u30ec\u30dd\u30fc\u30c8\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3059\u3002
|
||||
ReportGenerationPanel.confDlg.title.closing=\u9589\u3058\u3066\u3044\u307e\u3059
|
||||
ReportGenerator.displayProgress.title.text=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u30d7\u30ed\u30b0\u30ec\u30b9\u2026
|
||||
ReportGenerator.progress.queryingDb.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u2026
|
||||
ReportGenerator.progress.processingFile.text={0}\u3092\u51e6\u7406\u4e2d
|
||||
ReportGenerator.artifactTable.taggedResults.text=\u6b21\u306e\u4e2d\u306e\u4e00\u3064\u3067\u30bf\u30b0\u3055\u308c\u305f\u7d50\u679c\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\uff1a
|
||||
ReportGenerator.progress.processing={0}\u3092\u51e6\u7406\u4e2d\u2026
|
||||
ReportGenerator.msgShow.skippingArtType.title=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30bf\u30a4\u30d7{0}\u3092\u30ec\u30dd\u30fc\u30c8\u3067\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059
|
||||
ReportGenerator.msgShow.skippingArtType.msg=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u3059\u308b\u306e\u306b\u4e0d\u660e\u306a\u30b3\u30e9\u30e0
|
||||
ReportGenerator.msgShow.skippingArtRow.title=\u30bf\u30a4\u30d7{0}\u306e\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u884c\u3092\u30ec\u30dd\u30fc\u30c8\u3067\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059
|
||||
ReportGenerator.msgShow.skippingArtRow.msg=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u3059\u308b\u306e\u306b\u4e0d\u660e\u306a\u30b3\u30e9\u30e0
|
||||
ReportGenerator.makeContTagTab.taggedFiles.msg=\u306e\u4e2d\u306e\u4e00\u3064\u3067\u30bf\u30b0\u3055\u308c\u305f\u7d50\u679c\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\uff1a
|
||||
ReportGenerator.makeBbArtTagTab.taggedRes.msg=\u3053\u306e\u30ec\u30dd\u30fc\u30c8\u306b\u306f\u6b21\u3067\u30bf\u30b0\u3055\u308c\u305f\u7d50\u679c\u3057\u304b\u542b\u307e\u308c\u307e\u305b\u3093\uff1a
|
||||
ReportGenerator.tagTable.header.resultType=\u7d50\u679c\u30bf\u30a4\u30d7
|
||||
ReportGenerator.tagTable.header.tag=\u30bf\u30b0
|
||||
ReportGenerator.tagTable.header.comment=\u30b3\u30e1\u30f3\u30c8
|
||||
ReportGenerator.tagTable.header.srcFile=\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.progress.createdThumb.text=\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u4f5c\u6210\u4e2d\u2026
|
||||
ReportGenerator.thumbnailTable.name=\u30b5\u30e0\u30cd\u30a4\u30eb
|
||||
ReportGenerator.thumbnailTable.desc=\u30bf\u30b0\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3084\u7d50\u679c\u306b\u95a2\u9023\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u304c\u542b\u307e\u308c\u307e\u3059\u3002
|
||||
ReportGenerator.writeKwHits.userSrchs=\u30e6\u30fc\u30b6\u691c\u7d22
|
||||
ReportGenerator.progress.processingList={0} ({1})\u3092\u51e6\u7406\u4e2d\u2026
|
||||
ReportGenerator.artTableColHdr.url=URL
|
||||
ReportGenerator.artTableColHdr.title=\u30bf\u30a4\u30c8\u30eb
|
||||
ReportGenerator.artTableColHdr.dateCreated=\u4f5c\u6210\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.program=\u30d7\u30ed\u30b0\u30e9\u30e0
|
||||
ReportGenerator.artTableColHdr.srcFile=\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.artTableColHdr.dateTime=\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.name=\u540d\u524d
|
||||
ReportGenerator.artTableColHdr.value=\u30d0\u30ea\u30e5\u30fc
|
||||
ReportGenerator.artTableColHdr.dateAccessed=\u30a2\u30af\u30bb\u30b9\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.referrer=\u30ea\u30d5\u30a1\u30e9
|
||||
ReportGenerator.artTableColHdr.dest=\u30c7\u30b9\u30c6\u30a3\u30cd\u30fc\u30b7\u30e7\u30f3
|
||||
ReportGenerator.artTableColHdr.sourceUrl=\u30bd\u30fc\u30b9URL
|
||||
ReportGenerator.artTableColHdr.path=\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.progName=\u30d7\u30ed\u30b0\u30e9\u30e0\u540d
|
||||
ReportGenerator.artTableColHdr.instDateTime=\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.preview=\u30d7\u30ec\u30d3\u30e5\u30fc
|
||||
ReportGenerator.artTableColHdr.file=\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.artTableColHdr.size=\u30b5\u30a4\u30ba
|
||||
ReportGenerator.artTableColHdr.deviceId=\u6a5f\u5668ID
|
||||
ReportGenerator.artTableColHdr.text=\u30c6\u30ad\u30b9\u30c8
|
||||
ReportGenerator.artTableColHdr.domain=\u30c9\u30e1\u30a4\u30f3
|
||||
ReportGenerator.artTableColHdr.devManufacturer=\u6a5f\u5668\u30e1\u30fc\u30ab\u30fc
|
||||
ReportGenerator.artTableColHdr.devModel=\u6a5f\u5668\u30e2\u30c7\u30eb
|
||||
ReportGenerator.artTableColHdr.personName=\u4eba\u540d
|
||||
ReportGenerator.artTableColHdr.phoneNumber=\u96fb\u8a71\u756a\u53f7
|
||||
ReportGenerator.artTableColHdr.phoneNumHome=\u96fb\u8a71\u756a\u53f7\uff08\u81ea\u5b85\uff09
|
||||
ReportGenerator.artTableColHdr.phoneNumOffice=\u96fb\u8a71\u756a\u53f7\uff08\u4f1a\u793e\uff09
|
||||
ReportGenerator.artTableColHdr.phoneNumMobile=\u96fb\u8a71\u756a\u53f7\uff08\u643a\u5e2f\uff09
|
||||
ReportGenerator.artTableColHdr.email=Email
|
||||
ReportGenerator.artTableColHdr.msgType=\u30e1\u30c3\u30bb\u30fc\u30b8\u30bf\u30a4\u30d7
|
||||
ReportGenerator.artTableColHdr.latitude=\u7def\u5ea6
|
||||
ReportGenerator.artTableColHdr.longitude=\u7d4c\u5ea6
|
||||
ReportGenerator.artTableColHdr.dateTaken=\u64ae\u5f71\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.subject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
|
||||
ReportGenerator.artTableColHdr.calendarEntryType=\u30ab\u30ec\u30f3\u30c0\u30fc\u30a8\u30f3\u30c8\u30ea\u30bf\u30a4\u30d7
|
||||
ReportGenerator.artTableColHdr.description=\u8aac\u660e
|
||||
ReportGenerator.artTableColHdr.startDateTime=\u958b\u59cb\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.shortCut=\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8
|
||||
ReportGenerator.artTableColHdr.endDateTime=\u4fee\u4e86\u65e5\u4ed8\uff0f\u6642\u523b
|
||||
ReportGenerator.artTableColHdr.location=\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3
|
||||
ReportGenerator.artTableColHdr.deviceName=\u6a5f\u5668\u540d
|
||||
ReportGenerator.artTableColHdr.deviceAddress=\u6a5f\u5668\u30a2\u30c9\u30ec\u30b9
|
||||
ReportGenerator.artTableColHdr.altitude=\u6a19\u9ad8
|
||||
ReportGenerator.artTableColHdr.locationAddress=\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30c9\u30ec\u30b9
|
||||
ReportGenerator.artTableColHdr.category=\u30ab\u30c6\u30b4\u30ea\u30fc
|
||||
ReportGenerator.artTableColHdr.userId=\u30e6\u30fc\u30b6ID
|
||||
ReportGenerator.artTableColHdr.password=\u30d1\u30b9\u30ef\u30fc\u30c9
|
||||
ReportGenerator.artTableColHdr.replytoAddress=\u8fd4\u4fe1\u30a2\u30c9\u30ec\u30b9
|
||||
ReportGenerator.artTableColHdr.mailServer=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0
|
||||
ReportGenerator.artTableColHdr.tags=\u30bf\u30b0
|
||||
ReportProgressPanel.start.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb
|
||||
ReportProgressPanel.complete.processLbl.text=\u5b8c\u4e86
|
||||
ReportProgressPanel.complete.cancelButton.text=\u5b8c\u4e86
|
||||
ReportProgressPanel.cancel.cancelButton.toolTipText=\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f
|
||||
ReportWizardAction.actionName.text=\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210
|
||||
ReportWizardAction.reportWiz.title=\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210
|
||||
ReportWizardAction.toolBarButton.text=\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210
|
||||
ReportWizardPanel1.nextButton.text=\u6b21 >
|
||||
ReportWizardPanel2.nextButton.text=\u6b21 >
|
||||
ReportGenerator.artTableColHdr.direction=\u65b9\u5411
|
||||
ReportGenerator.artTableColHdr.fromEmail=\u9001\u4fe1\u5143E\u30e1\u30fc\u30eb
|
||||
ReportGenerator.artTableColHdr.toEmail=\u9001\u4fe1\u5148E\u30e1\u30fc\u30eb
|
||||
ReportGenerator.artTableColHdr.fromPhoneNum=\u767a\u4fe1\u8005\u96fb\u8a71\u756a\u53f7
|
||||
ReportGenerator.artTableColHdr.toPhoneNum=\u7740\u4fe1\u8005\u96fb\u8a71\u756a\u53f7
|
||||
ReportGenerator.artTableColHdr.appName=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540d
|
||||
ReportGenerator.artTableColHdr.appPath=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9
|
||||
ReportProgressPanel.progress.queuing=\u30ad\u30e5\u30fc\u30a4\u30f3\u30b0\u2026
|
||||
ReportProgressPanel.initPathLabel.noFile=<html><u>\u30ec\u30dd\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u7121\u3057</u></html>
|
||||
ReportProgressPanel.start.progress.text=\u30ec\u30dd\u30fc\u30c8\u958b\u59cb\u4e2d\u2026
|
||||
ReportProgressPanel.cancel.procLbl.text=\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f
|
||||
ReportVisualPanel1.getName.text=\u30ec\u30dd\u30fc\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u9078\u629e\u304a\u3088\u3073\u8a2d\u5b9a
|
||||
ReportVisualPanel2.getName.text=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30ec\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a
|
||||
ReportWizardFileOptionsPanel.finishButton.text=\u7d42\u4e86
|
||||
ReportWizardFileOptionsVisualPanel.getName.text=\u30d5\u30a1\u30a4\u30eb\u30ec\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a
|
||||
ReportWizardPanel1.finishButton.text=\u7d42\u4e86
|
||||
ReportWizardPanel2.finishButton.text=\u7d42\u4e86
|
||||
ReportGenerator.errors.reportErrorTitle=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
|
||||
ReportGenerator.errors.reportErrorText=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a
|
||||
ReportGenerator.artTableColHdr.extension.text=\u62e1\u5f35\u5b50
|
||||
ReportGenerator.artTableColHdr.mimeType.text=MIME\u30bf\u30a4\u30d7
|
||||
ReportGenerator.artTableColHdr.associatedArtifact=\u95a2\u4fc2\u3059\u308b\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8
|
||||
ReportGenerator.artTableColHdr.count=\u30ab\u30a6\u30f3\u30c8
|
||||
ReportGenerator.artTableColHdr.devMake=\u6a5f\u5668\u578b\u540d
|
||||
ReportGenerator.artTableColHdr.latitudeEnd=\u5230\u7740\u7def\u5ea6
|
||||
ReportGenerator.artTableColHdr.latitudeStart=\u51fa\u767a\u7def\u5ea6
|
||||
ReportGenerator.artTableColHdr.localPath=\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.longitudeEnd=\u5230\u7740\u7d4c\u5ea6
|
||||
ReportGenerator.artTableColHdr.longitudeStart=\u51fa\u767a\u7d4c\u5ea6
|
||||
ReportGenerator.artTableColHdr.osInstallDate.text=\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65e5\u4ed8
|
||||
ReportGenerator.artTableColHdr.osName.text=\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u540d
|
||||
ReportGenerator.artTableColHdr.processorArchitecture.text=\u30d7\u30ed\u30bb\u30c3\u30b5\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3
|
||||
ReportGenerator.artTableColHdr.readStatus=\u8aad\u307f\u53d6\u308a\u4e2d\u30b9\u30c6\u30fc\u30bf\u30b9
|
||||
ReportGenerator.artTableColHdr.remotePath=\u30ea\u30e2\u30fc\u30c8\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.tskDateTimeRcvd=\u53d7\u4fe1\u65e5
|
||||
ReportGenerator.artTableColHdr.tskDateTimeSent=\u9001\u4fe1\u65e5
|
||||
ReportGenerator.artTableColHdr.tskEmailBcc=E-Mail BCC
|
||||
ReportGenerator.artTableColHdr.tskEmailCc=E-Mail CC
|
||||
ReportGenerator.artTableColHdr.tskEmailFrom=E-Mail\u9001\u4fe1\u5143
|
||||
ReportGenerator.artTableColHdr.tskEmailTo=E-Mail\u9001\u4fe1\u5148
|
||||
ReportGenerator.artTableColHdr.tskGpsRouteCategory=\u30ab\u30c6\u30b4\u30ea
|
||||
ReportGenerator.artTableColHdr.tskInterestingFilesCategory=\u30eb\u30fc\u30eb
|
||||
ReportGenerator.artTableColHdr.tskMsgId=\u30e1\u30c3\u30bb\u30fc\u30b8ID
|
||||
ReportGenerator.artTableColHdr.tskPath=\u30d1\u30b9
|
||||
ReportGenerator.artTableColHdr.tskSetName=\u30bb\u30c3\u30c8\u540d
|
||||
ReportGenerator.artTableColHdr.tskSubject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
|
||||
ReportGenerator.artTableColHdr.urlDomainDecoded=URL\u30c9\u30e1\u30a4\u30f3
|
||||
ReportGenerator.artTableColHdr.userName=\u30e6\u30fc\u30b6\u540d
|
||||
ReportGenerator.errList.coreExceptionWhileGenRptRow=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30ec\u30dd\u30fc\u30c8\u7528\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u751f\u6210\u4e2d\u306b\u30b3\u30a2\u30a8\u30af\u30bb\u30d7\u30b7\u30e7\u30f3\uff08\u4f8b\u5916\uff09\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f
|
||||
ReportGenerator.errList.errGetContentFromBBArtifact=Blackboard\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u304b\u3089\u30ec\u30dd\u30fc\u30c8\u7528\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u53d6\u5f97\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetAbstractFileByID=ID\u306b\u57fa\u3065\u304d\u30a2\u30d6\u30b9\u30c8\u30e9\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3059\u308b\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f
|
||||
ReportGenerator.errList.failedGetBBArtifacts=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306bBlackboard\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetBBArtifactTags=Blackboard\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u30bf\u30b0\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetBBAttribs=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306bBlackboard\u5c5e\u6027\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedGetContentTags=\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30b0\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedMakeRptFolder=\u30ec\u30dd\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u304c\u3067\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
|
||||
ReportGenerator.errList.failedQueryHashsetHits=\u30cf\u30c3\u30b7\u30e5\u30bb\u30c3\u30c8\u30d2\u30c3\u30c8\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedQueryHashsetLists=\u30cf\u30c3\u30b7\u30e5\u30bb\u30c3\u30c8\u30ea\u30b9\u30c8\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedQueryKWLists=\u30ad\u30fc\u30ef\u30fc\u30c9\u30ea\u30b9\u30c8\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.errList.failedQueryKWs=\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u30af\u30a8\u30ea\u3059\u308b\u306e\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
ReportGenerator.htmlOutput.header.comment=\u30b3\u30e1\u30f3\u30c8
|
||||
ReportGenerator.htmlOutput.header.file=\u30d5\u30a1\u30a4\u30eb
|
||||
ReportGenerator.htmlOutput.header.hash=\u30cf\u30c3\u30b7\u30e5
|
||||
ReportGenerator.htmlOutput.header.size=\u30b5\u30a4\u30ba\uff08\u30d0\u30a4\u30c8\uff09
|
||||
ReportGenerator.htmlOutput.header.tag=\u30bf\u30b0
|
||||
ReportGenerator.htmlOutput.header.timeAccessed=\u30a2\u30af\u30bb\u30b9\u65e5\u6642
|
||||
ReportGenerator.htmlOutput.header.timeCreated=\u4f5c\u6210\u65e5\u6642
|
||||
ReportGenerator.htmlOutput.header.timeModified=\u4fee\u6b63\u65e5\u6642
|
||||
ReportGenerator.notifyErr.errsDuringRptGen=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u4e2d\u306e\u30a8\u30e9\u30fc\uff1a
|
||||
ReportGenerator.errList.failedGetAbstractFileFromID=ID\u306b\u57fa\u3065\u304d\u30a2\u30d6\u30b9\u30c8\u30e9\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3059\u308b\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f
|
||||
ReportVisualPanel1.invalidModuleWarning=\u7121\u52b9\u306a\u30ec\u30dd\u30fc\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb({0})\u306b\u906d\u9047\u3057\u307e\u3057\u305f
|
||||
ReportGenerationPanel.confDlg.cancelReport.msg=\u672c\u5f53\u306b\u30ec\u30dd\u30fc\u30c8\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u307e\u3059\u304b\uff1f
|
||||
ReportProgressPanel.complete.processLb2.text=\u5b8c\u4e86\u3057\u307e\u3057\u305f\u304c\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
|
||||
FileReportDataTypes.filename.text=\u540d\u524d
|
||||
FileReportDataTypes.fileExt.text=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50
|
||||
FileReportDataTypes.fileType.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7
|
||||
FileReportDataTypes.isDel.text=\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f
|
||||
FileReportDataTypes.aTime.text=\u6700\u5f8c\u306e\u30a2\u30af\u30bb\u30b9
|
||||
FileReportDataTypes.crTime.text=\u4f5c\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb
|
||||
FileReportDataTypes.mTime.text=\u6700\u5f8c\u306e\u4fee\u6b63
|
||||
FileReportDataTypes.size.text=\u30b5\u30a4\u30ba
|
||||
FileReportDataTypes.address.text=\u30a2\u30c9\u30ec\u30b9
|
||||
FileReportDataTypes.hash.text=\u30cf\u30c3\u30b7\u30e5\u5024
|
||||
FileReportDataTypes.knownStatus.text=\u65e2\u77e5\u30b9\u30c6\u30fc\u30bf\u30b9
|
||||
FileReportDataTypes.perms.text=\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3
|
||||
FileReportDataTypes.path.text=\u30d5\u30eb\u30d1\u30b9
|
||||
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
@@ -30,15 +30,15 @@ import org.sleuthkit.datamodel.TskData;
|
||||
*
|
||||
* @author jwallace
|
||||
*/
|
||||
enum FileReportDataTypes {
|
||||
public enum FileReportDataTypes {
|
||||
|
||||
NAME(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.filename.text")) {
|
||||
NAME(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.filename.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getName();
|
||||
}
|
||||
},
|
||||
FILE_EXT(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.fileExt.text")) {
|
||||
FILE_EXT(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.fileExt.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
String name = file.getName();
|
||||
@@ -46,13 +46,13 @@ enum FileReportDataTypes {
|
||||
return (extIndex == -1 ? "" : name.substring(extIndex));
|
||||
}
|
||||
},
|
||||
FILE_TYPE(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.fileType.text")) {
|
||||
FILE_TYPE(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.fileType.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getMetaTypeAsString();
|
||||
}
|
||||
},
|
||||
DELETED(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.isDel.text")) {
|
||||
DELETED(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.isDel.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
if (file.getMetaFlagsAsString().equals(TskData.TSK_FS_META_FLAG_ENUM.UNALLOC.toString())) {
|
||||
@@ -61,55 +61,55 @@ enum FileReportDataTypes {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
A_TIME(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.aTime.text")) {
|
||||
A_TIME(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.aTime.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getAtimeAsDate();
|
||||
}
|
||||
},
|
||||
CR_TIME(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.crTime.text")) {
|
||||
CR_TIME(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.crTime.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getCrtimeAsDate();
|
||||
}
|
||||
},
|
||||
M_TIME(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.mTime.text")) {
|
||||
M_TIME(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.mTime.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getMtimeAsDate();
|
||||
}
|
||||
},
|
||||
SIZE(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.size.text")) {
|
||||
SIZE(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.size.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return String.valueOf(file.getSize());
|
||||
}
|
||||
},
|
||||
ADDRESS(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.address.text")) {
|
||||
ADDRESS(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.address.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return String.valueOf(file.getMetaAddr());
|
||||
}
|
||||
},
|
||||
HASH_VALUE(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.hash.text")) {
|
||||
HASH_VALUE(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.hash.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getMd5Hash();
|
||||
}
|
||||
},
|
||||
KNOWN_STATUS(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.knownStatus.text")) {
|
||||
KNOWN_STATUS(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.knownStatus.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getKnown().getName();
|
||||
}
|
||||
},
|
||||
PERMISSIONS(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.perms.text")) {
|
||||
PERMISSIONS(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.perms.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
return file.getModesAsString();
|
||||
}
|
||||
},
|
||||
FULL_PATH(NbBundle.getMessage(FileReportText.class, "FileReportDataTypes.path.text")) {
|
||||
FULL_PATH(NbBundle.getMessage(FileReportDataTypes.class, "FileReportDataTypes.path.text")) {
|
||||
@Override
|
||||
public String getValue(AbstractFile file) {
|
||||
try {
|
||||
@@ -16,8 +16,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.ReportModule;
|
||||
import java.util.List;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
|
||||
@@ -26,7 +27,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
*
|
||||
* @author jwallace
|
||||
*/
|
||||
interface FileReportModule extends ReportModule {
|
||||
public interface FileReportModule extends ReportModule {
|
||||
|
||||
/**
|
||||
* Initialize the report which will be stored at the given path.
|
||||
52
Core/src/org/sleuthkit/autopsy/report/infrastructure/FileReportSettings.java
Executable file
52
Core/src/org/sleuthkit/autopsy/report/infrastructure/FileReportSettings.java
Executable file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Class for persisting the file properties used by FileReportGenerator to drive
|
||||
* report generation by FileReportModules.
|
||||
*/
|
||||
final class FileReportSettings implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Map<FileReportDataTypes, Boolean> filePropertiesInfo = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Creates FileReportSettings object.
|
||||
*
|
||||
* @param fileReportInfo The information that should be included about each
|
||||
* file in the report.
|
||||
*/
|
||||
FileReportSettings(Map<FileReportDataTypes, Boolean> fileReportInfo) {
|
||||
this.filePropertiesInfo = fileReportInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets file report settings.
|
||||
*
|
||||
* @return File report settings
|
||||
*/
|
||||
Map<FileReportDataTypes, Boolean> getFileProperties() {
|
||||
return filePropertiesInfo;
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="deselectButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jAllSetsCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="8" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@@ -54,10 +55,12 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jAllSetsCheckBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="179" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="164" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="selectButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -87,14 +90,14 @@
|
||||
<Component class="javax.swing.JLabel" name="descLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseInterestingItemsListPanel.descLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseInterestingItemsListPanel.descLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="selectButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseInterestingItemsListPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseInterestingItemsListPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[87, 23]"/>
|
||||
@@ -110,13 +113,23 @@
|
||||
<Component class="javax.swing.JButton" name="deselectButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseInterestingItemsListPanel.deselectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseInterestingItemsListPanel.deselectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deselectButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jAllSetsCheckBox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseInterestingItemsListPanel.jAllSetsCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jAllSetsCheckBoxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
@@ -16,13 +16,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModuleSettings;
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
@@ -33,7 +34,6 @@ import java.util.logging.Level;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.ListCellRenderer;
|
||||
import javax.swing.ListModel;
|
||||
import javax.swing.event.ListDataListener;
|
||||
@@ -41,9 +41,9 @@ import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule.GetInterestingItemSetNamesCallback;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.CaseDbAccessManager;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
@@ -59,16 +59,35 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
private Map<String, Long> setCounts;
|
||||
|
||||
private final ReportWizardPortableCaseOptionsPanel wizPanel;
|
||||
private final PortableCaseReportModule.PortableCaseOptions options;
|
||||
private final PortableCaseReportModuleSettings settings;
|
||||
private final boolean useCaseSpecificData;
|
||||
|
||||
/**
|
||||
* Creates new form PortableCaseListPanel
|
||||
*/
|
||||
PortableCaseInterestingItemsListPanel(ReportWizardPortableCaseOptionsPanel wizPanel, PortableCaseReportModule.PortableCaseOptions options) {
|
||||
PortableCaseInterestingItemsListPanel(ReportWizardPortableCaseOptionsPanel wizPanel, PortableCaseReportModuleSettings options, boolean useCaseSpecificData) {
|
||||
this.wizPanel = wizPanel;
|
||||
this.options = options;
|
||||
this.useCaseSpecificData = useCaseSpecificData;
|
||||
this.settings = options;
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
|
||||
// update tag selection
|
||||
jAllSetsCheckBox.setSelected(settings.areAllTagsSelected());
|
||||
setNamesListBox.setEnabled(!jAllSetsCheckBox.isSelected());
|
||||
selectButton.setEnabled(!jAllSetsCheckBox.isSelected());
|
||||
deselectButton.setEnabled(!jAllSetsCheckBox.isSelected());
|
||||
selectAllSets(jAllSetsCheckBox.isSelected());
|
||||
|
||||
this.jAllSetsCheckBox.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
setNamesListBox.setEnabled(!jAllSetsCheckBox.isSelected());
|
||||
selectButton.setEnabled(!jAllSetsCheckBox.isSelected());
|
||||
deselectButton.setEnabled(!jAllSetsCheckBox.isSelected());
|
||||
selectAllSets(jAllSetsCheckBox.isSelected());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
@@ -80,26 +99,34 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
|
||||
// Get the set names in use for the current case.
|
||||
setNames = new ArrayList<>();
|
||||
try {
|
||||
// Get all SET_NAMEs from interesting item artifacts
|
||||
String innerSelect = "SELECT (value_text) AS set_name FROM blackboard_attributes WHERE (artifact_type_id = '" +
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID() + "' OR artifact_type_id = '" +
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID() + "') AND attribute_type_id = '" +
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID() + "'"; // NON-NLS
|
||||
|
||||
// Get the count of each SET_NAME
|
||||
String query = "set_name, count(1) AS set_count FROM (" + innerSelect + ") set_names GROUP BY set_name"; // NON-NLS
|
||||
|
||||
GetInterestingItemSetNamesCallback callback = new GetInterestingItemSetNamesCallback();
|
||||
Case.getCurrentCaseThrows().getSleuthkitCase().getCaseDbAccessManager().select(query, callback);
|
||||
setCounts = callback.getSetCountMap();
|
||||
setNames.addAll(setCounts.keySet());
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Failed to get interesting item set names", ex); // NON-NLS
|
||||
JOptionPane.showMessageDialog(this, Bundle.PortableCaseInterestingItemsListPanel_error_errorLoadingTags(), Bundle.PortableCaseInterestingItemsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
JOptionPane.showMessageDialog(this, Bundle.PortableCaseInterestingItemsListPanel_error_noOpenCase(), Bundle.PortableCaseInterestingItemsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
|
||||
setCounts = new HashMap<>();
|
||||
|
||||
// only try to load tag names if we are displaying case specific data, otherwise
|
||||
// we will be displaying case specific data in command line wizard if there is
|
||||
// a case open in the background
|
||||
if (useCaseSpecificData) {
|
||||
try {
|
||||
// Get all SET_NAMEs from interesting item artifacts
|
||||
String innerSelect = "SELECT (value_text) AS set_name FROM blackboard_attributes WHERE (artifact_type_id = '"
|
||||
+ BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID() + "' OR artifact_type_id = '"
|
||||
+ BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID() + "') AND attribute_type_id = '"
|
||||
+ BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID() + "'"; // NON-NLS
|
||||
|
||||
// Get the count of each SET_NAME
|
||||
String query = "set_name, count(1) AS set_count FROM (" + innerSelect + ") set_names GROUP BY set_name"; // NON-NLS
|
||||
|
||||
GetInterestingItemSetNamesCallback callback = new GetInterestingItemSetNamesCallback();
|
||||
Case.getCurrentCaseThrows().getSleuthkitCase().getCaseDbAccessManager().select(query, callback);
|
||||
setCounts = callback.getSetCountMap();
|
||||
setNames.addAll(setCounts.keySet());
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Failed to get interesting item set names", ex); // NON-NLS
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
// There may not be a case open when configuring report modules for Command Line execution
|
||||
if (Case.isCaseOpen()) {
|
||||
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
Collections.sort(setNames);
|
||||
|
||||
@@ -135,8 +162,9 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
* Save the current selections and enabled/disable the finish button as needed.
|
||||
*/
|
||||
private void updateSetNameList() {
|
||||
options.updateSetNames(getSelectedSetNames());
|
||||
wizPanel.setFinish(options.isValid());
|
||||
settings.updateSetNames(getSelectedSetNames());
|
||||
settings.setAllSetsSelected(jAllSetsCheckBox.isSelected());
|
||||
wizPanel.setFinish(settings.isValid());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -199,43 +227,6 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
return selectedSetNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the result sets from the interesting item set name query.
|
||||
*/
|
||||
private static class GetInterestingItemSetNamesCallback implements CaseDbAccessManager.CaseDbAccessQueryCallback {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(GetInterestingItemSetNamesCallback.class.getName());
|
||||
private final Map<String, Long> setCounts = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void process(ResultSet rs) {
|
||||
try {
|
||||
while (rs.next()) {
|
||||
try {
|
||||
Long setCount = rs.getLong("set_count"); // NON-NLS
|
||||
String setName = rs.getString("set_name"); // NON-NLS
|
||||
|
||||
setCounts.put(setName, setCount);
|
||||
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Unable to get data_source_obj_id or value from result set", ex); // NON-NLS
|
||||
}
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.WARNING, "Failed to get next result for values by datasource", ex); // NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the counts for each interesting items set
|
||||
*
|
||||
* @return A map from each set name to the number of items in it
|
||||
*/
|
||||
Map<String, Long> getSetCountMap() {
|
||||
return setCounts;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -253,6 +244,7 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
descLabel = new javax.swing.JLabel();
|
||||
selectButton = new javax.swing.JButton();
|
||||
deselectButton = new javax.swing.JButton();
|
||||
jAllSetsCheckBox = new javax.swing.JCheckBox();
|
||||
|
||||
jScrollPane1.setViewportView(setNamesListBox);
|
||||
|
||||
@@ -274,6 +266,13 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jAllSetsCheckBox, org.openide.util.NbBundle.getMessage(PortableCaseInterestingItemsListPanel.class, "PortableCaseInterestingItemsListPanel.jAllSetsCheckBox.text")); // NOI18N
|
||||
jAllSetsCheckBox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jAllSetsCheckBoxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
@@ -288,17 +287,20 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deselectButton)))
|
||||
.addComponent(deselectButton))
|
||||
.addComponent(jAllSetsCheckBox))
|
||||
.addGap(0, 8, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGap(6, 6, 6)
|
||||
.addComponent(descLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jAllSetsCheckBox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -318,25 +320,33 @@ class PortableCaseInterestingItemsListPanel extends javax.swing.JPanel {
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void deselectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deselectButtonActionPerformed
|
||||
for (String setName : setNames) {
|
||||
setNameSelections.put(setName, Boolean.FALSE);
|
||||
}
|
||||
updateSetNameList();
|
||||
setNamesListBox.repaint();
|
||||
selectAllSets(false);
|
||||
}//GEN-LAST:event_deselectButtonActionPerformed
|
||||
|
||||
private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
|
||||
for (String setName : setNames) {
|
||||
setNameSelections.put(setName, Boolean.TRUE);
|
||||
}
|
||||
updateSetNameList();
|
||||
setNamesListBox.repaint();
|
||||
selectAllSets(true);
|
||||
}//GEN-LAST:event_selectButtonActionPerformed
|
||||
|
||||
private void jAllSetsCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jAllSetsCheckBoxActionPerformed
|
||||
selectAllSets(true);
|
||||
}//GEN-LAST:event_jAllSetsCheckBoxActionPerformed
|
||||
|
||||
private void selectAllSets(boolean select) {
|
||||
Boolean state = Boolean.TRUE;
|
||||
if (!select) {
|
||||
state = Boolean.FALSE;
|
||||
}
|
||||
for (String setName : setNames) {
|
||||
setNameSelections.put(setName, state);
|
||||
}
|
||||
updateSetNameList();
|
||||
setNamesListBox.repaint();
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel descLabel;
|
||||
private javax.swing.JButton deselectButton;
|
||||
private javax.swing.JCheckBox jAllSetsCheckBox;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton selectButton;
|
||||
@@ -34,7 +34,7 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" pref="215" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
@@ -43,6 +43,7 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="deselectButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jAllTagsCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@@ -54,10 +55,11 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jAllTagsCheckBox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="178" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="168" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="selectButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -87,14 +89,14 @@
|
||||
<Component class="javax.swing.JLabel" name="descLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseTagsListPanel.descLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseTagsListPanel.descLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="selectButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseTagsListPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseTagsListPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[87, 23]"/>
|
||||
@@ -110,13 +112,23 @@
|
||||
<Component class="javax.swing.JButton" name="deselectButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="PortableCaseTagsListPanel.deselectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseTagsListPanel.deselectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deselectButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jAllTagsCheckBox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="PortableCaseTagsListPanel.jAllTagsCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jAllTagsCheckBoxActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
@@ -16,9 +16,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModuleSettings;
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.sql.ResultSet;
|
||||
@@ -32,7 +35,6 @@ import java.util.logging.Level;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.ListCellRenderer;
|
||||
import javax.swing.ListModel;
|
||||
import javax.swing.event.ListDataListener;
|
||||
@@ -57,16 +59,34 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
private final Map<String, Long> tagCounts = new HashMap<>();
|
||||
|
||||
private final ReportWizardPortableCaseOptionsPanel wizPanel;
|
||||
private final PortableCaseReportModule.PortableCaseOptions options;
|
||||
private final PortableCaseReportModuleSettings settings;
|
||||
private final boolean useCaseSpecificData;
|
||||
|
||||
/**
|
||||
* Creates new form PortableCaseListPanel
|
||||
*/
|
||||
PortableCaseTagsListPanel(ReportWizardPortableCaseOptionsPanel wizPanel, PortableCaseReportModule.PortableCaseOptions options) {
|
||||
PortableCaseTagsListPanel(ReportWizardPortableCaseOptionsPanel wizPanel, PortableCaseReportModuleSettings options, boolean useCaseSpecificData) {
|
||||
this.wizPanel = wizPanel;
|
||||
this.options = options;
|
||||
this.useCaseSpecificData = useCaseSpecificData;
|
||||
this.settings = options;
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
// update tag selection
|
||||
jAllTagsCheckBox.setSelected(settings.areAllTagsSelected());
|
||||
tagNamesListBox.setEnabled(!jAllTagsCheckBox.isSelected());
|
||||
selectButton.setEnabled(!jAllTagsCheckBox.isSelected());
|
||||
deselectButton.setEnabled(!jAllTagsCheckBox.isSelected());
|
||||
selectAllTags(jAllTagsCheckBox.isSelected());
|
||||
|
||||
this.jAllTagsCheckBox.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
tagNamesListBox.setEnabled(!jAllTagsCheckBox.isSelected());
|
||||
selectButton.setEnabled(!jAllTagsCheckBox.isSelected());
|
||||
deselectButton.setEnabled(!jAllTagsCheckBox.isSelected());
|
||||
selectAllTags(jAllTagsCheckBox.isSelected());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
@@ -76,17 +96,24 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
})
|
||||
private void customizeComponents() {
|
||||
// Get the tag names in use for the current case.
|
||||
tagNames = new ArrayList<>();
|
||||
Map<Long, Long> tagCountsByID = new HashMap<>();
|
||||
try {
|
||||
tagNames = Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
|
||||
|
||||
// Get the counts for each tag ID
|
||||
String query = "tag_name_id, count(1) AS tag_count " +
|
||||
"FROM (" +
|
||||
"SELECT tag_name_id FROM content_tags UNION ALL SELECT tag_name_id FROM blackboard_artifact_tags" +
|
||||
") tag_ids GROUP BY tag_name_id"; // NON-NLS
|
||||
GetTagCountsCallback callback = new GetTagCountsCallback();
|
||||
Case.getCurrentCaseThrows().getSleuthkitCase().getCaseDbAccessManager().select(query, callback);
|
||||
Map<Long, Long> tagCountsByID = callback.getTagCountMap();
|
||||
// only try to load tag names if we are displaying case specific data, otherwise
|
||||
// we will be displaying case specific data in command line wizard if there is
|
||||
// a case open in the background
|
||||
if (useCaseSpecificData) {
|
||||
tagNames = Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
|
||||
|
||||
// Get the counts for each tag ID
|
||||
String query = "tag_name_id, count(1) AS tag_count "
|
||||
+ "FROM ("
|
||||
+ "SELECT tag_name_id FROM content_tags UNION ALL SELECT tag_name_id FROM blackboard_artifact_tags"
|
||||
+ ") tag_ids GROUP BY tag_name_id"; // NON-NLS
|
||||
GetTagCountsCallback callback = new GetTagCountsCallback();
|
||||
Case.getCurrentCaseThrows().getSleuthkitCase().getCaseDbAccessManager().select(query, callback);
|
||||
tagCountsByID = callback.getTagCountMap();
|
||||
}
|
||||
|
||||
// Mark the tag names as unselected. Note that tagNameSelections is a
|
||||
// LinkedHashMap so that order is preserved and the tagNames and tagNameSelections
|
||||
@@ -101,13 +128,10 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); // NON-NLS
|
||||
JOptionPane.showMessageDialog(this, Bundle.PortableCaseTagsListPanel_error_errorLoadingTags(), Bundle.PortableCaseTagsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS
|
||||
JOptionPane.showMessageDialog(this, Bundle.PortableCaseTagsListPanel_error_noOpenCase(), Bundle.PortableCaseTagsListPanel_error_errorTitle(), JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
// There may not be a case open when configuring report modules for Command Line execution
|
||||
Logger.getLogger(ReportWizardPortableCaseOptionsVisualPanel.class.getName()).log(Level.WARNING, "Exception while getting open case.", ex); // NON-NLS
|
||||
}
|
||||
|
||||
// Set up the tag names JList component to be a collection of check boxes
|
||||
// for selecting tag names. The mouse click listener updates tagNameSelections
|
||||
@@ -134,8 +158,9 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
* Save the current selections and enabled/disable the finish button as needed.
|
||||
*/
|
||||
private void updateTagList() {
|
||||
options.updateTagNames(getSelectedTagNames());
|
||||
wizPanel.setFinish(options.isValid());
|
||||
settings.updateTagNames(getSelectedTagNames());
|
||||
settings.setAllTagsSelected(jAllTagsCheckBox.isSelected());
|
||||
wizPanel.setFinish(settings.isValid());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,6 +277,7 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
descLabel = new javax.swing.JLabel();
|
||||
selectButton = new javax.swing.JButton();
|
||||
deselectButton = new javax.swing.JButton();
|
||||
jAllTagsCheckBox = new javax.swing.JCheckBox();
|
||||
|
||||
jScrollPane1.setViewportView(tagNamesListBox);
|
||||
|
||||
@@ -273,6 +299,13 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jAllTagsCheckBox, org.openide.util.NbBundle.getMessage(PortableCaseTagsListPanel.class, "PortableCaseTagsListPanel.jAllTagsCheckBox.text")); // NOI18N
|
||||
jAllTagsCheckBox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jAllTagsCheckBoxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
@@ -280,24 +313,26 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(descLabel)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deselectButton)))
|
||||
.addComponent(deselectButton))
|
||||
.addComponent(jAllTagsCheckBox))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(descLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jAllTagsCheckBox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -317,25 +352,33 @@ class PortableCaseTagsListPanel extends javax.swing.JPanel {
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void deselectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deselectButtonActionPerformed
|
||||
for (TagName tagName : tagNames) {
|
||||
tagNameSelections.put(tagName.getDisplayName(), Boolean.FALSE);
|
||||
}
|
||||
updateTagList();
|
||||
tagNamesListBox.repaint();
|
||||
selectAllTags(false);
|
||||
}//GEN-LAST:event_deselectButtonActionPerformed
|
||||
|
||||
private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
|
||||
selectAllTags(true);
|
||||
}//GEN-LAST:event_selectButtonActionPerformed
|
||||
|
||||
private void jAllTagsCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jAllTagsCheckBoxActionPerformed
|
||||
selectAllTags(true);
|
||||
}//GEN-LAST:event_jAllTagsCheckBoxActionPerformed
|
||||
|
||||
private void selectAllTags(boolean select) {
|
||||
Boolean state = Boolean.TRUE;
|
||||
if (!select) {
|
||||
state = Boolean.FALSE;
|
||||
}
|
||||
for (TagName tagName : tagNames) {
|
||||
tagNameSelections.put(tagName.getDisplayName(), Boolean.TRUE);
|
||||
tagNameSelections.put(tagName.getDisplayName(), state);
|
||||
}
|
||||
updateTagList();
|
||||
tagNamesListBox.repaint();
|
||||
}//GEN-LAST:event_selectButtonActionPerformed
|
||||
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel descLabel;
|
||||
private javax.swing.JButton deselectButton;
|
||||
private javax.swing.JCheckBox jAllTagsCheckBox;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton selectButton;
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
/**
|
||||
* Instances of this exception class are thrown when there is an error during
|
||||
* serialization and deserialization of a reporting configuration.
|
||||
*/
|
||||
final class ReportConfigException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Constructs a new exception with the specified message.
|
||||
*
|
||||
* @param message The message.
|
||||
*/
|
||||
public ReportConfigException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new exception with the specified message and cause.
|
||||
*
|
||||
* @param message The message.
|
||||
* @param cause The cause.
|
||||
*/
|
||||
public ReportConfigException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportGenerationPanel.closeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportGenerationPanel.closeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -80,10 +80,10 @@
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportGenerationPanel.cancelButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportGenerationPanel.cancelButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportGenerationPanel.cancelButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportGenerationPanel.cancelButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionListener;
|
||||
@@ -24,8 +24,8 @@ import java.beans.PropertyChangeEvent;
|
||||
import javax.swing.Box;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus;
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class ReportGenerationPanel extends javax.swing.JPanel {
|
||||
private final GridBagConstraints constraints;
|
||||
private final Component glue;
|
||||
private ActionListener actionListener;
|
||||
ReportProgressPanel progressPanel;
|
||||
ReportProgressDialog progressPanel;
|
||||
|
||||
/**
|
||||
* Constructs a panel that displays a panel used by a report generation
|
||||
@@ -54,6 +54,11 @@ class ReportGenerationPanel extends javax.swing.JPanel {
|
||||
constraints.gridy = 0;
|
||||
constraints.weightx = 1.0;
|
||||
glue = Box.createVerticalGlue();
|
||||
progressPanel = new ReportProgressDialog();
|
||||
}
|
||||
|
||||
ReportProgressDialog getProgressPanel() {
|
||||
return progressPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,16 +67,14 @@ class ReportGenerationPanel extends javax.swing.JPanel {
|
||||
*
|
||||
* @param reportName The report name.
|
||||
* @param reportPath The report file path
|
||||
*
|
||||
* @return The report generation progress panel.
|
||||
*/
|
||||
ReportProgressPanel addReport(String reportName, String reportPath) {
|
||||
void addReport(String reportName, String reportPath) {
|
||||
/*
|
||||
* Remove the "glue."
|
||||
*/
|
||||
reportPanel.remove(glue);
|
||||
|
||||
progressPanel = new ReportProgressPanel(reportName, reportPath);
|
||||
progressPanel.setLabels(reportName, reportPath);
|
||||
constraints.weighty = 0.0;
|
||||
constraints.anchor = GridBagConstraints.NORTH;
|
||||
reportPanel.add(progressPanel, constraints);
|
||||
@@ -99,7 +102,6 @@ class ReportGenerationPanel extends javax.swing.JPanel {
|
||||
});
|
||||
}
|
||||
});
|
||||
return progressPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,418 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule;
|
||||
import org.sleuthkit.autopsy.report.NoReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.ReportModule;
|
||||
import org.sleuthkit.autopsy.report.ReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.GeneralReportModule;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
public class ReportGenerator {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportGenerator.class.getName());
|
||||
|
||||
private ReportProgressPanel progressPanel = null;
|
||||
private ReportGenerationPanel reportGenerationPanel = null;
|
||||
|
||||
private static final String REPORT_PATH_FMT_STR = "%s" + File.separator + "%s %s %s" + File.separator;
|
||||
|
||||
private final String configName;
|
||||
|
||||
public static final String REPORTS_DIR = "Reports"; //NON-NLS
|
||||
|
||||
private List<String> errorList;
|
||||
|
||||
/**
|
||||
* Displays the list of errors during report generation in user-friendly
|
||||
* way.
|
||||
*/
|
||||
private void displayReportErrors() {
|
||||
if (!errorList.isEmpty()) {
|
||||
String errorString = "";
|
||||
for (String error : errorList) {
|
||||
errorString += error + "\n";
|
||||
}
|
||||
progressPanel.updateStatusLabel(errorString);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a report generator. This constructor uses a logger instead of UI
|
||||
* panel.
|
||||
*
|
||||
* @param configName Name of the reporting configuration to use
|
||||
* @param progress Fully instantiated progress logger
|
||||
*/
|
||||
public ReportGenerator(String configName, ReportProgressLogger progress) {
|
||||
this.errorList = new ArrayList<>();
|
||||
this.progressPanel = progress;
|
||||
this.reportGenerationPanel = null;
|
||||
this.configName = configName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a report generator. This constructor uses UI panel to display
|
||||
* progress.
|
||||
*
|
||||
* @param configName Name of the reporting configuration to use
|
||||
* @param panel Fully instantiated progress panel
|
||||
*/
|
||||
public ReportGenerator(String configName, ReportGenerationPanel panel) {
|
||||
this.errorList = new ArrayList<>();
|
||||
this.reportGenerationPanel = panel;
|
||||
this.progressPanel = panel.getProgressPanel();
|
||||
this.configName = configName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate reports according to previously specified reporting
|
||||
* configuration.
|
||||
*/
|
||||
public void generateReports() {
|
||||
ReportingConfig config = null;
|
||||
try {
|
||||
config = ReportingConfigLoader.loadConfig(configName);
|
||||
} catch (ReportConfigException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to load reporting configuration " + configName + ". Exiting", ex);
|
||||
progressPanel.updateStatusLabel("Unable to load reporting configuration " + configName + ". Exiting");
|
||||
return;
|
||||
}
|
||||
|
||||
if (config == null) {
|
||||
logger.log(Level.SEVERE, "Unable to load reporting configuration {0}. Exiting", configName);
|
||||
progressPanel.updateStatusLabel("Unable to load reporting configuration " + configName + ". Exiting");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// load all report modules
|
||||
Map<String, ReportModule> modules = new HashMap<>();
|
||||
for (TableReportModule module : ReportModuleLoader.getTableReportModules()) {
|
||||
modules.put(module.getClass().getCanonicalName(), module);
|
||||
}
|
||||
|
||||
for (GeneralReportModule module : ReportModuleLoader.getGeneralReportModules()) {
|
||||
modules.put(module.getClass().getCanonicalName(), module);
|
||||
}
|
||||
|
||||
for (FileReportModule module : ReportModuleLoader.getFileReportModules()) {
|
||||
modules.put(module.getClass().getCanonicalName(), module);
|
||||
}
|
||||
|
||||
// special case for PortableCaseReportModule
|
||||
modules.put(PortableCaseReportModule.class.getCanonicalName(), new PortableCaseReportModule());
|
||||
|
||||
// generate reports for enabled modules
|
||||
for (Map.Entry<String, ReportModuleConfig> entry : config.getModuleConfigs().entrySet()) {
|
||||
ReportModuleConfig moduleConfig = entry.getValue();
|
||||
if (moduleConfig == null || !moduleConfig.isEnabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// found enabled module
|
||||
String moduleName = entry.getKey();
|
||||
ReportModule module = modules.get(moduleName);
|
||||
if (module == null) {
|
||||
logger.log(Level.SEVERE, "Report module {0} not found", moduleName);
|
||||
progressPanel.updateStatusLabel("Report module " + moduleName + " not found");
|
||||
continue;
|
||||
}
|
||||
|
||||
// get persisted module settings
|
||||
ReportModuleSettings settings = moduleConfig.getModuleSettings();
|
||||
if (settings == null) {
|
||||
// use default configuration for this module
|
||||
settings = module.getDefaultConfiguration();
|
||||
}
|
||||
|
||||
// set module configuration
|
||||
module.setConfiguration(settings);
|
||||
|
||||
try {
|
||||
// generate report according to report module type
|
||||
if (module instanceof GeneralReportModule) {
|
||||
|
||||
// generate report
|
||||
generateGeneralReport((GeneralReportModule) module);
|
||||
|
||||
} else if (module instanceof TableReportModule) {
|
||||
|
||||
// get table report settings
|
||||
TableReportSettings tableSettings = config.getTableReportSettings();
|
||||
if (tableSettings == null) {
|
||||
logger.log(Level.SEVERE, "No table report settings for report module {0}", moduleName);
|
||||
progressPanel.updateStatusLabel("No table report settings for report module " + moduleName);
|
||||
continue;
|
||||
}
|
||||
|
||||
generateTableReport((TableReportModule) module, tableSettings); //NON-NLS
|
||||
|
||||
} else if (module instanceof FileReportModule) {
|
||||
|
||||
// get file report settings
|
||||
FileReportSettings fileSettings = config.getFileReportSettings();
|
||||
if (fileSettings == null) {
|
||||
logger.log(Level.SEVERE, "No file report settings for report module {0}", moduleName);
|
||||
progressPanel.updateStatusLabel("No file report settings for report module " + moduleName);
|
||||
continue;
|
||||
}
|
||||
|
||||
generateFileListReport((FileReportModule) module, fileSettings); //NON-NLS
|
||||
|
||||
} else if (module instanceof PortableCaseReportModule) {
|
||||
// get report settings
|
||||
if (settings instanceof NoReportModuleSettings) {
|
||||
settings = new PortableCaseReportModuleSettings();
|
||||
} else if (!(settings instanceof PortableCaseReportModuleSettings)) {
|
||||
logger.log(Level.SEVERE, "Invalid settings for report module {0}", moduleName);
|
||||
progressPanel.updateStatusLabel("Invalid settings for report module " + moduleName);
|
||||
continue;
|
||||
}
|
||||
|
||||
generatePortableCaseReport((PortableCaseReportModule) module, (PortableCaseReportModuleSettings) settings);
|
||||
|
||||
} else {
|
||||
logger.log(Level.SEVERE, "Report module {0} has unsupported report module type", moduleName);
|
||||
progressPanel.updateStatusLabel("Report module " + moduleName + " has unsupported report module type");
|
||||
continue;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.log(Level.SEVERE, "Exception while running report module {0}: {1}", new Object[]{moduleName, e.getMessage()});
|
||||
progressPanel.updateStatusLabel("Exception while running report module " + moduleName);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
displayReportErrors();
|
||||
errorList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the progress panels to the user, and add actions to close the
|
||||
* parent dialog.
|
||||
*/
|
||||
void displayProgressPanel() {
|
||||
if (reportGenerationPanel == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final JDialog dialog = new JDialog((JFrame) WindowManager.getDefault().getMainWindow(), true);
|
||||
dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
|
||||
dialog.setTitle(NbBundle.getMessage(this.getClass(), "ReportGenerator.displayProgress.title.text"));
|
||||
dialog.add(this.reportGenerationPanel);
|
||||
dialog.pack();
|
||||
|
||||
reportGenerationPanel.addCloseAction(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
dialog.dispose();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
reportGenerationPanel.close();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
dialog.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the GeneralReportModules using a SwingWorker.
|
||||
*/
|
||||
private void generateGeneralReport(GeneralReportModule generalReportModule) throws IOException {
|
||||
if (generalReportModule != null) {
|
||||
String reportDir = createReportDirectory(generalReportModule);
|
||||
setupProgressPanel(generalReportModule, reportDir);
|
||||
generalReportModule.generateReport(reportDir, progressPanel);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the TableReportModules using a SwingWorker.
|
||||
*
|
||||
* @param tableReportSettings settings for the table report
|
||||
*/
|
||||
private void generateTableReport(TableReportModule tableReport, TableReportSettings tableReportSettings) throws IOException {
|
||||
if (tableReport != null && tableReportSettings != null && null != tableReportSettings.getArtifactSelections()) {
|
||||
String reportDir = createReportDirectory(tableReport);
|
||||
setupProgressPanel(tableReport, reportDir);
|
||||
tableReport.startReport(reportDir);
|
||||
TableReportGenerator generator = new TableReportGenerator(tableReportSettings, progressPanel, tableReport);
|
||||
generator.execute();
|
||||
tableReport.endReport();
|
||||
// finish progress, wrap up
|
||||
progressPanel.complete(ReportProgressPanel.ReportStatus.COMPLETE);
|
||||
errorList = generator.getErrorList();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the FileReportModules using a SwingWorker.
|
||||
*
|
||||
* @param fileReportSettings settings for the file report
|
||||
*/
|
||||
private void generateFileListReport(FileReportModule fileReportModule, FileReportSettings fileReportSettings) throws IOException {
|
||||
if (fileReportModule != null && fileReportSettings != null && null != fileReportSettings.getFileProperties()) {
|
||||
String reportDir = createReportDirectory(fileReportModule);
|
||||
List<FileReportDataTypes> enabled = new ArrayList<>();
|
||||
for (Entry<FileReportDataTypes, Boolean> e : fileReportSettings.getFileProperties().entrySet()) {
|
||||
if (e.getValue()) {
|
||||
enabled.add(e.getKey());
|
||||
}
|
||||
}
|
||||
setupProgressPanel(fileReportModule, reportDir);
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
progressPanel.start();
|
||||
progressPanel.updateStatusLabel(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.progress.queryingDb.text"));
|
||||
}
|
||||
|
||||
List<AbstractFile> files = getFiles();
|
||||
int numFiles = files.size();
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
fileReportModule.startReport(reportDir);
|
||||
fileReportModule.startTable(enabled);
|
||||
}
|
||||
progressPanel.setIndeterminate(false);
|
||||
progressPanel.setMaximumProgress(numFiles);
|
||||
|
||||
int i = 0;
|
||||
// Add files to report.
|
||||
for (AbstractFile file : files) {
|
||||
// Check to see if any reports have been cancelled.
|
||||
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||
return;
|
||||
} else {
|
||||
fileReportModule.addRow(file, enabled);
|
||||
progressPanel.increment();
|
||||
}
|
||||
|
||||
if ((i % 100) == 0) {
|
||||
progressPanel.updateStatusLabel(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.progress.processingFile.text",
|
||||
file.getName()));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
fileReportModule.endTable();
|
||||
fileReportModule.endReport();
|
||||
progressPanel.complete(ReportStatus.COMPLETE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the Portable Case Report Module
|
||||
*/
|
||||
private void generatePortableCaseReport(PortableCaseReportModule portableCaseReportModule, PortableCaseReportModuleSettings settings) throws IOException {
|
||||
if (portableCaseReportModule != null) {
|
||||
String reportDir = createReportDirectory(portableCaseReportModule);
|
||||
setupProgressPanel(portableCaseReportModule, reportDir);
|
||||
portableCaseReportModule.generateReport(reportDir, settings, progressPanel);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all files in the image.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private List<AbstractFile> getFiles() {
|
||||
List<AbstractFile> absFiles;
|
||||
try {
|
||||
SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
absFiles = skCase.findAllFilesWhere("meta_type != " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getValue()); //NON-NLS
|
||||
return absFiles;
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
progressPanel.updateStatusLabel(NbBundle.getMessage(this.getClass(), "ReportGenerator.errors.reportErrorText") + ex.getLocalizedMessage());
|
||||
logger.log(Level.SEVERE, "failed to generate reports. Unable to get all files in the image.", ex); //NON-NLS
|
||||
return Collections.<AbstractFile>emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
private void setupProgressPanel(ReportModule module, String reportDir) {
|
||||
if (reportGenerationPanel != null) {
|
||||
String reportFilePath = module.getRelativeFilePath();
|
||||
if (reportFilePath == null) {
|
||||
reportGenerationPanel.addReport(module.getName(), null);
|
||||
} else if (reportFilePath.isEmpty()) {
|
||||
reportGenerationPanel.addReport(module.getName(), reportDir);
|
||||
} else {
|
||||
reportGenerationPanel.addReport(module.getName(), reportDir + reportFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String createReportDirectory(ReportModule module) throws IOException {
|
||||
Case currentCase;
|
||||
try {
|
||||
currentCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
throw new IOException("Exception while getting open case.", ex);
|
||||
}
|
||||
// Create the root reports directory path of the form: <CASE DIRECTORY>/Reports/<Case fileName> <Timestamp>/
|
||||
DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss");
|
||||
Date date = new Date();
|
||||
String dateNoTime = dateFormat.format(date);
|
||||
String reportPath = String.format(REPORT_PATH_FMT_STR, currentCase.getReportDirectory(), currentCase.getDisplayName(), module.getName(), dateNoTime);
|
||||
// Create the root reports directory.
|
||||
try {
|
||||
FileUtil.createFolder(new File(reportPath));
|
||||
} catch (IOException ex) {
|
||||
throw new IOException("Failed to make report folder, unable to generate reports.", ex);
|
||||
}
|
||||
return reportPath;
|
||||
}
|
||||
}
|
||||
106
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportModuleConfig.java
Executable file
106
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportModuleConfig.java
Executable file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.NoReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.ReportModule;
|
||||
import org.sleuthkit.autopsy.report.ReportModuleSettings;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Class for persisting information about a report module (e.g. whether the
|
||||
* report module is enabled).
|
||||
*/
|
||||
final class ReportModuleConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final String moduleName;
|
||||
private transient ReportModuleSettings settings; // these settings get serialized individually
|
||||
private boolean enabled;
|
||||
|
||||
/**
|
||||
* Creates ReportModuleConfig object.
|
||||
*
|
||||
* @param module Implementation of a ReportModule interface
|
||||
* @param enabled Boolean flag whether the module is enabled
|
||||
*/
|
||||
ReportModuleConfig(ReportModule module, boolean enabled) {
|
||||
this.moduleName = module.getClass().getCanonicalName();
|
||||
this.enabled = enabled;
|
||||
this.settings = new NoReportModuleSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates ReportModuleConfig object.
|
||||
*
|
||||
* @param module Implementation of a ReportModule interface
|
||||
* @param enabled Boolean flag whether the module is enabled
|
||||
* @param settings Report module settings object
|
||||
*/
|
||||
ReportModuleConfig(ReportModule module, boolean enabled, ReportModuleSettings settings) {
|
||||
this.moduleName = module.getClass().getCanonicalName();
|
||||
this.enabled = enabled;
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get full canonical report module name.
|
||||
*
|
||||
* @return Full canonical report module name.
|
||||
*/
|
||||
String getModuleClassName() {
|
||||
return moduleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set flag whether the report module is enabled.
|
||||
*
|
||||
* @param enabled Flag whether the report module is enabled.
|
||||
*/
|
||||
void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is report module enabled.
|
||||
*
|
||||
* @return True if the module is enabled, false otherwise.
|
||||
*/
|
||||
boolean isEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get settings object for the report module.
|
||||
*
|
||||
* @return the settings
|
||||
*/
|
||||
ReportModuleSettings getModuleSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set settings for the report module.
|
||||
*
|
||||
* @param settings the settings to set
|
||||
*/
|
||||
void setModuleSettings(ReportModuleSettings settings) {
|
||||
this.settings = settings;
|
||||
}
|
||||
}
|
||||
64
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportModuleLoader.java
Executable file
64
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportModuleLoader.java
Executable file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.GeneralReportModule;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.python.JythonModuleLoader;
|
||||
|
||||
/**
|
||||
* Class used to find and instantiate report module singletons. Provides a
|
||||
* single mechanism by which clients that interact with report modules can
|
||||
* obtain them.
|
||||
*/
|
||||
class ReportModuleLoader {
|
||||
|
||||
static List<GeneralReportModule> getGeneralReportModules() {
|
||||
List<GeneralReportModule> generalModules = new ArrayList<>();
|
||||
|
||||
for (GeneralReportModule module : Lookup.getDefault().lookupAll(GeneralReportModule.class)) {
|
||||
generalModules.add(module);
|
||||
}
|
||||
|
||||
for (GeneralReportModule module : JythonModuleLoader.getGeneralReportModules()) {
|
||||
generalModules.add(module);
|
||||
}
|
||||
|
||||
return generalModules;
|
||||
}
|
||||
|
||||
static List<TableReportModule> getTableReportModules() {
|
||||
List<TableReportModule> tableModules = new ArrayList<>();
|
||||
for (TableReportModule module : Lookup.getDefault().lookupAll(TableReportModule.class)) {
|
||||
tableModules.add(module);
|
||||
}
|
||||
return tableModules;
|
||||
}
|
||||
|
||||
// Initialize the list of ReportModules
|
||||
static List<FileReportModule> getFileReportModules() {
|
||||
List<FileReportModule> fileModules = new ArrayList<>();
|
||||
for (FileReportModule module : Lookup.getDefault().lookupAll(FileReportModule.class)) {
|
||||
fileModules.add(module);
|
||||
}
|
||||
return fileModules;
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportProgressPanel.reportLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportProgressDialog.reportLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -91,7 +91,7 @@
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportProgressPanel.pathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportProgressDialog.pathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
</Properties>
|
||||
@@ -104,14 +104,14 @@
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportProgressPanel.separationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportProgressDialog.separationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="statusMessageLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportProgressPanel.statusMessageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportProgressDialog.statusMessageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -0,0 +1,382 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import java.awt.Color;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
|
||||
/**
|
||||
* A panel used by a report generation module to show progress.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
class ReportProgressDialog extends javax.swing.JPanel implements ReportProgressPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger logger = Logger.getLogger(ReportProgressDialog.class.getName());
|
||||
private static final Color GREEN = new Color(50, 205, 50);
|
||||
private static final Color RED = new Color(178, 34, 34);
|
||||
private volatile ReportProgressPanel.ReportStatus status;
|
||||
|
||||
/**
|
||||
* Constructs a panel used by report generation module to show progress.
|
||||
*/
|
||||
ReportProgressDialog() {
|
||||
initComponents();
|
||||
reportProgressBar.setIndeterminate(true);
|
||||
reportProgressBar.setMaximum(100);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressDialog.progress.queuing"));
|
||||
status = ReportStatus.QUEUING;
|
||||
reportLabel.setText("");
|
||||
pathLabel.setText(""); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets label text.
|
||||
*
|
||||
* @param reportName The name of the report being generated.
|
||||
* @param reportPath The path to the report file.
|
||||
*/
|
||||
void setLabels(String reportName, String reportPath) {
|
||||
reportLabel.setText(reportName);
|
||||
if (null != reportPath) {
|
||||
pathLabel.setText("<html><u>" + shortenPath(reportPath) + "</u></html>"); //NON-NLS
|
||||
pathLabel.setToolTipText(reportPath);
|
||||
String linkPath = reportPath;
|
||||
pathLabel.addMouseListener(new MouseListener() {
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent mouseEvent) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent mouseEvent) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent mouseEvent) {
|
||||
File file = new File(linkPath);
|
||||
try {
|
||||
Desktop.getDesktop().open(file);
|
||||
} catch (IOException ioex) {
|
||||
logger.log(Level.SEVERE, "Error opening report file", ioex);
|
||||
} catch (IllegalArgumentException iaEx) {
|
||||
logger.log(Level.SEVERE, "Error opening report file", iaEx);
|
||||
try {
|
||||
Desktop.getDesktop().open(file.getParentFile());
|
||||
} catch (IOException ioEx2) {
|
||||
logger.log(Level.SEVERE, "Error opening report file parent", ioEx2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e3) {
|
||||
pathLabel.setForeground(Color.DARK_GRAY);
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent e4) {
|
||||
pathLabel.setForeground(Color.BLACK);
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
pathLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressDialog.initPathLabel.noFile"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current status of the generation of the report.
|
||||
*
|
||||
* @return The report generation status as a ReportStatus enum.
|
||||
*/
|
||||
@Override
|
||||
public ReportStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the progress bar component of this panel.
|
||||
*/
|
||||
@Override
|
||||
public void start() {
|
||||
EventQueue.invokeLater(() -> {
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressDialog.start.progress.text"));
|
||||
status = ReportStatus.RUNNING;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum value of the progress bar component of this panel.
|
||||
*
|
||||
* @param max The maximum value.
|
||||
*/
|
||||
@Override
|
||||
public void setMaximumProgress(int max) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setMaximum(max);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the current value of the progress bar component of this panel
|
||||
* by one unit.
|
||||
*/
|
||||
@Override
|
||||
public void increment() {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setValue(reportProgressBar.getValue() + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current value of the progress bar component of this panel.
|
||||
*
|
||||
* @param value The value to be set.
|
||||
*/
|
||||
@Override
|
||||
public void setProgress(int value) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setValue(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the the progress bar component of this panel to be determinate or
|
||||
* indeterminate.
|
||||
*
|
||||
* @param indeterminate True if the progress bar should be set to
|
||||
* indeterminate.
|
||||
*/
|
||||
@Override
|
||||
public void setIndeterminate(boolean indeterminate) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
reportProgressBar.setIndeterminate(indeterminate);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the status message label component of this panel to show a given
|
||||
* processing status message. For example, updateStatusLabel("Now processing
|
||||
* files...") sets the label text to "Now processing files..."
|
||||
*
|
||||
* @param statusMessage String to use as label text.
|
||||
*/
|
||||
@Override
|
||||
public void updateStatusLabel(String statusMessage) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
statusMessageLabel.setText(statusMessage);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the components of this panel indicate the final status of
|
||||
* generation of the report.
|
||||
*
|
||||
* @param reportStatus The final status, must be COMPLETE or ERROR.
|
||||
*/
|
||||
@Override
|
||||
public void complete(ReportStatus reportStatus) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
reportProgressBar.setIndeterminate(false);
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
switch (reportStatus) {
|
||||
case COMPLETE: {
|
||||
ReportStatus oldValue = status;
|
||||
status = ReportStatus.COMPLETE;
|
||||
statusMessageLabel.setForeground(Color.BLACK);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressDialog.complete.processLbl.text"));
|
||||
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
||||
reportProgressBar.setStringPainted(true);
|
||||
reportProgressBar.setForeground(GREEN);
|
||||
reportProgressBar.setString("Complete"); //NON-NLS
|
||||
firePropertyChange(ReportStatus.COMPLETE.toString(), oldValue, status);
|
||||
break;
|
||||
}
|
||||
case ERROR: {
|
||||
ReportStatus oldValue = status;
|
||||
status = ReportStatus.ERROR;
|
||||
statusMessageLabel.setForeground(RED);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressDialog.complete.processLb2.text"));
|
||||
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
||||
reportProgressBar.setStringPainted(true);
|
||||
reportProgressBar.setForeground(RED);
|
||||
reportProgressBar.setString("Error"); //NON-NLS
|
||||
firePropertyChange(ReportStatus.COMPLETE.toString(), oldValue, status);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the components of this panel indicate generation of the report was
|
||||
* cancelled.
|
||||
*/
|
||||
void cancel() {
|
||||
switch (status) {
|
||||
case COMPLETE:
|
||||
break;
|
||||
case CANCELED:
|
||||
break;
|
||||
case ERROR:
|
||||
break;
|
||||
default:
|
||||
ReportStatus oldValue = status;
|
||||
status = ReportStatus.CANCELED;
|
||||
reportProgressBar.setIndeterminate(false);
|
||||
reportProgressBar.setValue(0);
|
||||
reportProgressBar.setStringPainted(true);
|
||||
reportProgressBar.setForeground(RED); // Red
|
||||
reportProgressBar.setString("Cancelled"); //NON-NLS
|
||||
firePropertyChange(ReportStatus.CANCELED.toString(), oldValue, status);
|
||||
statusMessageLabel.setForeground(RED);
|
||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressDialog.cancel.procLbl.text"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a shortened version of a file path.
|
||||
*
|
||||
* @param path The path to shorten.
|
||||
*
|
||||
* @return The shortened path.
|
||||
*/
|
||||
private String shortenPath(String path) {
|
||||
if (path.length() > 100) {
|
||||
return path.substring(0, 10 + path.substring(10).indexOf(File.separator) + 1) + "..."
|
||||
+ path.substring((path.length() - 70) + path.substring(path.length() - 70).indexOf(File.separator));
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
reportProgressBar = new javax.swing.JProgressBar();
|
||||
reportLabel = new javax.swing.JLabel();
|
||||
pathLabel = new javax.swing.JLabel();
|
||||
separationLabel = new javax.swing.JLabel();
|
||||
statusMessageLabel = new javax.swing.JLabel();
|
||||
|
||||
setFont(getFont().deriveFont(getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
setMinimumSize(new java.awt.Dimension(486, 68));
|
||||
|
||||
reportProgressBar.setFont(reportProgressBar.getFont().deriveFont(reportProgressBar.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
|
||||
reportLabel.setFont(reportLabel.getFont().deriveFont(reportLabel.getFont().getStyle() | java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(reportLabel, org.openide.util.NbBundle.getMessage(ReportProgressDialog.class, "ReportProgressDialog.reportLabel.text")); // NOI18N
|
||||
|
||||
pathLabel.setFont(pathLabel.getFont().deriveFont(pathLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(pathLabel, org.openide.util.NbBundle.getMessage(ReportProgressDialog.class, "ReportProgressDialog.pathLabel.text")); // NOI18N
|
||||
pathLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
|
||||
separationLabel.setFont(separationLabel.getFont().deriveFont(separationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(separationLabel, org.openide.util.NbBundle.getMessage(ReportProgressDialog.class, "ReportProgressDialog.separationLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(statusMessageLabel, org.openide.util.NbBundle.getMessage(ReportProgressDialog.class, "ReportProgressDialog.statusMessageLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(statusMessageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(reportProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(reportLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(separationLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(reportProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(reportLabel)
|
||||
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(separationLabel))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(statusMessageLabel)
|
||||
.addGap(13, 13, 13))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel pathLabel;
|
||||
private javax.swing.JLabel reportLabel;
|
||||
private javax.swing.JProgressBar reportProgressBar;
|
||||
private javax.swing.JLabel separationLabel;
|
||||
private javax.swing.JLabel statusMessageLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
* Makes the components of this panel indicate the generation of the report
|
||||
* is completed.
|
||||
*
|
||||
* @deprecated Use {@link #complete(ReportStatus)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Override
|
||||
public void complete() {
|
||||
complete(ReportStatus.COMPLETE);
|
||||
}
|
||||
|
||||
}
|
||||
158
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportProgressLogger.java
Executable file
158
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportProgressLogger.java
Executable file
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
|
||||
/**
|
||||
* Writes progress and status messages to the application log.
|
||||
*/
|
||||
public class ReportProgressLogger implements ReportProgressPanel {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportProgressLogger.class.getName());
|
||||
private volatile ReportProgressPanel.ReportStatus status;
|
||||
|
||||
public ReportProgressLogger() {
|
||||
status = ReportStatus.QUEUING;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current status of the generation of the report.
|
||||
*
|
||||
* @return The report generation status as a ReportStatus enum.
|
||||
*/
|
||||
@Override
|
||||
public ReportStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs that the report has been started.
|
||||
*/
|
||||
@Override
|
||||
public void start() {
|
||||
status = ReportStatus.RUNNING;
|
||||
logger.log(Level.INFO, "Report started");
|
||||
}
|
||||
|
||||
/**
|
||||
* NO-OP.
|
||||
*
|
||||
* @param max The maximum value.
|
||||
*/
|
||||
@Override
|
||||
public void setMaximumProgress(int max) {
|
||||
}
|
||||
|
||||
/**
|
||||
* NO-OP.
|
||||
*/
|
||||
@Override
|
||||
public void increment() {
|
||||
}
|
||||
|
||||
/**
|
||||
* NO-OP.
|
||||
*
|
||||
* @param value The value to be set.
|
||||
*/
|
||||
@Override
|
||||
public void setProgress(int value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* NO-OP.
|
||||
*
|
||||
* @param indeterminate True if the progress bar should be set to
|
||||
* indeterminate.
|
||||
*/
|
||||
@Override
|
||||
public void setIndeterminate(boolean indeterminate) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the status message.
|
||||
*
|
||||
* @param statusMessage String to use as label text.
|
||||
*/
|
||||
@Override
|
||||
public void updateStatusLabel(String statusMessage) {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
logger.log(Level.INFO, statusMessage);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the final status of the report generation.
|
||||
*
|
||||
* @param reportStatus The final status, must be COMPLETE or ERROR.
|
||||
*/
|
||||
@Override
|
||||
public void complete(ReportStatus reportStatus) {
|
||||
if (status != ReportStatus.CANCELED) {
|
||||
switch (reportStatus) {
|
||||
case COMPLETE: {
|
||||
status = ReportStatus.COMPLETE;
|
||||
logger.log(Level.INFO, "Report completed");
|
||||
break;
|
||||
}
|
||||
case ERROR: {
|
||||
status = ReportStatus.ERROR;
|
||||
logger.log(Level.INFO, "Report completed with errors");
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs that the generation of the report was cancelled.
|
||||
*/
|
||||
void cancel() {
|
||||
switch (status) {
|
||||
case COMPLETE:
|
||||
break;
|
||||
case CANCELED:
|
||||
break;
|
||||
case ERROR:
|
||||
break;
|
||||
default:
|
||||
status = ReportStatus.CANCELED;
|
||||
logger.log(Level.INFO, "Report cancelled");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the final status of the report generation.
|
||||
*
|
||||
* @deprecated Use {@link #complete(ReportStatus)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Override
|
||||
public void complete() {
|
||||
complete(ReportStatus.COMPLETE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -59,7 +59,7 @@
|
||||
<Component class="javax.swing.JLabel" name="reportModulesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportVisualPanel1.reportModulesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel1.reportModulesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -16,15 +16,20 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule;
|
||||
import org.sleuthkit.autopsy.report.modules.html.HTMLReport;
|
||||
import org.sleuthkit.autopsy.report.ReportModule;
|
||||
import org.sleuthkit.autopsy.report.ReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.GeneralReportModule;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import static java.util.Collections.swap;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.JPanel;
|
||||
@@ -35,10 +40,8 @@ import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import org.openide.DialogDisplayer;
|
||||
import org.openide.NotifyDescriptor;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.python.JythonModuleLoader;
|
||||
|
||||
/**
|
||||
* Display reports modules.
|
||||
@@ -49,17 +52,19 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
|
||||
private static final Logger logger = Logger.getLogger(ReportVisualPanel1.class.getName());
|
||||
private final ReportWizardPanel1 wizPanel;
|
||||
private final List<ReportModule> modules = new ArrayList<>();
|
||||
private final List<GeneralReportModule> generalModules = new ArrayList<>();
|
||||
private final List<TableReportModule> tableModules = new ArrayList<>();
|
||||
private final List<FileReportModule> fileModules = new ArrayList<>();
|
||||
private List<GeneralReportModule> generalModules = new ArrayList<>();
|
||||
private List<TableReportModule> tableModules = new ArrayList<>();
|
||||
private List<FileReportModule> fileModules = new ArrayList<>();
|
||||
private PortableCaseReportModule portableCaseModule;
|
||||
private Map<String, ReportModuleConfig> moduleConfigs;
|
||||
private Integer selectedIndex;
|
||||
|
||||
/**
|
||||
* Creates new form ReportVisualPanel1
|
||||
*/
|
||||
public ReportVisualPanel1(ReportWizardPanel1 wizPanel) {
|
||||
public ReportVisualPanel1(ReportWizardPanel1 wizPanel, Map<String, ReportModuleConfig> moduleConfigs) {
|
||||
this.wizPanel = wizPanel;
|
||||
this.moduleConfigs = moduleConfigs;
|
||||
initComponents();
|
||||
configurationPanel.setLayout(new BorderLayout());
|
||||
descriptionTextPane.setEditable(false);
|
||||
@@ -68,80 +73,85 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
|
||||
|
||||
// Initialize the list of ReportModules
|
||||
private void initModules() {
|
||||
for (TableReportModule module : Lookup.getDefault().lookupAll(TableReportModule.class)) {
|
||||
if (moduleIsValid(module)) {
|
||||
tableModules.add(module);
|
||||
modules.add(module);
|
||||
} else {
|
||||
|
||||
tableModules = ReportModuleLoader.getTableReportModules();
|
||||
generalModules = ReportModuleLoader.getGeneralReportModules();
|
||||
fileModules = ReportModuleLoader.getFileReportModules();
|
||||
|
||||
for (TableReportModule module : tableModules) {
|
||||
if (!moduleIsValid(module)) {
|
||||
popupWarning(module);
|
||||
tableModules.remove(module);
|
||||
}
|
||||
}
|
||||
|
||||
for (GeneralReportModule module : Lookup.getDefault().lookupAll(GeneralReportModule.class)) {
|
||||
if (moduleIsValid(module)) {
|
||||
generalModules.add(module);
|
||||
modules.add(module);
|
||||
} else {
|
||||
for (GeneralReportModule module : generalModules) {
|
||||
if (!moduleIsValid(module)) {
|
||||
popupWarning(module);
|
||||
generalModules.remove(module);
|
||||
}
|
||||
}
|
||||
|
||||
for (GeneralReportModule module : JythonModuleLoader.getGeneralReportModules()) {
|
||||
if (moduleIsValid(module)) {
|
||||
generalModules.add(module);
|
||||
modules.add(module);
|
||||
} else {
|
||||
for (FileReportModule module : fileModules) {
|
||||
if (!moduleIsValid(module)) {
|
||||
popupWarning(module);
|
||||
fileModules.remove(module);
|
||||
}
|
||||
}
|
||||
|
||||
for (FileReportModule module : Lookup.getDefault().lookupAll(FileReportModule.class)) {
|
||||
if (moduleIsValid(module)) {
|
||||
fileModules.add(module);
|
||||
modules.add(module);
|
||||
} else {
|
||||
popupWarning(module);
|
||||
}
|
||||
}
|
||||
|
||||
// our theory is that the report table modules are more common, so they go on top
|
||||
modules.addAll(tableModules);
|
||||
modules.addAll(fileModules);
|
||||
modules.addAll(generalModules);
|
||||
|
||||
portableCaseModule = new PortableCaseReportModule();
|
||||
if (moduleIsValid(portableCaseModule)) {
|
||||
modules.add(portableCaseModule);
|
||||
} else {
|
||||
popupWarning(portableCaseModule);
|
||||
}
|
||||
|
||||
Collections.sort(modules, new Comparator<ReportModule>() {
|
||||
@Override
|
||||
public int compare(ReportModule rm1, ReportModule rm2) {
|
||||
// our theory is that the report table modules are more common, so they go on top
|
||||
boolean rm1isTable = (rm1 instanceof TableReportModule);
|
||||
boolean rm2isTable = (rm2 instanceof TableReportModule);
|
||||
if (rm1isTable && !rm2isTable) {
|
||||
return -1;
|
||||
}
|
||||
if (!rm1isTable && rm2isTable) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return rm1.getName().compareTo(rm2.getName());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Results-HTML should always be first in the list of Report Modules.
|
||||
int indexOfHTMLReportModule = 0;
|
||||
for (ReportModule module : modules) {
|
||||
if (module instanceof ReportHTML) {
|
||||
if (module instanceof HTMLReport) {
|
||||
break;
|
||||
}
|
||||
indexOfHTMLReportModule++;
|
||||
}
|
||||
swap(modules, indexOfHTMLReportModule, 0);
|
||||
|
||||
// set module configurations
|
||||
selectedIndex = 0;
|
||||
int indx = 0;
|
||||
for (ReportModule module : modules) {
|
||||
ReportModuleSettings settings = null;
|
||||
if (moduleConfigs != null) {
|
||||
// get configuration for this module
|
||||
ReportModuleConfig config = moduleConfigs.get(module.getClass().getCanonicalName());
|
||||
if (config != null) {
|
||||
// there is an existing configuration for this module
|
||||
settings = config.getModuleSettings();
|
||||
|
||||
// check if this module is enabled
|
||||
if (config.isEnabled()) {
|
||||
// make sure this module is the selected module in the UI panel
|
||||
selectedIndex = indx;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (settings == null) {
|
||||
// get default module configuration
|
||||
settings = module.getDefaultConfiguration();
|
||||
}
|
||||
// set module configuration
|
||||
module.setConfiguration(settings);
|
||||
indx++;
|
||||
}
|
||||
|
||||
modulesJList.getSelectionModel().addListSelectionListener(this);
|
||||
modulesJList.setCellRenderer(new ModuleCellRenderer());
|
||||
modulesJList.setListData(modules.toArray(new ReportModule[modules.size()]));
|
||||
selectedIndex = 0;
|
||||
modulesJList.setSelectedIndex(selectedIndex);
|
||||
}
|
||||
|
||||
@@ -205,7 +215,7 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the selection status of the Portable Case report module.
|
||||
*
|
||||
@@ -219,6 +229,27 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated configuration for all report modules.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, ReportModuleConfig> getUpdatedModuleConfigs() {
|
||||
moduleConfigs = new HashMap<>();
|
||||
for (ReportModule module : modules) {
|
||||
// get updated module configuration
|
||||
ReportModuleSettings settings = module.getConfiguration();
|
||||
moduleConfigs.put(module.getClass().getCanonicalName(), new ReportModuleConfig(module, false, settings));
|
||||
}
|
||||
|
||||
// set "enabled" flag for the selected module
|
||||
ReportModule mod = getSelectedModule();
|
||||
ReportModuleConfig config = moduleConfigs.get(mod.getClass().getCanonicalName());
|
||||
config.setEnabled(true);
|
||||
|
||||
return moduleConfigs;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
@@ -327,7 +358,7 @@ final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
|
||||
configurationPanel.add(panel, BorderLayout.CENTER);
|
||||
configurationPanel.revalidate();
|
||||
configurationPanel.repaint();
|
||||
|
||||
|
||||
boolean generalModuleSelected = (module instanceof GeneralReportModule);
|
||||
|
||||
wizPanel.setNext(!generalModuleSelected);
|
||||
@@ -25,13 +25,13 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
|
||||
<Component id="tagsScrollPane" max="32767" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="advancedButton" linkSize="1" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="deselectAllButton" linkSize="1" max="32767" attributes="0"/>
|
||||
@@ -40,11 +40,12 @@
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="taggedResultsRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="allTaggedResultsRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="dataLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="allResultsRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="specificTaggedResultsRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="402" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@@ -58,33 +59,34 @@
|
||||
<Component id="dataLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="allResultsRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="taggedResultsRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="allTaggedResultsRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="specificTaggedResultsRadioButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="selectAllButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="deselectAllButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="70" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="advancedButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="tagsScrollPane" max="32767" attributes="0"/>
|
||||
<Component id="tagsScrollPane" alignment="1" min="-2" pref="161" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="advancedButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JRadioButton" name="taggedResultsRadioButton">
|
||||
<Component class="javax.swing.JRadioButton" name="specificTaggedResultsRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="optionsButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportVisualPanel2.taggedResultsRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel2.specificTaggedResultsRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -94,7 +96,7 @@
|
||||
<ComponentRef name="optionsButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportVisualPanel2.allResultsRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel2.allResultsRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -104,14 +106,14 @@
|
||||
<Component class="javax.swing.JLabel" name="dataLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportVisualPanel2.dataLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel2.dataLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="selectAllButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportVisualPanel2.selectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel2.selectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -121,7 +123,7 @@
|
||||
<Component class="javax.swing.JButton" name="deselectAllButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportVisualPanel2.deselectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel2.deselectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -153,12 +155,25 @@
|
||||
<Component class="javax.swing.JButton" name="advancedButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportVisualPanel2.advancedButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel2.advancedButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="advancedButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="allTaggedResultsRadioButton">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="optionsButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportVisualPanel2.allTaggedResultsRadioButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="allTaggedResultsRadioButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -16,9 +16,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.infrastructure.TableReportSettings;
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.ArrayList;
|
||||
@@ -35,8 +38,6 @@ import javax.swing.JList;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.ListCellRenderer;
|
||||
import javax.swing.ListModel;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import javax.swing.event.ListDataListener;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
@@ -58,51 +59,100 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
private final ReportWizardPanel2 wizPanel;
|
||||
private final Map<String, Boolean> tagStates = new LinkedHashMap<>();
|
||||
private final List<String> tags = new ArrayList<>();
|
||||
ArtifactSelectionDialog dialog = new ArtifactSelectionDialog((JFrame) WindowManager.getDefault().getMainWindow(), true);
|
||||
final ArtifactSelectionDialog dialog = new ArtifactSelectionDialog((JFrame) WindowManager.getDefault().getMainWindow(), true);
|
||||
private Map<BlackboardArtifact.Type, Boolean> artifactStates = new HashMap<>();
|
||||
private List<BlackboardArtifact.Type> artifacts = new ArrayList<>();
|
||||
private final boolean useCaseSpecificData;
|
||||
private TagsListModel tagsModel;
|
||||
private TagsListRenderer tagsRenderer;
|
||||
|
||||
/**
|
||||
* Creates new form ReportVisualPanel2
|
||||
*/
|
||||
public ReportVisualPanel2(ReportWizardPanel2 wizPanel) {
|
||||
public ReportVisualPanel2(ReportWizardPanel2 wizPanel, boolean useCaseSpecificData, TableReportSettings settings) {
|
||||
this.useCaseSpecificData = useCaseSpecificData;
|
||||
initComponents();
|
||||
initTags();
|
||||
initArtifactTypes();
|
||||
tagsList.setEnabled(false);
|
||||
selectAllButton.setEnabled(false);
|
||||
deselectAllButton.setEnabled(false);
|
||||
allResultsRadioButton.setSelected(true);
|
||||
this.wizPanel = wizPanel;
|
||||
this.allResultsRadioButton.addChangeListener(new ChangeListener() {
|
||||
|
||||
this.allResultsRadioButton.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
tagsList.setEnabled(taggedResultsRadioButton.isSelected());
|
||||
selectAllButton.setEnabled(taggedResultsRadioButton.isSelected());
|
||||
deselectAllButton.setEnabled(taggedResultsRadioButton.isSelected());
|
||||
advancedButton.setEnabled(!taggedResultsRadioButton.isSelected());
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
tagsList.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
selectAllButton.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
deselectAllButton.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
advancedButton.setEnabled(allResultsRadioButton.isSelected() && useCaseSpecificData);
|
||||
updateFinishButton();
|
||||
}
|
||||
});
|
||||
this.taggedResultsRadioButton.addChangeListener(new ChangeListener() {
|
||||
this.allTaggedResultsRadioButton.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
tagsList.setEnabled(taggedResultsRadioButton.isSelected());
|
||||
selectAllButton.setEnabled(taggedResultsRadioButton.isSelected());
|
||||
deselectAllButton.setEnabled(taggedResultsRadioButton.isSelected());
|
||||
advancedButton.setEnabled(!taggedResultsRadioButton.isSelected());
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
tagsList.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
selectAllButton.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
deselectAllButton.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
advancedButton.setEnabled(allResultsRadioButton.isSelected() && useCaseSpecificData);
|
||||
updateFinishButton();
|
||||
}
|
||||
});
|
||||
this.specificTaggedResultsRadioButton.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
tagsList.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
selectAllButton.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
deselectAllButton.setEnabled(specificTaggedResultsRadioButton.isSelected());
|
||||
advancedButton.setEnabled(allResultsRadioButton.isSelected() && useCaseSpecificData);
|
||||
updateFinishButton();
|
||||
}
|
||||
});
|
||||
|
||||
// enable things based on input settings
|
||||
advancedButton.setEnabled(useCaseSpecificData);
|
||||
specificTaggedResultsRadioButton.setEnabled(useCaseSpecificData);
|
||||
TableReportSettings.TableReportOption type = TableReportSettings.TableReportOption.ALL_RESULTS;
|
||||
if (settings != null) {
|
||||
type = settings.getSelectedReportOption();
|
||||
}
|
||||
switch (type) {
|
||||
case ALL_TAGGED_RESULTS:
|
||||
allTaggedResultsRadioButton.setSelected(true);
|
||||
tagsList.setEnabled(false);
|
||||
selectAllButton.setEnabled(false);
|
||||
deselectAllButton.setEnabled(false);
|
||||
break;
|
||||
case SPECIFIC_TAGGED_RESULTS:
|
||||
specificTaggedResultsRadioButton.setSelected(useCaseSpecificData);
|
||||
tagsList.setEnabled(useCaseSpecificData);
|
||||
selectAllButton.setEnabled(useCaseSpecificData);
|
||||
deselectAllButton.setEnabled(useCaseSpecificData);
|
||||
break;
|
||||
case ALL_RESULTS:
|
||||
default:
|
||||
allResultsRadioButton.setSelected(true);
|
||||
tagsList.setEnabled(false);
|
||||
selectAllButton.setEnabled(false);
|
||||
deselectAllButton.setEnabled(false);
|
||||
break;
|
||||
}
|
||||
updateFinishButton();
|
||||
}
|
||||
|
||||
// Initialize the list of Tags
|
||||
private void initTags() {
|
||||
List<TagName> tagNamesInUse;
|
||||
|
||||
List<TagName> tagNamesInUse = new ArrayList<>();
|
||||
// NOTE: we do not want to load tag names that came from persisted settings
|
||||
// because there might have been new/additional tag names that have been added
|
||||
// by user. We should read tag names from the database each time.
|
||||
try {
|
||||
tagNamesInUse = Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
|
||||
// only try to load tag names if we are displaying case specific data, otherwise
|
||||
// we will be displaying case specific data in command line wizard if there is
|
||||
// a case open in the background
|
||||
if (useCaseSpecificData) {
|
||||
// get tags and artifact types from current case
|
||||
tagNamesInUse = Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
|
||||
}
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(ReportVisualPanel2.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
|
||||
return;
|
||||
@@ -124,7 +174,7 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
tagsList.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mousePressed(MouseEvent evt) {
|
||||
if (!taggedResultsRadioButton.isSelected()) {
|
||||
if (!specificTaggedResultsRadioButton.isSelected()) {
|
||||
return;
|
||||
}
|
||||
int index = tagsList.locationToIndex(evt.getPoint());
|
||||
@@ -142,6 +192,12 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
@SuppressWarnings("deprecation")
|
||||
private void initArtifactTypes() {
|
||||
|
||||
// only try to load existing artifact types if we are displaying case
|
||||
// specific data, otherwise there may not be a case open.
|
||||
if (!useCaseSpecificData) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Case openCase = Case.getCurrentCaseThrows();
|
||||
ArrayList<BlackboardArtifact.Type> doNotReport = new ArrayList<>();
|
||||
@@ -152,6 +208,7 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_TOOL_OUTPUT.getLabel(),
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_TOOL_OUTPUT.getDisplayName())); // output is too unstructured for table review
|
||||
|
||||
// get artifact types that exist in the current case
|
||||
artifacts = openCase.getSleuthkitCase().getArtifactTypesInUse();
|
||||
|
||||
artifacts.removeAll(doNotReport);
|
||||
@@ -207,7 +264,7 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
* component selections.
|
||||
*/
|
||||
private void updateFinishButton() {
|
||||
if (taggedResultsRadioButton.isSelected()) {
|
||||
if (specificTaggedResultsRadioButton.isSelected()) {
|
||||
wizPanel.setFinish(areTagsSelected());
|
||||
} else {
|
||||
wizPanel.setFinish(true);
|
||||
@@ -215,10 +272,16 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the Tags radio button is selected, false otherwise
|
||||
* @return true if the Specific Tags radio button is selected, false
|
||||
* otherwise
|
||||
*/
|
||||
boolean isTaggedResultsRadioButtonSelected() {
|
||||
return taggedResultsRadioButton.isSelected();
|
||||
TableReportSettings.TableReportOption getSelectedReportType() {
|
||||
if (allTaggedResultsRadioButton.isSelected()) {
|
||||
return TableReportSettings.TableReportOption.ALL_TAGGED_RESULTS;
|
||||
} else if (specificTaggedResultsRadioButton.isSelected()) {
|
||||
return TableReportSettings.TableReportOption.SPECIFIC_TAGGED_RESULTS;
|
||||
}
|
||||
return TableReportSettings.TableReportOption.ALL_RESULTS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,7 +294,6 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
tagStates.put(tag, (selected ? Boolean.TRUE : Boolean.FALSE));
|
||||
}
|
||||
tagsList.repaint();
|
||||
wizPanel.setFinish(selected);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,7 +305,7 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
private void initComponents() {
|
||||
|
||||
optionsButtonGroup = new javax.swing.ButtonGroup();
|
||||
taggedResultsRadioButton = new javax.swing.JRadioButton();
|
||||
specificTaggedResultsRadioButton = new javax.swing.JRadioButton();
|
||||
allResultsRadioButton = new javax.swing.JRadioButton();
|
||||
dataLabel = new javax.swing.JLabel();
|
||||
selectAllButton = new javax.swing.JButton();
|
||||
@@ -251,11 +313,12 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
tagsScrollPane = new javax.swing.JScrollPane();
|
||||
tagsList = new javax.swing.JList<>();
|
||||
advancedButton = new javax.swing.JButton();
|
||||
allTaggedResultsRadioButton = new javax.swing.JRadioButton();
|
||||
|
||||
setPreferredSize(new java.awt.Dimension(650, 250));
|
||||
|
||||
optionsButtonGroup.add(taggedResultsRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(taggedResultsRadioButton, org.openide.util.NbBundle.getMessage(ReportVisualPanel2.class, "ReportVisualPanel2.taggedResultsRadioButton.text")); // NOI18N
|
||||
optionsButtonGroup.add(specificTaggedResultsRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(specificTaggedResultsRadioButton, org.openide.util.NbBundle.getMessage(ReportVisualPanel2.class, "ReportVisualPanel2.specificTaggedResultsRadioButton.text")); // NOI18N
|
||||
|
||||
optionsButtonGroup.add(allResultsRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(allResultsRadioButton, org.openide.util.NbBundle.getMessage(ReportVisualPanel2.class, "ReportVisualPanel2.allResultsRadioButton.text")); // NOI18N
|
||||
@@ -292,6 +355,14 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
optionsButtonGroup.add(allTaggedResultsRadioButton);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(allTaggedResultsRadioButton, org.openide.util.NbBundle.getMessage(ReportVisualPanel2.class, "ReportVisualPanel2.allTaggedResultsRadioButton.text")); // NOI18N
|
||||
allTaggedResultsRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
allTaggedResultsRadioButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@@ -300,19 +371,20 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(21, 21, 21)
|
||||
.addGap(27, 27, 27)
|
||||
.addComponent(tagsScrollPane)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(advancedButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(deselectAllButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(selectAllButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(taggedResultsRadioButton)
|
||||
.addComponent(allTaggedResultsRadioButton)
|
||||
.addComponent(dataLabel)
|
||||
.addComponent(allResultsRadioButton))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addComponent(allResultsRadioButton)
|
||||
.addComponent(specificTaggedResultsRadioButton))
|
||||
.addGap(0, 402, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
@@ -325,28 +397,31 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
.addComponent(dataLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(allResultsRadioButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(taggedResultsRadioButton)
|
||||
.addGap(7, 7, 7)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(allTaggedResultsRadioButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(specificTaggedResultsRadioButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(selectAllButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(deselectAllButton)
|
||||
.addGap(0, 70, Short.MAX_VALUE))
|
||||
.addComponent(tagsScrollPane))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(advancedButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(advancedButton))
|
||||
.addComponent(tagsScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void selectAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectAllButtonActionPerformed
|
||||
setAllTaggedResultsSelected(true);
|
||||
wizPanel.setFinish(true);
|
||||
}//GEN-LAST:event_selectAllButtonActionPerformed
|
||||
|
||||
private void deselectAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deselectAllButtonActionPerformed
|
||||
setAllTaggedResultsSelected(false);
|
||||
wizPanel.setFinish(false);
|
||||
}//GEN-LAST:event_deselectAllButtonActionPerformed
|
||||
|
||||
private void advancedButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_advancedButtonActionPerformed
|
||||
@@ -357,14 +432,19 @@ final class ReportVisualPanel2 extends JPanel {
|
||||
setAllTaggedResultsSelected(false);
|
||||
}//GEN-LAST:event_allResultsRadioButtonActionPerformed
|
||||
|
||||
private void allTaggedResultsRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allTaggedResultsRadioButtonActionPerformed
|
||||
setAllTaggedResultsSelected(true);
|
||||
}//GEN-LAST:event_allTaggedResultsRadioButtonActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton advancedButton;
|
||||
private javax.swing.JRadioButton allResultsRadioButton;
|
||||
private javax.swing.JRadioButton allTaggedResultsRadioButton;
|
||||
private javax.swing.JLabel dataLabel;
|
||||
private javax.swing.JButton deselectAllButton;
|
||||
private javax.swing.ButtonGroup optionsButtonGroup;
|
||||
private javax.swing.JButton selectAllButton;
|
||||
private javax.swing.JRadioButton taggedResultsRadioButton;
|
||||
private javax.swing.JRadioButton specificTaggedResultsRadioButton;
|
||||
private javax.swing.JList<String> tagsList;
|
||||
private javax.swing.JScrollPane tagsScrollPane;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
@@ -0,0 +1,221 @@
|
||||
/*
|
||||
*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013-2018 Basis Technology Corp.
|
||||
*
|
||||
* Copyright 2012 42six Solutions.
|
||||
* Contact: aebadirad <at> 42six <dot> com
|
||||
* Project Contact/Architect: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule;
|
||||
import java.awt.Component;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.openide.DialogDisplayer;
|
||||
import org.openide.NotifyDescriptor;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.awt.ActionID;
|
||||
import org.openide.awt.ActionReference;
|
||||
import org.openide.awt.ActionReferences;
|
||||
import org.openide.awt.ActionRegistration;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.openide.util.actions.Presenter;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
@ActionID(category = "Tools", id = "org.sleuthkit.autopsy.report.infrastructure.ReportWizardAction")
|
||||
@ActionRegistration(displayName = "#CTL_ReportWizardAction", lazy = false)
|
||||
@ActionReferences(value = {
|
||||
@ActionReference(path = "Menu/Tools", position = 301, separatorAfter = 399)
|
||||
,
|
||||
@ActionReference(path = "Toolbars/Case", position = 105)})
|
||||
public final class ReportWizardAction extends CallableSystemAction implements Presenter.Toolbar, ActionListener {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportWizardAction.class.getName());
|
||||
private static final String REPORTING_CONFIGURATION_NAME = "ReportAction";
|
||||
private static final boolean DISPLAY_CASE_SPECIFIC_DATA = true;
|
||||
private static final boolean RUN_REPORTS = true;
|
||||
private final JButton toolbarButton = new JButton();
|
||||
private static final String ACTION_NAME = NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.actionName.text");
|
||||
private static ReportGenerationPanel panel;
|
||||
|
||||
/**
|
||||
* When the Generate Report button or menu item is selected, open the
|
||||
* reporting wizard. When the wizard is finished, create a ReportGenerator
|
||||
* with the wizard information, and start all necessary reports.
|
||||
*
|
||||
* @param configName Name of the reporting configuration to use
|
||||
* @param displayCaseSpecificData Flag whether to use case specific data in
|
||||
* UI panels or to use all possible result types
|
||||
* @param runReports Flag whether to produce report(s)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void doReportWizard(String configName, boolean displayCaseSpecificData, boolean runReports) {
|
||||
WizardDescriptor wiz = new WizardDescriptor(new ReportWizardIterator(configName, displayCaseSpecificData));
|
||||
wiz.setTitleFormat(new MessageFormat("{0} {1}"));
|
||||
wiz.setTitle(NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.reportWiz.title"));
|
||||
if (DialogDisplayer.getDefault().notify(wiz) == WizardDescriptor.FINISH_OPTION) {
|
||||
|
||||
// save reporting configuration
|
||||
try {
|
||||
saveReportingConfiguration(configName, wiz);
|
||||
} catch (ReportConfigException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to save reporting configuration " + configName, ex); //NON-NLS
|
||||
NotifyDescriptor descriptor = new NotifyDescriptor.Message(
|
||||
NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.unableToSaveConfig.errorLabel.text"),
|
||||
NotifyDescriptor.ERROR_MESSAGE);
|
||||
DialogDisplayer.getDefault().notify(descriptor);
|
||||
}
|
||||
|
||||
if (runReports) {
|
||||
// generate reports in a separate thread
|
||||
panel = new ReportGenerationPanel();
|
||||
ReportGenerator generator = new ReportGenerator(configName, panel); //NON-NLS
|
||||
ReportWorker worker = new ReportWorker(() -> {
|
||||
generator.generateReports();
|
||||
});
|
||||
worker.execute();
|
||||
generator.displayProgressPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void saveReportingConfiguration(String configName, WizardDescriptor wiz) throws ReportConfigException {
|
||||
|
||||
ReportingConfig reportingConfig = new ReportingConfig(configName);
|
||||
reportingConfig.setFileReportSettings((FileReportSettings) wiz.getProperty("fileReportSettings"));
|
||||
reportingConfig.setTableReportSettings((TableReportSettings) wiz.getProperty("tableReportSettings"));
|
||||
|
||||
Map<String, ReportModuleConfig> moduleConfigs = (Map<String, ReportModuleConfig>) wiz.getProperty("moduleConfigs");
|
||||
|
||||
// update portable case settings
|
||||
ReportModuleConfig config = moduleConfigs.get(PortableCaseReportModule.class.getCanonicalName());
|
||||
PortableCaseReportModuleSettings portableCaseReportSettings = (PortableCaseReportModuleSettings) wiz.getProperty("portableCaseReportSettings");
|
||||
if (portableCaseReportSettings != null) {
|
||||
config.setModuleSettings(portableCaseReportSettings);
|
||||
moduleConfigs.put(PortableCaseReportModule.class.getCanonicalName(), config);
|
||||
}
|
||||
|
||||
// set module configs
|
||||
reportingConfig.setModuleConfigs(moduleConfigs);
|
||||
|
||||
// save reporting configuration
|
||||
ReportingConfigLoader.saveConfig(reportingConfig);
|
||||
}
|
||||
|
||||
public ReportWizardAction() {
|
||||
setEnabled(false);
|
||||
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> {
|
||||
if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) {
|
||||
Case newCase = (Case) evt.getNewValue();
|
||||
setEnabled(newCase != null && RuntimeProperties.runningWithGUI());
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize the Generate Report button
|
||||
toolbarButton.addActionListener(ReportWizardAction.this::actionPerformed);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
doReportWizard(REPORTING_CONFIGURATION_NAME, DISPLAY_CASE_SPECIFIC_DATA, RUN_REPORTS);
|
||||
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performAction() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ACTION_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HelpCtx getHelpCtx() {
|
||||
return HelpCtx.DEFAULT_HELP;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the tool bar component of this action
|
||||
*
|
||||
* @return component the tool bar button
|
||||
*/
|
||||
@Override
|
||||
public Component getToolbarPresenter() {
|
||||
ImageIcon icon = new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/report/images/btn_icon_generate_report.png")); //NON-NLS
|
||||
toolbarButton.setIcon(icon);
|
||||
toolbarButton.setText(NbBundle.getMessage(this.getClass(), "ReportWizardAction.toolBarButton.text"));
|
||||
return toolbarButton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this action to be enabled/disabled
|
||||
*
|
||||
* @param value whether to enable this action or not
|
||||
*/
|
||||
@Override
|
||||
public void setEnabled(boolean value) {
|
||||
super.setEnabled(value);
|
||||
toolbarButton.setEnabled(value);
|
||||
}
|
||||
|
||||
private static class ReportWorker extends SwingWorker<Void, Void> {
|
||||
|
||||
private final Runnable doInBackground;
|
||||
|
||||
private ReportWorker(Runnable doInBackground) {
|
||||
this.doInBackground = doInBackground;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Void doInBackground() throws Exception {
|
||||
doInBackground.run();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
get();
|
||||
} catch (InterruptedException | ExecutionException ex) {
|
||||
panel.getProgressPanel().updateStatusLabel(NbBundle.getMessage(this.getClass(), "ReportGenerator.errors.reportErrorText") + ex.getLocalizedMessage());
|
||||
logger.log(Level.SEVERE, "failed to generate reports", ex); //NON-NLS
|
||||
} // catch and ignore if we were cancelled
|
||||
catch (java.util.concurrent.CancellationException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.infrastructure.FileReportSettings;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.JButton;
|
||||
@@ -35,9 +36,11 @@ class ReportWizardFileOptionsPanel implements WizardDescriptor.FinishablePanel<W
|
||||
|
||||
private WizardDescriptor wiz;
|
||||
private ReportWizardFileOptionsVisualPanel component;
|
||||
private JButton finishButton;
|
||||
private final JButton finishButton;
|
||||
private final FileReportSettings settings;
|
||||
|
||||
ReportWizardFileOptionsPanel() {
|
||||
ReportWizardFileOptionsPanel(FileReportSettings settings) {
|
||||
this.settings = settings;
|
||||
finishButton = new JButton(
|
||||
NbBundle.getMessage(this.getClass(), "ReportWizardFileOptionsPanel.finishButton.text"));
|
||||
finishButton.setEnabled(false);
|
||||
@@ -65,7 +68,7 @@ class ReportWizardFileOptionsPanel implements WizardDescriptor.FinishablePanel<W
|
||||
@Override
|
||||
public ReportWizardFileOptionsVisualPanel getComponent() {
|
||||
if (component == null) {
|
||||
component = new ReportWizardFileOptionsVisualPanel(this);
|
||||
component = new ReportWizardFileOptionsVisualPanel(this, settings);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
@@ -83,7 +86,7 @@ class ReportWizardFileOptionsPanel implements WizardDescriptor.FinishablePanel<W
|
||||
|
||||
@Override
|
||||
public void storeSettings(WizardDescriptor data) {
|
||||
data.putProperty("fileReportOptions", getComponent().getFileReportOptions()); //NON-NLS
|
||||
wiz.putProperty("fileReportSettings", new FileReportSettings(getComponent().getFileReportOptions()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,7 +77,7 @@
|
||||
<Component class="javax.swing.JButton" name="selectAllButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardFileOptionsVisualPanel.selectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportWizardFileOptionsVisualPanel.selectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -87,7 +87,7 @@
|
||||
<Component class="javax.swing.JButton" name="deselectAllButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardFileOptionsVisualPanel.deselectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportWizardFileOptionsVisualPanel.deselectAllButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -97,7 +97,7 @@
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardFileOptionsVisualPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportWizardFileOptionsVisualPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -16,15 +16,17 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JList;
|
||||
@@ -39,15 +41,15 @@ import org.openide.util.NbBundle;
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
class ReportWizardFileOptionsVisualPanel extends javax.swing.JPanel {
|
||||
|
||||
private List<FileReportDataTypes> options;
|
||||
private List<FileReportDataTypes> options = new ArrayList<>();
|
||||
private final Map<FileReportDataTypes, Boolean> optionStates = new EnumMap<>(FileReportDataTypes.class);
|
||||
private ListModel<FileReportDataTypes> model;
|
||||
private final ReportWizardFileOptionsPanel wizPanel;
|
||||
|
||||
public ReportWizardFileOptionsVisualPanel(ReportWizardFileOptionsPanel wizPanel) {
|
||||
public ReportWizardFileOptionsVisualPanel(ReportWizardFileOptionsPanel wizPanel, FileReportSettings settings) {
|
||||
this.wizPanel = wizPanel;
|
||||
initComponents();
|
||||
initOptionsList();
|
||||
initOptionsList(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,10 +60,19 @@ class ReportWizardFileOptionsVisualPanel extends javax.swing.JPanel {
|
||||
/**
|
||||
* Populate the list of File Report Information that can be selected.
|
||||
*/
|
||||
private void initOptionsList() {
|
||||
options = Arrays.asList(FileReportDataTypes.values());
|
||||
for (FileReportDataTypes col : options) {
|
||||
optionStates.put(col, Boolean.FALSE);
|
||||
private void initOptionsList(FileReportSettings settings) {
|
||||
if (settings != null && settings.getFileProperties() != null && !settings.getFileProperties().isEmpty()) {
|
||||
// load the configuration
|
||||
for (Entry<FileReportDataTypes, Boolean> entry : settings.getFileProperties().entrySet()) {
|
||||
optionStates.put(entry.getKey(), entry.getValue());
|
||||
options.add(entry.getKey());
|
||||
}
|
||||
} else {
|
||||
// load defaults
|
||||
options = Arrays.asList(FileReportDataTypes.values());
|
||||
for (FileReportDataTypes entry : options) {
|
||||
optionStates.put(entry, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
model = new OptionsListModel();
|
||||
@@ -16,19 +16,22 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.util.NbPreferences;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
final class ReportWizardIterator implements WizardDescriptor.Iterator<WizardDescriptor> {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportWizardIterator.class.getName());
|
||||
private int index;
|
||||
|
||||
private final ReportWizardPanel1 firstPanel;
|
||||
@@ -55,11 +58,26 @@ final class ReportWizardIterator implements WizardDescriptor.Iterator<WizardDesc
|
||||
private final WizardDescriptor.Panel<WizardDescriptor>[] portableCaseConfigPanels;
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
ReportWizardIterator() {
|
||||
firstPanel = new ReportWizardPanel1();
|
||||
tableConfigPanel = new ReportWizardPanel2();
|
||||
fileConfigPanel = new ReportWizardFileOptionsPanel();
|
||||
portableCaseConfigPanel = new ReportWizardPortableCaseOptionsPanel();
|
||||
ReportWizardIterator(String reportingConfigurationName, boolean useCaseSpecificData) {
|
||||
|
||||
ReportingConfig config = null;
|
||||
try {
|
||||
config = ReportingConfigLoader.loadConfig(reportingConfigurationName);
|
||||
} catch (ReportConfigException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to load reporting configuration " + reportingConfigurationName + ". Using default settings", ex);
|
||||
}
|
||||
|
||||
if (config != null) {
|
||||
firstPanel = new ReportWizardPanel1(config.getModuleConfigs());
|
||||
tableConfigPanel = new ReportWizardPanel2(useCaseSpecificData, config.getTableReportSettings());
|
||||
fileConfigPanel = new ReportWizardFileOptionsPanel(config.getFileReportSettings());
|
||||
portableCaseConfigPanel = new ReportWizardPortableCaseOptionsPanel(config.getModuleConfigs(), useCaseSpecificData);
|
||||
} else {
|
||||
firstPanel = new ReportWizardPanel1(null);
|
||||
tableConfigPanel = new ReportWizardPanel2(useCaseSpecificData, null);
|
||||
fileConfigPanel = new ReportWizardFileOptionsPanel(null);
|
||||
portableCaseConfigPanel = new ReportWizardPortableCaseOptionsPanel(null, useCaseSpecificData);
|
||||
}
|
||||
|
||||
allConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel, fileConfigPanel, portableCaseConfigPanel};
|
||||
tableConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel};
|
||||
@@ -16,11 +16,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.prefs.Preferences;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.event.ChangeListener;
|
||||
@@ -33,10 +33,12 @@ class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<WizardDescr
|
||||
|
||||
private WizardDescriptor wiz;
|
||||
private ReportVisualPanel1 component;
|
||||
private JButton nextButton;
|
||||
private JButton finishButton;
|
||||
private final Map<String, ReportModuleConfig> moduleConfigs;
|
||||
private final JButton nextButton;
|
||||
private final JButton finishButton;
|
||||
|
||||
ReportWizardPanel1() {
|
||||
ReportWizardPanel1(Map<String, ReportModuleConfig> moduleConfigs) {
|
||||
this.moduleConfigs = moduleConfigs;
|
||||
nextButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel1.nextButton.text"));
|
||||
finishButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel1.finishButton.text"));
|
||||
finishButton.setEnabled(false);
|
||||
@@ -60,7 +62,7 @@ class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<WizardDescr
|
||||
@Override
|
||||
public ReportVisualPanel1 getComponent() {
|
||||
if (component == null) {
|
||||
component = new ReportVisualPanel1(this);
|
||||
component = new ReportVisualPanel1(this, moduleConfigs);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
@@ -107,35 +109,13 @@ class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<WizardDescr
|
||||
|
||||
@Override
|
||||
public void storeSettings(WizardDescriptor wiz) {
|
||||
TableReportModule module = getComponent().getTableModule();
|
||||
GeneralReportModule general = getComponent().getGeneralModule();
|
||||
PortableCaseReportModule portable = getComponent().getPortableCaseModule();
|
||||
wiz.putProperty("tableModule", module); //NON-NLS
|
||||
wiz.putProperty("generalModule", general); //NON-NLS
|
||||
wiz.putProperty("fileModule", getComponent().getFileModule()); //NON-NLS
|
||||
wiz.putProperty("portableCaseModule", portable); //NON-NLS
|
||||
wiz.putProperty("moduleConfigs", getComponent().getUpdatedModuleConfigs()); //NON-NLS
|
||||
|
||||
// Store preferences that WizardIterator will use to determine what
|
||||
// panels need to be shown
|
||||
Preferences prefs = NbPreferences.forModule(ReportWizardPanel1.class);
|
||||
prefs.putBoolean("tableModule", module != null); //NON-NLS
|
||||
prefs.putBoolean("generalModule", general != null); //NON-NLS
|
||||
prefs.putBoolean("portableCaseModule", portable != null); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
* Are any of the given booleans true?
|
||||
*
|
||||
* @param bools
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean any(Collection<Boolean> bools) {
|
||||
for (Boolean b : bools) {
|
||||
if (b) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
prefs.putBoolean("tableModule", getComponent().getTableModule() != null); //NON-NLS
|
||||
prefs.putBoolean("generalModule", getComponent().getGeneralModule() != null); //NON-NLS
|
||||
prefs.putBoolean("portableCaseModule", getComponent().getPortableCaseModule() != null); //NON-NLS
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@@ -25,18 +25,20 @@ import javax.swing.event.ChangeListener;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbPreferences;
|
||||
|
||||
class ReportWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
||||
|
||||
private ReportVisualPanel2 component;
|
||||
private JButton finishButton;
|
||||
private JButton nextButton;
|
||||
private final JButton finishButton;
|
||||
private final JButton nextButton;
|
||||
private WizardDescriptor wiz;
|
||||
private final boolean useCaseSpecificData;
|
||||
private final TableReportSettings settings;
|
||||
|
||||
ReportWizardPanel2() {
|
||||
ReportWizardPanel2(boolean useCaseSpecificData, TableReportSettings settings) {
|
||||
this.useCaseSpecificData = useCaseSpecificData;
|
||||
this.settings = settings;
|
||||
finishButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel2.finishButton.text"));
|
||||
|
||||
nextButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel2.nextButton.text"));
|
||||
nextButton.setEnabled(true);
|
||||
|
||||
@@ -58,7 +60,7 @@ class ReportWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
||||
@Override
|
||||
public ReportVisualPanel2 getComponent() {
|
||||
if (component == null) {
|
||||
component = new ReportVisualPanel2(this);
|
||||
component = new ReportVisualPanel2(this, useCaseSpecificData, settings);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
@@ -89,15 +91,12 @@ class ReportWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
||||
@Override
|
||||
public void readSettings(WizardDescriptor wiz) {
|
||||
// Re-enable the normal wizard buttons
|
||||
setFinish(true);
|
||||
this.wiz = wiz;
|
||||
wiz.setOptions(new Object[]{WizardDescriptor.PREVIOUS_OPTION, nextButton, finishButton, WizardDescriptor.CANCEL_OPTION});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeSettings(WizardDescriptor wiz) {
|
||||
wiz.putProperty("tagStates", getComponent().getTagStates()); //NON-NLS
|
||||
wiz.putProperty("artifactStates", getComponent().getArtifactStates()); //NON-NLS
|
||||
wiz.putProperty("isTagsSelected", getComponent().isTaggedResultsRadioButtonSelected()); //NON-NLS
|
||||
wiz.putProperty("tableReportSettings", new TableReportSettings(getComponent().getArtifactStates(), getComponent().getTagStates(), useCaseSpecificData, getComponent().getSelectedReportType()));
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.Map;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import org.openide.WizardDescriptor;
|
||||
@@ -35,8 +36,12 @@ class ReportWizardPortableCaseOptionsPanel implements WizardDescriptor.Finishabl
|
||||
private WizardDescriptor wiz;
|
||||
private ReportWizardPortableCaseOptionsVisualPanel component;
|
||||
private final JButton finishButton;
|
||||
private Map<String, ReportModuleConfig> moduleConfigs;
|
||||
private final boolean useCaseSpecificData;
|
||||
|
||||
ReportWizardPortableCaseOptionsPanel() {
|
||||
ReportWizardPortableCaseOptionsPanel(Map<String, ReportModuleConfig> moduleConfigs, boolean useCaseSpecificData) {
|
||||
this.moduleConfigs = moduleConfigs;
|
||||
this.useCaseSpecificData = useCaseSpecificData;
|
||||
finishButton = new JButton(
|
||||
NbBundle.getMessage(this.getClass(), "ReportWizardFileOptionsPanel.finishButton.text"));
|
||||
finishButton.setEnabled(false);
|
||||
@@ -66,7 +71,7 @@ class ReportWizardPortableCaseOptionsPanel implements WizardDescriptor.Finishabl
|
||||
@Override
|
||||
public ReportWizardPortableCaseOptionsVisualPanel getComponent() {
|
||||
if (component == null) {
|
||||
component = new ReportWizardPortableCaseOptionsVisualPanel(this);
|
||||
component = new ReportWizardPortableCaseOptionsVisualPanel(this, moduleConfigs, useCaseSpecificData);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
@@ -84,7 +89,7 @@ class ReportWizardPortableCaseOptionsPanel implements WizardDescriptor.Finishabl
|
||||
|
||||
@Override
|
||||
public void storeSettings(WizardDescriptor data) {
|
||||
data.putProperty("portableCaseReportOptions", getComponent().getPortableCaseReportOptions()); //NON-NLS
|
||||
data.putProperty("portableCaseReportSettings", getComponent().getPortableCaseReportSettings()); //NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,10 +76,10 @@
|
||||
<Component class="javax.swing.JCheckBox" name="compressCheckbox">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@@ -92,7 +92,7 @@
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/infrastructure/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -16,13 +16,16 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule;
|
||||
import org.sleuthkit.autopsy.report.ReportModuleSettings;
|
||||
import java.awt.GridLayout;
|
||||
import java.util.Map;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.report.PortableCaseReportModule.ChunkSize;
|
||||
import org.sleuthkit.autopsy.report.PortableCaseReportModule.PortableCaseOptions;
|
||||
import org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModuleSettings.ChunkSize;
|
||||
|
||||
/**
|
||||
* The UI portion of the Portable Case config panel
|
||||
@@ -31,36 +34,62 @@ import org.sleuthkit.autopsy.report.PortableCaseReportModule.PortableCaseOptions
|
||||
class ReportWizardPortableCaseOptionsVisualPanel extends javax.swing.JPanel {
|
||||
|
||||
private final ReportWizardPortableCaseOptionsPanel wizPanel;
|
||||
private final PortableCaseOptions options = new PortableCaseOptions();
|
||||
private PortableCaseReportModuleSettings settings = null;
|
||||
private Map<String, ReportModuleConfig> moduleConfigs;
|
||||
private final boolean useCaseSpecificData;
|
||||
|
||||
/**
|
||||
* Creates new form ReportWizardPortableCaseOptionsVisualPanel
|
||||
*/
|
||||
ReportWizardPortableCaseOptionsVisualPanel(ReportWizardPortableCaseOptionsPanel wizPanel) {
|
||||
ReportWizardPortableCaseOptionsVisualPanel(ReportWizardPortableCaseOptionsPanel wizPanel, Map<String, ReportModuleConfig> moduleConfigs, boolean useCaseSpecificData) {
|
||||
this.wizPanel = wizPanel;
|
||||
this.useCaseSpecificData = useCaseSpecificData;
|
||||
this.moduleConfigs = moduleConfigs;
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
|
||||
if ( ! PlatformUtil.isWindowsOS()) {
|
||||
if (!PlatformUtil.isWindowsOS()) {
|
||||
errorLabel.setVisible(true);
|
||||
compressCheckbox.setEnabled(false);
|
||||
} else {
|
||||
errorLabel.setVisible(false);
|
||||
}
|
||||
|
||||
for (ChunkSize chunkSize:ChunkSize.values()) {
|
||||
|
||||
for (ChunkSize chunkSize : ChunkSize.values()) {
|
||||
chunkSizeComboBox.addItem(chunkSize);
|
||||
}
|
||||
chunkSizeComboBox.setSelectedItem(ChunkSize.NONE);
|
||||
chunkSizeComboBox.setEnabled(false);
|
||||
options.updateCompression(false, ChunkSize.NONE);
|
||||
|
||||
// initialize settings
|
||||
if (moduleConfigs != null) {
|
||||
// get configuration for this module
|
||||
ReportModuleConfig config = moduleConfigs.get(PortableCaseReportModule.class.getCanonicalName());
|
||||
if (config != null) {
|
||||
// there is an existing configuration for this module
|
||||
ReportModuleSettings reportSettings = config.getModuleSettings();
|
||||
// check if the settings are for this module, it could be NoReportModuleSettings
|
||||
if (reportSettings instanceof PortableCaseReportModuleSettings) {
|
||||
settings = (PortableCaseReportModuleSettings) reportSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (settings == null) {
|
||||
// get default module configuration
|
||||
settings = new PortableCaseReportModuleSettings();
|
||||
}
|
||||
|
||||
// update according to input configuration
|
||||
compressCheckbox.setSelected(settings.shouldCompress());
|
||||
chunkSizeComboBox.setEnabled(settings.shouldCompress());
|
||||
chunkSizeComboBox.setSelectedItem(settings.getChunkSize());
|
||||
|
||||
// initialize other panels and pass them the settings
|
||||
listPanel.setLayout(new GridLayout(1,2));
|
||||
listPanel.add(new PortableCaseTagsListPanel(wizPanel, options));
|
||||
listPanel.add(new PortableCaseInterestingItemsListPanel(wizPanel, options));
|
||||
listPanel.add(new PortableCaseTagsListPanel(wizPanel, settings, useCaseSpecificData));
|
||||
listPanel.add(new PortableCaseInterestingItemsListPanel(wizPanel, settings, useCaseSpecificData));
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
@@ -84,8 +113,10 @@ class ReportWizardPortableCaseOptionsVisualPanel extends javax.swing.JPanel {
|
||||
* Update the selected compression options and enable/disable the finish button
|
||||
*/
|
||||
private void updateCompression() {
|
||||
options.updateCompression(compressCheckbox.isSelected(), getChunkSize());
|
||||
wizPanel.setFinish(options.isValid());
|
||||
if (settings != null) {
|
||||
settings.updateCompression(compressCheckbox.isSelected(), getChunkSize());
|
||||
wizPanel.setFinish(settings.isValid());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,8 +124,8 @@ class ReportWizardPortableCaseOptionsVisualPanel extends javax.swing.JPanel {
|
||||
*
|
||||
* @return the current settings
|
||||
*/
|
||||
PortableCaseOptions getPortableCaseReportOptions() {
|
||||
return options;
|
||||
PortableCaseReportModuleSettings getPortableCaseReportSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
/**
|
||||
77
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportingConfig.java
Executable file
77
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportingConfig.java
Executable file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A bundling of all the settings objects that define a report configuration.
|
||||
*/
|
||||
final class ReportingConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String configName;
|
||||
private Map<String, ReportModuleConfig> moduleConfigs = new HashMap<>();
|
||||
private TableReportSettings tableReportSettings;
|
||||
private FileReportSettings fileReportSettings;
|
||||
|
||||
/**
|
||||
* Creates ReportingConfig object.
|
||||
*
|
||||
* @param configName Name of the reporting configuration
|
||||
*/
|
||||
ReportingConfig(String configName) {
|
||||
this.configName = configName;
|
||||
}
|
||||
|
||||
void setName(String configName) {
|
||||
this.configName = configName;
|
||||
}
|
||||
|
||||
String getName() {
|
||||
return this.configName;
|
||||
}
|
||||
|
||||
void setModuleConfigs(Map<String, ReportModuleConfig> moduleConfigs) {
|
||||
this.moduleConfigs = moduleConfigs;
|
||||
}
|
||||
|
||||
Map<String, ReportModuleConfig> getModuleConfigs() {
|
||||
return this.moduleConfigs;
|
||||
}
|
||||
|
||||
void setTableReportSettings(TableReportSettings settings) {
|
||||
this.tableReportSettings = settings;
|
||||
}
|
||||
|
||||
TableReportSettings getTableReportSettings() {
|
||||
return this.tableReportSettings;
|
||||
}
|
||||
|
||||
void setFileReportSettings(FileReportSettings settings) {
|
||||
this.fileReportSettings = settings;
|
||||
}
|
||||
|
||||
FileReportSettings getFileReportSettings() {
|
||||
return this.fileReportSettings;
|
||||
}
|
||||
|
||||
}
|
||||
197
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportingConfigLoader.java
Executable file
197
Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportingConfigLoader.java
Executable file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.ReportModuleSettings;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.util.io.NbObjectInputStream;
|
||||
import org.openide.util.io.NbObjectOutputStream;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
|
||||
/**
|
||||
* Utility class responsible for managing serialization and deserialization of
|
||||
* all of the settings that make up a reporting configuration in an atomic,
|
||||
* thread safe way.
|
||||
*/
|
||||
final class ReportingConfigLoader {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportingConfigLoader.class.getName());
|
||||
private static final String REPORT_CONFIG_FOLDER = "ReportingConfigs"; //NON-NLS
|
||||
private static final String REPORT_CONFIG_FOLDER_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), ReportingConfigLoader.REPORT_CONFIG_FOLDER).toAbsolutePath().toString();
|
||||
private static final String REPORT_SETTINGS_FILE_EXTENSION = ".settings";
|
||||
private static final String TABLE_REPORT_CONFIG_FILE = "TableReportSettings.settings";
|
||||
private static final String FILE_REPORT_CONFIG_FILE = "FileReportSettings.settings";
|
||||
private static final String MODULE_CONFIG_FILE = "ModuleConfigs.settings";
|
||||
|
||||
/**
|
||||
* Deserialize all of the settings that make up a reporting configuration in
|
||||
* an atomic, thread safe way.
|
||||
*
|
||||
* @param configName Name of the reporting configuration
|
||||
* @return ReportingConfig object if a persisted configuration exists, null
|
||||
* otherwise
|
||||
* @throws ReportConfigException if an error occurred while reading the
|
||||
* configuration
|
||||
*/
|
||||
static synchronized ReportingConfig loadConfig(String configName) throws ReportConfigException {
|
||||
|
||||
// construct the configuration directory path
|
||||
Path reportDirPath = Paths.get(ReportingConfigLoader.REPORT_CONFIG_FOLDER_PATH, configName);
|
||||
File reportDirectory = reportDirPath.toFile();
|
||||
|
||||
// Return null if a reporting configuration for the given name does not exist.
|
||||
if (!reportDirectory.exists()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!reportDirectory.isDirectory() || !reportDirectory.canRead()) {
|
||||
throw new ReportConfigException("Unable to read reporting configuration directory " + reportDirPath.toString());
|
||||
}
|
||||
|
||||
// read in the configuration
|
||||
ReportingConfig config = new ReportingConfig(configName);
|
||||
|
||||
// read table report settings
|
||||
String filePath = reportDirPath.toString() + File.separator + TABLE_REPORT_CONFIG_FILE;
|
||||
try (NbObjectInputStream in = new NbObjectInputStream(new FileInputStream(filePath))) {
|
||||
config.setTableReportSettings((TableReportSettings) in.readObject());
|
||||
} catch (IOException | ClassNotFoundException ex) {
|
||||
throw new ReportConfigException("Unable to read table report settings " + filePath, ex);
|
||||
}
|
||||
|
||||
// read file report settings
|
||||
filePath = reportDirPath.toString() + File.separator + FILE_REPORT_CONFIG_FILE;
|
||||
try (NbObjectInputStream in = new NbObjectInputStream(new FileInputStream(filePath))) {
|
||||
config.setFileReportSettings((FileReportSettings) in.readObject());
|
||||
} catch (IOException | ClassNotFoundException ex) {
|
||||
throw new ReportConfigException("Unable to read file report settings " + filePath, ex);
|
||||
}
|
||||
|
||||
// read map of module configuration objects
|
||||
Map<String, ReportModuleConfig> moduleConfigs = null;
|
||||
filePath = reportDirPath.toString() + File.separator + MODULE_CONFIG_FILE;
|
||||
try (NbObjectInputStream in = new NbObjectInputStream(new FileInputStream(filePath))) {
|
||||
moduleConfigs = (Map<String, ReportModuleConfig>) in.readObject();
|
||||
} catch (IOException | ClassNotFoundException ex) {
|
||||
throw new ReportConfigException("Unable to read module configurations map " + filePath, ex);
|
||||
}
|
||||
|
||||
if (moduleConfigs == null || moduleConfigs.isEmpty()) {
|
||||
return config;
|
||||
}
|
||||
|
||||
// read each ReportModuleSettings object individually
|
||||
for (Iterator<Entry<String, ReportModuleConfig>> iterator = moduleConfigs.entrySet().iterator(); iterator.hasNext();) {
|
||||
ReportModuleConfig moduleConfig = iterator.next().getValue();
|
||||
filePath = reportDirPath.toString() + File.separator + moduleConfig.getModuleClassName() + REPORT_SETTINGS_FILE_EXTENSION;
|
||||
try (NbObjectInputStream in = new NbObjectInputStream(new FileInputStream(filePath))) {
|
||||
moduleConfig.setModuleSettings((ReportModuleSettings) in.readObject());
|
||||
} catch (IOException | ClassNotFoundException ex) {
|
||||
/* NOTE: we do not want to re-throw the exception because we do not
|
||||
want a single error while reading in a (3rd party) report module
|
||||
to prevent us from reading the entire reporting configuration.*/
|
||||
logger.log(Level.SEVERE, "Unable to read module settings " + filePath, ex);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
config.setModuleConfigs(moduleConfigs);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize all of the settings that make up a reporting configuration in
|
||||
* an atomic, thread safe way.
|
||||
*
|
||||
* @param reportConfig ReportingConfig object to serialize to disk
|
||||
* @throws ReportConfigException if an error occurred while saving the
|
||||
* configuration
|
||||
*/
|
||||
static synchronized void saveConfig(ReportingConfig reportConfig) throws ReportConfigException {
|
||||
|
||||
if (reportConfig == null) {
|
||||
throw new ReportConfigException("Reporting configuration is NULL");
|
||||
}
|
||||
|
||||
// construct the configuration directory path
|
||||
Path pathToConfigDir = Paths.get(ReportingConfigLoader.REPORT_CONFIG_FOLDER_PATH, reportConfig.getName());
|
||||
|
||||
// create configuration directory
|
||||
try {
|
||||
Files.createDirectories(pathToConfigDir); // does not throw if directory already exists
|
||||
} catch (IOException | SecurityException ex) {
|
||||
throw new ReportConfigException("Failed to create reporting configuration directory " + pathToConfigDir.toString(), ex);
|
||||
}
|
||||
|
||||
// save table report settings
|
||||
String filePath = pathToConfigDir.toString() + File.separator + TABLE_REPORT_CONFIG_FILE;
|
||||
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(filePath))) {
|
||||
out.writeObject(reportConfig.getTableReportSettings());
|
||||
} catch (IOException ex) {
|
||||
throw new ReportConfigException("Unable to save table report configuration " + filePath, ex);
|
||||
}
|
||||
|
||||
// save file report settings
|
||||
filePath = pathToConfigDir.toString() + File.separator + FILE_REPORT_CONFIG_FILE;
|
||||
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(filePath))) {
|
||||
out.writeObject(reportConfig.getFileReportSettings());
|
||||
} catch (IOException ex) {
|
||||
throw new ReportConfigException("Unable to save file report configuration " + filePath, ex);
|
||||
}
|
||||
|
||||
// save map of module configuration objects
|
||||
filePath = pathToConfigDir.toString() + File.separator + MODULE_CONFIG_FILE;
|
||||
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(filePath))) {
|
||||
out.writeObject(reportConfig.getModuleConfigs());
|
||||
} catch (IOException ex) {
|
||||
throw new ReportConfigException("Unable to save module configurations map " + filePath, ex);
|
||||
}
|
||||
|
||||
// save each ReportModuleSettings object individually
|
||||
/* NOTE: This is done to protect us from errors in reading/writing 3rd
|
||||
party report module settings. If we were to serialize the entire ReportingConfig
|
||||
object, then a single error while reading in a 3rd party report module
|
||||
would prevent us from reading the entire reporting configuration.*/
|
||||
if (reportConfig.getModuleConfigs() == null) {
|
||||
return;
|
||||
}
|
||||
for (ReportModuleConfig moduleConfig : reportConfig.getModuleConfigs().values()) {
|
||||
ReportModuleSettings settings = moduleConfig.getModuleSettings();
|
||||
filePath = pathToConfigDir.toString() + File.separator + moduleConfig.getModuleClassName() + REPORT_SETTINGS_FILE_EXTENSION;
|
||||
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(filePath))) {
|
||||
out.writeObject(settings);
|
||||
} catch (IOException ex) {
|
||||
throw new ReportConfigException("Unable to save module settings " + filePath, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,8 +16,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.modules.html.HTMLReport;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Multimaps;
|
||||
@@ -45,6 +46,7 @@ import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.ImageUtils;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
import static org.sleuthkit.autopsy.casemodule.services.TagsManager.getNotableTagLabel;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.Account;
|
||||
@@ -61,46 +63,87 @@ import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
class TableReportGenerator {
|
||||
|
||||
private final List<BlackboardArtifact.Type> artifactTypes = new ArrayList<>();
|
||||
private final HashSet<String> tagNamesFilter = new HashSet<>();
|
||||
private List<BlackboardArtifact.Type> artifactTypes = new ArrayList<>();
|
||||
private HashSet<String> tagNamesFilter = new HashSet<>();
|
||||
|
||||
private final Set<Content> images = new HashSet<>();
|
||||
private final ReportProgressPanel progressPanel;
|
||||
private final TableReportModule tableReport;
|
||||
private final TableReportSettings settings;
|
||||
private final Map<Integer, List<Column>> columnHeaderMap;
|
||||
private static final Logger logger = Logger.getLogger(TableReportGenerator.class.getName());
|
||||
|
||||
private final List<String> errorList;
|
||||
|
||||
TableReportGenerator(Map<BlackboardArtifact.Type, Boolean> artifactTypeSelections, Map<String, Boolean> tagNameSelections, ReportProgressPanel progressPanel, TableReportModule tableReport) {
|
||||
TableReportGenerator(TableReportSettings settings, ReportProgressPanel progressPanel, TableReportModule tableReport) {
|
||||
|
||||
this.progressPanel = progressPanel;
|
||||
this.tableReport = tableReport;
|
||||
this.columnHeaderMap = new HashMap<>();
|
||||
errorList = new ArrayList<>();
|
||||
// Get the artifact types selected by the user.
|
||||
for (Map.Entry<BlackboardArtifact.Type, Boolean> entry : artifactTypeSelections.entrySet()) {
|
||||
if (entry.getValue()) {
|
||||
artifactTypes.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
errorList = new ArrayList<>();
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
private void getAllExistingTags() throws NoCurrentCaseException, TskCoreException {
|
||||
List<String> tagNames = new ArrayList<>();
|
||||
|
||||
// Get the tag names selected by the user and make a tag names filter.
|
||||
if (null != tagNameSelections) {
|
||||
for (Map.Entry<String, Boolean> entry : tagNameSelections.entrySet()) {
|
||||
if (entry.getValue() == true) {
|
||||
tagNamesFilter.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
// get all tag names from this case
|
||||
List<TagName> tagNamesInUse = Case.getCurrentCaseThrows().getServices().getTagsManager().getTagNamesInUse();
|
||||
|
||||
String notableString = "";
|
||||
for (TagName tagName : tagNamesInUse) {
|
||||
notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||
tagNames.add(tagName.getDisplayName() + notableString);
|
||||
}
|
||||
tagNamesFilter = new HashSet<>(tagNames);
|
||||
}
|
||||
|
||||
private void getAllExistingArtiactTypes() throws NoCurrentCaseException, TskCoreException {
|
||||
// get all possible artifact types
|
||||
ArrayList<BlackboardArtifact.Type> doNotReport = new ArrayList<>();
|
||||
doNotReport.add(new BlackboardArtifact.Type(BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO.getTypeID(),
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO.getLabel(),
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO.getDisplayName()));
|
||||
doNotReport.add(new BlackboardArtifact.Type(BlackboardArtifact.ARTIFACT_TYPE.TSK_TOOL_OUTPUT.getTypeID(),
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_TOOL_OUTPUT.getLabel(),
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_TOOL_OUTPUT.getDisplayName())); // output is too unstructured for table review
|
||||
|
||||
Case.getCurrentCaseThrows().getSleuthkitCase().getArtifactTypes().forEach(artifactTypes::add);
|
||||
artifactTypes.removeAll(doNotReport);
|
||||
}
|
||||
|
||||
protected void execute() {
|
||||
// Start the progress indicators for each active TableReportModule.
|
||||
|
||||
progressPanel.start();
|
||||
progressPanel.updateStatusLabel(NbBundle.getMessage(this.getClass(), "ReportGenerator.progress.readingTagsArtifacts.text"));
|
||||
|
||||
if (settings.useStoredTagsAndArtifactsLists()) {
|
||||
// Get the artifact types selected by the user.
|
||||
artifactTypes = settings.getArtifactSelections();
|
||||
|
||||
// Get the tag names selected by the user and make a tag names filter.
|
||||
tagNamesFilter = new HashSet<>(settings.getTagSelections());
|
||||
} else {
|
||||
try {
|
||||
// If report type is "all tagged results", then read all possible tab names from database.
|
||||
// Otherwise do not load tag names, i.e. run "all results" report
|
||||
if (settings.getSelectedReportOption() == TableReportSettings.TableReportOption.ALL_TAGGED_RESULTS) {
|
||||
getAllExistingTags();
|
||||
}
|
||||
|
||||
// get all possible artifact types
|
||||
getAllExistingArtiactTypes();
|
||||
} catch (NoCurrentCaseException | TskCoreException ex) {
|
||||
errorList.add(NbBundle.getMessage(this.getClass(), "ReportGenerator.errList.failedGetAllTagsArtifacts"));
|
||||
logger.log(Level.SEVERE, "Failed get all possible tag names and artifact types", ex); //NON-NLS
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Start the progress indicators for each active TableReportModule.
|
||||
progressPanel.setIndeterminate(false);
|
||||
progressPanel.setMaximumProgress(this.artifactTypes.size() + 2); // +2 for content and blackboard artifact tags
|
||||
|
||||
// report on the blackboard results
|
||||
if (progressPanel.getStatus() != ReportProgressPanel.ReportStatus.CANCELED) {
|
||||
makeBlackboardArtifactTables();
|
||||
@@ -177,7 +220,7 @@ class TableReportGenerator {
|
||||
});
|
||||
for (String accountTypeStr : groupedArtifacts.keySet()) {
|
||||
/*
|
||||
* If the report is a ReportHTML, the data type name
|
||||
* If the report is a HTMLReport, the data type name
|
||||
* eventualy makes it to useDataTypeIcon which expects but
|
||||
* does not require a artifact name, so we make a synthetic
|
||||
* compund name by appending a ":" and the account type.
|
||||
@@ -303,8 +346,8 @@ class TableReportGenerator {
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.makeContTagTab.taggedFiles.msg"));
|
||||
comment.append(makeCommaSeparatedList(tagNamesFilter));
|
||||
}
|
||||
if (tableReport instanceof ReportHTML) {
|
||||
ReportHTML htmlReportModule = (ReportHTML) tableReport;
|
||||
if (tableReport instanceof HTMLReport) {
|
||||
HTMLReport htmlReportModule = (HTMLReport) tableReport;
|
||||
htmlReportModule.startDataType(BlackboardArtifact.ARTIFACT_TYPE.TSK_TAG_FILE.getDisplayName(), comment.toString());
|
||||
htmlReportModule.startContentTagsTable(columnHeaders);
|
||||
} else {
|
||||
@@ -341,8 +384,8 @@ class TableReportGenerator {
|
||||
rowData.add(file.getMd5Hash());
|
||||
}
|
||||
// @@@ This casting is a tricky little workaround to allow the HTML report module to slip in a content hyperlink.
|
||||
if (tableReport instanceof ReportHTML) {
|
||||
ReportHTML htmlReportModule = (ReportHTML) tableReport;
|
||||
if (tableReport instanceof HTMLReport) {
|
||||
HTMLReport htmlReportModule = (HTMLReport) tableReport;
|
||||
htmlReportModule.addRowWithTaggedContentHyperlink(rowData, tag);
|
||||
} else {
|
||||
tableReport.addRow(rowData);
|
||||
@@ -432,13 +475,13 @@ class TableReportGenerator {
|
||||
progressPanel.updateStatusLabel(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.progress.createdThumb.text"));
|
||||
|
||||
if (tableReport instanceof ReportHTML) {
|
||||
ReportHTML htmlModule = (ReportHTML) tableReport;
|
||||
if (tableReport instanceof HTMLReport) {
|
||||
HTMLReport htmlModule = (HTMLReport) tableReport;
|
||||
htmlModule.startDataType(
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.thumbnailTable.name"),
|
||||
NbBundle.getMessage(this.getClass(), "ReportGenerator.thumbnailTable.desc"));
|
||||
List<String> emptyHeaders = new ArrayList<>();
|
||||
for (int i = 0; i < ReportHTML.THUMBNAIL_COLUMNS; i++) {
|
||||
for (int i = 0; i < HTMLReport.THUMBNAIL_COLUMNS; i++) {
|
||||
emptyHeaders.add("");
|
||||
}
|
||||
htmlModule.startTable(emptyHeaders);
|
||||
@@ -16,8 +16,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import org.sleuthkit.autopsy.report.ReportModule;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -29,7 +30,7 @@ import java.util.List;
|
||||
* The data sent consists of user-chosen fields such as Blackboard Artifacts and
|
||||
* File/Result Tags.
|
||||
*/
|
||||
interface TableReportModule extends ReportModule {
|
||||
public interface TableReportModule extends ReportModule {
|
||||
|
||||
/**
|
||||
* Start the report. Open any output streams, initialize member variables,
|
||||
102
Core/src/org/sleuthkit/autopsy/report/infrastructure/TableReportSettings.java
Executable file
102
Core/src/org/sleuthkit/autopsy/report/infrastructure/TableReportSettings.java
Executable file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.infrastructure;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
|
||||
/**
|
||||
* Class for persisting the selection of the tag types and artifact types used
|
||||
* by the TableReportGenerator class to drive report generation by
|
||||
* TableReportModules.
|
||||
*/
|
||||
final class TableReportSettings implements Serializable {
|
||||
|
||||
/**
|
||||
* An enumeration of table report options.
|
||||
*/
|
||||
enum TableReportOption {
|
||||
ALL_RESULTS, //NON-NLS
|
||||
ALL_TAGGED_RESULTS, //NON-NLS
|
||||
SPECIFIC_TAGGED_RESULTS; //NON-NLS
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final List<BlackboardArtifact.Type> artifactTypes = new ArrayList<>();
|
||||
private final List<String> tagNames = new ArrayList<>();
|
||||
private final boolean useStoredTagsAndArtifactsLists;
|
||||
private final TableReportOption reportOption;
|
||||
|
||||
/**
|
||||
* Creates TableReportSettings object. This constructor is used when user
|
||||
* selects specific tags and artifacts in UI (which requires a case to be
|
||||
* open).
|
||||
*
|
||||
* @param artifactTypeSelections The enabled/disabled state of the artifact
|
||||
* types to be included in the report. Only enabled entries will be kept.
|
||||
* @param tagNameSelections The enabled/disabled state of the tag names to
|
||||
* be included in the report. Only enabled entries will be kept.
|
||||
* @param useTagsAndArtifactsLists Flag whether to use the input lists of tags
|
||||
* and artifacts (which may be empty) or read tag and artifact lists at report generation time
|
||||
* @param reportOption Selected table report option.
|
||||
*/
|
||||
TableReportSettings(Map<BlackboardArtifact.Type, Boolean> artifactTypeSelections, Map<String, Boolean> tagNameSelections, boolean useTagsAndArtifactsLists, TableReportOption reportOption) {
|
||||
// Get the artifact types selected by the user
|
||||
for (Map.Entry<BlackboardArtifact.Type, Boolean> entry : artifactTypeSelections.entrySet()) {
|
||||
if (entry.getValue()) {
|
||||
artifactTypes.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
// Get the tag names selected by the user
|
||||
|
||||
for (Map.Entry<String, Boolean> entry : tagNameSelections.entrySet()) {
|
||||
if (entry.getValue() == true) {
|
||||
tagNames.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
this.reportOption = reportOption;
|
||||
this.useStoredTagsAndArtifactsLists = useTagsAndArtifactsLists;
|
||||
}
|
||||
|
||||
List<BlackboardArtifact.Type> getArtifactSelections() {
|
||||
return artifactTypes;
|
||||
}
|
||||
|
||||
List<String> getTagSelections() {
|
||||
return tagNames;
|
||||
}
|
||||
|
||||
boolean useStoredTagsAndArtifactsLists() {
|
||||
return useStoredTagsAndArtifactsLists;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get selected report option.
|
||||
*
|
||||
* @return the reportOption
|
||||
*/
|
||||
TableReportOption getSelectedReportOption() {
|
||||
return reportOption;
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.modules.bodyfile;
|
||||
|
||||
import org.sleuthkit.autopsy.report.GeneralReportModule;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
@@ -34,18 +35,19 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus;
|
||||
import org.sleuthkit.datamodel.*;
|
||||
|
||||
/**
|
||||
* ReportBodyFile generates a report in the body file format specified on The
|
||||
* Sleuth Kit wiki as
|
||||
* MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime.
|
||||
* BodyFileReport generates a report in the body file format specified on The
|
||||
Sleuth Kit wiki as
|
||||
MD5|name|inode|mode_as_string|UID|GID|size|atime|mtime|ctime|crtime.
|
||||
*/
|
||||
class ReportBodyFile implements GeneralReportModule {
|
||||
class BodyFileReport implements GeneralReportModule {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportBodyFile.class.getName());
|
||||
private static ReportBodyFile instance = null;
|
||||
private static final Logger logger = Logger.getLogger(BodyFileReport.class.getName());
|
||||
private static BodyFileReport instance = null;
|
||||
|
||||
private Case currentCase;
|
||||
private SleuthkitCase skCase;
|
||||
@@ -53,13 +55,13 @@ class ReportBodyFile implements GeneralReportModule {
|
||||
private String reportPath;
|
||||
|
||||
// Hidden constructor for the report
|
||||
private ReportBodyFile() {
|
||||
private BodyFileReport() {
|
||||
}
|
||||
|
||||
// Get the default implementation of this report
|
||||
public static synchronized ReportBodyFile getDefault() {
|
||||
public static synchronized BodyFileReport getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new ReportBodyFile();
|
||||
instance = new BodyFileReport();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
8
Core/src/org/sleuthkit/autopsy/report/modules/bodyfile/Bundle.properties
Executable file
8
Core/src/org/sleuthkit/autopsy/report/modules/bodyfile/Bundle.properties
Executable file
@@ -0,0 +1,8 @@
|
||||
ReportBodyFile.progress.querying=Querying files...
|
||||
ReportBodyFile.ingestWarning.text=Warning, this report was run before ingest services completed\!
|
||||
ReportBodyFile.progress.loading=Loading files...
|
||||
ReportBodyFile.progress.processing=Now processing {0}...
|
||||
ReportBodyFile.getName.text=TSK Body File
|
||||
ReportBodyFile.getDesc.text=Body file format report with MAC times for every file. This format can be used for a timeline view.
|
||||
ReportBodyFile.getFilePath.text=BodyFile.txt
|
||||
ReportBodyFile.generateReport.srcModuleName.text=TSK Body File
|
||||
@@ -0,0 +1,8 @@
|
||||
ReportBodyFile.progress.querying=Querying files...
|
||||
ReportBodyFile.ingestWarning.text=Warning, this report was run before ingest services completed\!
|
||||
ReportBodyFile.progress.loading=Loading files...
|
||||
ReportBodyFile.progress.processing=Now processing {0}...
|
||||
ReportBodyFile.getName.text=TSK Body File
|
||||
ReportBodyFile.getDesc.text=Body file format report with MAC times for every file. This format can be used for a timeline view.
|
||||
ReportBodyFile.getFilePath.text=BodyFile.txt
|
||||
ReportBodyFile.generateReport.srcModuleName.text=TSK Body File
|
||||
@@ -0,0 +1,8 @@
|
||||
ReportBodyFile.progress.querying=\u30d5\u30a1\u30a4\u30eb\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u2026
|
||||
ReportBodyFile.ingestWarning.text=\u8b66\u544a\u3001\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u30b5\u30fc\u30d3\u30b9\u304c\u5b8c\u4e86\u3059\u308b\u524d\u306b\u30ec\u30dd\u30fc\u30c8\u304c\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\uff01
|
||||
ReportBodyFile.progress.loading=\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u4e2d\u2026
|
||||
ReportBodyFile.progress.processing={0}\u3092\u51e6\u7406\u4e2d\u2026
|
||||
ReportBodyFile.getName.text=TSK\u30dc\u30c7\u30a3\u30d5\u30a1\u30a4\u30eb
|
||||
ReportBodyFile.getDesc.text=\u5404\u30d5\u30a1\u30a4\u30eb\u306eMAC\u30bf\u30a4\u30e0\u3092\u542b\u3080\u3001\u30dc\u30c7\u30a3\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u30ec\u30dd\u30fc\u30c8\u3002\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u30d3\u30e5\u30fc\u306b\u3053\u306e\u5f62\u5f0f\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002
|
||||
ReportBodyFile.getFilePath.text=BodyFile.txt
|
||||
ReportBodyFile.generateReport.srcModuleName.text=TSK\u30dc\u30c7\u30a3\u30d5\u30a1\u30a4\u30eb
|
||||
@@ -1,7 +1,7 @@
|
||||
CaseUcoFormatExporter.datasourceMsg=Generating CASE-UCO Report for %s
|
||||
CaseUcoFormatExporter.finishMsg=Finished generating CASE-UCO Report
|
||||
CaseUcoFormatExporter.startMsg=Generating CASE-UCO Report
|
||||
OpenIDE-Module-Name=CaseUcoModule
|
||||
ReportCaseUco.datasourceMsg=Generating CASE-UCO Report for %s
|
||||
ReportCaseUco.getName.text=CASE-UCO
|
||||
ReportCaseUco.getDesc.text=CASE-UCO format report with basic property fields for every file.
|
||||
ReportCaseUco.ingestWarning=Warning, this report will be created before ingest services completed
|
||||
@@ -9,7 +9,6 @@ ReportCaseUco.initializing=Creating directories...
|
||||
ReportCaseUco.noCaseOpen=Unable to open currect case
|
||||
ReportCaseUco.noDataSourceSelected=No data source selected for CASE-UCO report
|
||||
ReportCaseUco.notInitialized=CASE-UCO settings panel has not been initialized
|
||||
ReportCaseUco.processing=Saving files in CASE-UCO format...
|
||||
ReportCaseUco.querying=Querying files...
|
||||
ReportCaseUco.srcModuleName.text=CASE-UCO Report
|
||||
ReportCaseUco.unableToCreateDirectories=Unable to create directory for CASE-UCO report
|
||||
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.caseuco;
|
||||
package org.sleuthkit.autopsy.report.modules.caseuco;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonEncoding;
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
@@ -41,7 +41,6 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
@@ -75,7 +74,6 @@ public final class CaseUcoFormatExporter {
|
||||
/**
|
||||
* Generates CASE-UCO report for the selected data source.
|
||||
*
|
||||
* @param selectedDataSourceId Object ID of the data source
|
||||
* @param reportOutputPath Full path to directory where to save CASE-UCO
|
||||
* report file
|
||||
* @param progressPanel ReportProgressPanel to update progress
|
||||
@@ -86,11 +84,11 @@ public final class CaseUcoFormatExporter {
|
||||
"ReportCaseUco.initializing=Creating directories...",
|
||||
"ReportCaseUco.querying=Querying files...",
|
||||
"ReportCaseUco.ingestWarning=Warning, this report will be created before ingest services completed",
|
||||
"ReportCaseUco.processing=Saving files in CASE-UCO format...",
|
||||
"ReportCaseUco.datasourceMsg=Generating CASE-UCO Report for %s",
|
||||
"ReportCaseUco.srcModuleName.text=CASE-UCO Report"
|
||||
})
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void generateReport(Long selectedDataSourceId, String reportOutputPath, ReportProgressPanel progressPanel) {
|
||||
public static void generateReport(String reportOutputPath, ReportProgressPanel progressPanel) {
|
||||
|
||||
// Start the progress bar and setup the report
|
||||
progressPanel.setIndeterminate(false);
|
||||
@@ -104,14 +102,14 @@ public final class CaseUcoFormatExporter {
|
||||
Files.createDirectories(Paths.get(reportFile.getParent()));
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Unable to create directory for CASE-UCO report", ex); //NON-NLS
|
||||
MessageNotifyUtil.Message.error(Bundle.ReportCaseUco_unableToCreateDirectories());
|
||||
progressPanel.updateStatusLabel(Bundle.ReportCaseUco_unableToCreateDirectories());
|
||||
progressPanel.complete(ReportProgressPanel.ReportStatus.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if ingest has finished
|
||||
if (IngestManager.getInstance().isIngestRunning()) {
|
||||
MessageNotifyUtil.Message.warn(Bundle.ReportCaseUco_ingestWarning());
|
||||
progressPanel.updateStatusLabel(Bundle.ReportCaseUco_ingestWarning());
|
||||
}
|
||||
|
||||
JsonGenerator jsonGenerator = null;
|
||||
@@ -131,40 +129,45 @@ public final class CaseUcoFormatExporter {
|
||||
// create CASE-UCO entry for the Autopsy case
|
||||
String caseTraceId = saveCaseInfo(skCase, jsonGenerator);
|
||||
|
||||
// create CASE-UCO data source entry
|
||||
String dataSourceTraceId = saveDataSourceInfo(selectedDataSourceId, caseTraceId, skCase, jsonGenerator);
|
||||
// loop over all data sources in the case
|
||||
for (DataSource ds : skCase.getDataSources()) {
|
||||
progressPanel.updateStatusLabel(String.format(
|
||||
Bundle.ReportCaseUco_datasourceMsg(), ds.getName()));
|
||||
|
||||
// create CASE-UCO data source entry
|
||||
long selectedDataSourceId = ds.getId();
|
||||
String dataSourceTraceId = saveDataSourceInfo(selectedDataSourceId, caseTraceId, skCase, jsonGenerator);
|
||||
|
||||
// Run getAllFilesQuery to get all files, exclude directories
|
||||
final String getAllFilesQuery = "select obj_id, name, size, crtime, atime, mtime, md5, parent_path, mime_type, extension from tsk_files where "
|
||||
+ "data_source_obj_id = " + Long.toString(selectedDataSourceId)
|
||||
+ " AND ((meta_type = " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF.getValue()
|
||||
+ ") OR (meta_type = " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getValue()
|
||||
+ ") OR (meta_type = " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_VIRT.getValue() + "))"; //NON-NLS
|
||||
// Run getAllFilesQuery to get all files, exclude directories
|
||||
final String getAllFilesQuery = "select obj_id, name, size, crtime, atime, mtime, md5, parent_path, mime_type, extension from tsk_files where "
|
||||
+ "data_source_obj_id = " + Long.toString(selectedDataSourceId)
|
||||
+ " AND ((meta_type = " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF.getValue()
|
||||
+ ") OR (meta_type = " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getValue()
|
||||
+ ") OR (meta_type = " + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_VIRT.getValue() + "))"; //NON-NLS
|
||||
|
||||
try (SleuthkitCase.CaseDbQuery queryResult = skCase.executeQuery(getAllFilesQuery)) {
|
||||
ResultSet resultSet = queryResult.getResultSet();
|
||||
try (SleuthkitCase.CaseDbQuery queryResult = skCase.executeQuery(getAllFilesQuery)) {
|
||||
ResultSet resultSet = queryResult.getResultSet();
|
||||
|
||||
progressPanel.updateStatusLabel(Bundle.ReportCaseUco_processing());
|
||||
// Loop files and write info to CASE-UCO report
|
||||
while (resultSet.next()) {
|
||||
|
||||
// Loop files and write info to CASE-UCO report
|
||||
while (resultSet.next()) {
|
||||
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
|
||||
break;
|
||||
Long objectId = resultSet.getLong(1);
|
||||
String fileName = resultSet.getString(2);
|
||||
long size = resultSet.getLong("size");
|
||||
String crtime = ContentUtils.getStringTimeISO8601(resultSet.getLong("crtime"), timeZone);
|
||||
String atime = ContentUtils.getStringTimeISO8601(resultSet.getLong("atime"), timeZone);
|
||||
String mtime = ContentUtils.getStringTimeISO8601(resultSet.getLong("mtime"), timeZone);
|
||||
String md5Hash = resultSet.getString("md5");
|
||||
String parent_path = resultSet.getString("parent_path");
|
||||
String mime_type = resultSet.getString("mime_type");
|
||||
String extension = resultSet.getString("extension");
|
||||
|
||||
saveFileInCaseUcoFormat(objectId, fileName, parent_path, md5Hash, mime_type, size, crtime, atime, mtime, extension, jsonGenerator, dataSourceTraceId);
|
||||
}
|
||||
|
||||
Long objectId = resultSet.getLong(1);
|
||||
String fileName = resultSet.getString(2);
|
||||
long size = resultSet.getLong("size");
|
||||
String crtime = ContentUtils.getStringTimeISO8601(resultSet.getLong("crtime"), timeZone);
|
||||
String atime = ContentUtils.getStringTimeISO8601(resultSet.getLong("atime"), timeZone);
|
||||
String mtime = ContentUtils.getStringTimeISO8601(resultSet.getLong("mtime"), timeZone);
|
||||
String md5Hash = resultSet.getString("md5");
|
||||
String parent_path = resultSet.getString("parent_path");
|
||||
String mime_type = resultSet.getString("mime_type");
|
||||
String extension = resultSet.getString("extension");
|
||||
|
||||
saveFileInCaseUcoFormat(objectId, fileName, parent_path, md5Hash, mime_type, size, crtime, atime, mtime, extension, jsonGenerator, dataSourceTraceId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,22 +201,21 @@ public final class CaseUcoFormatExporter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Exports files that are tagged w/ the following TagNames and that belong to
|
||||
* Exports files that are tagged with the following TagNames and that belong to
|
||||
* the following interesting file sets (set name attributes of TSK_INTERSTING_FILE_HIT
|
||||
* and TSK_INTERESTING_ARTIFACT_HIT). Artifacts that are tagged with
|
||||
* the following TagNames also have their associated source files included.
|
||||
*
|
||||
* Duplicate files are excluded.
|
||||
*
|
||||
*
|
||||
* @param tagTypes Collection of TagNames to match
|
||||
* @param interestingItemSets Collection of SET_NAMEs to match on in TSK_INTERESTING_FILE_HITs
|
||||
* and TSK_INTERESTING_ARTIFACT_HITs.
|
||||
* @param outputFilePath Path to the folder that the CASE-UCO report should be written into
|
||||
* @param caseReportFolder Path to the folder that the CASE-UCO report should be written into
|
||||
* @param progressPanel UI Component to be updated with current processing status
|
||||
*/
|
||||
@NbBundle.Messages({
|
||||
"CaseUcoFormatExporter.startMsg=Generating CASE-UCO Report",
|
||||
"CaseUcoFormatExporter.datasourceMsg=Generating CASE-UCO Report for %s",
|
||||
"CaseUcoFormatExporter.finishMsg=Finished generating CASE-UCO Report"
|
||||
})
|
||||
public static void export(List<TagName> tagTypes, List<String> interestingItemSets,
|
||||
@@ -233,21 +235,21 @@ public final class CaseUcoFormatExporter {
|
||||
Files.createDirectory(tmpDir);
|
||||
|
||||
//Create our report file
|
||||
Path reportFile = Paths.get(caseReportFolder.toString(),
|
||||
ReportCaseUco.getReportFileName());
|
||||
Path reportFile = Paths.get(caseReportFolder.toString(),
|
||||
CaseUcoReport.getReportFileName());
|
||||
|
||||
//Timezone for formatting file creation, modification, and accessed times
|
||||
SimpleTimeZone timeZone = new SimpleTimeZone(0, "GMT");
|
||||
|
||||
try (JsonGenerator jsonGenerator = createJsonGenerator(reportFile.toFile())) {
|
||||
try (JsonGenerator jsonGenerator = createJsonGenerator(reportFile.toFile())) {
|
||||
initializeJsonOutputFile(jsonGenerator);
|
||||
//Make the case the first entity in the report file.
|
||||
String caseTraceId = saveCaseInfo(skCase, jsonGenerator);
|
||||
|
||||
for (DataSource ds : skCase.getDataSources()) {
|
||||
progressPanel.updateStatusLabel(String.format(
|
||||
Bundle.CaseUcoFormatExporter_datasourceMsg(), ds.getName()));
|
||||
String dataSourceTraceId = saveDataSourceInfo(ds.getId(),
|
||||
Bundle.ReportCaseUco_datasourceMsg(), ds.getName()));
|
||||
String dataSourceTraceId = saveDataSourceInfo(ds.getId(),
|
||||
caseTraceId, skCase, jsonGenerator);
|
||||
for (TagName tn : tagTypes) {
|
||||
for (ContentTag ct : tagsManager.getContentTagsByTagName(tn, ds.getId())) {
|
||||
@@ -259,12 +261,12 @@ public final class CaseUcoFormatExporter {
|
||||
jsonGenerator, timeZone, dataSourceTraceId);
|
||||
}
|
||||
}
|
||||
if(!interestingItemSets.isEmpty()) {
|
||||
if (!interestingItemSets.isEmpty()) {
|
||||
List<BlackboardArtifact.ARTIFACT_TYPE> typesToQuery = Lists.newArrayList(
|
||||
INTERESTING_FILE_HIT, INTERESTING_ARTIFACT_HIT);
|
||||
for(BlackboardArtifact.ARTIFACT_TYPE artType : typesToQuery) {
|
||||
for(BlackboardArtifact bArt : skCase.getBlackboardArtifacts(artType)) {
|
||||
if(bArt.getDataSource().getId() != ds.getId()) {
|
||||
for (BlackboardArtifact.ARTIFACT_TYPE artType : typesToQuery) {
|
||||
for (BlackboardArtifact bArt : skCase.getBlackboardArtifacts(artType)) {
|
||||
if (bArt.getDataSource().getId() != ds.getId()) {
|
||||
continue;
|
||||
}
|
||||
BlackboardAttribute setAttr = bArt.getAttribute(SET_NAME);
|
||||
@@ -283,9 +285,9 @@ public final class CaseUcoFormatExporter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves only unique abstract files to the report. Uniqueness is
|
||||
* determined by object id. The tmpDir Path is used to stored object
|
||||
* ids that have already been visited.
|
||||
* Saves only unique abstract files to the report. Uniqueness is determined
|
||||
* by object id. The tmpDir Path is used to stored object ids that have
|
||||
* already been visited.
|
||||
*
|
||||
* @param content Abstractfile isntance
|
||||
* @param tmpDir Directory to write object ids
|
||||
@@ -17,49 +17,47 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.caseuco;
|
||||
package org.sleuthkit.autopsy.report.modules.caseuco;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JPanel;
|
||||
import java.sql.SQLException;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.report.GeneralReportModule;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel;
|
||||
import org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus;
|
||||
import org.sleuthkit.datamodel.*;
|
||||
|
||||
/**
|
||||
* ReportCaseUco generates a report in the CASE-UCO format. It saves basic file
|
||||
* CaseUcoReport generates a report in the CASE-UCO format. It saves basic file
|
||||
* info like full caseDirPath, name, MIME type, times, and hash.
|
||||
*/
|
||||
public final class ReportCaseUco implements GeneralReportModule {
|
||||
public final class CaseUcoReport implements GeneralReportModule {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportCaseUco.class.getName());
|
||||
private static ReportCaseUco instance = null;
|
||||
private ReportCaseUcoConfigPanel configPanel;
|
||||
private static final Logger logger = Logger.getLogger(CaseUcoReport.class.getName());
|
||||
private static CaseUcoReport instance = null;
|
||||
|
||||
private static final String REPORT_FILE_NAME = "CASE_UCO_output.json-ld";
|
||||
|
||||
// Hidden constructor for the report
|
||||
private ReportCaseUco() {
|
||||
private CaseUcoReport() {
|
||||
}
|
||||
|
||||
// Get the default implementation of this report
|
||||
public static synchronized ReportCaseUco getDefault() {
|
||||
public static synchronized CaseUcoReport getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new ReportCaseUco();
|
||||
instance = new CaseUcoReport();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
String name = NbBundle.getMessage(this.getClass(), "ReportCaseUco.getName.text");
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getConfigurationPanel() {
|
||||
return null; // No configuration panel
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRelativeFilePath() {
|
||||
@@ -72,18 +70,6 @@ public final class ReportCaseUco implements GeneralReportModule {
|
||||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getConfigurationPanel() {
|
||||
try {
|
||||
configPanel = new ReportCaseUcoConfigPanel();
|
||||
} catch (NoCurrentCaseException | TskCoreException | SQLException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to initialize CASE-UCO settings panel", ex); //NON-NLS
|
||||
MessageNotifyUtil.Message.error(Bundle.ReportCaseUco_notInitialized());
|
||||
configPanel = null;
|
||||
}
|
||||
return configPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns CASE-UCO report file name
|
||||
*
|
||||
@@ -106,23 +92,7 @@ public final class ReportCaseUco implements GeneralReportModule {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void generateReport(String baseReportDir, ReportProgressPanel progressPanel) {
|
||||
|
||||
if (configPanel == null) {
|
||||
logger.log(Level.SEVERE, "CASE-UCO settings panel has not been initialized"); //NON-NLS
|
||||
MessageNotifyUtil.Message.error(Bundle.ReportCaseUco_notInitialized());
|
||||
progressPanel.complete(ReportStatus.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
Long selectedDataSourceId = configPanel.getSelectedDataSourceId();
|
||||
if (selectedDataSourceId == ReportCaseUcoConfigPanel.NO_DATA_SOURCE_SELECTED) {
|
||||
logger.log(Level.SEVERE, "No data source selected for CASE-UCO report"); //NON-NLS
|
||||
MessageNotifyUtil.Message.error(Bundle.ReportCaseUco_noDataSourceSelected());
|
||||
progressPanel.complete(ReportStatus.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
String reportPath = baseReportDir + getRelativeFilePath();
|
||||
CaseUcoFormatExporter.generateReport(selectedDataSourceId, reportPath, progressPanel);
|
||||
CaseUcoFormatExporter.generateReport(reportPath, progressPanel);
|
||||
}
|
||||
}
|
||||
10
Core/src/org/sleuthkit/autopsy/report/modules/excel/Bundle.properties
Executable file
10
Core/src/org/sleuthkit/autopsy/report/modules/excel/Bundle.properties
Executable file
@@ -0,0 +1,10 @@
|
||||
ReportExcel.numAartifacts.text=Number of artifacts:
|
||||
ReportExcel.getName.text=Excel Report
|
||||
ReportExcel.getDesc.text=A report about results and tagged items in Excel (XLS) format.
|
||||
ReportExcel.sheetName.text=Summary
|
||||
ReportExcel.cellVal.summary=Summary
|
||||
ReportExcel.cellVal.caseName=Case Name:
|
||||
ReportExcel.cellVal.caseNum=Case Number:
|
||||
ReportExcel.cellVal.examiner=Examiner:
|
||||
ReportExcel.cellVal.numImages=Number of Images:
|
||||
ReportExcel.endReport.srcModuleName.text=Excel Report
|
||||
19
Core/src/org/sleuthkit/autopsy/report/modules/excel/Bundle.properties-MERGED
Executable file
19
Core/src/org/sleuthkit/autopsy/report/modules/excel/Bundle.properties-MERGED
Executable file
@@ -0,0 +1,19 @@
|
||||
ReportExcel.exceptionMessage.dataTooLarge=Value is too long to fit into an Excel cell.
|
||||
ReportExcel.exceptionMessage.errorText=Error showing data into an Excel cell.
|
||||
ReportExcel.numAartifacts.text=Number of artifacts:
|
||||
ReportExcel.getName.text=Excel Report
|
||||
ReportExcel.getDesc.text=A report about results and tagged items in Excel (XLS) format.
|
||||
ReportExcel.sheetName.text=Summary
|
||||
ReportExcel.cellVal.summary=Summary
|
||||
ReportExcel.cellVal.caseName=Case Name:
|
||||
ReportExcel.cellVal.caseNum=Case Number:
|
||||
ReportExcel.cellVal.examiner=Examiner:
|
||||
ReportExcel.cellVal.numImages=Number of Images:
|
||||
ReportExcel.endReport.srcModuleName.text=Excel Report
|
||||
ReportExcel.writeSummary.caseName=Case Name:
|
||||
ReportExcel.writeSummary.caseNotes=Case Notes:
|
||||
ReportExcel.writeSummary.caseNum=Case Number:
|
||||
ReportExcel.writeSummary.examiner=Examiner:
|
||||
ReportExcel.writeSummary.numImages=Number of Images:
|
||||
ReportExcel.writeSummary.sheetName=Summary
|
||||
ReportExcel.writeSummary.summary=Summary
|
||||
10
Core/src/org/sleuthkit/autopsy/report/modules/excel/Bundle_ja.properties
Executable file
10
Core/src/org/sleuthkit/autopsy/report/modules/excel/Bundle_ja.properties
Executable file
@@ -0,0 +1,10 @@
|
||||
ReportExcel.numAartifacts.text=\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u6570\uff1a
|
||||
ReportExcel.getName.text=\u7d50\u679c - Excel
|
||||
ReportExcel.getDesc.text=\u7d50\u679c\u306b\u95a2\u3059\u308b\u30ec\u30dd\u30fc\u30c8\u3002Excel(XLS)\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u30a2\u30a4\u30c6\u30e0\u306e\u30bf\u30b0\u4ed8\u3051\u304c\u3055\u308c\u3066\u3044\u307e\u3059\u3002
|
||||
ReportExcel.sheetName.text=\u30b5\u30de\u30ea\u30fc
|
||||
ReportExcel.cellVal.summary=\u30b5\u30de\u30ea\u30fc
|
||||
ReportExcel.cellVal.caseName=\u30b1\u30fc\u30b9\u540d\uff1a
|
||||
ReportExcel.cellVal.caseNum=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a
|
||||
ReportExcel.cellVal.examiner=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a
|
||||
ReportExcel.cellVal.numImages=\u30a4\u30e1\u30fc\u30b8\u6570\uff1a
|
||||
ReportExcel.endReport.srcModuleName.text=Excel\u30ec\u30dd\u30fc\u30c8
|
||||
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.modules.excel;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -30,12 +30,13 @@ import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.report.infrastructure.TableReportModule;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
class ReportExcel implements TableReportModule {
|
||||
class ExcelReport implements TableReportModule {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReportExcel.class.getName());
|
||||
private static ReportExcel instance;
|
||||
private static final Logger logger = Logger.getLogger(ExcelReport.class.getName());
|
||||
private static ExcelReport instance;
|
||||
private static final int EXCEL_CELL_MAXIMUM_SIZE = 36767; //Specified at:https://poi.apache.org/apidocs/org/apache/poi/ss/SpreadsheetVersion.html
|
||||
|
||||
private Workbook wb;
|
||||
@@ -48,15 +49,15 @@ class ReportExcel implements TableReportModule {
|
||||
private String reportPath;
|
||||
|
||||
// Get the default instance of this report
|
||||
public static synchronized ReportExcel getDefault() {
|
||||
public static synchronized ExcelReport getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new ReportExcel();
|
||||
instance = new ExcelReport();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
// Hidden constructor
|
||||
private ReportExcel() {
|
||||
private ExcelReport() {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +70,7 @@ class ReportExcel implements TableReportModule {
|
||||
public void startReport(String baseReportDir) {
|
||||
// Set the path and save it for when the report is written to disk.
|
||||
this.reportPath = baseReportDir + getRelativeFilePath();
|
||||
|
||||
|
||||
// Make a workbook.
|
||||
wb = new XSSFWorkbook();
|
||||
|
||||
@@ -137,7 +138,7 @@ class ReportExcel implements TableReportModule {
|
||||
* Start a new worksheet for the given data type. Note: This method is a
|
||||
* temporary workaround to avoid modifying the TableReportModule interface.
|
||||
*
|
||||
* @param name Name of the data type
|
||||
* @param name Name of the data type
|
||||
* @param comment Comment on the data type, may be the empty string
|
||||
*/
|
||||
@Override
|
||||
@@ -245,7 +246,6 @@ class ReportExcel implements TableReportModule {
|
||||
"ReportExcel.exceptionMessage.dataTooLarge=Value is too long to fit into an Excel cell. ",
|
||||
"ReportExcel.exceptionMessage.errorText=Error showing data into an Excel cell."
|
||||
})
|
||||
|
||||
public void addRow(List<String> rowData) {
|
||||
Row row = sheet.createRow(rowIndex);
|
||||
for (int i = 0; i < rowData.size(); ++i) {
|
||||
8
Core/src/org/sleuthkit/autopsy/report/modules/file/Bundle.properties
Executable file
8
Core/src/org/sleuthkit/autopsy/report/modules/file/Bundle.properties
Executable file
@@ -0,0 +1,8 @@
|
||||
# To change this license header, choose License Headers in Project Properties.
|
||||
# To change this template file, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
|
||||
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
|
||||
FileReportText.getName.text=Files - Text
|
||||
FileReportText.getDesc.text=A delimited text file containing information about individual files in the case.
|
||||
@@ -0,0 +1,8 @@
|
||||
# To change this license header, choose License Headers in Project Properties.
|
||||
# To change this template file, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
|
||||
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
|
||||
FileReportText.getName.text=Files - Text
|
||||
FileReportText.getDesc.text=A delimited text file containing information about individual files in the case.
|
||||
2
Core/src/org/sleuthkit/autopsy/report/modules/file/Bundle_ja.properties
Executable file
2
Core/src/org/sleuthkit/autopsy/report/modules/file/Bundle_ja.properties
Executable file
@@ -0,0 +1,2 @@
|
||||
FileReportText.getName.text=\u30d5\u30a1\u30a4\u30eb - \u30c6\u30ad\u30b9\u30c8
|
||||
FileReportText.getDesc.text=\u30b1\u30fc\u30b9\u306e\u500b\u5225\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3092\u6301\u3064\u3001\u30bf\u30d6\u533a\u5207\u308a\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3002
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2019 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report.modules.file;
|
||||
|
||||
import org.sleuthkit.autopsy.report.ReportModuleSettings;
|
||||
|
||||
/**
|
||||
* Settings for the File report module.
|
||||
*/
|
||||
class FileReportModuleSettings implements ReportModuleSettings {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
enum ReportDelimiter {
|
||||
TAB_DELIMITED,
|
||||
COMA_DELIMITED
|
||||
}
|
||||
private final ReportDelimiter delimiter;
|
||||
|
||||
/**
|
||||
* Default File report module settings. Default to tab delimited since it
|
||||
* was previously the only option.
|
||||
*/
|
||||
FileReportModuleSettings() {
|
||||
this.delimiter = ReportDelimiter.TAB_DELIMITED;
|
||||
}
|
||||
|
||||
FileReportModuleSettings(ReportDelimiter type) {
|
||||
this.delimiter = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getVersionNumber() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get delimiter of the report.
|
||||
*
|
||||
* @return Delimiter setting for the report.
|
||||
*/
|
||||
ReportDelimiter getReportDelimiter() {
|
||||
return delimiter;
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.modules.file;
|
||||
|
||||
import org.sleuthkit.autopsy.report.infrastructure.FileReportDataTypes;
|
||||
import org.sleuthkit.autopsy.report.NoReportModuleSettings;
|
||||
import org.sleuthkit.autopsy.report.ReportModuleSettings;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -31,10 +34,10 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JPanel;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.report.infrastructure.FileReportModule;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@@ -60,6 +63,48 @@ class FileReportText implements FileReportModule {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default configuration for this report module.
|
||||
*
|
||||
* @return Object which contains default report module settings.
|
||||
*/
|
||||
@Override
|
||||
public ReportModuleSettings getDefaultConfiguration() {
|
||||
return new FileReportModuleSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current configuration for this report module.
|
||||
*
|
||||
* @return Object which contains current report module settings.
|
||||
*/
|
||||
@Override
|
||||
public ReportModuleSettings getConfiguration() {
|
||||
initializePanel();
|
||||
return configPanel.getConfiguration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set report module configuration.
|
||||
*
|
||||
* @param settings Object which contains report module settings.
|
||||
*/
|
||||
@Override
|
||||
public void setConfiguration(ReportModuleSettings settings) {
|
||||
initializePanel();
|
||||
if (settings == null || settings instanceof NoReportModuleSettings) {
|
||||
configPanel.setConfiguration((FileReportModuleSettings) getDefaultConfiguration());
|
||||
return;
|
||||
}
|
||||
|
||||
if (settings instanceof FileReportModuleSettings) {
|
||||
configPanel.setConfiguration((FileReportModuleSettings) settings);
|
||||
return;
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("Expected settings argument to be an instance of FileReportModuleSettings");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startReport(String baseReportDir) {
|
||||
this.reportPath = baseReportDir + FILE_NAME;
|
||||
@@ -153,9 +198,13 @@ class FileReportText implements FileReportModule {
|
||||
|
||||
@Override
|
||||
public JPanel getConfigurationPanel() {
|
||||
initializePanel();
|
||||
return configPanel;
|
||||
}
|
||||
|
||||
private void initializePanel() {
|
||||
if (configPanel == null) {
|
||||
configPanel = new ReportFileTextConfigurationPanel();
|
||||
}
|
||||
return configPanel;
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportFileTextConfigurationPanel.tabDelimitedButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/modules/file/Bundle.properties" key="ReportFileTextConfigurationPanel.tabDelimitedButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -60,7 +60,7 @@
|
||||
<ComponentRef name="delimiterGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportFileTextConfigurationPanel.commaDelimitedButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/report/modules/file/Bundle.properties" key="ReportFileTextConfigurationPanel.commaDelimitedButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.report;
|
||||
package org.sleuthkit.autopsy.report.modules.file;
|
||||
|
||||
/**
|
||||
* Panel for configuring settings for the file text report
|
||||
@@ -34,6 +34,33 @@ class ReportFileTextConfigurationPanel extends javax.swing.JPanel {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set module configuration
|
||||
*
|
||||
* @param settings File report module settings object
|
||||
*/
|
||||
void setConfiguration(FileReportModuleSettings settings) {
|
||||
if (settings.getReportDelimiter() == FileReportModuleSettings.ReportDelimiter.COMA_DELIMITED) {
|
||||
commaDelimitedButton.setSelected(true);
|
||||
} else {
|
||||
// default to tab since it was previously the only option
|
||||
tabDelimitedButton.setSelected(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current report module settings.
|
||||
*
|
||||
* @return Current report module settings.
|
||||
*/
|
||||
FileReportModuleSettings getConfiguration() {
|
||||
if (commaDelimitedButton.isSelected()) {
|
||||
return new FileReportModuleSettings(FileReportModuleSettings.ReportDelimiter.COMA_DELIMITED);
|
||||
} else {
|
||||
return new FileReportModuleSettings(FileReportModuleSettings.ReportDelimiter.TAB_DELIMITED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the delimiter that was selected on this panel
|
||||
*
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user