Merge branch 'develop' of github.com:sleuthkit/autopsy into 8425-snap

This commit is contained in:
Greg DiCristofaro 2023-06-27 16:49:56 -04:00
commit bc239fe786
1250 changed files with 22682 additions and 3296 deletions

6
.gitattributes vendored
View File

@ -18,4 +18,8 @@ Doxyfile text
/KeywordSearch/solr/bin/autopsy-solr eol=lf
/KeywordSearch/solr/bin/init.d/solr eol=lf
/KeywordSearch/solr/bin/post eol=lf
/KeywordSearch/solr/bin/solr eol=lf
/KeywordSearch/solr/bin/solr eol=lf
# ensure properties files and xml files in the platform don't get changed during the build
/netbeans-plat/15/**/*.properties eol=lf
/netbeans-plat/15/**/*.xml eol=lf

224
.gitignore vendored
View File

@ -1,111 +1,113 @@
/dist/
/build/
/*/build/
*/nbproject/private/*
/nbproject/private/*
/apidiff_output/
/Core/release/
/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties
/Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html
/Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png
/Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv
/Core/build/
/Core/dist/
/Core/nbproject/*
/Core/test/qa-functional/data/*
!/Core/nbproject/project.xml
!/Core/nbproject/project.properties
/CoreLibs/release/
/CoreLibs/build/
/CoreLibs/dist/
/CoreLibs/nbproject/*
!/CoreLibs/nbproject/project.xml
!/CoreLibs/nbproject/project.properties
/CoreTestLibs/release/
/CoreTestLibs/build/
/CoreTestLibs/dist/
/Core/test/qa-functional/data/*
!/Core/test/qa-functional/data/PasswordDetection_img1_v1.img
/KeywordSearch/release/
/KeywordSearch/build/
/KeywordSearch/dist/
/KeywordSearch/nbproject/*
!/KeywordSearch/nbproject/project.xml
!/KeywordSearch/nbproject/project.properties
*/genfiles.properties
genfiles.properties
/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
/branding/build/
/branding/dist/
/branding/nbproject/*
!/branding/nbproject/project.xml
!/branding/nbproject/project.properties
/test/input/*
!/test/input/notablehashes.txt-md5.idx
!/test/input/notablekeywords.xml
!/test/input/NSRL.txt-md5.idx
/test/output/*
!/test/output/gold
/test/script/output_dir_link.txt
/test/output/gold/tmp
/test/script/ScriptLog.txt
/test/script/__pycache__/
/test/script/*.pyc
/test/script/DBDump-Diff.txt
/test/script/DBDump.txt
/test/script/SortedData-Diff.txt
/test/script/SortedData.txt
/test/script/myconfig.xml
/test/script/*/*.xml
/test/build/
/test/dist/
/test/nbproject/*
!/Testing/nbproject/project.xml
!/Testing/nbproject/project.properties
*~
/netbeans-plat
/docs/doxygen-user/user-docs
/docs/doxygen-dev/build-docs
/jdiff-javadocs/*
/jdiff-logs/*
/gen_version.txt
hs_err_pid*.log
.DS_Store
.*.swp
/Experimental/release/
/ImageGallery/release/
/thunderbirdparser/release/
/RecentActivity/release/
/CentralRepository/release/
/Tika/release
.idea/
*.iml
*.img
*.vhd
*.E01
/thirdparty/yara/yarabridge/yarabridge/x64/
/thirdparty/yara/yarabridge/yarabridge.VC.db
/thirdparty/yara/yarabridge/yarabridge.VC.VC.opendb
/thirdparty/yara/yarabridge/x64/
/thirdparty/yara/YaraWrapperTest/nbproject/private/
/thirdparty/yara/YaraWrapperTest/build/
/thirdparty/yara/YaraJNIWrapper/dist/
/thirdparty/yara/YaraJNIWrapper/build/
/thirdparty/yara/YaraJNIWrapper/nbproject/private/
/thirdparty/yara/yarabridge/.vs/
*/path_list.txt
/dist/
/build/
/*/build/
*/nbproject/private/*
/nbproject/private/*
/apidiff_output/
/Core/release/
/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties
/Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html
/Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png
/Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv
/Core/build/
/Core/dist/
/Core/nbproject/*
/Core/test/qa-functional/data/*
!/Core/nbproject/project.xml
!/Core/nbproject/project.properties
/CoreLibs/release/
/CoreLibs/build/
/CoreLibs/dist/
/CoreLibs/nbproject/*
!/CoreLibs/nbproject/project.xml
!/CoreLibs/nbproject/project.properties
/CoreTestLibs/release/
/CoreTestLibs/build/
/CoreTestLibs/dist/
/Core/test/qa-functional/data/*
!/Core/test/qa-functional/data/PasswordDetection_img1_v1.img
/KeywordSearch/release/
/KeywordSearch/build/
/KeywordSearch/dist/
/KeywordSearch/nbproject/*
!/KeywordSearch/nbproject/project.xml
!/KeywordSearch/nbproject/project.properties
*/genfiles.properties
genfiles.properties
/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
/branding/build/
/branding/dist/
/branding/nbproject/*
!/branding/nbproject/project.xml
!/branding/nbproject/project.properties
/test/input/*
!/test/input/notablehashes.txt-md5.idx
!/test/input/notablekeywords.xml
!/test/input/NSRL.txt-md5.idx
/test/output/*
!/test/output/gold
/test/script/output_dir_link.txt
/test/output/gold/tmp
/test/script/ScriptLog.txt
/test/script/__pycache__/
/test/script/*.pyc
/test/script/DBDump-Diff.txt
/test/script/DBDump.txt
/test/script/SortedData-Diff.txt
/test/script/SortedData.txt
/test/script/myconfig.xml
/test/script/*/*.xml
/test/build/
/test/dist/
/test/nbproject/*
!/Testing/nbproject/project.xml
!/Testing/nbproject/project.properties
*~
/netbeans-plat/*
# include netbeans platform 15 because it doesn't seem to download consistently or is being updated
!/netbeans-plat/15
/docs/doxygen-user/user-docs
/docs/doxygen-dev/build-docs
/jdiff-javadocs/*
/jdiff-logs/*
/gen_version.txt
hs_err_pid*.log
.DS_Store
.*.swp
/Experimental/release/
/ImageGallery/release/
/thunderbirdparser/release/
/RecentActivity/release/
/CentralRepository/release/
/Tika/release
.idea/
*.iml
*.img
*.vhd
*.E01
/thirdparty/yara/yarabridge/yarabridge/x64/
/thirdparty/yara/yarabridge/yarabridge.VC.db
/thirdparty/yara/yarabridge/yarabridge.VC.VC.opendb
/thirdparty/yara/yarabridge/x64/
/thirdparty/yara/YaraWrapperTest/nbproject/private/
/thirdparty/yara/YaraWrapperTest/build/
/thirdparty/yara/YaraJNIWrapper/dist/
/thirdparty/yara/YaraJNIWrapper/build/
/thirdparty/yara/YaraJNIWrapper/nbproject/private/
/thirdparty/yara/yarabridge/.vs/
*/path_list.txt

View File

@ -1,5 +1,4 @@
language: java
sudo: required
jobs:
include:
@ -9,63 +8,61 @@ jobs:
osx_image: xcode12.2
env:
global:
- TSK_HOME=$TRAVIS_BUILD_DIR/sleuthkit/sleuthkit
global:
- TSK_HOME=$TRAVIS_BUILD_DIR/sleuthkit/sleuthkit
addons:
apt:
update: true
packages:
- testdisk
- libafflib-dev
- libewf-dev
- libpq-dev
- autopoint
- libsqlite3-dev
- ant
- ant-optional
- libcppunit-dev
- wget
- openjdk-8-jdk
- openjfx=8u161-b12-1ubuntu2
- libopenjfx-java=8u161-b12-1ubuntu2
- libopenjfx-jni=8u161-b12-1ubuntu2
- testdisk
- libafflib-dev
- libewf-dev
- libpq-dev
- autopoint
- libsqlite3-dev
- ant
- ant-optional
- libcppunit-dev
- wget
homebrew:
update: true
packages:
- ant
- wget
- libpq
- libewf
- gettext
- cppunit
- afflib
- testdisk
- ant
- wget
- libpq
- libewf
- gettext
- cppunit
- afflib
- testdisk
python:
- "2.7"
- 2.7
before_install:
- git clone https://github.com/sleuthkit/sleuthkit.git sleuthkit/sleuthkit
- python setupSleuthkitBranch.py
- git clone https://github.com/sleuthkit/sleuthkit.git sleuthkit/sleuthkit
- python setupSleuthkitBranch.py
install:
- pushd sleuthkit/sleuthkit && ./travis_install_libs.sh && popd
- pushd sleuthkit/sleuthkit && ./travis_install_libs.sh && popd
before_script:
- if [ $TRAVIS_OS_NAME = linux ]; then
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java;
sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac;
export PATH=/usr/bin:$PATH;
unset JAVA_HOME;
wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | sudo apt-key add -;
echo "deb [arch=amd64] https://apt.bell-sw.com/ stable main" | sudo tee /etc/apt/sources.list.d/bellsoft.list;
sudo apt-get update;
sudo apt-get install bellsoft-java17-full;
export PATH=/usr/bin:$PATH;
export JAVA_HOME=/usr/lib/jvm/bellsoft-java17-full-amd64;
fi
- if [ $TRAVIS_OS_NAME = osx ]; then
brew uninstall java --force;
brew cask uninstall java --force;
brew tap homebrew/cask-versions;
brew cask install corretto8;
export JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home;
- if [ $TRAVIS_OS_NAME = osx ]; then
brew uninstall java --force --ignore-dependencies;
brew cask uninstall java --force;
brew tap bell-sw/liberica;
brew install --cask liberica-jdk17-full;
export JAVA_HOME=/Library/Java/JavaVirtualMachines/liberica-jdk-17-full.jdk/Contents/Home;
fi
- java -version
script: ./travis_build.sh
script: ./travis_build.sh

View File

@ -11,12 +11,9 @@ correct C libraries.
STEPS:
1) Get Java Setup
1a) Download and install JDK version 1.8. For the current version of JavaFX
that we use, you'll need 1.8.0_66 or greater. You can now use 32-bit or 64-bit,
but special work is needed to get The Sleuth Kit to compile as 64-bit.
1a) Download and install 64-bit JDK version 17 with JavaFX.
Autopsy has been used and tested with the following OpenJDK build
(https://github.com/ojdkbuild/ojdkbuild/releases/tag/java-1.8.0-openjdk-1.8.0.222-1.b10).
Autopsy has been used and tested with liberica java which can be downloaded from here: https://bell-sw.com/pages/downloads/.
1b) Ensure that JDK_HOME is set to the root JDK directory.

View File

@ -134,8 +134,8 @@
<property environment="env"/>
<copy file="${env.TSK_HOME}/bindings/java/dist/sleuthkit-${TSK_VERSION}.jar"
tofile="${ext.dir}/sleuthkit-${TSK_VERSION}.jar"/>
<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.36.0.3.jar"
tofile="${ext.dir}/sqlite-jdbc-3.36.0.3.jar"/>
<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.42.0.0.jar"
tofile="${ext.dir}/sqlite-jdbc-3.42.0.0.jar"/>
<copy file="${env.TSK_HOME}/bindings/java/lib/postgresql-42.3.5.jar"
tofile="${ext.dir}/postgresql-42.3.5.jar"/>
<copy file="${env.TSK_HOME}/bindings/java/lib/c3p0-0.9.5.5.jar"
@ -310,41 +310,19 @@
(i.e. https://stackoverflow.com/questions/219585/including-all-the-jars-in-a-directory-within-the-java-classpath).
This solution involves taking the initial module.run.classpath property and simplifying it to the directories containing jars
(i.e. instead of “/dir/lib1.jar:/dir/lib2.jar:/dir/lib3.jar” it becomes “/dir/*” ).
More information on module.run.classpath can be found in “netbeans-plat\11.3\harness\README” and it appears that
“netbeans-plat\11.3\harness\build.xml:build-init target is in charge of setting the module.run.classpath variable.
More information on module.run.classpath can be found in “netbeans-plat\15\harness\README” and it appears that
“netbeans-plat\15\harness\build.xml:build-init target is in charge of setting the module.run.classpath variable.
More information in Jira: 6970.
-->
<target name="unit-test-path-simplification" depends="projectized-common.test-init">
<property name="unit-test-path-simplification.dir.path" value="${thirdparty.dir}/ClasspathSimplification/target"/>
<property name="unit-test-path-simplification.jar.path" value="${unit-test-path-simplification.dir.path}/ClasspathSimplification-1.0-jar-with-dependencies.jar"/>
<taskdef name="classpathsimplify" classname="org.sleuthkit.autopsy.classpathsimplification.ClasspathSimplification" classpath="${unit-test-path-simplification.jar.path}"/>
<sequential>
<script language="javascript">
<![CDATA[
var moduleRunClasspath = project.getProperty("module.run.classpath");
var directories = [];
// searches for jar file parent directories with path separators of \ or /
var individualPathRegex = /^\s*(.+?[\\\/])[^\\\/]+?\.jar\s*$/i;
// split on ':' but not 'C:\'
var classPathRegex = /((C:\\)?.+?)(:|$)/gi;
var match;
while((match = classPathRegex.exec(moduleRunClasspath)) !== null) {
var thisPath = match[1];
var pathMatch = thisPath.match(individualPathRegex);
// find unique matches
if (pathMatch && directories.indexOf(pathMatch[1]) < 0) {
directories.push(pathMatch[1]);
}
}
// suffix with *
for (var i = 0; i < directories.length; i++) {
directories[i] = directories[i] + "*";
}
// set project property
project.setNewProperty("test.unit.abbreviatedModuleRunClassPath", directories.join(":"));
]]>
</script>
<classpathsimplify classpath="${module.run.classpath}" outputprop="test.unit.abbreviatedModuleRunClassPath" />
<!--grab properties from common.xml:test-init so that "test.unit.run.cp" can be properly formed-->
<property name="build.test.unit.dir" location="${build.dir}/test/unit"/>
<property name="build.test.unit.classes.dir" location="${build.test.unit.dir}/classes"/>

View File

@ -40,6 +40,10 @@
<!-- for handling diffs -->
<dependency conf="core->default" org="io.github.java-diff-utils" name="java-diff-utils" rev="4.11"/>
<!-- JAXB -->
<dependency conf="core->default" org="javax.xml.bind" name="jaxb-api" rev="2.3.1"/>
<dependency conf="core->default" org="org.glassfish.jaxb" name="jaxb-runtime" rev="2.3.3"/>
<dependency conf="core->default" org="org.icepdf.os" name="icepdf-viewer" rev="6.2.2">
<!-- get the new latest batik items below, override bouncy castle -->

View File

@ -1,16 +1,16 @@
cluster.path=\
${nbplatform.active.dir}/platform
disabled.modules=\
org.netbeans.api.visual,\
org.netbeans.core.execution,\
org.netbeans.core.multiview,\
org.netbeans.libs.jsr223,\
org.netbeans.modules.autoupdate.services,\
org.netbeans.modules.autoupdate.ui,\
org.netbeans.modules.core.kit,\
org.netbeans.modules.favorites,\
org.openide.compat,\
org.openide.execution,\
org.openide.options,\
org.openide.util.enumerations
nbplatform.active=default
# cluster.path=\
# ${nbplatform.active.dir}/platform
# disabled.modules=\
# org.netbeans.api.visual,\
# org.netbeans.core.execution,\
# org.netbeans.core.multiview,\
# org.netbeans.libs.jsr223,\
# org.netbeans.modules.autoupdate.services,\
# org.netbeans.modules.autoupdate.ui,\
# org.netbeans.modules.core.kit,\
# org.netbeans.modules.favorites,\
# org.openide.compat,\
# org.openide.execution,\
# org.openide.options,\
# org.openide.util.enumerations
# nbplatform.active=default

View File

@ -1,7 +1,13 @@
file.reference.activemq-all-5.16.4.jar=release/modules/ext/activemq-all-5.16.4.jar
file.reference.audience-annotations-0.12.0.jar=release/modules/ext/audience-annotations-0.12.0.jar
file.reference.batik-awt-util-1.14.jar=release/modules/ext/batik-awt-util-1.14.jar
file.reference.batik-constants-1.14.jar=release/modules/ext/batik-constants-1.14.jar
file.reference.batik-css-1.14.jar=release/modules/ext/batik-css-1.14.jar
file.reference.batik-dom-1.14.jar=release/modules/ext/batik-dom-1.14.jar
file.reference.batik-ext-1.14.jar=release/modules/ext/batik-ext-1.14.jar
file.reference.batik-i18n-1.14.jar=release/modules/ext/batik-i18n-1.14.jar
file.reference.batik-parser-1.14.jar=release/modules/ext/batik-parser-1.14.jar
file.reference.batik-shared-resources-1.14.jar=release/modules/ext/batik-shared-resources-1.14.jar
file.reference.batik-svg-dom-1.14.jar=release/modules/ext/batik-svg-dom-1.14.jar
file.reference.batik-svggen-1.14.jar=release/modules/ext/batik-svggen-1.14.jar
file.reference.batik-util-1.14.jar=release/modules/ext/batik-util-1.14.jar
@ -9,6 +15,7 @@ file.reference.batik-xml-1.14.jar=release/modules/ext/batik-xml-1.14.jar
file.reference.bcpkix-jdk15on-1.70.jar=release/modules/ext/bcpkix-jdk15on-1.70.jar
file.reference.bcprov-ext-jdk15on-1.70.jar=release/modules/ext/bcprov-ext-jdk15on-1.70.jar
file.reference.bcprov-jdk15on-1.70.jar=release/modules/ext/bcprov-jdk15on-1.70.jar
file.reference.bcutil-jdk15on-1.70.jar=release/modules/ext/bcutil-jdk15on-1.70.jar
file.reference.c3p0-0.9.5.5.jar=release/modules/ext/c3p0-0.9.5.5.jar
file.reference.checker-qual-3.12.0.jar=release/modules/ext/checker-qual-3.12.0.jar
file.reference.commons-dbcp2-2.9.0.jar=release/modules/ext/commons-dbcp2-2.9.0.jar
@ -26,13 +33,19 @@ file.reference.failureaccess-1.0.1.jar=release/modules/ext/failureaccess-1.0.1.j
file.reference.guava-31.1-jre.jar=release/modules/ext/guava-31.1-jre.jar
file.reference.icepdf-core-6.2.2.jar=release/modules/ext/icepdf-core-6.2.2.jar
file.reference.icepdf-viewer-6.2.2.jar=release/modules/ext/icepdf-viewer-6.2.2.jar
file.reference.istack-commons-runtime-3.0.11.jar=release/modules/ext/istack-commons-runtime-3.0.11.jar
file.reference.j2objc-annotations-1.3.jar=release/modules/ext/j2objc-annotations-1.3.jar
file.reference.jackcess-4.0.1.jar=release/modules/ext/jackcess-4.0.1.jar
file.reference.jackcess-encrypt-4.0.1.jar=release/modules/ext/jackcess-encrypt-4.0.1.jar
file.reference.jai_core-1.1.3.jar=release/modules/ext/jai_core-1.1.3.jar
file.reference.jai_imageio-1.1.jar=release/modules/ext/jai_imageio-1.1.jar
file.reference.jakarta.activation-1.2.2.jar=release/modules/ext/jakarta.activation-1.2.2.jar
file.reference.jakarta.xml.bind-api-2.3.3.jar=release/modules/ext/jakarta.xml.bind-api-2.3.3.jar
file.reference.java-diff-utils-4.11.jar=release/modules/ext/java-diff-utils-4.11.jar
file.reference.javax.activation-api-1.2.0.jar=release/modules/ext/javax.activation-api-1.2.0.jar
file.reference.javax.ws.rs-api-2.1.1.jar=release/modules/ext/javax.ws.rs-api-2.1.1.jar
file.reference.jaxb-api-2.3.1.jar=release/modules/ext/jaxb-api-2.3.1.jar
file.reference.jaxb-runtime-2.3.3.jar=release/modules/ext/jaxb-runtime-2.3.3.jar
file.reference.jdom-2.0.5.jar=release/modules/ext/jdom-2.0.5.jar
file.reference.jfreechart-1.5.3.jar=release/modules/ext/jfreechart-1.5.3.jar
file.reference.jgraphx-4.2.2.jar=release/modules/ext/jgraphx-4.2.2.jar
@ -62,6 +75,7 @@ file.reference.okhttp-2.7.5.jar=release/modules/ext/okhttp-2.7.5.jar
file.reference.okio-1.6.0.jar=release/modules/ext/okio-1.6.0.jar
file.reference.postgresql-42.3.5.jar=release/modules/ext/postgresql-42.3.5.jar
file.reference.Rejistry-1.1-SNAPSHOT.jar=release/modules/ext/Rejistry-1.1-SNAPSHOT.jar
file.reference.serializer-2.7.2.jar=release/modules/ext/serializer-2.7.2.jar
file.reference.sevenzipjbinding-AllPlatforms.jar=release/modules/ext/sevenzipjbinding-AllPlatforms.jar
file.reference.sevenzipjbinding.jar=release/modules/ext/sevenzipjbinding.jar
file.reference.sleuthkit-4.12.0.jar=release/modules/ext/sleuthkit-4.12.0.jar
@ -69,12 +83,17 @@ file.reference.sleuthkit-caseuco-4.12.0.jar=release/modules/ext/sleuthkit-caseuc
file.reference.snakeyaml-1.30.jar=release/modules/ext/snakeyaml-1.30.jar
file.reference.SparseBitSet-1.1.jar=release/modules/ext/SparseBitSet-1.1.jar
file.reference.spotbugs-annotations-4.6.0.jar=release/modules/ext/spotbugs-annotations-4.6.0.jar
file.reference.sqlite-jdbc-3.36.0.3.jar=release/modules/ext/sqlite-jdbc-3.36.0.3.jar
file.reference.sqlite-jdbc-3.42.0.0.jar=release/modules/ext/sqlite-jdbc-3.42.0.0.jar
file.reference.txw2-2.3.3.jar=release/modules/ext/txw2-2.3.3.jar
file.reference.xalan-2.7.2.jar=release/modules/ext/xalan-2.7.2.jar
file.reference.xml-apis-1.4.01.jar=release/modules/ext/xml-apis-1.4.01.jar
file.reference.xml-apis-ext-1.3.04.jar=release/modules/ext/xml-apis-ext-1.3.04.jar
file.reference.xmlgraphics-commons-2.6.jar=release/modules/ext/xmlgraphics-commons-2.6.jar
file.reference.xmpcore-6.1.11.jar=release/modules/ext/xmpcore-6.1.11.jar
file.reference.YaraJNIWrapper.jar=release/modules/ext/YaraJNIWrapper.jar
file.reference.zookeeper-3.8.0.jar=release/modules/ext/zookeeper-3.8.0.jar
file.reference.zookeeper-jute-3.8.0.jar=release/modules/ext/zookeeper-jute-3.8.0.jar
javac.source=1.8
javac.source=17
javac.compilerargs=-Xlint -Xlint:-serial
license.file=../LICENSE-2.0.txt
nbm.homepage=http://www.sleuthkit.org/

View File

@ -12,7 +12,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.28.1</specification-version>
<specification-version>1.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -20,7 +20,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.46.1</specification-version>
<specification-version>1.64</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -28,7 +28,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.46.1</specification-version>
<specification-version>1.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -36,7 +36,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.6.1</specification-version>
<specification-version>1.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -48,13 +48,31 @@
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.core.multitabs</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.core.windows</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>2</release-version>
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.options.api</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.26.1</specification-version>
<specification-version>1.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -63,7 +81,7 @@
<compile-dependency/>
<run-dependency>
<release-version>2</release-version>
<specification-version>2.25.1</specification-version>
<specification-version>2.53</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -72,7 +90,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.35.1</specification-version>
<specification-version>1.66</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -80,7 +98,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.14.1</specification-version>
<specification-version>1.44</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -88,7 +106,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.20.1</specification-version>
<specification-version>1.51</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -96,7 +114,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.25.1</specification-version>
<specification-version>1.59</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -104,7 +122,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.36.1</specification-version>
<specification-version>1.74</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -112,7 +130,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.26.1</specification-version>
<specification-version>6.56</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -120,7 +138,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.46.1</specification-version>
<specification-version>7.85</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -128,7 +146,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.25.1</specification-version>
<specification-version>7.63</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -136,7 +154,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.45.1</specification-version>
<specification-version>6.79</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -144,23 +162,23 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.62.1</specification-version>
<specification-version>9.29</specification-version>
</run-dependency>
</dependency>
<dependency>
<!-- <dependency>
<code-name-base>org.openide.filesystems.compat8</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.7.1</specification-version>
<specification-version>9.26</specification-version>
</run-dependency>
</dependency>
</dependency> -->
<dependency>
<code-name-base>org.openide.filesystems.nb</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.7.1</specification-version>
<specification-version>9.27</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -168,7 +186,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.63.2</specification-version>
<specification-version>7.87</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -176,7 +194,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.32.1</specification-version>
<specification-version>7.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -184,7 +202,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.28.1</specification-version>
<specification-version>7.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -192,7 +210,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.49.1</specification-version>
<specification-version>6.85</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -200,7 +218,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.25.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -208,7 +226,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.15.1</specification-version>
<specification-version>8.51</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -216,7 +234,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.4.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -224,7 +242,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.55.1</specification-version>
<specification-version>6.94</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -362,10 +380,34 @@
<runtime-relative-path>ext/batik-awt-util-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-awt-util-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-constants-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-constants-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-css-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-css-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-dom-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-dom-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-ext-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-ext-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-i18n-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-i18n-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-parser-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-parser-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-shared-resources-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-shared-resources-1.14.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/batik-svg-dom-1.14.jar</runtime-relative-path>
<binary-origin>release/modules/ext/batik-svg-dom-1.14.jar</binary-origin>
@ -394,6 +436,10 @@
<runtime-relative-path>ext/bcprov-jdk15on-1.70.jar</runtime-relative-path>
<binary-origin>release/modules/ext/bcprov-jdk15on-1.70.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/bcutil-jdk15on-1.70.jar</runtime-relative-path>
<binary-origin>release/modules/ext/bcutil-jdk15on-1.70.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/c3p0-0.9.5.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/c3p0-0.9.5.5.jar</binary-origin>
@ -462,6 +508,10 @@
<runtime-relative-path>ext/icepdf-viewer-6.2.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/icepdf-viewer-6.2.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/istack-commons-runtime-3.0.11.jar</runtime-relative-path>
<binary-origin>release/modules/ext/istack-commons-runtime-3.0.11.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/j2objc-annotations-1.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/j2objc-annotations-1.3.jar</binary-origin>
@ -482,14 +532,34 @@
<runtime-relative-path>ext/jai_imageio-1.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jai_imageio-1.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jakarta.activation-1.2.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jakarta.activation-1.2.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jakarta.xml.bind-api-2.3.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jakarta.xml.bind-api-2.3.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/java-diff-utils-4.11.jar</runtime-relative-path>
<binary-origin>release/modules/ext/java-diff-utils-4.11.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/javax.activation-api-1.2.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/javax.activation-api-1.2.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/javax.ws.rs-api-2.1.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/javax.ws.rs-api-2.1.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jaxb-api-2.3.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jaxb-api-2.3.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jaxb-runtime-2.3.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jaxb-runtime-2.3.3.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>
@ -506,6 +576,10 @@
<runtime-relative-path>ext/jsoup-1.14.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jsoup-1.14.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jsr305-3.0.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jsr305-3.0.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jutf7-1.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jutf7-1.0.0.jar</binary-origin>
@ -602,6 +676,10 @@
<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/serializer-2.7.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/serializer-2.7.2.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>
@ -631,8 +709,28 @@
<binary-origin>release/modules/ext/spotbugs-annotations-4.6.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/sqlite-jdbc-3.36.0.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sqlite-jdbc-3.36.0.3.jar</binary-origin>
<runtime-relative-path>ext/sqlite-jdbc-3.42.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sqlite-jdbc-3.42.0.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/txw2-2.3.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/txw2-2.3.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/xalan-2.7.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/xalan-2.7.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/xml-apis-1.4.01.jar</runtime-relative-path>
<binary-origin>release/modules/ext/xml-apis-1.4.01.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/xml-apis-ext-1.3.04.jar</runtime-relative-path>
<binary-origin>release/modules/ext/xml-apis-ext-1.3.04.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/xmlgraphics-commons-2.6.jar</runtime-relative-path>
<binary-origin>release/modules/ext/xmlgraphics-commons-2.6.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/xmpcore-6.1.11.jar</runtime-relative-path>

View File

@ -47,6 +47,9 @@ class AddLocalFilesTask implements Runnable {
private final List<String> localFilePaths;
private final DataSourceProcessorProgressMonitor progress;
private final DataSourceProcessorCallback callback;
private final boolean createTimestamp;
private final boolean accessTimestamp;
private final boolean modifiedTimestamp;
/**
* Constructs a runnable that adds a set of local/logical files and/or
@ -67,15 +70,22 @@ class AddLocalFilesTask implements Runnable {
* @param localFilePaths A list of localFilePaths of local/logical
* files and/or directories.
* @param host The host for this data source (may be null).
* @param createTime Boolean value to add the time the file was locally created
* @param accessTime Boolean value to add the time the file was last accessed
* @param modifiedTime Boolean value to add the time the file was locally modified
* @param progressMonitor Progress monitor to report progress
* during processing.
* @param callback Callback to call when processing is done.
*/
AddLocalFilesTask(String deviceId, String rootVirtualDirectoryName, List<String> localFilePaths, Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
AddLocalFilesTask(String deviceId, String rootVirtualDirectoryName, List<String> localFilePaths, Host host, boolean createTimestamp,
boolean accessTimestamp, boolean modifiedTimestamp, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
this.deviceId = deviceId;
this.rootVirtualDirectoryName = rootVirtualDirectoryName;
this.localFilePaths = localFilePaths;
this.host = host;
this.createTimestamp = createTimestamp;
this.accessTimestamp = accessTimestamp;
this.modifiedTimestamp = modifiedTimestamp;
this.callback = callback;
this.progress = progressMonitor;
}
@ -92,7 +102,8 @@ class AddLocalFilesTask implements Runnable {
try {
progress.setIndeterminate(true);
FileManager fileManager = Case.getCurrentCaseThrows().getServices().getFileManager();
LocalFilesDataSource newDataSource = fileManager.addLocalFilesDataSource(deviceId, rootVirtualDirectoryName, "", host, localFilePaths, new ProgressUpdater());
LocalFilesDataSource newDataSource = fileManager.addLocalFilesDataSource(deviceId, rootVirtualDirectoryName, "", host, localFilePaths, createTimestamp,
accessTimestamp, modifiedTimestamp, new ProgressUpdater());
newDataSources.add(newDataSource);
} catch (TskDataException | TskCoreException | NoCurrentCaseException ex) {
errors.add(ex.getMessage());

View File

@ -190,7 +190,6 @@ ImageFilePanel.sectorSizeLabel.text=Sector size:
LocalDiskPanel.sectorSizeLabel.text=Sector Size:
LocalFilesPanel.displayNameLabel.text=Logical File Set Display Name: Default
LocalFilesPanel.errorLabel.text=Error Label
LocalFilesPanel.selectedPaths.toolTipText=
LocalFilesPanel.clearButton.toolTipText=Clears currently selected local file paths
LocalFilesPanel.clearButton.text=Clear
LocalFilesPanel.selectButton.actionCommand=Add
@ -263,3 +262,11 @@ AddImageWizardSelectHostVisual.specifyNewHostTextField.text=
AddImageWizardSelectHostVisual.specifyNewHostRadio.text=Specify new host name
AddImageWizardSelectHostVisual.generateNewRadio.text=Generate new host name based on data source name
AddImageWizardSelectHostVisual.validationMessage.text=\
LocalFilesPanel.deleteButon.text=Delete
LocalFilesPanel.createTimeCheckBox.text=Creation Time - Often changed when a file is copied
LocalFilesPanel.modifiedTimeCheckBox.text=\ Modified Time - Often not changed when a file is copied
LocalFilesPanel.jLabel2.text=NOTE: Time stamps may have changed when the files were copied to the current location.
LocalFilesPanel.timestampToIncludeLabel.text=Timestamps To Include:
LocalFilesPanel.accessTimeCheckBox.text=Access Time - Can be changed when the file is opened
LocalFilesPanel.timeStampToIncludeLabel.text=Timestamps To Include:
LocalFilesPanel.timeStampNoteLabel.text=NOTE: Time stamps may have changed when the files were copied to the current location.

View File

@ -247,10 +247,15 @@ AddImageWizardIngestConfigPanel.dsProcDone.errs.text=*Errors encountered in addi
AddImageWizardIngestConfigVisual.getName.text=Configure Ingest
AddImageWizardIterator.stepXofN=Step {0} of {1}
AddLocalFilesTask.localFileAdd.progress.text=Adding: {0}/{1}
Case.getCurCase.exception.noneOpen=Cannot get the current case; there is no case open!
Case.getCurCase.exception.noneOpen=Cannot get the current case; there is no case open\!
Case.open.msgDlg.updated.msg=Updated case database schema.\nA backup copy of the database with the following path has been made:\n {0}
Case.open.msgDlg.updated.title=Case Database Schema Update
Case.checkImgExist.confDlg.doesntExist.msg=One of the images associated with \nthis case are missing. Would you like to search for them now?\nPreviously, the image was located at:\n{0}\nPlease note that you will still be able to browse directories and generate reports\nif you choose No, but you will not be able to view file content or run the ingest process.
Case.checkImgExist.confDlg.doesntExist.msg=One of the images associated with \n\
this case are missing. Would you like to search for them now?\n\
Previously, the image was located at:\n\
{0}\n\
Please note that you will still be able to browse directories and generate reports\n\
if you choose No, but you will not be able to view file content or run the ingest process.
Case.checkImgExist.confDlg.doesntExist.title=Missing Image
Case.addImg.exception.msg=Error adding image to the case
Case.updateCaseName.exception.msg=Error while trying to update the case name.
@ -269,9 +274,12 @@ Case.GetCaseTypeGivenPath.Failure=Unable to get case type
Case.metaDataFileCorrupt.exception.msg=The case metadata file (.aut) is corrupted.
Case.deleteReports.deleteFromDiskException.log.msg=Unable to delete the report from the disk.
Case.deleteReports.deleteFromDiskException.msg=Unable to delete the report {0} from the disk.\nYou may manually delete it from {1}
CaseDeleteAction.closeConfMsg.text=Are you sure want to close and delete this case? \nCase Name: {0}\nCase Directory: {1}
CaseDeleteAction.closeConfMsg.text=Are you sure want to close and delete this case? \n\
Case Name: {0}\n\
Case Directory: {1}
CaseDeleteAction.closeConfMsg.title=Warning: Closing the Current Case
CaseDeleteAction.msgDlg.fileInUse.msg=The delete action cannot be fully completed because the folder or file in it is open by another program.\n\nClose the folder and file and try again or you can delete the case manually.
CaseDeleteAction.msgDlg.fileInUse.msg=The delete action cannot be fully completed because the folder or file in it is open by another program.\n\n\
Close the folder and file and try again or you can delete the case manually.
CaseDeleteAction.msgDlg.fileInUse.title=Error: Folder In Use
CaseDeleteAction.msgDlg.caseDelete.msg=Case {0} has been deleted.
CaseOpenAction.autFilter.title={0} Case File ( {1})
@ -303,7 +311,8 @@ NewCaseWizardAction.databaseProblem1.text=Cannot open database. Cancelling case
NewCaseWizardAction.databaseProblem2.text=Error
NewCaseWizardPanel1.validate.errMsg.invalidSymbols=The Case Name cannot contain any of the following symbols: \\ / : * ? " &lt; > |
NewCaseWizardPanel1.validate.errMsg.dirExists=Case directory ''{0}'' already exists.
NewCaseWizardPanel1.validate.confMsg.createDir.msg=The base directory "{0}" does not exist. \n\nDo you want to create that directory?
NewCaseWizardPanel1.validate.confMsg.createDir.msg=The base directory "{0}" does not exist. \n\n\
Do you want to create that directory?
NewCaseWizardPanel1.validate.confMsg.createDir.title=Create directory
NewCaseWizardPanel1.validate.errMsg.cantCreateParDir.msg=Error: Could not create case parent directory {0}
NewCaseWizardPanel1.validate.errMsg.prevCreateBaseDir.msg=Prevented from creating base directory {0}
@ -360,8 +369,8 @@ UnpackageWorker.doInBackground.previouslySeenCase=Case has been previously opene
UpdateRecentCases.menuItem.clearRecentCases.text=Clear Recent Cases
UpdateRecentCases.menuItem.empty=-Empty-
AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=Cancel
NewCaseVisualPanel1.CaseFolderOnCDriveError.text=Warning: Path to multi-user case folder is on "C:" drive
NewCaseVisualPanel1.CaseFolderOnInternalDriveWindowsError.text=Warning: Path to case folder is on "C:" drive. Case folder is created on the target system
NewCaseVisualPanel1.CaseFolderOnCDriveError.text=Warning: Path to multi-user case folder is on \"C:\" drive
NewCaseVisualPanel1.CaseFolderOnInternalDriveWindowsError.text=Warning: Path to case folder is on \"C:\" drive. Case folder is created on the target system
NewCaseVisualPanel1.CaseFolderOnInternalDriveLinuxError.text=Warning: Path to case folder is on the target system. Create case folder in mounted drive.
NewCaseVisualPanel1.uncPath.error=Error: UNC paths are not allowed for Single-User cases
CollaborationMonitor.addingDataSourceStatus.msg={0} adding data source
@ -369,7 +378,7 @@ CollaborationMonitor.analyzingDataSourceStatus.msg={0} analyzing {1}
MissingImageDialog.lbWarning.text=
MissingImageDialog.lbWarning.toolTipText=
NewCaseVisualPanel1.caseParentDirWarningLabel.text=
NewCaseVisualPanel1.multiUserCaseRadioButton.text=Multi-User\t\t
NewCaseVisualPanel1.multiUserCaseRadioButton.text=Multi-User
NewCaseVisualPanel1.singleUserCaseRadioButton.text=Single-User
NewCaseVisualPanel1.caseTypeLabel.text=Case Type:
SingleUserCaseConverter.BadDatabaseFileName=Database file does not exist!
@ -408,7 +417,6 @@ ImageFilePanel.sectorSizeLabel.text=Sector size:
LocalDiskPanel.sectorSizeLabel.text=Sector Size:
LocalFilesPanel.displayNameLabel.text=Logical File Set Display Name: Default
LocalFilesPanel.errorLabel.text=Error Label
LocalFilesPanel.selectedPaths.toolTipText=
LocalFilesPanel.clearButton.toolTipText=Clears currently selected local file paths
LocalFilesPanel.clearButton.text=Clear
LocalFilesPanel.selectButton.actionCommand=Add
@ -481,3 +489,11 @@ AddImageWizardSelectHostVisual.specifyNewHostTextField.text=
AddImageWizardSelectHostVisual.specifyNewHostRadio.text=Specify new host name
AddImageWizardSelectHostVisual.generateNewRadio.text=Generate new host name based on data source name
AddImageWizardSelectHostVisual.validationMessage.text=\
LocalFilesPanel.deleteButon.text=Delete
LocalFilesPanel.createTimeCheckBox.text=Creation Time - Often changed when a file is copied
LocalFilesPanel.modifiedTimeCheckBox.text=\ Modified Time - Often not changed when a file is copied
LocalFilesPanel.jLabel2.text=NOTE: Time stamps may have changed when the files were copied to the current location.
LocalFilesPanel.timestampToIncludeLabel.text=Timestamps To Include:
LocalFilesPanel.accessTimeCheckBox.text=Access Time - Can be changed when the file is opened
LocalFilesPanel.timeStampToIncludeLabel.text=Timestamps To Include:
LocalFilesPanel.timeStampNoteLabel.text=NOTE: Time stamps may have changed when the files were copied to the current location.

View File

@ -45,7 +45,6 @@
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="detailsPanel" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -87,7 +86,6 @@
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="&lt;CaseDetailsPanel.casePanel.border.title&gt;">
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="CaseDetailsPanel.casePanel.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
</TitledBorder>
</Border>
</Property>
@ -328,7 +326,6 @@
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="&lt;CaseDetailsPanel.examinerPanel.border.title&gt;">
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="CaseDetailsPanel.examinerPanel.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
</TitledBorder>
</Border>
</Property>
@ -506,7 +503,6 @@
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="&lt;CaseDetailsPanel.pnOrganization.border.title&gt;">
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="CaseDetailsPanel.pnOrganization.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
</TitledBorder>
</Border>
</Property>

View File

@ -182,7 +182,7 @@ final class CaseDetailsPanel extends javax.swing.JPanel {
jTextArea1.setRows(5);
jScrollPane1.setViewportView(jTextArea1);
casePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.casePanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
casePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.casePanel.border.title"))); // NOI18N
caseNameLabel.setText(org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.caseNameLabel.text")); // NOI18N
caseNameLabel.setMaximumSize(new java.awt.Dimension(82, 14));
@ -295,7 +295,7 @@ final class CaseDetailsPanel extends javax.swing.JPanel {
.addGap(6, 6, 6))
);
examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.examinerPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.examinerPanel.border.title"))); // NOI18N
lbNotesLabel.setText(org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.lbNotesLabel.text")); // NOI18N
lbNotesLabel.setMaximumSize(new java.awt.Dimension(82, 14));
@ -381,7 +381,7 @@ final class CaseDetailsPanel extends javax.swing.JPanel {
.addGap(6, 6, 6))
);
pnOrganization.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.pnOrganization.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
pnOrganization.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.pnOrganization.border.title"))); // NOI18N
lbOrganizationNameLabel.setText(org.openide.util.NbBundle.getMessage(CaseDetailsPanel.class, "CaseDetailsPanel.lbOrganizationNameLabel.text")); // NOI18N
lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(82, 14));
@ -484,8 +484,7 @@ final class CaseDetailsPanel extends javax.swing.JPanel {
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(detailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(0, 0, 0))
.addComponent(detailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents

View File

@ -176,6 +176,9 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
public void run(Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
localFilePaths = configPanel.getContentPaths();
boolean createTimestamp = configPanel.getCreateTimestamp();
boolean modifiedTimestamp = configPanel.getModifiedTimestamp();
boolean accessTimestamp = configPanel.getAccessTimestamp();
if (configPanel.subTypeIsLogicalEvidencePanel()) {
try {
//if the L01 option was chosen
@ -191,7 +194,8 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
return;
}
}
run(UUID.randomUUID().toString(), configPanel.getFileSetName(), localFilePaths, host, progressMonitor, callback);
run(UUID.randomUUID().toString(), configPanel.getFileSetName(), localFilePaths, host, createTimestamp,
accessTimestamp, modifiedTimestamp, progressMonitor, callback);
}
/**
@ -330,7 +334,40 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
* @param callback Callback to call when processing is done.
*/
public void run(String deviceId, String rootVirtualDirectoryName, List<String> localFilePaths, Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
new Thread(new AddLocalFilesTask(deviceId, rootVirtualDirectoryName, localFilePaths, host, progressMonitor, callback)).start();
new Thread(new AddLocalFilesTask(deviceId, rootVirtualDirectoryName, localFilePaths, host, false, false, false,progressMonitor, callback)).start();
}
/**
* Adds a data source to the case database using a background task in a
* separate thread and the given settings instead of those provided by the
* selection and configuration panel. Returns as soon as the background task
* is started and uses the callback object to signal task completion and
* return results.
*
* @param deviceId An ASCII-printable identifier for the
* device associated with the data source
* that is intended to be unique across
* multiple cases (e.g., a UUID).
* @param rootVirtualDirectoryName The name to give to the virtual directory
* that will serve as the root for the
* local/logical files and/or directories
* that compose the data source. Pass the
* empty string to get a default name of the
* form: LogicalFileSet[N]
* @param localFilePaths A list of local/logical file and/or
* directory localFilePaths.
* @param createTime Boolean value to add the time the file was locally created
* @param accessTime Boolean value to add the time the file was last accessed
* @param modifiedTime Boolean value to add the time the file was locally modified
* @param host The host for this data source.
* @param progressMonitor Progress monitor for reporting progress
* during processing.
* @param callback Callback to call when processing is done.
*/
public void run(String deviceId, String rootVirtualDirectoryName, List<String> localFilePaths, Host host, boolean createTimestamp, boolean accessTimestamp,
boolean modifiedTimestamp, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
new Thread(new AddLocalFilesTask(deviceId, rootVirtualDirectoryName, localFilePaths, host, createTimestamp, accessTimestamp, modifiedTimestamp,
progressMonitor, callback)).start();
}
/**
@ -356,7 +393,7 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
* during processing.
* @param callback Callback to call when processing is done.
*/
public void run(String deviceId, String rootVirtualDirectoryName, List<String> localFilePaths, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
public void run(String deviceId, String rootVirtualDirectoryName, List<String> localFilePaths, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
run(deviceId, rootVirtualDirectoryName, localFilePaths, null, progressMonitor, callback);
}

View File

@ -27,159 +27,139 @@
<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"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,30,0,0,1,-5"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<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/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="deleteButon">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.deleteButon.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteButonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="clearButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JScrollPane" name="fileListScrollpane">
<Properties>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[32767, 100]"/>
</Property>
<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="[258, 100]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="3" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="selectedPathsScrollPane" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="selectButton" linkSize="1" alignment="0" max="32767" attributes="0"/>
<Component id="clearButton" linkSize="1" alignment="0" max="32767" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="displayNameLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="changeNameButton" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="errorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="selectButton" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
<Component id="clearButton" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="selectedPathsScrollPane" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="changeNameButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="displayNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JButton" name="selectButton">
<Component class="javax.swing.JList" name="fileList">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectButton.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="clearButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.clearButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearButtonActionPerformed"/>
</Events>
</Component>
<Container class="javax.swing.JScrollPane" name="selectedPathsScrollPane">
<Properties>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[379, 96]"/>
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
<StringArray count="0"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;FileRecord&gt;"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="selectedPaths">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="columns" type="int" value="20"/>
<Property name="rows" type="int" value="5"/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.selectedPaths.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="errorLabel">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="displayNamePanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="3" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
<SubComponents>
<Component class="javax.swing.JButton" name="changeNameButton">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
@ -189,6 +169,11 @@
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="changeNameButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="displayNameLabel">
<Properties>
@ -196,8 +181,157 @@
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.displayNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JPanel" name="padding">
<Properties>
<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="[0, 0]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Container>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="timeStampToIncludeLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.timeStampToIncludeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="4" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="modifiedTimeCheckBox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.modifiedTimeCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="5" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="15" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="createTimeCheckBox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.createTimeCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="6" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="15" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="accessTimeCheckBox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.accessTimeCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="7" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="15" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="timeStampNoteLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.timeStampNoteLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="8" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="10" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="errorLabel">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="LocalFilesPanel.errorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="9" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JPanel" name="paddingBottom">
<Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 0]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="10" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="1.0"/>
</Constraint>
</Constraints>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Container>
</SubComponents>
</Form>

View File

@ -19,31 +19,33 @@
package org.sleuthkit.autopsy.casemodule;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import javax.swing.JFileChooser;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import java.util.logging.Level;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.swing.AbstractListModel;
import javax.swing.JOptionPane;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.PathValidator;
/**
* A panel which allows the user to select local files and/or directories.
* A panel which allows the user to select local files and/or directories.
*/
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
final class LocalFilesPanel extends javax.swing.JPanel {
private static final long serialVersionUID = 1L;
private final Set<File> currentFiles = new TreeSet<>(); //keep currents in a set to disallow duplicates per add
private boolean enableNext = false;
private static final Logger logger = Logger.getLogger(LocalFilesPanel.class.getName());
private String displayName = "";
private final LocalFilesModel listModel = new LocalFilesModel();
/**
* Creates new form LocalFilesPanel
@ -56,7 +58,8 @@ final class LocalFilesPanel extends javax.swing.JPanel {
private void customInit() {
localFileChooser.setMultiSelectionEnabled(true);
errorLabel.setVisible(false);
selectedPaths.setText("");
this.fileList.setModel(listModel);
listModel.clear();
this.displayNameLabel.setText(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.displayNameLabel.text"));
}
@ -68,22 +71,33 @@ final class LocalFilesPanel extends javax.swing.JPanel {
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
localFileChooser = new javax.swing.JFileChooser();
jPanel1 = new javax.swing.JPanel();
selectButton = new javax.swing.JButton();
deleteButon = new javax.swing.JButton();
clearButton = new javax.swing.JButton();
selectedPathsScrollPane = new javax.swing.JScrollPane();
selectedPaths = new javax.swing.JTextArea();
errorLabel = new javax.swing.JLabel();
javax.swing.JScrollPane fileListScrollpane = new javax.swing.JScrollPane();
fileList = new javax.swing.JList<>();
javax.swing.JPanel displayNamePanel = new javax.swing.JPanel();
changeNameButton = new javax.swing.JButton();
displayNameLabel = new javax.swing.JLabel();
javax.swing.JPanel padding = new javax.swing.JPanel();
javax.swing.JLabel timeStampToIncludeLabel = new javax.swing.JLabel();
modifiedTimeCheckBox = new javax.swing.JCheckBox();
createTimeCheckBox = new javax.swing.JCheckBox();
accessTimeCheckBox = new javax.swing.JCheckBox();
javax.swing.JLabel timeStampNoteLabel = new javax.swing.JLabel();
errorLabel = new javax.swing.JLabel();
javax.swing.JPanel paddingBottom = new javax.swing.JPanel();
localFileChooser.setApproveButtonText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.localFileChooser.approveButtonText")); // NOI18N
localFileChooser.setApproveButtonToolTipText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.localFileChooser.approveButtonToolTipText")); // NOI18N
localFileChooser.setDialogTitle(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.localFileChooser.dialogTitle")); // NOI18N
localFileChooser.setFileSelectionMode(javax.swing.JFileChooser.FILES_AND_DIRECTORIES);
setLayout(new java.awt.GridBagLayout());
org.openide.awt.Mnemonics.setLocalizedText(selectButton, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectButton.text")); // NOI18N
selectButton.setToolTipText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectButton.toolTipText")); // NOI18N
selectButton.setActionCommand(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectButton.actionCommand")); // NOI18N
@ -95,6 +109,29 @@ final class LocalFilesPanel extends javax.swing.JPanel {
selectButtonActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
add(selectButton, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(deleteButon, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.deleteButon.text")); // NOI18N
deleteButon.setMaximumSize(new java.awt.Dimension(70, 23));
deleteButon.setMinimumSize(new java.awt.Dimension(70, 23));
deleteButon.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deleteButonActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
add(deleteButon, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(clearButton, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.clearButton.text")); // NOI18N
clearButton.setToolTipText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.clearButton.toolTipText")); // NOI18N
@ -106,17 +143,30 @@ final class LocalFilesPanel extends javax.swing.JPanel {
clearButtonActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
add(clearButton, gridBagConstraints);
selectedPathsScrollPane.setPreferredSize(new java.awt.Dimension(379, 96));
fileListScrollpane.setMaximumSize(new java.awt.Dimension(32767, 100));
fileListScrollpane.setMinimumSize(new java.awt.Dimension(100, 100));
fileListScrollpane.setPreferredSize(new java.awt.Dimension(258, 100));
selectedPaths.setEditable(false);
selectedPaths.setColumns(20);
selectedPaths.setRows(5);
selectedPaths.setToolTipText(org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.selectedPaths.toolTipText")); // NOI18N
selectedPathsScrollPane.setViewportView(selectedPaths);
fileListScrollpane.setViewportView(fileList);
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.errorLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridheight = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 0);
add(fileListScrollpane, gridBagConstraints);
displayNamePanel.setLayout(new java.awt.GridBagLayout());
org.openide.awt.Mnemonics.setLocalizedText(changeNameButton, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.changeNameButton.text")); // NOI18N
changeNameButton.addActionListener(new java.awt.event.ActionListener() {
@ -124,64 +174,127 @@ final class LocalFilesPanel extends javax.swing.JPanel {
changeNameButtonActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
displayNamePanel.add(changeNameButton, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(displayNameLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.displayNameLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
displayNamePanel.add(displayNameLabel, gridBagConstraints);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(selectedPathsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(selectButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(clearButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(2, 2, 2))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(displayNameLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(changeNameButton))
.addComponent(errorLabel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
padding.setMinimumSize(new java.awt.Dimension(0, 0));
padding.setPreferredSize(new java.awt.Dimension(0, 0));
javax.swing.GroupLayout paddingLayout = new javax.swing.GroupLayout(padding);
padding.setLayout(paddingLayout);
paddingLayout.setHorizontalGroup(
paddingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
paddingLayout.setVerticalGroup(
paddingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {clearButton, selectButton});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.weightx = 1.0;
displayNamePanel.add(padding, gridBagConstraints);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(0, 0, 0)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(36, 36, 36)
.addComponent(clearButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(selectedPathsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(changeNameButton)
.addComponent(displayNameLabel))
.addGap(13, 13, 13)
.addComponent(errorLabel)
.addContainerGap())
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
add(displayNamePanel, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(timeStampToIncludeLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.timeStampToIncludeLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
add(timeStampToIncludeLabel, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(modifiedTimeCheckBox, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.modifiedTimeCheckBox.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 5;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 15, 5, 5);
add(modifiedTimeCheckBox, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(createTimeCheckBox, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.createTimeCheckBox.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 6;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 15, 5, 5);
add(createTimeCheckBox, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(accessTimeCheckBox, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.accessTimeCheckBox.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 7;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 15, 5, 5);
add(accessTimeCheckBox, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(timeStampNoteLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.timeStampNoteLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 8;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5);
add(timeStampNoteLabel, gridBagConstraints);
errorLabel.setForeground(new java.awt.Color(255, 0, 0));
org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(LocalFilesPanel.class, "LocalFilesPanel.errorLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 9;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
add(errorLabel, gridBagConstraints);
paddingBottom.setMinimumSize(new java.awt.Dimension(0, 0));
javax.swing.GroupLayout paddingBottomLayout = new javax.swing.GroupLayout(paddingBottom);
paddingBottom.setLayout(paddingBottomLayout);
paddingBottomLayout.setHorizontalGroup(
paddingBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
paddingBottomLayout.setVerticalGroup(
paddingBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 10;
gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
gridBagConstraints.weighty = 1.0;
add(paddingBottom, gridBagConstraints);
}// </editor-fold>//GEN-END:initComponents
private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
@ -189,20 +302,10 @@ final class LocalFilesPanel extends javax.swing.JPanel {
if (returnVal == JFileChooser.APPROVE_OPTION) {
File[] files = localFileChooser.getSelectedFiles();
StringBuilder allPaths = new StringBuilder();
for (File f : files) {
currentFiles.add(f);
}
for (File f : currentFiles) {
//loop over set of all files to ensure list is accurate
//update label
allPaths.append(f.getAbsolutePath()).append("\n");
}
this.selectedPaths.setText(allPaths.toString());
this.selectedPaths.setToolTipText(allPaths.toString());
this.listModel.add(files);
}
enableNext = !currentFiles.isEmpty();
enableNext = !this.listModel.getFiles().isEmpty();
try {
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
@ -226,12 +329,32 @@ final class LocalFilesPanel extends javax.swing.JPanel {
}
}//GEN-LAST:event_changeNameButtonActionPerformed
private void deleteButonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButonActionPerformed
int minIdx = this.fileList.getMinSelectionIndex();
int maxIdx = this.fileList.getMaxSelectionIndex();
if (minIdx >= 0 && maxIdx >= minIdx) {
this.listModel.remove(minIdx, maxIdx);
}
this.fileList.clearSelection();
enableNext = !this.listModel.getFiles().isEmpty();
try {
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
} catch (Exception e) {
logger.log(Level.SEVERE, "LocalFilesPanel listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}//GEN-LAST:event_deleteButonActionPerformed
/**
* Clear the fields and undo any selection of files.
*/
void reset() {
currentFiles.clear();
selectedPaths.setText("");
this.listModel.clear();
enableNext = false;
errorLabel.setVisible(false);
displayName = "";
@ -245,20 +368,44 @@ final class LocalFilesPanel extends javax.swing.JPanel {
MessageNotifyUtil.MessageType.ERROR);
}
}
/**
* Get the path(s) which have been selected on this panel
*
* @return a List of Strings representing the path(s) for the selected files or directories
* @return a List of Strings representing the path(s) for the selected files
* or directories
*/
List<String> getContentPaths() {
List<String> pathsList = new ArrayList<>();
if (currentFiles == null) {
return pathsList;
}
for (File f : currentFiles) {
pathsList.add(f.getAbsolutePath());
}
return pathsList;
return this.listModel.getFiles().stream()
.map(File::getAbsolutePath)
.collect(Collectors.toList());
}
/**
* Get whether the createTimestampcheckbox has been checked or not
* @return boolean if box was checked
*/
Boolean getCreateTimestamps() {
return createTimeCheckBox.isSelected();
}
/**
* Get whether the ModifiedTimestampcheckbox has been checked or not
* @return boolean if box was checked
*/
Boolean getModifiedTimestamps() {
return modifiedTimeCheckBox.isSelected();
}
/**
* Get whether the accessTimestampcheckbox has been checked or not
* @return boolean if box was checked
*/
Boolean getAccessTimestamps() {
return accessTimeCheckBox.isSelected();
}
/**
@ -311,15 +458,104 @@ final class LocalFilesPanel extends javax.swing.JPanel {
return this.displayName;
}
/**
* A record of a file for the specific purposes of displaying in a JList
* (with toString).
*/
private static class FileRecord {
private final File file;
FileRecord(File file) {
this.file = file;
}
@Override
public String toString() {
return file == null ? "" : file.getAbsolutePath();
}
/**
* @return The underlying file.
*/
File getFile() {
return file;
}
}
/**
* JListModel for displaying files.
*/
private static class LocalFilesModel extends AbstractListModel<FileRecord> {
private List<File> items = Collections.emptyList();
@Override
public int getSize() {
return items.size();
}
@Override
public FileRecord getElementAt(int index) {
File f = items.get(index);
return new FileRecord(f);
}
/**
* Adds a series of files to the list model.
*
* @param files The files.
*/
void add(File... files) {
items = Stream.concat(items.stream(), Stream.of(files))
.sorted(Comparator.comparing(f -> f.getAbsolutePath().toLowerCase()))
.distinct()
.collect(Collectors.toList());
this.fireContentsChanged(this, 0, items.size() - 1);
}
/**
* Removes files in the list starting at minIdx going to maxIdx.
*
* @param minIdx The minimum index of items to be removed.
* @param maxIdx The maximum index to be removed.
*/
void remove(int minIdx, int maxIdx) {
for (int i = maxIdx; i >= minIdx; i--) {
items.remove(i);
}
this.fireContentsChanged(this, 0, items.size() - 1);
}
/**
* @return The files to be added to the local files data source.
*/
List<File> getFiles() {
return items;
}
/**
* Clears currently tracked local files.
*/
void clear() {
items.clear();
this.fireContentsChanged(this, 0, 0);
}
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox accessTimeCheckBox;
private javax.swing.JButton changeNameButton;
private javax.swing.JButton clearButton;
private javax.swing.JCheckBox createTimeCheckBox;
private javax.swing.JButton deleteButon;
private javax.swing.JLabel displayNameLabel;
private javax.swing.JLabel errorLabel;
private javax.swing.JPanel jPanel1;
private javax.swing.JList<FileRecord> fileList;
private javax.swing.JFileChooser localFileChooser;
private javax.swing.JCheckBox modifiedTimeCheckBox;
private javax.swing.JButton selectButton;
private javax.swing.JTextArea selectedPaths;
private javax.swing.JScrollPane selectedPathsScrollPane;
// End of variables declaration//GEN-END:variables
}

View File

@ -16,16 +16,11 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="dspSubtypeComboBox" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="dspSubtypePanel" alignment="0" min="-2" pref="466" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="dspSubtypeComboBox" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="dspSubtypePanel" alignment="0" min="-2" pref="524" max="-2" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
@ -33,8 +28,8 @@
<Group type="102" alignment="0" attributes="0">
<Component id="dspSubtypeComboBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="dspSubtypePanel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="dspSubtypePanel" min="-2" pref="334" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -50,12 +45,12 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="466" max="32767" attributes="0"/>
<EmptySpace min="0" pref="524" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="160" max="32767" attributes="0"/>
<EmptySpace min="0" pref="334" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>

View File

@ -114,11 +114,11 @@ final class LogicalFilesDspPanel extends JPanel {
dspSubtypePanel.setLayout(dspSubtypePanelLayout);
dspSubtypePanelLayout.setHorizontalGroup(
dspSubtypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 466, Short.MAX_VALUE)
.addGap(0, 524, Short.MAX_VALUE)
);
dspSubtypePanelLayout.setVerticalGroup(
dspSubtypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 160, Short.MAX_VALUE)
.addGap(0, 334, Short.MAX_VALUE)
);
dspSubtypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] {Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text(), Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text()}));
@ -135,20 +135,17 @@ final class LogicalFilesDspPanel extends JPanel {
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(dspSubtypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(dspSubtypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, 466, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap()
.addComponent(dspSubtypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(dspSubtypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, 524, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(dspSubtypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(dspSubtypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0))
.addComponent(dspSubtypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
@ -231,4 +228,32 @@ final class LogicalFilesDspPanel extends JPanel {
return "";
}
}
/**
* Get whether the createTimestampcheckbox was selected or not
*
* @return if box was checked or not
*/
Boolean getCreateTimestamp() {
return localFilesPanel.getCreateTimestamps();
}
/**
* Get whether the modifiedTimestampcheckbox was selected or not
*
* @return if box was checked or not
*/
Boolean getModifiedTimestamp() {
return localFilesPanel.getModifiedTimestamps();
}
/**
* Get whether the accessTimestampcheckbox was selected or not
*
* @return if box was checked or not
*/
Boolean getAccessTimestamp() {
return localFilesPanel.getAccessTimestamps();
}
}

View File

@ -25,6 +25,8 @@ package org.sleuthkit.autopsy.casemodule.services;
import java.io.Closeable;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@ -424,9 +426,8 @@ public class FileManager implements Closeable {
* directory that does not exist or cannot be read.
*/
public LocalFilesDataSource addLocalFilesDataSource(String deviceId, String rootVirtualDirectoryName, String timeZone, List<String> localFilePaths, FileAddProgressUpdater progressUpdater) throws TskCoreException, TskDataException {
return addLocalFilesDataSource(deviceId, rootVirtualDirectoryName, timeZone, null, localFilePaths, progressUpdater);
return addLocalFilesDataSource(deviceId, rootVirtualDirectoryName, timeZone, null, localFilePaths, false, false, false, progressUpdater);
}
/**
* Adds a set of local/logical files and/or directories to the case database
* as data source.
@ -456,8 +457,44 @@ public class FileManager implements Closeable {
* @throws TskDataException if any of the local file paths is for a file or
* directory that does not exist or cannot be read.
*/
public LocalFilesDataSource addLocalFilesDataSource(String deviceId, String rootVirtualDirectoryName, String timeZone, Host host, List<String> localFilePaths, FileAddProgressUpdater progressUpdater) throws TskCoreException, TskDataException {
return addLocalFilesDataSource(deviceId, rootVirtualDirectoryName, timeZone, host, localFilePaths, false, false, false, progressUpdater);
}
/**
* Adds a set of local/logical files and/or directories to the case database
* as data source.
*
* @param deviceId An ASCII-printable identifier for the
* device associated with the data source
* that is intended to be unique across
* multiple cases (e.g., a UUID).
* @param rootVirtualDirectoryName The name to give to the virtual directory
* that will serve as the root for the
* local/logical files and/or directories
* that compose the data source. Pass the
* empty string to get a default name of the
* form: LogicalFileSet[N]
* @param timeZone The time zone used to process the data
* source, may be the empty string.
* @param host The host for this data source (may be null).
* @param localFilePaths A list of local/logical file and/or
* directory localFilePaths.
* @param createTime Boolean value to add the time the file was locally created
* @param accessTime Boolean value to add the time the file was last accessed
* @param modifiedTime Boolean value to add the time the file was locally modified
* @param progressUpdater Called after each file/directory is added
* to the case database.
*
* @return A local files data source object.
*
* @throws TskCoreException If there is a problem completing a database
* operation.
* @throws TskDataException if any of the local file paths is for a file or
* directory that does not exist or cannot be read.
*/
public LocalFilesDataSource addLocalFilesDataSource(String deviceId, String rootVirtualDirectoryName, String timeZone, Host host,
List<String> localFilePaths, FileAddProgressUpdater progressUpdater) throws TskCoreException, TskDataException {
List<String> localFilePaths, boolean createTimestamp, boolean accessTimestamp, boolean modifiedTimestamp, FileAddProgressUpdater progressUpdater) throws TskCoreException, TskDataException {
List<java.io.File> localFiles = getFilesAndDirectories(localFilePaths);
CaseDbTransaction trans = null;
try {
@ -474,7 +511,7 @@ public class FileManager implements Closeable {
LocalFilesDataSource dataSource = caseDb.addLocalFilesDataSource(deviceId, rootDirectoryName, timeZone, host, trans);
List<AbstractFile> filesAdded = new ArrayList<>();
for (java.io.File localFile : localFiles) {
AbstractFile fileAdded = addLocalFile(trans, dataSource, localFile, TskData.EncodingType.NONE, progressUpdater);
AbstractFile fileAdded = addLocalFile(trans, dataSource, localFile, createTimestamp, accessTimestamp, modifiedTimestamp, TskData.EncodingType.NONE, progressUpdater);
if (null != fileAdded) {
filesAdded.add(fileAdded);
} else {
@ -564,6 +601,9 @@ public class FileManager implements Closeable {
* @param parentDirectory The root virtual directory of the data source or
* the parent local directory.
* @param localFile The local/logical file or directory.
* @param createTime Boolean value to add the time the file was locally created
* @param accessTime Boolean value to add the time the file was locally modified
* @param modifiedTime Boolean value to add the time the file was last accessed
* @param encodingType Type of encoding used when storing the file
* @param progressUpdater Called after each file/directory is added to the
* case database.
@ -573,8 +613,8 @@ public class FileManager implements Closeable {
* @throws TskCoreException If there is a problem completing a database
* operation.
*/
private AbstractFile addLocalFile(CaseDbTransaction trans, SpecialDirectory parentDirectory, java.io.File localFile,
TskData.EncodingType encodingType, FileAddProgressUpdater progressUpdater) throws TskCoreException {
private AbstractFile addLocalFile(CaseDbTransaction trans, SpecialDirectory parentDirectory, java.io.File localFile, boolean createTime,
boolean accessTime, boolean modifiedTime, TskData.EncodingType encodingType, FileAddProgressUpdater progressUpdater) throws TskCoreException {
if (localFile.isDirectory()) {
/*
* Add the directory as a local directory.
@ -588,15 +628,35 @@ public class FileManager implements Closeable {
final java.io.File[] childFiles = localFile.listFiles();
if (childFiles != null && childFiles.length > 0) {
for (java.io.File childFile : childFiles) {
addLocalFile(trans, localDirectory, childFile, progressUpdater);
addLocalFile(trans, localDirectory, childFile, createTime, accessTime, modifiedTime, encodingType, progressUpdater);
}
}
return localDirectory;
} else {
return caseDb.addLocalFile(localFile.getName(), localFile.getAbsolutePath(), localFile.length(),
0, 0, 0, 0,
long createTimestamp = 0;
long modifiedTimestamp = 0;
long accessTimestamp = 0;
try {
BasicFileAttributes attrs;
attrs = Files.readAttributes(localFile.toPath(), BasicFileAttributes.class);
if (createTime) {
createTimestamp = (attrs.creationTime().toMillis()/1000);
}
if (modifiedTime) {
modifiedTimestamp = (attrs.lastModifiedTime().toMillis()/1000);
}
if (accessTime) {
accessTimestamp = (attrs.lastAccessTime().toMillis()/1000);
}
return caseDb.addLocalFile(localFile.getName(), localFile.getAbsolutePath(), localFile.length(),
0, createTimestamp, accessTimestamp, modifiedTimestamp,
localFile.isFile(), encodingType, parentDirectory, trans);
} catch (IOException ex) {
return caseDb.addLocalFile(localFile.getName(), localFile.getAbsolutePath(), localFile.length(),
0, 0, 0, 0,
localFile.isFile(), encodingType, parentDirectory, trans);
}
}
}
@ -752,7 +812,7 @@ public class FileManager implements Closeable {
*/
@Deprecated
private AbstractFile addLocalFile(CaseDbTransaction trans, SpecialDirectory parentDirectory, java.io.File localFile, FileAddProgressUpdater progressUpdater) throws TskCoreException {
return addLocalFile(trans, parentDirectory, localFile, TskData.EncodingType.NONE, progressUpdater);
return addLocalFile(trans, parentDirectory, localFile, false, false, false, TskData.EncodingType.NONE, progressUpdater);
}
/**

View File

@ -163,7 +163,9 @@ final public class VisualizationPanel extends JPanel {
this.relationshipBrowser = relationshipBrowser;
initComponents();
//initialize invisible JFXPanel that is used to show JFXNotifications over this window.
notificationsJFXPanel.setScene(new Scene(new Pane()));
Platform.runLater(() -> {
notificationsJFXPanel.setScene(new Scene(new Pane()));
});
graph = new CommunicationsGraph(pinnedAccountModel, lockedVertexModel);

View File

@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.contentviewers;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Scene;
import javafx.scene.image.Image;
@ -87,7 +88,12 @@ final class JavaFxAppSink extends AppSink {
fxImageView = new ImageView(); // Will hold the current video frame.
BorderPane borderpane = new BorderPane(fxImageView); // Center and size ImageView.
Scene scene = new Scene(borderpane); // Root of the JavaFX tree.
target.setScene(scene);
// Although the documentation for JFXPanel.setScene() claims that it
// can be called on either the EDT or the JavaFX thread, with JavaFX 11
// it doesn't work unless you call it on the JavaFX application thread.
Platform.runLater(() -> {
target.setScene(scene);
});
// Bind size of image to that of scene, while keeping proportions
fxImageView.fitWidthProperty().bind(scene.widthProperty());

View File

@ -19,7 +19,7 @@
.label {
-fx-wrap-text:true;
-fx-text-fill: red;
-fx-text-fill: #ff0000;
-fx-font-size: 2em;
}
@ -28,6 +28,6 @@
}
.masker-pane .masker-text {
-fx-text-fill: white;
-fx-text-fill: #ffffff;
-fx-font-size: 1.5em;
}

View File

@ -18,7 +18,9 @@
*/
package org.sleuthkit.autopsy.contentviewers.imagetagging;
import com.sun.javafx.event.EventDispatchChainImpl;
// TODO: See JIRA-6693
//import com.sun.javafx.event.EventDispatchChainImpl;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
@ -46,7 +48,7 @@ import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewer
public final class ImageTag extends Group {
// Used to tell the 8 edit handles to hide if this tag is no longer selected
private final EventDispatchChainImpl ALL_CHILDREN;
// private final EventDispatchChainImpl ALL_CHILDREN;
private final PhysicalTag physicalTag;
@ -57,13 +59,13 @@ public final class ImageTag extends Group {
private final ContentViewerTag<ImageTagRegion> appTag;
public ImageTag(ContentViewerTag<ImageTagRegion> contentViewerTag, ImageView image) {
ALL_CHILDREN = new EventDispatchChainImpl();
// ALL_CHILDREN = new EventDispatchChainImpl();
this.appTag = contentViewerTag;
this.getChildren().addListener((ListChangeListener<Node>) change -> {
change.next();
change.getAddedSubList().forEach((node) -> ALL_CHILDREN.append(node.getEventDispatcher()));
});
// this.getChildren().addListener((ListChangeListener<Node>) change -> {
// change.next();
// change.getAddedSubList().forEach((node) -> ALL_CHILDREN.append(node.getEventDispatcher()));
// });
ImageTagRegion details = contentViewerTag.getDetails();
physicalTag = new PhysicalTag(details);
@ -120,8 +122,8 @@ public final class ImageTag extends Group {
Tooltip.install(this, new Tooltip(contentViewerTag.getContentTag()
.getName().getDisplayName()));
this.addEventHandler(ImageTagControls.NOT_FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event));
this.addEventHandler(ImageTagControls.FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event));
// this.addEventHandler(ImageTagControls.NOT_FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event));
// this.addEventHandler(ImageTagControls.FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event));
}
/**

View File

@ -18,11 +18,11 @@
*/
package org.sleuthkit.autopsy.contentviewers.imagetagging;
import com.sun.javafx.event.EventDispatchChainImpl;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import javafx.event.Event;
import javafx.event.EventDispatchChain;
import javafx.geometry.Point2D;
import javafx.scene.Group;
import javafx.scene.Node;
@ -41,7 +41,8 @@ import javafx.scene.input.MouseEvent;
*/
public final class ImageTagsGroup extends Group {
private final EventDispatchChainImpl NO_OP_CHAIN = new EventDispatchChainImpl();
// TODO: See JIRA-6693
// private final EventDispatchChain NO_OP_CHAIN = new EventDispatchChainImpl();
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
private volatile ImageTag currentFocus;
@ -50,10 +51,10 @@ public final class ImageTagsGroup extends Group {
//Reset focus of current selection if the back drop has focus.
backDrop.setOnMousePressed((mouseEvent) -> {
if (currentFocus != null) {
currentFocus.getEventDispatcher().dispatchEvent(
new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN);
}
// if (currentFocus != null) {
// currentFocus.getEventDispatcher().dispatchEvent(
// new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN);
// }
this.pcs.firePropertyChange(new PropertyChangeEvent(this,
ImageTagControls.NOT_FOCUSED.getName(), currentFocus, null));
@ -130,7 +131,7 @@ public final class ImageTagsGroup extends Group {
* @param n
*/
private void resetFocus(ImageTag n) {
n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN);
// n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN);
this.pcs.firePropertyChange(new PropertyChangeEvent(this, ImageTagControls.NOT_FOCUSED.getName(), n, null));
}
@ -146,7 +147,7 @@ public final class ImageTagsGroup extends Group {
resetFocus(currentFocus);
}
n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.FOCUSED), NO_OP_CHAIN);
// n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.FOCUSED), NO_OP_CHAIN);
this.pcs.firePropertyChange(new PropertyChangeEvent(this, ImageTagControls.FOCUSED.getName(), currentFocus, n));
currentFocus = n;

View File

@ -24,7 +24,6 @@ import org.openide.util.NbBundle.Messages;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.BlackboardArtifact;
/**
* A DataContentViewer that displays text with the TextViewers available.

View File

@ -99,7 +99,7 @@ public class TextContentViewerPanel extends javax.swing.JPanel implements DataCo
/**
* Determine the isPreffered score for the content viewer which is
* displaying this panel. Score is depenedent on the score of the supported
* displaying this panel. Score is dependent on the score of the supported
* TextViewers which exist.
*
* @param node

View File

@ -11,7 +11,7 @@ OpenIDE-Module-Short-Description=Autopsy Core Module
org_sleuthkit_autopsy_core_update_center=http://sleuthkit.org/autopsy/updates.xml
Services/AutoupdateType/org_sleuthkit_autopsy_core_update_center.settings=Autopsy Update Center
Installer.errorInitJavafx.msg=Error initializing JavaFX.
Installer.errorInitJavafx.details=\ Some features will not be available. Check that you have JavaFX installed (OpenJFX 8).
Installer.errorInitJavafx.details=\ Some features will not be available. Check that you have JavaFX installed (OpenJFX 11).
ServicesMonitor.failedService.notify.title=Service Is Down
ServicesMonitor.failedService.notify.msg=Connection to {0} is down
ServicesMonitor.restoredService.notify.title=Service Is Up

View File

@ -15,7 +15,7 @@ OpenIDE-Module-Short-Description=Autopsy Core Module
org_sleuthkit_autopsy_core_update_center=http://sleuthkit.org/autopsy/updates.xml
Services/AutoupdateType/org_sleuthkit_autopsy_core_update_center.settings=Autopsy Update Center
Installer.errorInitJavafx.msg=Error initializing JavaFX.
Installer.errorInitJavafx.details=\ Some features will not be available. Check that you have JavaFX installed (OpenJFX 8).
Installer.errorInitJavafx.details=\ Some features will not be available. Check that you have JavaFX installed (OpenJFX 11).
ServicesMonitor.failedService.notify.title=Service Is Down
ServicesMonitor.failedService.notify.msg=Connection to {0} is down
ServicesMonitor.restoredService.notify.title=Service Is Up

View File

@ -263,8 +263,15 @@ public class Installer extends ModuleInstall {
//initialize java fx if exists
System.setProperty("javafx.macosx.embedded", "true");
try {
// Due to a lingering issue https://bugs.openjdk.org/browse/JDK-8223377 where glass.dll from java 8 gets loaded instead of the java 17 one.
String javaLibraryPath = "java.library.path";
String jvmBinPathStr = Paths.get(System.getProperty("java.home"), "bin").toAbsolutePath().toString();
String path = System.getProperty(javaLibraryPath);
System.setProperty(javaLibraryPath, StringUtils.isBlank(path) ? jvmBinPathStr : jvmBinPathStr + File.pathSeparator + path);
// Creating a JFXPanel initializes JavaFX
JFXPanel panel = new JFXPanel();
new JFXPanel();
Platform.setImplicitExit(false);
javaFxInit = true;
} catch (UnsatisfiedLinkError | NoClassDefFoundError | Exception e) {

View File

@ -26,12 +26,12 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="0" pref="860" max="32767" attributes="0"/>
<Component id="jScrollPane1" alignment="0" pref="955" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane1" alignment="0" pref="620" max="32767" attributes="0"/>
<Component id="jScrollPane1" alignment="0" pref="699" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
@ -244,7 +244,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
<Component id="memFieldValidationLabel" min="-2" pref="478" max="-2" attributes="0"/>
<EmptySpace pref="12" max="32767" attributes="0"/>
<EmptySpace pref="117" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
@ -521,7 +521,7 @@
</Group>
</Group>
</Group>
<EmptySpace pref="164" max="32767" attributes="0"/>
<EmptySpace pref="269" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -635,11 +635,14 @@
</TitledBorder>
</Border>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[300, 175]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[33, 100]"/>
<Dimension value="[300, 175]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 150]"/>
<Dimension value="[300, 175]"/>
</Property>
</Properties>
<Constraints>
@ -678,7 +681,15 @@
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.sizingTextPane.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="autoscrolls" type="boolean" value="false"/>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[453, 220]"/>
</Property>
<Property name="opaque" type="boolean" value="false"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[453, 220]"/>
</Property>
<Property name="selectionStart" type="int" value="0"/>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>

View File

@ -506,7 +506,6 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
confLoaded = true;
} catch (IOException ex) {
logger.log(Level.SEVERE, "Can't read current Jvm max memory setting from file", ex);
memField.setEnabled(false);
heapDumpFileField.setText(DEFAULT_HEAP_DUMP_FILE_FIELD);
}
memField.setText(initialMemValue);
@ -1016,7 +1015,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
.addGroup(runtimePanelLayout.createSequentialGroup()
.addGap(23, 23, 23)
.addComponent(memFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 478, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(12, Short.MAX_VALUE))
.addContainerGap(117, Short.MAX_VALUE))
.addGroup(runtimePanelLayout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(solrJVMHeapWarning, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE)
@ -1149,7 +1148,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
.addComponent(tempCustomField, javax.swing.GroupLayout.PREFERRED_SIZE, 459, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tempDirectoryBrowseButton)))))
.addContainerGap(164, Short.MAX_VALUE))
.addContainerGap(269, Short.MAX_VALUE))
);
tempDirectoryPanelLayout.setVerticalGroup(
tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -1179,8 +1178,9 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
tempDirectoryPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryPanel.AccessibleContext.accessibleName")); // NOI18N
rdpPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.rdpPanel.border.title"))); // NOI18N
rdpPanel.setMinimumSize(new java.awt.Dimension(33, 100));
rdpPanel.setPreferredSize(new java.awt.Dimension(100, 150));
rdpPanel.setMaximumSize(new java.awt.Dimension(300, 175));
rdpPanel.setMinimumSize(new java.awt.Dimension(300, 175));
rdpPanel.setPreferredSize(new java.awt.Dimension(300, 175));
rdpPanel.setLayout(new java.awt.GridBagLayout());
sizingScrollPane.setBorder(null);
@ -1188,7 +1188,11 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
sizingTextPane.setEditable(false);
sizingTextPane.setBorder(null);
sizingTextPane.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.sizingTextPane.text")); // NOI18N
sizingTextPane.setAutoscrolls(false);
sizingTextPane.setMinimumSize(new java.awt.Dimension(453, 220));
sizingTextPane.setOpaque(false);
sizingTextPane.setPreferredSize(new java.awt.Dimension(453, 220));
sizingTextPane.setSelectionStart(0);
sizingScrollPane.setViewportView(sizingTextPane);
gridBagConstraints = new java.awt.GridBagConstraints();
@ -1220,11 +1224,11 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 860, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 955, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 620, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 699, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents

View File

@ -23,16 +23,19 @@ import java.awt.Insets;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
import java.util.logging.Level;
import java.util.stream.Stream;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.FontUIResource;
import org.netbeans.spi.sendopts.OptionProcessor;
import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI;
import org.openide.modules.ModuleInstall;
@ -128,7 +131,7 @@ public class Installer extends ModuleInstall {
UIManager.put("OptionPane.warningIcon", warningIcon);
UIManager.put("OptionPane.questionIcon", questionIcon);
UIManager.put("OptionPane.informationIcon", informationIcon);
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
setUnixLookAndFeel();
setModuleSettings("false");

View File

@ -6,8 +6,11 @@
</Component>
</NonVisualComponents>
<Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[727, 520]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[727, 495]"/>
<Dimension value="[727, 520]"/>
</Property>
</Properties>
<AuxValues>
@ -30,7 +33,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="viewPreferencesScrollPane" alignment="0" max="32767" attributes="0"/>
<Component id="viewPreferencesScrollPane" alignment="0" pref="520" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
@ -40,8 +43,11 @@
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[727, 500]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[727, 493]"/>
<Dimension value="[727, 500]"/>
</Property>
</Properties>

View File

@ -187,10 +187,12 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
currentSessionSettingsPanel = new javax.swing.JPanel();
hideRejectedResultsCheckbox = new javax.swing.JCheckBox();
setPreferredSize(new java.awt.Dimension(727, 495));
setMinimumSize(new java.awt.Dimension(727, 520));
setPreferredSize(new java.awt.Dimension(727, 520));
viewPreferencesScrollPane.setBorder(null);
viewPreferencesScrollPane.setPreferredSize(new java.awt.Dimension(727, 493));
viewPreferencesScrollPane.setMinimumSize(new java.awt.Dimension(727, 500));
viewPreferencesScrollPane.setPreferredSize(new java.awt.Dimension(727, 500));
viewPreferencesPanel.setPreferredSize(new java.awt.Dimension(727, 492));
@ -502,7 +504,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(viewPreferencesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(viewPreferencesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 520, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents

View File

@ -18,7 +18,6 @@
*/
package org.sleuthkit.autopsy.coreutils;
import com.sun.javafx.PlatformUtil;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@ -28,6 +27,7 @@ import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import org.apache.commons.lang3.SystemUtils;
import org.sleuthkit.autopsy.core.UserPreferences;
/**
@ -371,7 +371,7 @@ public final class ExecUtil {
return;
}
if (PlatformUtil.isWindows()) {
if (SystemUtils.IS_OS_WINDOWS) {
try {
Win32Process parentProcess = new Win32Process(process);
List<Win32Process> children = parentProcess.getChildren();

View File

@ -292,7 +292,16 @@ public class JLNK {
} else if (linkTargetIdList != null && !linkTargetIdList.isEmpty()) {
String ret = "";
for (String s : linkTargetIdList) {
ret += s;
if (s.endsWith("\\")) {
ret += s;
} else {
if (ret.endsWith("\\")) {
ret +=s;
} else {
ret += "\\";
ret += s;
}
}
}
return ret;
}

View File

@ -20,25 +20,31 @@ package org.sleuthkit.autopsy.coreutils;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import javax.swing.filechooser.FileSystemView;
import org.apache.commons.io.FilenameUtils;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.ptql.ProcessFinder;
import org.apache.commons.io.IOUtils;
import org.openide.modules.InstalledFileLocator;
import org.openide.modules.Places;
import org.openide.util.NbBundle;
@ -60,7 +66,6 @@ public class PlatformUtil {
public static final String OS_VERSION_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.verUnknown");
public static final String OS_ARCH_UNKNOWN = NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.archUnknown");
private static volatile long pid = -1;
private static volatile Sigar sigar = null;
private static volatile MemoryMXBean memoryManager = null;
/**
@ -238,7 +243,7 @@ public class PlatformUtil {
public static String getModuleConfigDirectory() {
return Paths.get(getUserConfigDirectory(), "ModuleConfig").toString();
}
/**
* Get log directory path
*
@ -504,25 +509,8 @@ public class PlatformUtil {
* @return PID of this process or -1 if it couldn't be determined
*/
public static synchronized long getPID() {
if (pid != -1) {
return pid;
}
try {
if (sigar == null) {
sigar = org.sleuthkit.autopsy.corelibs.SigarLoader.getSigar();
}
if (sigar != null) {
pid = sigar.getPid();
} else {
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getPID.sigarNotInit.msg"));
}
} catch (Exception e) {
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getPID.gen.msg", e.toString()));
}
return pid;
// taken from https://stackoverflow.com/a/7303433/2375948
return ProcessHandle.current().pid();
}
/**
@ -536,56 +524,123 @@ public class PlatformUtil {
* @return PID of a java process or -1 if it couldn't be determined
*/
public static synchronized long getJavaPID(String sigarSubQuery) {
long jpid = -1;
final String sigarQuery = "State.Name.sw=java," + sigarSubQuery; //NON-NLS
try {
if (sigar == null) {
sigar = org.sleuthkit.autopsy.corelibs.SigarLoader.getSigar();
}
if (sigar != null) {
ProcessFinder finder = new ProcessFinder(sigar);
jpid = finder.findSingleProcess(sigarQuery);
} else {
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getJavaPID.sigarNotInit.msg"));
}
} catch (Exception e) {
System.out.println(
NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getJavaPID.gen.msg", sigarQuery, e.toString()));
long[] pids = getJavaPIDs(sigarSubQuery);
return pids == null || pids.length < 1
? -1
: pids[0];
}
/**
* Performs a simple conversion of a sql like statement to regex replacing
* '%' and '_' in a like statement with regex equivalents.
*
* @param originalLikeStatement The original like statement.
* @return The equivalent regex string.
*/
private static String convertSqlLikeToRegex(String originalLikeStatement) {
if (originalLikeStatement == null) {
return "";
}
return jpid;
Map<Character, String> likeEscapeSequences = new HashMap<>() {
{
put('%', ".*");
put('_', ".");
}
};
String regexQuoted = Pattern.quote(originalLikeStatement);
char[] charArr = regexQuoted.toCharArray();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < charArr.length; i++) {
char curChar = charArr[i];
String regexReplacement = likeEscapeSequences.get(curChar);
if (regexReplacement == null) {
sb.append(curChar);
} else {
Character nextChar = charArr.length > i + 1 ? charArr[i + 1] : null;
if (nextChar != null && curChar == nextChar) {
sb.append(curChar);
i++;
} else {
sb.append(regexReplacement);
}
}
}
return sb.toString();
}
/**
* Query and get PIDs of another java processes matching a query
*
* @param sigarSubQuery a sigar subquery to identify a java processes among
* other java processes, for example, by class name,
* use: Args.*.eq=org.jboss.Main more examples here:
* http://support.hyperic.com/display/SIGAR/PTQL
* @param argsSubQuery A like query for command line arguments
*
* @return array of PIDs of a java processes matching the query or null if
* it couldn't be determined
*/
public static synchronized long[] getJavaPIDs(String sigarSubQuery) {
long[] jpids = null;
final String sigarQuery = "State.Name.sw=java," + sigarSubQuery; //NON-NLS
public static synchronized long[] getJavaPIDs(String argsSubQuery) {
try {
if (sigar == null) {
sigar = org.sleuthkit.autopsy.corelibs.SigarLoader.getSigar();
}
if (sigar != null) {
ProcessFinder finder = new ProcessFinder(sigar);
jpids = finder.find(sigarQuery);
} else {
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getJavaPIDs.sigarNotInit"));
}
} catch (Exception e) {
System.out.println(
NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getJavaPIDs.gen.msg", sigarQuery, e.toString()));
}
return jpids;
if (isWindowsOS()) {
ProcessBuilder pb = new ProcessBuilder("wmic process where \"name='java.exe' AND commandline LIKE '%" + argsSubQuery + "%'\" get ProcessID");
String output = IOUtils.toString(pb.start().getInputStream(), StandardCharsets.UTF_8);
String[] lines = output.split("\\r?\\n");
return Stream.of(lines).skip(1).map(ln -> {
if (ln == null || ln.trim().isEmpty()) {
return null;
}
try {
return Long.parseLong(ln.trim());
} catch (NumberFormatException ex) {
return null;
}
})
.filter(num -> num != null)
.mapToLong(l -> l)
.toArray();
} else {
String sigarRegexQuery = convertSqlLikeToRegex(argsSubQuery);
ProcessBuilder pb = new ProcessBuilder("sh", "-c", "ps -ef | grep -E 'java.*" + sigarRegexQuery + ".*'");
String output = IOUtils.toString(pb.start().getInputStream(), StandardCharsets.UTF_8);
List<String> lines = Arrays.asList(output.split("\\r?\\n"));
if (lines.size() > 0) {
// ignore last one as it will be the same as this command
lines.remove(lines.size() - 1);
}
return lines.stream().skip(1).map(ln -> {
if (ln == null || ln.trim().isEmpty()) {
return null;
}
ln = ln.trim();
String[] pieces = ln.split("\\s*");
if (pieces.length < 2) {
return null;
}
try {
return Long.parseLong(pieces[1]);
} catch (NumberFormatException ex) {
return null;
}
})
.filter(num -> num != null)
.mapToLong(l -> l)
.toArray();
}
} catch (IOException ex) {
System.out.println("An exception occurred while fetching java pids with query: " + argsSubQuery + " with IO Exception: " + ex.getMessage());
ex.printStackTrace();
return null;
}
}
/**
@ -594,20 +649,16 @@ public class PlatformUtil {
* @param pid pid of the process to kill
*/
public static synchronized void killProcess(long pid) {
try {
if (sigar == null) {
sigar = org.sleuthkit.autopsy.corelibs.SigarLoader.getSigar();
}
if (sigar != null) {
sigar.kill(pid, 9);
} else {
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.killProcess.sigarNotInit.msg"));
}
} catch (Exception e) {
System.out.println(
NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.killProcess.gen.msg", pid, e.toString()));
}
String cmd = isWindowsOS()
? "taskkill /F /PID " + pid
: "kill " + pid;
try {
Runtime.getRuntime().exec(cmd);
} catch (IOException ex) {
System.out.println("An exception occurred while killing process pid: " + pid);
ex.printStackTrace();
}
}
/**
@ -616,23 +667,8 @@ public class PlatformUtil {
* @return virt memory used in bytes or -1 if couldn't be queried
*/
public static synchronized long getProcessVirtualMemoryUsed() {
long virtMem = -1;
try {
if (sigar == null) {
sigar = org.sleuthkit.autopsy.corelibs.SigarLoader.getSigar();
}
if (sigar == null || getPID() == -1) {
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getProcVmUsed.sigarNotInit.msg"));
return -1;
}
virtMem = sigar.getProcMem(getPID()).getSize();
} catch (Exception e) {
System.out.println(NbBundle.getMessage(PlatformUtil.class, "PlatformUtil.getProcVmUsed.gen.msg", e.toString()));
}
return virtMem;
// taken from https://stackoverflow.com/a/17376879/2375948
return Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
}
/**

View File

@ -55,6 +55,11 @@ import org.xml.sax.SAXException;
*/
public class XMLUtil {
static {
// this is to ensure using xalan for the transformer factory: https://stackoverflow.com/a/64364531/2375948
System.setProperty("javax.xml.transform.TransformerFactory","com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
}
private static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException {
// See JIRA-6958 for details about class loading and jaxb.
ClassLoader original = Thread.currentThread().getContextClassLoader();

View File

@ -515,7 +515,7 @@ public class Artifacts {
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error getting child count", ex); //NON-NLS
}
super.setDisplayName(this.baseName + " \u200E(\u200E" + this.childCount + ")\u200E");
super.setDisplayName(this.baseName + " (" + this.childCount + ")");
}
}

View File

@ -48,6 +48,10 @@ public interface AutopsyItemVisitor<T> {
T visit(DeletedContent dc);
T visit(DeletedContent.DeletedContentFilter dcf);
T visit(ScoreContent sc);
T visit(ScoreContent.ScoreContentFilter scf);
T visit(FileSize fs);
@ -124,6 +128,16 @@ public interface AutopsyItemVisitor<T> {
public T visit(DeletedContent.DeletedContentFilter dcf) {
return defaultVisit(dcf);
}
@Override
public T visit(ScoreContent dc) {
return defaultVisit(dc);
}
@Override
public T visit(ScoreContent.ScoreContentFilter dcf) {
return defaultVisit(dcf);
}
@Override
public T visit(FileSize fs) {

View File

@ -412,6 +412,13 @@ ReportNode.reportNameProperty.name=Report Name
ReportNode.reportNameProperty.displayName=Report Name
ReportNode.reportNameProperty.desc=Name of the report
ReportsListNode.displayName=Reports
ScoreContent_badFilter_text=Bad Items
ScoreContent_createSheet_filterType_desc=no description
ScoreContent_createSheet_filterType_displayName=Type
ScoreContent_createSheet_name_desc=no description
ScoreContent_createSheet_name_displayName=Name
ScoreContent_ScoreContentNode_name=Score
ScoreContent_susFilter_text=Suspicious Items
SlackFileNode.getActions.viewInNewWin.text=View in New Window
SlackFileNode.getActions.viewFileInDir.text=View File in Directory
SpecialDirectoryNode.getActions.viewInNewWin.text=View in New Window

View File

@ -32,6 +32,8 @@ import org.sleuthkit.autopsy.datamodel.FileSize.FileSizeRootNode;
import org.sleuthkit.autopsy.datamodel.FileTypes.FileTypesNode;
import org.sleuthkit.autopsy.datamodel.accounts.Accounts;
import org.sleuthkit.autopsy.allcasessearch.CorrelationAttributeInstanceNode;
import org.sleuthkit.autopsy.datamodel.ScoreContent.ScoreContentsNode;
import org.sleuthkit.autopsy.datamodel.ScoreContent.ScoreContentsChildren.ScoreContentNode;
/**
* Visitor pattern that goes over all nodes in the directory tree. This includes
@ -78,6 +80,10 @@ public interface DisplayableItemNodeVisitor<T> {
T visit(DeletedContentsNode dcn);
T visit(ScoreContentNode scn);
T visit(ScoreContentsNode scn);
T visit(FileSizeRootNode fsrn);
T visit(FileSizeNode fsn);
@ -335,6 +341,16 @@ public interface DisplayableItemNodeVisitor<T> {
return defaultVisit(dcn);
}
@Override
public T visit(ScoreContentNode scn) {
return defaultVisit(scn);
}
@Override
public T visit(ScoreContentsNode scn) {
return defaultVisit(scn);
}
@Override
public T visit(DeletedContentsNode dcn) {
return defaultVisit(dcn);

View File

@ -24,6 +24,8 @@ import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.datamodel.ScoreContent.ScoreContentsChildren;
import org.sleuthkit.autopsy.datamodel.ScoreContent.ScoreContentsChildren.ScoreContentNode;
import org.sleuthkit.autopsy.datamodel.accounts.Accounts;
import org.sleuthkit.datamodel.SleuthkitVisitableItem;
@ -98,6 +100,11 @@ public class RootContentChildren extends Children.Keys<Object> {
return new DeletedContent.DeletedContentsNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());
}
@Override
public AbstractNode visit(ScoreContent sc) {
return new ScoreContent.ScoreContentsNode(sc.getSleuthkitCase(), sc.filteringDataSourceObjId());
}
@Override
public AbstractNode visit(FileSize dc) {
return new FileSize.FileSizeRootNode(dc.getSleuthkitCase(), dc.filteringDataSourceObjId());

View File

@ -0,0 +1,596 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2023 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.datamodel;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import org.apache.commons.lang3.StringUtils;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.ChildFactory;
import org.openide.nodes.Children;
import org.openide.nodes.Node;
import org.openide.nodes.Sheet;
import org.openide.util.NbBundle;
import org.openide.util.WeakListeners;
import org.openide.util.lookup.Lookups;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.guiutils.RefreshThrottler;
import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.autopsy.ingest.IngestManager.IngestModuleEvent;
import org.sleuthkit.autopsy.ingest.ModuleDataEvent;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.BlackboardArtifact.Category;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.ContentVisitor;
import org.sleuthkit.datamodel.DerivedFile;
import org.sleuthkit.datamodel.Directory;
import org.sleuthkit.datamodel.File;
import org.sleuthkit.datamodel.FsContent;
import org.sleuthkit.datamodel.LayoutFile;
import org.sleuthkit.datamodel.LocalFile;
import org.sleuthkit.datamodel.Score.Priority;
import org.sleuthkit.datamodel.Score.Significance;
import org.sleuthkit.datamodel.SlackFile;
import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.VirtualDirectory;
/**
* Score content view nodes.
*/
public class ScoreContent implements AutopsyVisitableItem {
private SleuthkitCase skCase;
private final long filteringDSObjId; // 0 if not filtering/grouping by data source
@NbBundle.Messages({"ScoreContent_badFilter_text=Bad Items",
"ScoreContent_susFilter_text=Suspicious Items"})
public enum ScoreContentFilter implements AutopsyVisitableItem {
BAD_ITEM_FILTER(0, "BAD_ITEM_FILTER",
Bundle.ScoreContent_badFilter_text()),
SUS_ITEM_FILTER(1, "SUS_ITEM_FILTER",
Bundle.ScoreContent_susFilter_text());
private int id;
private String name;
private String displayName;
private ScoreContentFilter(int id, String name, String displayName) {
this.id = id;
this.name = name;
this.displayName = displayName;
}
public String getName() {
return this.name;
}
public int getId() {
return this.id;
}
public String getDisplayName() {
return this.displayName;
}
@Override
public <T> T accept(AutopsyItemVisitor<T> visitor) {
return visitor.visit(this);
}
}
/**
* Constructor assuming no data source filtering.
* @param skCase The sleuthkit case.
*/
public ScoreContent(SleuthkitCase skCase) {
this(skCase, 0);
}
/**
* Constructor.
* @param skCase The sleuthkit case.
* @param dsObjId The data source object id to filter on if > 0.
*/
public ScoreContent(SleuthkitCase skCase, long dsObjId) {
this.skCase = skCase;
this.filteringDSObjId = dsObjId;
}
/**
* @return The data source object id to filter on if > 0.
*/
long filteringDataSourceObjId() {
return this.filteringDSObjId;
}
@Override
public <T> T accept(AutopsyItemVisitor<T> visitor) {
return visitor.visit(this);
}
/**
* @return The sleuthkit case used.
*/
public SleuthkitCase getSleuthkitCase() {
return this.skCase;
}
private static final Set<Case.Events> CASE_EVENTS_OF_INTEREST = EnumSet.of(
Case.Events.DATA_SOURCE_ADDED,
Case.Events.CURRENT_CASE,
Case.Events.CONTENT_TAG_ADDED,
Case.Events.CONTENT_TAG_DELETED,
Case.Events.BLACKBOARD_ARTIFACT_TAG_ADDED,
Case.Events.BLACKBOARD_ARTIFACT_TAG_DELETED
);
private static final Set<IngestManager.IngestJobEvent> INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.COMPLETED, IngestManager.IngestJobEvent.CANCELLED);
private static final Set<IngestManager.IngestModuleEvent> INGEST_MODULE_EVENTS_OF_INTEREST = EnumSet.of(IngestModuleEvent.CONTENT_CHANGED);
/**
* Returns a property change listener listening for possible updates to aggregate score updates for files.
* @param onRefresh Action on refresh.
* @param onRemove Action to remove listener (i.e. case close).
* @return The property change listener.
*/
private static PropertyChangeListener getPcl(final Runnable onRefresh, final Runnable onRemove) {
return (PropertyChangeEvent evt) -> {
String eventType = evt.getPropertyName();
if (eventType.equals(IngestManager.IngestModuleEvent.CONTENT_CHANGED.toString())) {
// only refresh if there is a current case.
try {
Case.getCurrentCaseThrows();
if (onRefresh != null) {
onRefresh.run();
}
} catch (NoCurrentCaseException notUsed) {
/**
* Case is closed, do nothing.
*/
}
} else if (eventType.equals(Case.Events.CURRENT_CASE.toString())) {
// case was closed. Remove listeners so that we don't get called with a stale case handle
if (evt.getNewValue() == null && onRemove != null) {
onRemove.run();
}
} else if (CASE_EVENTS_OF_INTEREST.contains(eventType)) {
// only refresh if there is a current case.
try {
Case.getCurrentCaseThrows();
if (onRefresh != null) {
onRefresh.run();
}
} catch (NoCurrentCaseException notUsed) {
/**
* Case is closed, do nothing.
*/
}
}
};
}
/**
* The sql where statement for the files.
* @param filter The filter type.
* @param filteringDSObjId The data source object id to filter on if > 0.
* @return The sql where statement.
* @throws IllegalArgumentException
*/
static private String getFileFilter(ScoreContent.ScoreContentFilter filter, long filteringDSObjId) throws IllegalArgumentException {
String aggregateScoreFilter = "";
switch (filter) {
case SUS_ITEM_FILTER:
aggregateScoreFilter = " tsk_aggregate_score.significance = " + Significance.LIKELY_NOTABLE.getId() + " AND (tsk_aggregate_score.priority = " + Priority.NORMAL.getId() + " OR tsk_aggregate_score.priority = " + Priority.OVERRIDE.getId() + " )";
break;
case BAD_ITEM_FILTER:
aggregateScoreFilter = " tsk_aggregate_score.significance = " + Significance.NOTABLE.getId() + " AND (tsk_aggregate_score.priority = " + Priority.NORMAL.getId() + " OR tsk_aggregate_score.priority = " + Priority.OVERRIDE.getId() + " )";
break;
default:
throw new IllegalArgumentException(MessageFormat.format("Unsupported filter type to get suspect content: {0}", filter));
}
String query = " obj_id IN (SELECT tsk_aggregate_score.obj_id FROM tsk_aggregate_score WHERE " + aggregateScoreFilter + ") ";
if (filteringDSObjId > 0) {
query += " AND data_source_obj_id = " + filteringDSObjId;
}
return query;
}
/**
* Checks for analysis results added to the case that could affect the
* aggregate score of the file.
*
* @param evt The event.
* @return True if has an analysis result.
*/
private static boolean isRefreshRequired(PropertyChangeEvent evt) {
String eventType = evt.getPropertyName();
if (eventType.equals(IngestManager.IngestModuleEvent.DATA_ADDED.toString())) {
// check if current case is active before updating
try {
Case.getCurrentCaseThrows();
final ModuleDataEvent event = (ModuleDataEvent) evt.getOldValue();
if (null != event && Category.ANALYSIS_RESULT.equals(event.getBlackboardArtifactType().getCategory())) {
return true;
}
} catch (NoCurrentCaseException notUsed) {
/**
* Case is closed, do nothing.
*/
}
}
return false;
}
/**
* Parent node in views section for content with score.
*/
public static class ScoreContentsNode extends DisplayableItemNode {
@NbBundle.Messages("ScoreContent_ScoreContentNode_name=Score")
private static final String NAME = Bundle.ScoreContent_ScoreContentNode_name();
ScoreContentsNode(SleuthkitCase skCase, long datasourceObjId) {
super(Children.create(new ScoreContentsChildren(skCase, datasourceObjId), true), Lookups.singleton(NAME));
super.setName(NAME);
super.setDisplayName(NAME);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/red-circle-exclamation.png"); //NON-NLS
}
@Override
public boolean isLeafTypeNode() {
return false;
}
@Override
public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
return visitor.visit(this);
}
@Override
@NbBundle.Messages({
"ScoreContent_createSheet_name_displayName=Name",
"ScoreContent_createSheet_name_desc=no description"})
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
if (sheetSet == null) {
sheetSet = Sheet.createPropertiesSet();
sheet.put(sheetSet);
}
sheetSet.put(new NodeProperty<>("Name", //NON-NLS
Bundle.ScoreContent_createSheet_name_displayName(),
Bundle.ScoreContent_createSheet_name_desc(),
NAME));
return sheet;
}
@Override
public String getItemType() {
return getClass().getName();
}
}
/**
* Children that display a node for Bad Items and Score Items.
*/
public static class ScoreContentsChildren extends ChildFactory.Detachable<ScoreContent.ScoreContentFilter> implements RefreshThrottler.Refresher {
private SleuthkitCase skCase;
private final long datasourceObjId;
private final RefreshThrottler refreshThrottler = new RefreshThrottler(this);
private final PropertyChangeListener pcl = getPcl(
() -> ScoreContentsChildren.this.refresh(false),
() -> ScoreContentsChildren.this.removeNotify());
private final PropertyChangeListener weakPcl = WeakListeners.propertyChange(pcl, null);
private final Map<ScoreContentFilter, ScoreContentsChildren.ScoreContentNode> typeNodeMap = new HashMap<>();
public ScoreContentsChildren(SleuthkitCase skCase, long dsObjId) {
this.skCase = skCase;
this.datasourceObjId = dsObjId;
}
@Override
protected void addNotify() {
super.addNotify();
refreshThrottler.registerForIngestModuleEvents();
IngestManager.getInstance().addIngestJobEventListener(INGEST_JOB_EVENTS_OF_INTEREST, weakPcl);
IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl);
Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl);
}
@Override
protected void removeNotify() {
refreshThrottler.unregisterEventListener();
IngestManager.getInstance().removeIngestJobEventListener(INGEST_JOB_EVENTS_OF_INTEREST, weakPcl);
IngestManager.getInstance().removeIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl);
Case.removeEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl);
typeNodeMap.clear();
}
@Override
public void refresh() {
refresh(false);
}
@Override
public boolean isRefreshRequired(PropertyChangeEvent evt) {
return ScoreContent.isRefreshRequired(evt);
}
@Override
protected boolean createKeys(List<ScoreContent.ScoreContentFilter> list) {
list.addAll(Arrays.asList(ScoreContent.ScoreContentFilter.values()));
typeNodeMap.values().forEach(nd -> nd.updateDisplayName());
return true;
}
@Override
protected Node createNodeForKey(ScoreContent.ScoreContentFilter key) {
ScoreContentsChildren.ScoreContentNode nd = new ScoreContentsChildren.ScoreContentNode(skCase, key, datasourceObjId);
typeNodeMap.put(key, nd);
return nd;
}
/**
* Parent node showing files matching a score filter.
*/
public class ScoreContentNode extends DisplayableItemNode {
private static final Logger logger = Logger.getLogger(ScoreContentNode.class.getName());
private final ScoreContent.ScoreContentFilter filter;
private final long datasourceObjId;
ScoreContentNode(SleuthkitCase skCase, ScoreContent.ScoreContentFilter filter, long dsObjId) {
super(Children.create(new ScoreContentChildren(filter, skCase, dsObjId), true), Lookups.singleton(filter.getDisplayName()));
this.filter = filter;
this.datasourceObjId = dsObjId;
init();
}
private void init() {
super.setName(filter.getName());
String tooltip = filter.getDisplayName();
this.setShortDescription(tooltip);
switch (this.filter) {
case SUS_ITEM_FILTER:
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/yellow-circle-yield.png"); //NON-NLS
break;
default:
case BAD_ITEM_FILTER:
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/red-circle-exclamation.png"); //NON-NLS
break;
}
updateDisplayName();
}
void updateDisplayName() {
//get count of children without preloading all child nodes
long count = 0;
try {
count = calculateItems(skCase, filter, datasourceObjId);
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "An error occurred while fetching file counts", ex);
}
super.setDisplayName(filter.getDisplayName() + " (" + count + ")");
}
/**
* Get children count without actually loading all nodes
*
* @param sleuthkitCase
* @param filter
*
* @return
*/
private static long calculateItems(SleuthkitCase sleuthkitCase, ScoreContent.ScoreContentFilter filter, long datasourceObjId) throws TskCoreException {
return sleuthkitCase.countFilesWhere(getFileFilter(filter, datasourceObjId));
}
@Override
public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
return visitor.visit(this);
}
@Override
@NbBundle.Messages({
"ScoreContent_createSheet_filterType_displayName=Type",
"ScoreContent_createSheet_filterType_desc=no description"})
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
if (sheetSet == null) {
sheetSet = Sheet.createPropertiesSet();
sheet.put(sheetSet);
}
sheetSet.put(new NodeProperty<>("Type", //NON_NLS
Bundle.ScoreContent_createSheet_filterType_displayName(),
Bundle.ScoreContent_createSheet_filterType_desc(),
filter.getDisplayName()));
return sheet;
}
@Override
public boolean isLeafTypeNode() {
return true;
}
@Override
public String getItemType() {
return DisplayableItemNode.FILE_PARENT_NODE_KEY;
}
}
/**
* Children showing files for a score filter.
*/
static class ScoreContentChildren extends BaseChildFactory<AbstractFile> implements RefreshThrottler.Refresher {
private final RefreshThrottler refreshThrottler = new RefreshThrottler(this);
private final PropertyChangeListener pcl = getPcl(
() -> ScoreContentChildren.this.refresh(false),
() -> ScoreContentChildren.this.removeNotify());
private final PropertyChangeListener weakPcl = WeakListeners.propertyChange(pcl, null);
private final SleuthkitCase skCase;
private final ScoreContent.ScoreContentFilter filter;
private static final Logger logger = Logger.getLogger(ScoreContentChildren.class.getName());
private final long datasourceObjId;
ScoreContentChildren(ScoreContent.ScoreContentFilter filter, SleuthkitCase skCase, long datasourceObjId) {
super(filter.getName(), new ViewsKnownAndSlackFilter<>());
this.skCase = skCase;
this.filter = filter;
this.datasourceObjId = datasourceObjId;
}
@Override
protected void onAdd() {
refreshThrottler.registerForIngestModuleEvents();
IngestManager.getInstance().addIngestJobEventListener(INGEST_JOB_EVENTS_OF_INTEREST, weakPcl);
IngestManager.getInstance().addIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl);
Case.addEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl);
}
@Override
protected void onRemove() {
refreshThrottler.unregisterEventListener();
IngestManager.getInstance().removeIngestJobEventListener(INGEST_JOB_EVENTS_OF_INTEREST, weakPcl);
IngestManager.getInstance().removeIngestModuleEventListener(INGEST_MODULE_EVENTS_OF_INTEREST, weakPcl);
Case.removeEventTypeSubscriber(CASE_EVENTS_OF_INTEREST, weakPcl);
}
@Override
public void refresh() {
refresh(false);
}
@Override
public boolean isRefreshRequired(PropertyChangeEvent evt) {
return ScoreContent.isRefreshRequired(evt);
}
private List<AbstractFile> runFsQuery() {
List<AbstractFile> ret = new ArrayList<>();
String query = null;
try {
query = getFileFilter(filter, datasourceObjId);
ret = skCase.findAllFilesWhere(query);
} catch (TskCoreException | IllegalArgumentException e) {
logger.log(Level.SEVERE, "Error getting files for the deleted content view using: " + StringUtils.defaultString(query, "<null>"), e); //NON-NLS
}
return ret;
}
@Override
protected List<AbstractFile> makeKeys() {
return runFsQuery();
}
@Override
protected Node createNodeForKey(AbstractFile key) {
return key.accept(new ContentVisitor.Default<AbstractNode>() {
public FileNode visit(AbstractFile f) {
return new FileNode(f, false);
}
public FileNode visit(FsContent f) {
return new FileNode(f, false);
}
@Override
public FileNode visit(LayoutFile f) {
return new FileNode(f, false);
}
@Override
public FileNode visit(File f) {
return new FileNode(f, false);
}
@Override
public FileNode visit(Directory f) {
return new FileNode(f, false);
}
@Override
public FileNode visit(VirtualDirectory f) {
return new FileNode(f, false);
}
@Override
public AbstractNode visit(SlackFile sf) {
return new FileNode(sf, false);
}
@Override
public AbstractNode visit(LocalFile lf) {
return new FileNode(lf, false);
}
@Override
public AbstractNode visit(DerivedFile df) {
return new FileNode(df, false);
}
@Override
protected AbstractNode defaultVisit(Content di) {
if (di instanceof AbstractFile) {
return visit((AbstractFile) di);
} else {
throw new UnsupportedOperationException("Not supported for this type of Displayable Item: " + di.toString());
}
}
});
}
}
}
}

View File

@ -329,7 +329,7 @@ public class Tags implements AutopsyVisitableItem {
} catch (TskCoreException | NoCurrentCaseException ex) {
Logger.getLogger(TagNameNode.class.getName()).log(Level.SEVERE, "Failed to get tags count for " + tagName.getDisplayName() + " tag name", ex); //NON-NLS
}
setDisplayName(TagUtils.getDecoratedTagDisplayName(tagName) + " \u200E(\u200E" + tagsCount + ")\u200E");
setDisplayName(TagUtils.getDecoratedTagDisplayName(tagName) + " (" + tagsCount + ")");
}
@Override

View File

@ -46,7 +46,8 @@ public class ViewsNode extends DisplayableItemNode {
// add it back in if we can filter the results to a more managable size.
// new RecentFiles(sleuthkitCase),
new DeletedContent(sleuthkitCase, dsObjId),
new FileSize(sleuthkitCase, dsObjId))
new FileSize(sleuthkitCase, dsObjId),
new ScoreContent(sleuthkitCase, dsObjId))
),
Lookups.singleton(NAME)
);

View File

@ -84,12 +84,7 @@ class DirectoryTreeFilterNode extends FilterNode {
try {
int numVisibleChildren = getVisibleChildCount(file);
/*
* Left-to-right marks here are necessary to keep the count
* and parens together for mixed right-to-left and
* left-to-right names.
*/
name = name + " \u200E(\u200E" + numVisibleChildren + ")\u200E"; //NON-NLS
name = name + " (" + numVisibleChildren + ")"; //NON-NLS
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting children count to display for file: " + file, ex); //NON-NLS
@ -98,7 +93,7 @@ class DirectoryTreeFilterNode extends FilterNode {
BlackboardArtifact artifact = ((BlackboardArtifactNode) orig).getArtifact();
try {
int numAttachments = artifact.getChildrenCount();
name = name + " \u200E(\u200E" + numAttachments + ")\u200E"; //NON-NLS
name = name + " (" + numAttachments + ")"; //NON-NLS
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting chidlren count for atifact: " + artifact, ex); //NON-NLS
}

View File

@ -18,20 +18,24 @@
*/
package org.sleuthkit.autopsy.directorytree;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.SequenceWriter;
import com.fasterxml.jackson.dataformat.csv.CsvMapper;
import com.fasterxml.jackson.dataformat.csv.CsvSchema;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.lang.reflect.InvocationTargetException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import javax.swing.AbstractAction;
@ -57,7 +61,8 @@ import org.sleuthkit.autopsy.guiutils.JFileChooserFactory;
* Exports CSV version of result nodes to a location selected by the user.
*/
public final class ExportCSVAction extends AbstractAction {
// number of rows to sample for different columns
private static final int COLUMN_SAMPLING_ROW_NUM = 100;
private static final Logger logger = Logger.getLogger(ExportCSVAction.class.getName());
private final static String DEFAULT_FILENAME = "Results";
private final static List<String> columnsToSkip = Arrays.asList(AbstractFilePropertyType.SCORE.toString(),
@ -276,43 +281,64 @@ public final class ExportCSVAction extends AbstractAction {
progress.start();
progress.switchToIndeterminate();
try (BufferedWriter br = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8))) {
// Write BOM
br.write('\ufeff');
if (this.isCancelled()) {
return null;
}
Set<String> columnHeaderStrs = new HashSet<>();
List<CsvSchema.Column> columnHeaders = new ArrayList<>();
int remainingRowsToSample = 0;
int columnIdx = 0;
for (Node nd: nodesToExport) {
// sample up to 100 rows
if (remainingRowsToSample >= COLUMN_SAMPLING_ROW_NUM) {
break;
}
remainingRowsToSample++;
// Write the header
List<String> headers = new ArrayList<>();
PropertySet[] sets = nodesToExport.iterator().next().getPropertySets();
for(PropertySet set : sets) {
for (Property<?> prop : set.getProperties()) {
if ( ! columnsToSkip.contains(prop.getDisplayName())) {
headers.add(prop.getDisplayName());
for (PropertySet ps: nd.getPropertySets()) {
for (Property prop: ps.getProperties()) {
if (!columnHeaderStrs.contains(prop.getDisplayName()) && !columnsToSkip.contains(prop.getName())) {
columnHeaderStrs.add(prop.getDisplayName());
columnHeaders.add(new CsvSchema.Column(columnIdx, prop.getDisplayName()));
columnIdx++;
}
}
}
br.write(listToCSV(headers));
}
if (this.isCancelled()) {
return null;
}
CsvSchema schema = CsvSchema.builder()
.addColumns(columnHeaders)
.setUseHeader(true)
.setNullValue("")
.build();
CsvMapper mapper = new CsvMapper();
ObjectWriter writer = mapper.writerFor(Map.class).with(schema);
try (SequenceWriter seqWriter = writer.writeValues(outputFile)) {
// Write each line
Iterator<?> nodeIterator = nodesToExport.iterator();
while (nodeIterator.hasNext()) {
if (this.isCancelled()) {
break;
return null;
}
Map<String, Object> rowMap = new HashMap<>();
Node node = (Node)nodeIterator.next();
List<String> values = new ArrayList<>();
sets = node.getPropertySets();
for(PropertySet set : sets) {
for(PropertySet set : node.getPropertySets()) {
for (Property<?> prop : set.getProperties()) {
if ( ! columnsToSkip.contains(prop.getDisplayName())) {
values.add(escapeQuotes(prop.getValue().toString()));
if (!columnsToSkip.contains(prop.getName())) {
rowMap.put(prop.getDisplayName(), prop.getValue());
}
}
}
br.write(listToCSV(values));
seqWriter.write(rowMap);
}
}
return null;
}

View File

@ -0,0 +1,228 @@
package org.sleuthkit.autopsy.guicomponentutils;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.ComboBoxEditor;
import javax.swing.ComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.JTextComponent;
import javax.swing.text.PlainDocument;
/*
* This code is taken from http://www.orbital-computer.de/JComboBox/source/AutoCompletion.java
* Author: Thomas Bierhance
* This work is hereby released into the Public Domain. To view a copy of the
* public domain dedication, visit
* http://creativecommons.org/licenses/publicdomain/
*/
public class AutoCompletion extends PlainDocument {
private static final long serialVersionUID = 1L;
private JComboBox<?> comboBox;
private ComboBoxModel<?> model;
private JTextComponent editor;
// flag to indicate if setSelectedItem has been called
// subsequent calls to remove/insertString should be ignored
private boolean selecting = false;
private boolean hidePopupOnFocusLoss;
private boolean hitBackspace = false;
private boolean hitBackspaceOnSelection;
private KeyListener editorKeyListener;
private FocusListener editorFocusListener;
public AutoCompletion(final JComboBox<?> comboBox) {
this.comboBox = comboBox;
model = comboBox.getModel();
comboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (!selecting) {
highlightCompletedText(0);
}
}
});
comboBox.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent e) {
if (e.getPropertyName().equals("editor")) {
configureEditor((ComboBoxEditor) e.getNewValue());
}
if (e.getPropertyName().equals("model")) {
model = (ComboBoxModel) e.getNewValue();
}
}
});
editorKeyListener = new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (comboBox.isDisplayable()) {
comboBox.setPopupVisible(true);
}
hitBackspace = false;
switch (e.getKeyCode()) {
// determine if the pressed key is backspace (needed by the remove method)
case KeyEvent.VK_BACK_SPACE:
hitBackspace = true;
hitBackspaceOnSelection = editor.getSelectionStart() != editor.getSelectionEnd();
break;
// ignore delete key
case KeyEvent.VK_DELETE:
e.consume();
comboBox.getToolkit().beep();
break;
}
}
};
// Bug 5100422 on Java 1.5: Editable JComboBox won't hide popup when tabbing out
hidePopupOnFocusLoss = System.getProperty("java.version").startsWith("1.5");
// Highlight whole text when gaining focus
editorFocusListener = new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
highlightCompletedText(0);
}
@Override
public void focusLost(FocusEvent e) {
// Workaround for Bug 5100422 - Hide Popup on focus loss
if (hidePopupOnFocusLoss) {
comboBox.setPopupVisible(false);
}
}
};
configureEditor(comboBox.getEditor());
// Handle initially selected object
Object selected = comboBox.getSelectedItem();
if (selected != null) {
setText(selected.toString());
}
highlightCompletedText(0);
}
public static void enable(JComboBox<?> comboBox) {
// has to be editable
comboBox.setEditable(true);
// change the editor's document
new AutoCompletion(comboBox);
}
void configureEditor(ComboBoxEditor newEditor) {
if (editor != null) {
editor.removeKeyListener(editorKeyListener);
editor.removeFocusListener(editorFocusListener);
}
if (newEditor != null) {
editor = (JTextComponent) newEditor.getEditorComponent();
editor.addKeyListener(editorKeyListener);
editor.addFocusListener(editorFocusListener);
editor.setDocument(this);
}
}
public void remove(int offs, int len) throws BadLocationException {
// return immediately when selecting an item
if (selecting) {
return;
}
if (hitBackspace) {
// user hit backspace => move the selection backwards
// old item keeps being selected
if (offs > 0) {
if (hitBackspaceOnSelection) {
offs--;
}
} else {
// User hit backspace with the cursor positioned on the start => beep
comboBox.getToolkit().beep(); // when available use: UIManager.getLookAndFeel().provideErrorFeedback(comboBox);
}
highlightCompletedText(offs);
} else {
super.remove(offs, len);
}
}
@Override
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
// return immediately when selecting an item
if (selecting) {
return;
}
// insert the string into the document
super.insertString(offs, str, a);
// lookup and select a matching item
Object item = lookupItem(getText(0, getLength()));
if (item != null) {
setSelectedItem(item);
} else {
// keep old item selected if there is no match
item = comboBox.getSelectedItem();
// imitate no insert (later on offs will be incremented by str.length(): selection won't move forward)
offs = offs - str.length();
// provide feedback to the user that his input has been received but can not be accepted
comboBox.getToolkit().beep(); // when available use: UIManager.getLookAndFeel().provideErrorFeedback(comboBox);
}
setText(item.toString());
// select the completed part
highlightCompletedText(offs + str.length());
}
private void setText(String text) {
try {
// remove all text and insert the completed string
super.remove(0, getLength());
super.insertString(0, text, null);
} catch (BadLocationException e) {
throw new RuntimeException(e.toString());
}
}
private void highlightCompletedText(int start) {
editor.setCaretPosition(getLength());
editor.moveCaretPosition(start);
}
private void setSelectedItem(Object item) {
selecting = true;
model.setSelectedItem(item);
selecting = false;
}
private Object lookupItem(String pattern) {
Object selectedItem = model.getSelectedItem();
// only search for a different item if the currently selected does not match
if (selectedItem != null && startsWithIgnoreCase(selectedItem.toString(), pattern)) {
return selectedItem;
} else {
// iterate over all items
for (int i = 0, n = model.getSize(); i < n; i++) {
Object currentItem = model.getElementAt(i);
// current item starts with the pattern?
if (currentItem != null && startsWithIgnoreCase(currentItem.toString(), pattern)) {
return currentItem;
}
}
}
// no item starts with the pattern => return null
return null;
}
// checks if str1 starts with str2 - ignores case
private boolean startsWithIgnoreCase(String str1, String str2) {
return str1.toUpperCase().startsWith(str2.toUpperCase());
}
}

View File

@ -25,6 +25,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@ -402,7 +403,7 @@ public final class IngestJobSettings {
}
for (String moduleName : disabledModuleNames) {
if (!loadedModuleNames.contains(moduleName)) {
missingModuleNames.add(moduleName);
logger.log(Level.WARNING, MessageFormat.format("A module marked as disabled in the ingest job settings, ''{0}'', could not be found.", moduleName));
}
}
for (String moduleName : missingModuleNames) {

View File

@ -23,8 +23,8 @@ import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import javax.xml.bind.DatatypeConverter;
import java.util.Arrays;
import org.apache.commons.codec.binary.Hex;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
import org.sleuthkit.autopsy.ingest.DataSourceIngestModuleProgress;
@ -250,8 +250,8 @@ public class DataSourceIntegrityIngestModule implements DataSourceIngestModule {
}
// Produce the final hashes
for (HashData hashData : hashDataList) {
hashData.calculatedHash = DatatypeConverter.printHexBinary(hashData.digest.digest()).toLowerCase();
for(HashData hashData: hashDataList) {
hashData.calculatedHash = Hex.encodeHexString(hashData.digest.digest()).toLowerCase();
logger.log(Level.INFO, "Hash calculated from {0}: {1}", new Object[]{imgName, hashData.calculatedHash}); //NON-NLS
}

View File

@ -22,7 +22,8 @@ import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
import javax.xml.bind.DatatypeConverter;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.modules.filetypeid.FileType.Signature;
@ -101,7 +102,7 @@ class AddFileTypeSignaturePanel extends javax.swing.JPanel {
this.offsetTextField.setText(toEdit.getOffset() + "");
if (Signature.Type.RAW == toEdit.getType()) {
this.signatureTypeComboBox.setSelectedIndex(0);
this.signatureTextField.setText(DatatypeConverter.printHexBinary(toEdit.getSignatureBytes()));
this.signatureTextField.setText(Hex.encodeHexString(toEdit.getSignatureBytes()));
} else {
this.signatureTypeComboBox.setSelectedIndex(1);
try {
@ -146,8 +147,8 @@ class AddFileTypeSignaturePanel extends javax.swing.JPanel {
if (FileType.Signature.Type.RAW == sigType) {
try {
sigString = sigString.replaceAll("\\s", ""); //NON-NLS
signatureBytes = DatatypeConverter.parseHexBinary(sigString);
} catch (IllegalArgumentException ex) {
signatureBytes = Hex.decodeHex(sigString);
} catch (DecoderException ex) {
JOptionPane.showMessageDialog(this,
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidRawSignatureBytes.message"),
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidSignatureBytes.title"),

View File

@ -28,6 +28,8 @@ import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.DatatypeConverter;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.openide.util.io.NbObjectInputStream;
import org.openide.util.io.NbObjectOutputStream;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
@ -166,7 +168,7 @@ final class CustomFileTypesManager {
/*
* Add type for gzip.
*/
byteArray = DatatypeConverter.parseHexBinary("1F8B"); //NON-NLS
byteArray = Hex.decodeHex("1F8B"); //NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 0L));
fileType = new FileType("application/x-gzip", signatureList); //NON-NLS
@ -175,7 +177,7 @@ final class CustomFileTypesManager {
/*
* Add type for wk1.
*/
byteArray = DatatypeConverter.parseHexBinary("0000020006040600080000000000"); //NON-NLS
byteArray = Hex.decodeHex("0000020006040600080000000000"); //NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 0L));
fileType = new FileType("application/x-123", signatureList); //NON-NLS
@ -184,7 +186,7 @@ final class CustomFileTypesManager {
/*
* Add type for Radiance images.
*/
byteArray = DatatypeConverter.parseHexBinary("233F52414449414E43450A");//NON-NLS
byteArray = Hex.decodeHex("233F52414449414E43450A");//NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 0L));
fileType = new FileType("image/vnd.radiance", signatureList); //NON-NLS
@ -193,7 +195,7 @@ final class CustomFileTypesManager {
/*
* Add type for dcx images.
*/
byteArray = DatatypeConverter.parseHexBinary("B168DE3A"); //NON-NLS
byteArray = Hex.decodeHex("B168DE3A"); //NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 0L));
fileType = new FileType("image/x-dcx", signatureList); //NON-NLS
@ -210,7 +212,7 @@ final class CustomFileTypesManager {
/*
* Add type for pict images.
*/
byteArray = DatatypeConverter.parseHexBinary("001102FF"); //NON-NLS
byteArray = Hex.decodeHex("001102FF"); //NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 522L));
fileType = new FileType("image/x-pict", signatureList); //NON-NLS
@ -251,7 +253,7 @@ final class CustomFileTypesManager {
/*
* Add type for tga.
*/
byteArray = DatatypeConverter.parseHexBinary("54525545564953494F4E2D5846494C452E00"); //NON-NLS
byteArray = Hex.decodeHex("54525545564953494F4E2D5846494C452E00"); //NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 17, false));
fileType = new FileType("image/x-tga", signatureList); //NON-NLS
@ -311,7 +313,7 @@ final class CustomFileTypesManager {
* Add type for .tec files with leading End Of Image marker (JFIF
* JPEG)
*/
byteArray = DatatypeConverter.parseHexBinary("FFD9FFD8"); //NON-NLS
byteArray = Hex.decodeHex("FFD9FFD8"); //NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 0L));
fileType = new FileType("image/jpeg", signatureList); //NON-NLS
@ -321,7 +323,7 @@ final class CustomFileTypesManager {
* Add type for Windows NT registry files with leading End Of Image marker (JFIF
* JPEG)
*/
byteArray = DatatypeConverter.parseHexBinary("72656766"); //NON-NLS
byteArray = Hex.decodeHex("72656766"); //NON-NLS
signatureList.clear();
signatureList.add(new Signature(byteArray, 0L));
fileType = new FileType("application/x.windows-registry", signatureList); //NON-NLS
@ -345,9 +347,10 @@ final class CustomFileTypesManager {
fileType = new FileType("application/x-vhd", signatureList); //NON-NLS
autopsyDefinedFileTypes.add(fileType);
} catch (IllegalArgumentException ex) {
} catch (DecoderException ex) {
/*
* parseHexBinary() throws this if the argument passed in is not hex
* decodeHex() throws this if an odd number of characters or illegal
* characters are supplied
*/
throw new CustomFileTypesException("Error creating Autopsy defined custom file types", ex); //NON-NLS
}
@ -442,7 +445,7 @@ final class CustomFileTypesManager {
}
}
return fileTypes;
} catch (IOException | ParserConfigurationException | SAXException ex) {
} catch (IOException | ParserConfigurationException | SAXException | DecoderException ex) {
throw new CustomFileTypesException(String.format("Failed to read ssettings from %s", filePath), ex); //NON-NLS
}
}
@ -459,7 +462,7 @@ final class CustomFileTypesManager {
* @throws NumberFormatException if there is a problem parsing the file
* type.
*/
private static FileType parseFileType(Element fileTypeElem) throws IllegalArgumentException, NumberFormatException {
private static FileType parseFileType(Element fileTypeElem) throws DecoderException, NumberFormatException {
String mimeType = parseMimeType(fileTypeElem);
Signature signature = parseSignature(fileTypeElem);
// File type definitions in the XML file were written prior to the
@ -487,7 +490,7 @@ final class CustomFileTypesManager {
*
* @return The signature.
*/
private static Signature parseSignature(Element fileTypeElem) throws IllegalArgumentException, NumberFormatException {
private static Signature parseSignature(Element fileTypeElem) throws DecoderException, NumberFormatException {
NodeList signatureElems = fileTypeElem.getElementsByTagName(SIGNATURE_TAG_NAME);
Element signatureElem = (Element) signatureElems.item(0);
@ -495,18 +498,18 @@ final class CustomFileTypesManager {
Signature.Type signatureType = Signature.Type.valueOf(sigTypeAttribute);
String sigBytesString = getChildElementTextContent(signatureElem, BYTES_TAG_NAME);
byte[] signatureBytes = DatatypeConverter.parseHexBinary(sigBytesString);
byte[] signatureBytes = Hex.decodeHex(sigBytesString);
Element offsetElem = (Element) signatureElem.getElementsByTagName(OFFSET_TAG_NAME).item(0);
String offsetString = offsetElem.getTextContent();
long offset = DatatypeConverter.parseLong(offsetString);
long offset = Long.parseLong(offsetString);
boolean isRelativeToStart;
String relativeString = offsetElem.getAttribute(RELATIVE_ATTRIBUTE);
if (null == relativeString || relativeString.equals("")) {
isRelativeToStart = true;
} else {
isRelativeToStart = DatatypeConverter.parseBoolean(relativeString);
isRelativeToStart = Boolean.parseBoolean(relativeString);
}
return new Signature(signatureBytes, offset, signatureType, isRelativeToStart);

View File

@ -28,7 +28,7 @@ import java.util.List;
import java.util.Objects;
import java.util.logging.Level;
import javax.swing.JOptionPane;
import javax.xml.bind.DatatypeConverter;
import org.apache.commons.codec.binary.Hex;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.AbstractFile;
@ -389,7 +389,7 @@ class FileType implements Serializable {
public String toString() {
String signatureBytesString;
if (Signature.Type.RAW == this.getType()) {
signatureBytesString = DatatypeConverter.printHexBinary(this.getSignatureBytes());
signatureBytesString = Hex.encodeHexString(this.getSignatureBytes());
signatureBytesString = "0x" + signatureBytesString;
} else {
try {

View File

@ -18,6 +18,7 @@
*/
package org.sleuthkit.autopsy.modules.interestingitems;
import org.sleuthkit.autopsy.guicomponentutils.AutoCompletion;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.util.Arrays;
@ -76,6 +77,7 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
*/
FilesSetRulePanel(JButton okButton, JButton cancelButton, PANEL_TYPE panelType) {
initComponents();
AutoCompletion.enable(mimeTypeComboBox);
if (panelType == FilesSetDefsPanel.PANEL_TYPE.FILE_INGEST_FILTERS) { //Hide the mimetype settings when this is displaying a FileSet rule instead of a interesting item rule
mimeTypeComboBox.setVisible(false);
mimeCheck.setVisible(false);
@ -102,6 +104,7 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
*/
FilesSetRulePanel(FilesSet.Rule rule, JButton okButton, JButton cancelButton, PANEL_TYPE panelType) {
initComponents();
AutoCompletion.enable(mimeTypeComboBox);
if (panelType == FilesSetDefsPanel.PANEL_TYPE.FILE_INGEST_FILTERS) { //Hide the mimetype settings when this is displaying a FileSet rule instead of a interesting item rule
mimeTypeComboBox.setVisible(false);
mimeCheck.setVisible(false);

View File

@ -71,7 +71,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
private static final String ALEAPP_EXECUTABLE = "aleapp.exe";//NON-NLS
private static final String ALEAPP_PATHS_FILE = "aLeapp_paths.txt"; //NON-NLS
private static final String XMLFILE = "aleap-artifact-attribute-reference.xml"; //NON-NLS
private static final String XMLFILE = "aleapp-artifact-attribute-reference.xml"; //NON-NLS
private File aLeappExecutable;
@ -86,7 +86,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
@NbBundle.Messages({
"ALeappAnalyzerIngestModule.executable.not.found=aLeapp Executable Not Found.",
"ALeappAnalyzerIngestModule.requires.windows=aLeapp module requires windows.",
"ALeappAnalyzerIngestModule.error.ileapp.file.processor.init=Failure to initialize aLeappProcessFile"})
"ALeappAnalyzerIngestModule.error.aleapp.file.processor.init=Failure to initialize aLeappProcessFile"})
@Override
public void startUp(IngestJobContext context) throws IngestModuleException {
this.context = context;
@ -100,9 +100,9 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
}
try {
aLeappFileProcessor = new LeappFileProcessor(XMLFILE, ALeappAnalyzerModuleFactory.getModuleName(), context);
aLeappFileProcessor = new LeappFileProcessor(XMLFILE, ALeappAnalyzerModuleFactory.getModuleName(), ALEAPP, context);
} catch (IOException | IngestModuleException | NoCurrentCaseException ex) {
throw new IngestModuleException(Bundle.ALeappAnalyzerIngestModule_error_ileapp_file_processor_init(), ex);
throw new IngestModuleException(Bundle.ALeappAnalyzerIngestModule_error_aleapp_file_processor_init(), ex);
}
try {
@ -148,7 +148,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
writeErrorMsgToIngestInbox();
return ProcessResult.ERROR;
}
aLeappPathsToProcess = loadIleappPathFile(tempOutputPath);
aLeappPathsToProcess = loadAleappPathFile(tempOutputPath);
if (aLeappPathsToProcess.isEmpty()) {
logger.log(Level.SEVERE, String.format("Error getting file paths to search, list is empty"));
writeErrorMsgToIngestInbox();
@ -178,7 +178,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
}
statusHelper.switchToIndeterminate();
statusHelper.progress(Bundle.ILeappAnalyzerIngestModule_processing_iLeapp_results());
statusHelper.progress(Bundle.ALeappAnalyzerIngestModule_processing_aLeapp_results());
extractFilesFromDataSource(dataSource, aLeappPathsToProcess, tempOutputPath);
processALeappFs(dataSource, currentCase, statusHelper, tempOutputPath.toString());
@ -219,7 +219,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
return;
}
addILeappReportToReports(moduleOutputPath, currentCase);
addALeappReportToReports(moduleOutputPath, currentCase);
} catch (IOException ex) {
logger.log(Level.SEVERE, String.format("Error when trying to execute aLeapp program against file %s", aLeappFile.getLocalAbsPath()), ex);
@ -227,7 +227,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
}
if (context.dataSourceIngestIsCancelled()) {
logger.log(Level.INFO, "ILeapp Analyser ingest module run was canceled"); //NON-NLS
logger.log(Level.INFO, "aLeapp Analyser ingest module run was canceled"); //NON-NLS
return;
}
@ -262,7 +262,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
return;
}
addILeappReportToReports(moduleOutputPath, currentCase);
addALeappReportToReports(moduleOutputPath, currentCase);
} catch (IOException ex) {
logger.log(Level.SEVERE, String.format("Error when trying to execute aLeapp program against file system"), ex);
@ -270,7 +270,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
}
if (context.dataSourceIngestIsCancelled()) {
logger.log(Level.INFO, "ILeapp Analyser ingest module run was canceled"); //NON-NLS
logger.log(Level.INFO, "aLeapp Analyser ingest module run was canceled"); //NON-NLS
return;
}
@ -335,7 +335,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
* Find the index.html file in the aLeapp output directory so it can be
* added to reports
*/
private void addILeappReportToReports(Path aLeappOutputDir, Case currentCase) {
private void addALeappReportToReports(Path aLeappOutputDir, Case currentCase) {
List<String> allIndexFiles = new ArrayList<>();
try (Stream<Path> walk = Files.walk(aLeappOutputDir)) {
@ -363,7 +363,7 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule {
* Reads the aLeapp paths file to get the paths that we want to extract
*
*/
private List<String> loadIleappPathFile(Path moduleOutputPath) throws FileNotFoundException, IOException {
private List<String> loadAleappPathFile(Path moduleOutputPath) throws FileNotFoundException, IOException {
List<String> aLeappPathsToProcess = new ArrayList<>();
Path filePath = Paths.get(moduleOutputPath.toString(), ALEAPP_PATHS_FILE);

View File

@ -1,7 +1,7 @@
ALeappAnalyzerIngestModule.aLeapp.cancelled=aLeapp run was canceled
ALeappAnalyzerIngestModule.completed=aLeapp Processing Completed
ALeappAnalyzerIngestModule.error.aleapp.file.processor.init=Failure to initialize aLeappProcessFile
ALeappAnalyzerIngestModule.error.creating.output.dir=Error creating aLeapp module output directory.
ALeappAnalyzerIngestModule.error.ileapp.file.processor.init=Failure to initialize aLeappProcessFile
ALeappAnalyzerIngestModule.error.running.aLeapp=Error running aLeapp, see log file.
ALeappAnalyzerIngestModule.executable.not.found=aLeapp Executable Not Found.
ALeappAnalyzerIngestModule.has.run=aLeapp

View File

@ -71,7 +71,7 @@ public class ILeappAnalyzerIngestModule implements DataSourceIngestModule {
private static final String ILEAPP_EXECUTABLE = "ileapp.exe";//NON-NLS
private static final String ILEAPP_PATHS_FILE = "iLeapp_paths.txt"; //NON-NLS
private static final String XMLFILE = "ileap-artifact-attribute-reference.xml"; //NON-NLS
private static final String XMLFILE = "ileapp-artifact-attribute-reference.xml"; //NON-NLS
private File iLeappExecutable;
@ -100,7 +100,7 @@ public class ILeappAnalyzerIngestModule implements DataSourceIngestModule {
}
try {
iLeappFileProcessor = new LeappFileProcessor(XMLFILE, ILeappAnalyzerModuleFactory.getModuleName(), context);
iLeappFileProcessor = new LeappFileProcessor(XMLFILE, ILeappAnalyzerModuleFactory.getModuleName(), ILEAPP, context);
} catch (IOException | IngestModuleException | NoCurrentCaseException ex) {
throw new IngestModuleException(Bundle.ILeappAnalyzerIngestModule_error_ileapp_file_processor_init(), ex);
}

View File

@ -145,7 +145,11 @@ public final class LeappFileProcessor {
}
private static final Logger logger = Logger.getLogger(LeappFileProcessor.class.getName());
private final String CUSTOM_ARTIFACTS_ATTRIBUTES_FILE = "custom-artifact-attribute-list.csv";
private final String ARTIFACT_ATTRIBUTE_REFERENCE_USER = "artifact-attribute-reference-user.xml";
private final String xmlFile; //NON-NLS
private final String leapModule;
private final String moduleName;
private final IngestJobContext context;
@ -198,7 +202,7 @@ public final class LeappFileProcessor {
private final Blackboard blkBoard;
public LeappFileProcessor(String xmlFile, String moduleName, IngestJobContext context) throws IOException, IngestModuleException, NoCurrentCaseException {
public LeappFileProcessor(String xmlFile, String moduleName, String leapModule, IngestJobContext context) throws IOException, IngestModuleException, NoCurrentCaseException {
this.tsvFiles = new HashMap<>();
this.tsvFileArtifacts = new HashMap<>();
this.tsvFileArtifactComments = new HashMap<>();
@ -206,14 +210,27 @@ public final class LeappFileProcessor {
this.xmlFile = xmlFile;
this.moduleName = moduleName;
this.context = context;
this.leapModule = leapModule;
blkBoard = Case.getCurrentCaseThrows().getSleuthkitCase().getBlackboard();
loadCustomArtifactsAttributes(blkBoard, leapModule);
createCustomArtifacts(blkBoard);
configExtractor();
loadConfigFile();
}
/**
* Generates a key trimmed and case-insensitive that can be used for a
* case-insensitive lookup in a map.
*
* @param origKey The original key.
* @return The normalized key.
*/
private static String normalizeKey(String origKey) {
return StringUtils.defaultString(origKey).trim().toLowerCase();
}
@NbBundle.Messages({
"LeappFileProcessor.error.running.Leapp=Error running Leapp, see log file.",
@ -274,7 +291,7 @@ public final class LeappFileProcessor {
.filter(f -> f.toLowerCase().endsWith(".tsv")).collect(Collectors.toList());
for (String tsvFile : allTsvFiles) {
if (tsvFiles.containsKey(FilenameUtils.getName(tsvFile.toLowerCase()))) {
if (tsvFiles.containsKey(normalizeKey(FilenameUtils.getName(tsvFile)))) {
foundTsvFiles.add(tsvFile);
}
}
@ -323,9 +340,10 @@ public final class LeappFileProcessor {
progress.progress(Bundle.LeappFileProcessor_tsvProcessed(fileName), i);
File LeappFile = new File(LeappFileName);
if (tsvFileAttributes.containsKey(fileName)) {
List<TsvColumn> attrList = tsvFileAttributes.get(fileName);
BlackboardArtifact.Type artifactType = tsvFileArtifacts.get(fileName);
String fileKey = fileName.toLowerCase().trim();
if (tsvFileAttributes.containsKey(normalizeKey(fileKey))) {
List<TsvColumn> attrList = tsvFileAttributes.get(normalizeKey(fileKey));
BlackboardArtifact.Type artifactType = tsvFileArtifacts.get(normalizeKey(fileKey));
try {
processFile(LeappFile, attrList, fileName, artifactType, dataSource);
@ -895,18 +913,15 @@ public final class LeappFileProcessor {
private Collection<BlackboardAttribute> processReadLine(List<String> lineValues, Map<String, Integer> columnIndexes,
List<TsvColumn> attrList, String fileName, int lineNum) throws IngestModuleException {
// if no attributes, return an empty row
if (MapUtils.isEmpty(columnIndexes) || CollectionUtils.isEmpty(lineValues)
|| (lineValues.size() == 1 && StringUtils.isEmpty(lineValues.get(0)))) {
return Collections.emptyList();
} else if (lineValues.size() != columnIndexes.size()) {
logger.log(Level.WARNING, String.format(
"Row at line number %d in file %s has %d columns when %d were expected based on the header row.",
lineNum, fileName, lineValues.size(), columnIndexes.size()));
return Collections.emptyList();
}
List<BlackboardAttribute> attrsToRet = new ArrayList<>();
for (TsvColumn colAttr : attrList) {
// if no matching attribute type, keep going
if (colAttr.getAttributeType() == null) {
// this handles columns that are currently ignored.
continue;
@ -920,22 +935,30 @@ public final class LeappFileProcessor {
String value = (columnIdx >= lineValues.size() || columnIdx < 0) ? null : lineValues.get(columnIdx);
if (value == null) {
logger.log(Level.WARNING, String.format("No value found for column %s at line %d in file %s. Omitting row.", colAttr.getColumnName(), lineNum, fileName));
return Collections.emptyList();
// if column is required, return empty for this row if no value
if (colAttr.isRequired()) {
logger.log(Level.WARNING, String.format("No value found for required column %s at line %d in file %s. Omitting row.", colAttr.getColumnName(), lineNum, fileName));
return Collections.emptyList();
} else {
// otherwise, continue to next column
logger.log(Level.WARNING, String.format("No value found for column %s at line %d in file %s. Omitting column.", colAttr.getColumnName(), lineNum, fileName));
continue;
}
}
String formattedValue = formatValueBasedOnAttrType(colAttr, value);
BlackboardAttribute attr = getAttribute(colAttr.getAttributeType(), formattedValue, fileName);
if (attr == null) {
if (attr != null) {
attrsToRet.add(attr);
} else if (colAttr.isRequired()) {
logger.log(Level.WARNING, String.format("Blackboard attribute could not be parsed column %s at line %d in file %s. Omitting row.", colAttr.getColumnName(), lineNum, fileName));
return Collections.emptyList();
}
attrsToRet.add(attr);
}
if (tsvFileArtifactComments.containsKey(fileName)) {
attrsToRet.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT, moduleName, tsvFileArtifactComments.get(fileName)));
if (tsvFileArtifactComments.containsKey(normalizeKey(fileName))) {
attrsToRet.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT, moduleName, tsvFileArtifactComments.get(normalizeKey(fileName))));
}
return attrsToRet;
@ -1065,6 +1088,18 @@ public final class LeappFileProcessor {
}
}
/**
* Read the XML config file and load the mappings into maps
*/
private void loadConfigFile() throws IngestModuleException {
String path = PlatformUtil.getUserConfigDirectory() + File.separator + xmlFile;
loadIndividualConfigFile(path);
String userPath = PlatformUtil.getUserConfigDirectory() + File.separator + leapModule + "-" + ARTIFACT_ATTRIBUTE_REFERENCE_USER;
if (new File(userPath).exists()) {
loadIndividualConfigFile(userPath);
}
}
/**
* Read the XML config file and load the mappings into maps
*/
@ -1075,10 +1110,9 @@ public final class LeappFileProcessor {
"LeappFileProcessor.postartifacts_error=Error posting Blackboard Artifact",
"LeappFileProcessor.error.creating.new.artifacts=Error creating new artifacts."
})
private void loadConfigFile() throws IngestModuleException {
private void loadIndividualConfigFile(String path) throws IngestModuleException {
Document xmlinput;
try {
String path = PlatformUtil.getUserConfigDirectory() + File.separator + xmlFile;
File f = new File(path);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
@ -1104,7 +1138,7 @@ public final class LeappFileProcessor {
for (int i = 0; i < nlist.getLength(); i++) {
NamedNodeMap nnm = nlist.item(i).getAttributes();
tsvFiles.put(nnm.getNamedItem("filename").getNodeValue().toLowerCase(), nnm.getNamedItem("description").getNodeValue());
tsvFiles.put(normalizeKey(nnm.getNamedItem("filename").getNodeValue()), nnm.getNamedItem("description").getNodeValue());
}
@ -1130,11 +1164,11 @@ public final class LeappFileProcessor {
logger.log(Level.SEVERE, String.format("No known artifact mapping found for [artifact: %s, %s]",
artifactName, getXmlFileIdentifier(parentName)));
} else {
tsvFileArtifacts.put(parentName, foundArtifactType);
tsvFileArtifacts.put(normalizeKey(parentName), foundArtifactType);
}
if (!comment.toLowerCase().matches("null")) {
tsvFileArtifactComments.put(parentName, comment);
tsvFileArtifactComments.put(normalizeKey(parentName), comment);
}
}
@ -1196,14 +1230,14 @@ public final class LeappFileProcessor {
columnName.trim().toLowerCase(),
"yes".compareToIgnoreCase(required) == 0);
if (tsvFileAttributes.containsKey(parentName)) {
List<TsvColumn> attrList = tsvFileAttributes.get(parentName);
if (tsvFileAttributes.containsKey(normalizeKey(parentName))) {
List<TsvColumn> attrList = tsvFileAttributes.get(normalizeKey(parentName));
attrList.add(thisCol);
tsvFileAttributes.replace(parentName, attrList);
} else {
List<TsvColumn> attrList = new ArrayList<>();
attrList.add(thisCol);
tsvFileAttributes.put(parentName, attrList);
tsvFileAttributes.put(normalizeKey(parentName), attrList);
}
}
@ -1270,7 +1304,7 @@ public final class LeappFileProcessor {
private static final Set<String> ALLOWED_EXTENSIONS = new HashSet<>(Arrays.asList("zip", "tar", "tgz"));
/**
* Find the files that will be processed by the iLeapp program
* Find the files that will be processed by the Leapp program
*
* @param dataSource
*
@ -1303,6 +1337,111 @@ public final class LeappFileProcessor {
return leappFilesToProcess;
}
/**
* Create custom artifacts that are defined in the xLeapp xml file(s).
*
*/
private void loadCustomArtifactsAttributes(Blackboard blkBoard, String leapModule) {
for (Map.Entry<String, String> customArtifact : CUSTOM_ARTIFACT_MAP.entrySet()) {
String artifactName = customArtifact.getKey();
String artifactDescription = customArtifact.getValue();
createCustomAttributesArtifacts(blkBoard, "artifact", artifactName, artifactDescription, null);
}
File customFilePath = new File(PlatformUtil.getUserConfigDirectory() + File.separator + leapModule + '-' + CUSTOM_ARTIFACTS_ATTRIBUTES_FILE);
if (customFilePath.exists()) {
try (MappingIterator<List<String>> iterator = new CsvMapper()
.enable(CsvParser.Feature.WRAP_AS_ARRAY)
.readerFor(List.class)
.with(CsvSchema.emptySchema().withColumnSeparator(','))
.readValues(customFilePath)) {
if (iterator.hasNext()) {
// Header line we can skip
List<String> headerItems = iterator.next();
int lineNum = 2;
while (iterator.hasNext()) {
List<String> columnItems = iterator.next();
if (columnItems.size() > 3) {
createCustomAttributesArtifacts(blkBoard, columnItems.get(0), columnItems.get(1), columnItems.get(2), columnItems.get(3));
} else {
createCustomAttributesArtifacts(blkBoard, columnItems.get(0), columnItems.get(1), columnItems.get(2), null);
}
}
}
} catch (IOException ex) {
logger.log(Level.WARNING, String.format("Failed to read/open file %s.", customFilePath), ex);
}
}
}
/**
* Create custom attributes that are defined in the xLeapp xml file(s).
*
*/
private void createCustomAttributesArtifacts(Blackboard blkBoard, String atType, String atName, String atDescription, String attrType) {
if (atType.toLowerCase().equals("artifact")) {
try {
BlackboardArtifact.Type customArtifactType = blkBoard.getOrAddArtifactType(atName.toUpperCase(), atDescription);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.WARNING, String.format("Failed to create custom artifact type %s.", atName), ex);
}
return;
}
switch (attrType.toLowerCase()) {
case "json":
case "string":
try {
BlackboardAttribute.Type customAttrbiuteType = blkBoard.getOrAddAttributeType(atName.toUpperCase(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, atDescription);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.WARNING, String.format("Failed to create custom attribute type %s.", atName), ex);
}
return;
case "integer":
try {
BlackboardAttribute.Type customAttrbiuteType = blkBoard.getOrAddAttributeType(atName.toUpperCase(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, atDescription);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.WARNING, String.format("Failed to create custom attribute type %s.", atName), ex);
}
return;
case "long":
try {
BlackboardAttribute.Type customAttrbiuteType = blkBoard.getOrAddAttributeType(atName.toUpperCase(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, atDescription);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.WARNING, String.format("Failed to create custom attribute type %s.", atName), ex);
}
return;
case "double":
try {
BlackboardAttribute.Type customAttrbiuteType = blkBoard.getOrAddAttributeType(atName.toUpperCase(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING, atDescription);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.WARNING, String.format("Failed to create custom attribute type %s.", atName), ex);
}
return;
case "byte":
try {
BlackboardAttribute.Type customAttrbiuteType = blkBoard.getOrAddAttributeType(atName.toUpperCase(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE, atDescription);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.WARNING, String.format("Failed to create custom attribute type %s.", atName), ex);
}
return;
case "datetime":
try {
BlackboardAttribute.Type customAttrbiuteType = blkBoard.getOrAddAttributeType(atName.toUpperCase(), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME, atDescription);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.WARNING, String.format("Failed to create custom attribute type %s.", atName), ex);
}
return;
default:
logger.log(Level.WARNING, String.format("Attribute Type %s for file %s not defined.", attrType, atName)); //NON-NLS
return;
}
}
/**
* Create custom artifacts that are defined in the xLeapp xml file(s).
*

View File

@ -36,6 +36,14 @@
</ArtifactName>
</FileName>
<FileName filename="accounts ce 10.tsv" description="Accounts_ce">
<ArtifactName artifactname="TSK_SERVICE_ACCOUNT" comment="accounts ce 0">
<AttributeName attributename="TSK_USER_ID" columnName="Name" required="yes" />
<AttributeName attributename="TSK_PROG_NAME" columnName="Type" required="yes" />
<AttributeName attributename="TSK_PASSWORD" columnName="Password" required="yes" />
</ArtifactName>
</FileName>
<FileName filename="authtokens 0.tsv" description="Authtokens">
<ArtifactName artifactname="TSK_SERVICE_ACCOUNT" comment="Authtokens">
<AttributeName attributename="null" columnName="ID" required="no" />
@ -54,7 +62,15 @@
</ArtifactName>
</FileName>
<FileName filename="Browser Bookmarks.tsv" description="Browser Bookmarks">
<FileName filename="accounts de 10.tsv" description="Accounts_de">
<ArtifactName artifactname="TSK_SERVICE_ACCOUNT" comment="accounts de 0">
<AttributeName attributename="null" columnName="Last password entry" required="no" />
<AttributeName attributename="TSK_USER_ID" columnName="Name" required="yes" />
<AttributeName attributename="TSK_PROG_NAME" columnName="Type" required="yes" />
</ArtifactName>
</FileName>
<FileName filename="Browser - Bookmarks.tsv" description="Browser Bookmarks">
<ArtifactName artifactname="TSK_WEB_BOOKMARK" comment="Browser Bookmarks">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Added Date" required="yes" />
<AttributeName attributename="TSK_URL" columnName="URL" required="yes" />
@ -64,7 +80,7 @@
</ArtifactName>
</FileName>
<FileName filename="Browser cookies.tsv" description="Browser Cookies">
<FileName filename="Browser - Cookies.tsv" description="Browser Cookies">
<ArtifactName artifactname="TSK_WEB_COOKIE" comment="Browser Cookies">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Access Date" required="yes" />
<AttributeName attributename="TSK_URL" columnName="Host" required="yes" />
@ -76,7 +92,7 @@
</ArtifactName>
</FileName>
<FileName filename="Browser History.tsv" description="Browser History">
<FileName filename="Browser - Web History.tsv" description="Browser History">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Browser History">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Visit Time" required="yes"/>
<AttributeName attributename="TSK_URL" columnName="URL" required="yes"/>
@ -86,7 +102,7 @@
</ArtifactName>
</FileName>
<FileName filename="Browser keyword search terms.tsv" description="Browser keyword Search Terms">
<FileName filename="Browser - Keyword Search Terms.tsv" description="Browser keyword Search Terms">
<ArtifactName artifactname="TSK_WEB_SEARCH_QUERY" comment="Browser Keyword Search Terms">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Visit Time" required="yes"/>
<AttributeName attributename="TSK_TEXT" columnName="Term" required="yes"/>
@ -94,7 +110,7 @@
</ArtifactName>
</FileName>
<FileName filename="Browser login data.tsv" description="Browser Login Data">
<FileName filename="Browser - Login Data.tsv" description="Browser Login Data">
<ArtifactName artifactname="TSK_SERVICE_ACCOUNT" comment="Browser Login">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Created Time" required="yes" />
<AttributeName attributename="TSK_USER_ID" columnName="Username" required="yes" />
@ -104,7 +120,7 @@
</ArtifactName>
</FileName>
<FileName filename="Browser offline pages.tsv" description="Browser Offline Pages">
<FileName filename="Browser - Offline Pages.tsv" description="Browser Offline Pages">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Browser Offline Pages">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Creation Time" required="yes" />
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Access Time" required="yes" />
@ -116,7 +132,7 @@
</ArtifactName>
</FileName>
<FileName filename="Browser search terms.tsv" description="Browser Search Terms">
<FileName filename="Browser - Search Terms.tsv" description="Browser Search Terms">
<ArtifactName artifactname="TSK_WEB_SEARCH_QUERY" comment="Browser Search Terms">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Visit Time" required="yes"/>
<AttributeName attributename="TSK_TEXT" columnName="Search Term" required="yes"/>
@ -126,7 +142,7 @@
</ArtifactName>
</FileName>
<FileName filename="Browser top sites.tsv" description="Browser Top Sites">
<FileName filename="Browser - Top Sites.tsv" description="Browser Top Sites">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Browser Top Sites">
<AttributeName attributename="TSK_URL" columnName="URL" required="yes" />
<AttributeName attributename="null" columnName="Rank" required="no" />
@ -151,7 +167,7 @@
</ArtifactName>
</FileName>
<FileName filename="Chrome Bookmarks.tsv" description="Chrome Bookmarks">
<FileName filename="Chrome - Bookmarks.tsv" description="Chrome Bookmarks">
<ArtifactName artifactname="TSK_WEB_BOOKMARK" comment="Chrome Bookmarks">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Added Date" required="yes" />
<AttributeName attributename="TSK_URL" columnName="URL" required="yes" />
@ -161,7 +177,7 @@
</ArtifactName>
</FileName>
<FileName filename="Chrome cookies.tsv" description="Chrome Cookies">
<FileName filename="Chrome - cookies.tsv" description="Chrome Cookies">
<ArtifactName artifactname="TSK_WEB_COOKIE" comment="Chrome Cookies">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Access Date" required="yes" />
<AttributeName attributename="TSK_URL" columnName="Host" required="yes" />
@ -173,7 +189,7 @@
</ArtifactName>
</FileName>
<FileName filename="Chrome History.tsv" description="Chrome History">
<FileName filename="Chrome - Web History.tsv" description="Chrome History">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Chrome History">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Visit Time" required="yes"/>
<AttributeName attributename="TSK_URL" columnName="URL" required="yes"/>
@ -183,17 +199,18 @@
</ArtifactName>
</FileName>
<FileName filename="Chrome login data.tsv" description="Chrome Login Data">
<FileName filename="Chrome - login data.tsv" description="Chrome Login Data">
<ArtifactName artifactname="TSK_SERVICE_ACCOUNT" comment="Chrome Login">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Created Time" required="yes" />
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Created Time" required="no" />
<AttributeName attributename="TSK_USER_ID" columnName="Username" required="yes" />
<AttributeName attributename="TSK_PASSWORD" columnName="Password" required="yes" />
<AttributeName attributename="TSK_PASSWORD" columnName="Password" required="no" />
<AttributeName attributename="TSK_URL" columnName="Origin URL" required="no" />
<AttributeName attributename="null" columnName="Blacklisted by User" required="no" />
<AttributeName attributename="null" columnName="Browser Name" required="no" />
</ArtifactName>
</FileName>
<FileName filename="Chrome offline pages.tsv" description="Chrome Offline Pages">
<FileName filename="Chrome - offline pages.tsv" description="Chrome Offline Pages">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Chrome Offline Pages">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Creation Time" required="yes" />
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Access Time" required="yes" />
@ -205,7 +222,7 @@
</ArtifactName>
</FileName>
<FileName filename="Chrome search terms.tsv" description="Chrome Search Terms">
<FileName filename="Chrome - search terms.tsv" description="Chrome Search Terms">
<ArtifactName artifactname="TSK_WEB_SEARCH_QUERY" comment="Chrome Search Terms">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Visit Time" required="yes"/>
<AttributeName attributename="TSK_TEXT" columnName="Search Term" required="yes"/>
@ -215,7 +232,7 @@
</ArtifactName>
</FileName>
<FileName filename="Chrome top sites.tsv" description="Chrome Top Sites">
<FileName filename="Chrome - top sites.tsv" description="Chrome Top Sites">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Chrome Top Sites">
<AttributeName attributename="TSK_URL" columnName="URL" required="yes" />
<AttributeName attributename="null" columnName="Rank" required="no" />
@ -224,7 +241,7 @@
</ArtifactName>
</FileName>
<FileName filename="Edge Bookmarks.tsv" description="Edge Bookmarks">
<FileName filename="Edge - Bookmarks.tsv" description="Edge Bookmarks">
<ArtifactName artifactname="TSK_WEB_BOOKMARK" comment="Edge Bookmarks">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Added Date" required="yes" />
<AttributeName attributename="TSK_URL" columnName="URL" required="yes" />
@ -234,19 +251,19 @@
</ArtifactName>
</FileName>
<FileName filename="Edge cookies.tsv" description="Edge Cookies">
<FileName filename="Edge - cookies.tsv" description="Edge Cookies">
<ArtifactName artifactname="TSK_WEB_COOKIE" comment="Edge Cookies">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Access Date" required="yes" />
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Access Date" required="no" />
<AttributeName attributename="TSK_URL" columnName="Host" required="yes" />
<AttributeName attributename="TSK_NAME" columnName="Name" required="yes" />
<AttributeName attributename="TSK_VALUE" columnName="Value" required="yes" />
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Created Date" required="yes" />
<AttributeName attributename="TSK_DATETIME_END" columnName="Expiration Date" required="yes" />
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Created Date" required="no" />
<AttributeName attributename="TSK_DATETIME_END" columnName="Expiration Date" required="no" />
<AttributeName attributename="null" columnName="Path" required="no" />
</ArtifactName>
</FileName>
<FileName filename="Edge History.tsv" description="Edge History">
<FileName filename="Edge - Web History.tsv" description="Edge History">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Edge History">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Visit Time" required="yes"/>
<AttributeName attributename="TSK_URL" columnName="URL" required="yes"/>
@ -256,7 +273,7 @@
</ArtifactName>
</FileName>
<FileName filename="Edge login data.tsv" description="Edge Login Data">
<FileName filename="Edge - login data.tsv" description="Edge Login Data">
<ArtifactName artifactname="TSK_SERVICE_ACCOUNT" comment="Edge Login">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Created Time" required="yes" />
<AttributeName attributename="TSK_USER_ID" columnName="Username" required="yes" />
@ -266,7 +283,7 @@
</ArtifactName>
</FileName>
<FileName filename="Edge offline pages.tsv" description="Edge Offline Pages">
<FileName filename="Edge - offline pages.tsv" description="Edge Offline Pages">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Edge Offline Pages">
<AttributeName attributename="TSK_DATETIME_CREATED" columnName="Creation Time" required="yes" />
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Access Time" required="yes" />
@ -278,7 +295,7 @@
</ArtifactName>
</FileName>
<FileName filename="Edge search terms.tsv" description="Edge Search Terms">
<FileName filename="Edge - search terms.tsv" description="Edge Search Terms">
<ArtifactName artifactname="TSK_WEB_SEARCH_QUERY" comment="Chrome Search Terms">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Visit Time" required="yes"/>
<AttributeName attributename="TSK_TEXT" columnName="Search Term" required="yes"/>
@ -288,7 +305,7 @@
</ArtifactName>
</FileName>
<FileName filename="Edge top sites.tsv" description="Edge Top Sites">
<FileName filename="Edge - top sites.tsv" description="Edge Top Sites">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="Edge Top Sites">
<AttributeName attributename="TSK_URL" columnName="URL" required="yes" />
<AttributeName attributename="null" columnName="Rank" required="no" />
@ -317,7 +334,7 @@
<FileName filename="installed apps library.tsv" description="Installed Apps (Library)">
<ArtifactName artifactname="TSK_INSTALLED_PROG" comment="Installed Apps (Library)">
<AttributeName attributename="TSK_DATETIME" columnName="Purchase Time" required="yes"/>
<AttributeName attributename="TSK_DATETIME" columnName="Purchase Time" required="no"/>
<AttributeName attributename="null" columnName="Account" required="no"/>
<AttributeName attributename="TSK_PROG_NAME" columnName="Doc ID" required="yes"/>
</ArtifactName>
@ -329,13 +346,21 @@
</ArtifactName>
</FileName>
<FileName filename="installed apps - GMS_0.tsv" description="Installed Apps">
<ArtifactName artifactname="TSK_INSTALLED_PROG" comment="Installed Apps GSM">
<AttributeName attributename="TSK_PROG_NAME" columnName="Bundle ID" required="yes" />
</ArtifactName>
</FileName>
<FileName filename="installed apps vending.tsv" description="Installed Apps (Vending)">
<ArtifactName artifactname="TSK_INSTALLED_PROG" comment="Installed Apps (Vending)">
<AttributeName attributename="TSK_DATETIME" columnName="First Download" required="yes" />
<AttributeName attributename="TSK_DATETIME" columnName="First Download" required="no" />
<AttributeName attributename="TSK_PROG_NAME" columnName="Package Name" required="yes" />
<AttributeName attributename="null" columnName="Title" required="no" />
<AttributeName attributename="null" columnName="Install Reason" required="no" />
<AttributeName attributename="null" columnName="Last Updated" required="no" />
<AttributeName attributename="null" columnName="Auto Update?" required="no" />
<AttributeName attributename="null" columnName="Account" required="no" />
</ArtifactName>
</FileName>

View File

@ -66,14 +66,24 @@
</FileName>
<FileName filename="Bluetooth paired.tsv" description="Bluetooth Paired">
<ArtifactName artifactname="TSK_BLUETOOTH_PAIRING" comment="Bluetooth Paired">
<AttributeName attributename="TSK_DATETIME" columnName="Last Seen Time" required="no" />
<AttributeName attributename="TSK_MAC_ADDRESS" columnName="MAC Address" required="no" />
<AttributeName attributename="TSK_DEVICE_NAME" columnName="Name Key" required="yes" />
<AttributeName attributename="null" columnName="Name" required="no" />
<AttributeName attributename="null" columnName="Device Product ID" required="no" />
<AttributeName attributename="null" columnName="Default Name" required="no" />
</ArtifactName>
</FileName>
<FileName filename="Bluetooth paired LE.tsv" description="Bluetooth Paired LE">
<ArtifactName artifactname="TSK_BLUETOOTH_PAIRING" comment="Bluetooth Paired">
<AttributeName attributename="TSK_DEVICE_ID" columnName="UUID" required="yes" />
<AttributeName attributename="TSK_DEVICE_NAME" columnName="Name" required="yes" />
<AttributeName attributename="null" columnName="Name Origin" required="no" />
<AttributeName attributename="null" columnName="Address" required="no" />
<AttributeName attributename="null" columnName="Resolved Address" required="no" />
<AttributeName attributename="TSK_DATETIME" columnName="Last Seen Time" required="yes" />
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Connection Time" required="yes" />
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Last Connection Time" required="no" />
</ArtifactName>
</FileName>
@ -92,16 +102,17 @@
<FileName filename="Call History.tsv" description="Call Logs">
<ArtifactName artifactname="TSK_CALLLOG" comment="Call Logs">
<AttributeName attributename="TSK_DATETIME_START" columnName="Timestamp" required="yes" />
<AttributeName attributename="TSK_PHONE_NUMBER_FROM" columnName="Address" required="yes" />
<AttributeName attributename="null" columnName="Was Answered" required="no" />
<AttributeName attributename="TSK_DATETIME_START" columnName="Starting Timestamp" required="yes" />
<AttributeName attributename="TSK_DATETIME_END" columnName="Ending Timestamp" required="no" />
<AttributeName attributename="TSK_PHONE_NUMBER_FROM" columnName="Phone Number" required="yes" />
<AttributeName attributename="null" columnName="Name" required="no" />
<AttributeName attributename="null" columnName="Answered" required="no" />
<AttributeName attributename="null" columnName="Call Type" required="no" />
<AttributeName attributename="null" columnName="Originated" required="no" />
<AttributeName attributename="null" columnName="Duration in Secs" required="no" />
<AttributeName attributename="null" columnName="Call Direction" required="no" />
<AttributeName attributename="null" columnName="Call Duration" required="no" />
<AttributeName attributename="null" columnName="ISO County Code" required="no" />
<AttributeName attributename="null" columnName="Location" required="no" />
<AttributeName attributename="null" columnName="Service Provider" required="no" />
<AttributeName attributename="TSK_TEXT_FILE" columnName="source file" required="yes"/>
</ArtifactName>
</FileName>
@ -712,19 +723,24 @@
<AttributeName attributename="null" columnName="Pairing ID" required="no" />
</ArtifactName>
</FileName>
<FileName filename="Safari Browser History.tsv" description="Safari Browser">
<FileName filename="Recent WebSearches.tsv" description="Recent Web Searches">
<ArtifactName artifactname="TSK_WEB_SEARCH_QUERY" comment="null">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Date" required="yes" />
<AttributeName attributename="TSK_TEXT" columnName="Search Term" required="yes" />
</ArtifactName>
</FileName>
<FileName filename="Safari Browser - History.tsv" description="Safari Browser">
<ArtifactName artifactname="TSK_WEB_HISTORY" comment="null">
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Visit Time" required="yes" />
<AttributeName attributename="TSK_DATETIME_ACCESSED" columnName="Visit Timestamp" required="no" />
<AttributeName attributename="TSK_TITLE" columnName="Title" required="no" />
<AttributeName attributename="TSK_URL" columnName="URL" required="yes" />
<AttributeName attributename="null" columnName="Visit Count" required="no" />
<AttributeName attributename="TSK_TITLE" columnName="Title" required="yes" />
<AttributeName attributename="null" columnName="iCloud Sync" required="no" />
<AttributeName attributename="null" columnName="Load Successful" required="no" />
<AttributeName attributename="null" columnName="Visit ID" required="no" />
<AttributeName attributename="TSK_REFERRER" columnName="Redirect Source" required="yes" />
<AttributeName attributename="null" columnName="Redirect Destination" required="no" />
<AttributeName attributename="null" columnName="History Item ID" required="no" />
<AttributeName attributename="TSK_REFERRER" columnName="Redirect Source" required="no" />
<AttributeName attributename="null" columnName="Redirect Destination" required="no" />
<AttributeName attributename="null" columnName="Visit ID" required="no" />
<AttributeName attributename="null" columnName="Origin" required="no" />
</ArtifactName>
</FileName>
@ -744,22 +760,28 @@
</ArtifactName>
</FileName>
<FileName filename="SMS - iMessage.tsv" description="SMS - iMessage">
<FileName filename="SMS &amp; iMessage - Messages.tsv" description="SMS - iMessage">
<ArtifactName artifactname="TSK_MESSAGE" comment="SMS - iMessage">
<AttributeName attributename="TSK_DATETIME" columnName="Message Date" required="yes" />
<AttributeName attributename="null" columnName="Date Delivered" required="no" />
<AttributeName attributename="null" columnName="Date Read" required="no" />
<AttributeName attributename="TSK_DATETIME" columnName="Message Timestamp" required="yes" />
<AttributeName attributename="null" columnName="Read Timestamp" required="no" />
<AttributeName attributename="TSK_TEXT" columnName="Message" required="yes" />
<AttributeName attributename="TSK_PHONE_NUMBER_FROM" columnName="Contact ID" required="yes" />
<AttributeName attributename="null" columnName="Service" required="no" />
<AttributeName attributename="TSK_PHONE_NUMBER_TO" columnName="Account" required="yes" />
<AttributeName attributename="null" columnName="Is Delivered" required="no" />
<AttributeName attributename="null" columnName="Is from Me" required="no" />
<AttributeName attributename="null" columnName="Filename" required="no" />
<AttributeName attributename="null" columnName="MIME Type" required="no" />
<AttributeName attributename="null" columnName="Transfer Type" required="no" />
<AttributeName attributename="null" columnName="Total Bytes" required="no" />
<AttributeName attributename="TSK_TEXT_FILE" columnName="source file" required="yes"/>
<AttributeName attributename="null" columnName="Message Direction" required="no" />
<AttributeName attributename="null" columnName="Message Sent" required="no" />
<AttributeName attributename="null" columnName="Message Delivered" required="no" />
<AttributeName attributename="null" columnName="Message Read" required="no" />
<AttributeName attributename="null" columnName="Account" required="no" />
<AttributeName attributename="null" columnName="Account Login" required="no" />
<AttributeName attributename="null" columnName="Chat" required="no" />
<AttributeName attributename="null" columnName="Contact ID" required="no" />
<AttributeName attributename="null" columnName="Attachment Name" required="no" />
<AttributeName attributename="null" columnName="Attachment Path" required="no" />
<AttributeName attributename="null" columnName="Attachment Timestamp" required="no" />
<AttributeName attributename="null" columnName="Attachment Mimetype" required="no" />
<AttributeName attributename="null" columnName="Attachment Size (Bytes)" required="no" />
<AttributeName attributename="null" columnName="Message Row ID" required="no" />
<AttributeName attributename="TSK_THREAD_ID" columnName="Chat ID" required="no" />
<AttributeName attributename="null" columnName="From Me" required="no" />
</ArtifactName>
</FileName>
@ -779,4 +801,33 @@
</ArtifactName>
</FileName>
<FileName filename="Wifi Known Networks.tsv" description="Wifi Known Networks">
<ArtifactName artifactname="TSK_WIFI_NETWORK" comment="Wifi">
<AttributeName attributename="TSK_SSID" columnName="SSID" required="yes" />
<AttributeName attributename="TSK_MAC_ADDRESS" columnName="BSSID" required="yes" />
<AttributeName attributename="null" columnName="Network usage" required="no" />
<AttributeName attributename="null" columnName="Country code" required="no" />
<AttributeName attributename="TSK_DEVICE_ID" columnName="Device name" required="yes" />
<AttributeName attributename="null" columnName="Manufacturer" required="no" />
<AttributeName attributename="null" columnName="Serial number" required="no" />
<AttributeName attributename="TSK_DEVICE_MODEL" columnName="Model name" required="no" />
<AttributeName attributename="TSK_DATETIME" columnName="Last joined" required="yes" />
<AttributeName attributename="null" columnName="Last autojoined" required="no" />
<AttributeName attributename="null" columnName="Enabled" required="no" />
</ArtifactName>
</FileName>
<FileName filename="Wifi Network Store Model - Networks.tsv" description="Wifi Network Store Model - Networks">
<ArtifactName artifactname="TSK_WIFI_NETWORK" comment="Wifi">
<AttributeName attributename="TSK_DATETIME" columnName="Last Connected Timestamp" required="no" />
<AttributeName attributename="null" columnName="PK" required="no" />
<AttributeName attributename="TSK_SSID" columnName="SSID" required="yes" />
<AttributeName attributename="TSK_GEO_LATITUDE" columnName="Latitude" required="no" />
<AttributeName attributename="TSK_GEO_LONGITUDE" columnName="Longitude" required="no" />
<AttributeName attributename="TSK_MAC_ADDRESS" columnName="BSSID" required="no" />
<AttributeName attributename="null" columnName="5 GHz Network" required="no" />
<AttributeName attributename="null" columnName="2.4 GHz Network" required="no" />
</ArtifactName>
</FileName>
</iLeap_Files_To_Process>

View File

@ -24,14 +24,14 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="statusMessageLabel" max="32767" attributes="0"/>
<Component id="statusMessageLabel" pref="474" max="32767" attributes="0"/>
<Component id="reportProgressBar" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="reportLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="separationLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="pathLabel" pref="548" max="32767" attributes="0"/>
<Component id="pathLabel" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
@ -86,11 +86,32 @@
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="statusMessageLabel">
<Component class="javax.swing.JTextArea" name="statusMessageLabel">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="background" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="null" type="code"/>
</Property>
<Property name="lineWrap" type="boolean" value="true"/>
<Property name="rows" type="int" value="5"/>
<Property name="tabSize" type="int" value="4"/>
<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, &quot;{key}&quot;)"/>
</Property>
<Property name="wrapStyleWord" type="boolean" value="true"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[2147483647, 80]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[101, 80]"/>
</Property>
<Property name="opaque" type="boolean" value="false"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[2147483647, 80]"/>
</Property>
</Properties>
</Component>
</SubComponents>

View File

@ -41,6 +41,8 @@ public class ReportProgressPanel extends javax.swing.JPanel {
private static final Color GREEN = new Color(50, 205, 50);
private static final Color RED = new Color(178, 34, 34);
private volatile ReportStatus status;
private static final int MAX_STATUS_LENGTH = 500;
private static final String ELIPSIS = "...";
/**
* Used by a report generation module to communicate report generation
@ -75,6 +77,15 @@ public class ReportProgressPanel extends javax.swing.JPanel {
return displayName;
}
}
private void setStatusText(String message) {
if (message == null) {
message = "";
} else if (message.length() > MAX_STATUS_LENGTH) {
message = message.substring(0, MAX_STATUS_LENGTH) + ELIPSIS;
}
this.statusMessageLabel.setText(message);
}
/**
* Constructs a panel used by report generation module to show progress.
@ -83,7 +94,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
initComponents();
reportProgressBar.setIndeterminate(true);
reportProgressBar.setMaximum(100);
statusMessageLabel.setText(Bundle.ReportProgressPanel_progress_queuing());
setStatusText(Bundle.ReportProgressPanel_progress_queuing());
status = ReportStatus.QUEUING;
reportLabel.setText("");
pathLabel.setText(""); //NON-NLS
@ -174,7 +185,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
*/
public void start() {
EventQueue.invokeLater(() -> {
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.start.progress.text"));
setStatusText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.start.progress.text"));
status = ReportStatus.RUNNING;
});
}
@ -242,7 +253,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
public void updateStatusLabel(String statusMessage) {
EventQueue.invokeLater(() -> {
if (status != ReportStatus.CANCELED) {
statusMessageLabel.setText(statusMessage);
setStatusText(statusMessage);
}
});
}
@ -284,7 +295,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
ReportStatus oldValue = status;
status = ReportStatus.COMPLETE;
statusMessageLabel.setForeground(Color.BLACK);
statusMessageLabel.setText(statusMessage);
setStatusText(statusMessage);
reportProgressBar.setValue(reportProgressBar.getMaximum());
reportProgressBar.setStringPainted(true);
reportProgressBar.setForeground(GREEN);
@ -296,7 +307,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
ReportStatus oldValue = status;
status = ReportStatus.ERROR;
statusMessageLabel.setForeground(RED);
statusMessageLabel.setText(statusMessage);
setStatusText(statusMessage);
reportProgressBar.setValue(reportProgressBar.getMaximum());
reportProgressBar.setStringPainted(true);
reportProgressBar.setForeground(RED);
@ -334,7 +345,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
reportProgressBar.setString(ReportStatus.CANCELED.getDisplayName());
firePropertyChange(ReportStatus.CANCELED.toString(), oldValue, status);
statusMessageLabel.setForeground(RED);
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.cancel.procLbl.text"));
setStatusText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.cancel.procLbl.text"));
break;
}
}
@ -368,7 +379,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
reportLabel = new javax.swing.JLabel();
pathLabel = new javax.swing.JLabel();
separationLabel = new javax.swing.JLabel();
statusMessageLabel = new javax.swing.JLabel();
statusMessageLabel = new javax.swing.JTextArea();
setMinimumSize(new java.awt.Dimension(486, 68));
@ -380,7 +391,18 @@ public class ReportProgressPanel extends javax.swing.JPanel {
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
statusMessageLabel.setEditable(false);
statusMessageLabel.setBackground(null);
statusMessageLabel.setLineWrap(true);
statusMessageLabel.setRows(5);
statusMessageLabel.setTabSize(4);
statusMessageLabel.setText(org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.statusMessageLabel.text")); // NOI18N
statusMessageLabel.setWrapStyleWord(true);
statusMessageLabel.setBorder(null);
statusMessageLabel.setMaximumSize(new java.awt.Dimension(2147483647, 80));
statusMessageLabel.setMinimumSize(new java.awt.Dimension(101, 80));
statusMessageLabel.setOpaque(false);
statusMessageLabel.setPreferredSize(new java.awt.Dimension(2147483647, 80));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
@ -389,14 +411,14 @@ public class ReportProgressPanel extends javax.swing.JPanel {
.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(statusMessageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 474, 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)))
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
@ -410,7 +432,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
.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)
.addComponent(statusMessageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(13, 13, 13))
);
}// </editor-fold>//GEN-END:initComponents
@ -421,7 +443,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
private javax.swing.JLabel reportLabel;
private javax.swing.JProgressBar reportProgressBar;
private javax.swing.JLabel separationLabel;
private javax.swing.JLabel statusMessageLabel;
private javax.swing.JTextArea statusMessageLabel;
// End of variables declaration//GEN-END:variables
/**

View File

@ -1378,7 +1378,7 @@ public class PortableCaseReportModule implements ReportModule {
}
try {
OsAccountRealm newRealm = newRealmManager.newWindowsRealm(oldRealm.getRealmAddr().orElse(null), realmName, newHost, oldRealm.getScope());
OsAccountRealm newRealm = newRealmManager.newWindowsRealm(oldOsAccount.getAddr().orElse(null), realmName, newHost, oldRealm.getScope());
oldRealmIdToNewRealm.put(oldOsAccount.getRealmId(), newRealm);
} catch (NotUserSIDException ex) {
throw new TskCoreException("Failed to copy OsAccountRealm with ID=" + oldOsAccount.getRealmId(), ex);

View File

@ -1,18 +1,18 @@
body {margin: 0px; padding: 0px; background: #FFFFFF; font: 13px/20px Arial, Helvetica, sans-serif; color: #535353;}
#snapshot{max-width:800; max-height:600}
#content {padding: 30px;}
#header {width:100%; padding: 10px; line-height: 25px; background: #07A; color: #FFF; font-size: 20px;}
h1 {font-size: 20px; font-weight: normal; color: #07A; padding: 0 0 7px 0; margin-top: 25px; border-bottom: 1px solid #D6D6D6;}
h2 {font-size: 20px; font-weight: bolder; color: #07A;}
h3 {font-size: 16px; color: #07A;}
h4 {background: #07A; color: #FFF; font-size: 16px; margin: 0 0 0 25px; padding: 0; padding-left: 15px;}
#header {width:100%; padding: 10px; line-height: 25px; background: #0077AA; color: #FFFFFF; font-size: 20px;}
h1 {font-size: 20px; font-weight: normal; color: #0077AA; padding: 0 0 7px 0; margin-top: 25px; border-bottom: 1px solid #D6D6D6;}
h2 {font-size: 20px; font-weight: bolder; color: #0077AA;}
h3 {font-size: 16px; color: #0077AA;}
h4 {background: #0077AA; color: #FFFFFF; font-size: 16px; margin: 0 0 0 25px; padding: 0; padding-left: 15px;}
ul.nav {list-style-type: none; line-height: 35px; padding: 0px; margin-left: 15px;}
ul li a {font-size: 14px; color: #444; text-decoration: none; padding-left: 25px;}
ul li a {font-size: 14px; color: #444444; text-decoration: none; padding-left: 25px;}
ul li a:hover {text-decoration: underline;}
p {margin: 0 0 20px 0;}
table {white-space:nowrap; min-width: 800px; padding: 2; margin: 0; border-collapse: collapse; border-bottom: 2px solid #e5e5e5;}
.keyword_list table {margin: 0 0 25px 25px; border-bottom: 2px solid #dedede;}
table th {white-space:nowrap; display: table-cell; text-align: center; padding: 2px 4px; background: #e5e5e5; color: #777; font-size: 11px; text-shadow: #e9f9fd 0 1px 0; border-top: 1px solid #dedede; border-bottom: 2px solid #e5e5e5;}
table th {white-space:nowrap; display: table-cell; text-align: center; padding: 2px 4px; background: #e5e5e5; color: #777777; font-size: 11px; text-shadow: #e9f9fd 0 1px 0; border-top: 1px solid #dedede; border-bottom: 2px solid #e5e5e5;}
table .left_align_cell{display: table-cell; padding: 2px 4px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align: left; }
table .right_align_cell{display: table-cell; padding: 2px 4px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align: right; }
table td {white-space:nowrap; display: table-cell; padding: 2px 3px; font: 13px/20px Arial, Helvetica, sans-serif; min-width: 125px; overflow: auto; text-align:left; }

View File

@ -1,8 +1,8 @@
body { padding: 0px; margin: 0px; font: 13px/20px Arial, Helvetica, sans-serif; color: #535353; }
body { padding: 0px; margin: 0px; font: 13px Arial, Helvetica, sans-serif; color: #535353; }
#wrapper { width: 90%; margin: 0px auto; margin-top: 35px; }
h1 { color: #07A; font-size: 36px; line-height: 42px; font-weight: normal; margin: 0px; border-bottom: 1px solid #81B9DB; }
h1 span { color: #F00; display: block; font-size: 16px; font-weight: bold; line-height: 22px;}
h2 { padding: 0 0 3px 0; margin: 0px; color: #07A; font-weight: normal; border-bottom: 1px dotted #81B9DB; }
h1 { color: #0077AA; font-size: 36px; line-height: 42px; font-weight: normal; margin: 0px; border-bottom: 1px solid #81B9DB; }
h1 span { color: #FF0000; display: block; font-size: 16px; font-weight: bold; line-height: 22px;}
h2 { padding: 0 0 3px 0; margin: 0px; color: #0077AA; font-weight: normal; border-bottom: 1px dotted #81B9DB; }
table td { padding-right: 25px; }
p.subheadding { padding: 0px; margin: 0px; font-size: 11px; color: #B5B5B5; }
.title { width: 660px; margin-bottom: 50px; }
@ -10,5 +10,5 @@ p.subheadding { padding: 0px; margin: 0px; font-size: 11px; color: #B5B5B5; }
.left img { max-width: 250px; max-height: 250px; min-width: 200px; min-height: 200px; }
.right { float: right; width: 385px; margin-top: 25px; font-size: 14px; }
.clear { clear: both; }
.info p { padding: 3px 10px; background: #e5e5e5; color: #777; font-size: 12px; font-weight: bold; text-shadow: #e9f9fd 0 1px 0; border-top: 1px solid #dedede; border-bottom: 2px solid #dedede; }
.info p { padding: 3px 10px; background: #e5e5e5; color: #777777; font-size: 12px; font-weight: bold; text-shadow: #e9f9fd 0 1px 0; border-top: 1px solid #dedede; border-bottom: 2px solid #dedede; }
.info table { margin: 0 25px 20px 25px; }

View File

@ -20,7 +20,8 @@ package org.sleuthkit.autopsy.test;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.DatatypeConverter;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.joda.time.DateTime;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.datamodel.Blackboard;
@ -95,13 +96,13 @@ final class CustomArtifactType {
* @throws Blackboard.BlackboardException If there is an error posting the
* artifact to the blackboard.
*/
static BlackboardArtifact createAndPostInstance(Content source, long ingestJobId) throws TskCoreException, Blackboard.BlackboardException {
static BlackboardArtifact createAndPostInstance(Content source, long ingestJobId) throws TskCoreException, Blackboard.BlackboardException, DecoderException {
List<BlackboardAttribute> attributes = new ArrayList<>();
attributes.add(new BlackboardAttribute(intAttrType, MODULE_NAME, 0));
attributes.add(new BlackboardAttribute(doubleAttrType, MODULE_NAME, 0.0));
attributes.add(new BlackboardAttribute(longAttributeType, MODULE_NAME, 0L));
attributes.add(new BlackboardAttribute(dateTimeAttrType, MODULE_NAME, DateTime.now().getMillis()/1000));
attributes.add(new BlackboardAttribute(bytesAttrType, MODULE_NAME, DatatypeConverter.parseHexBinary("ABCD")));
attributes.add(new BlackboardAttribute(dateTimeAttrType, MODULE_NAME, 60L));
attributes.add(new BlackboardAttribute(bytesAttrType, MODULE_NAME, Hex.decodeHex("ABCD")));
attributes.add(new BlackboardAttribute(stringAttrType, MODULE_NAME, "Zero"));
attributes.add(new BlackboardAttribute(jsonAttrType, MODULE_NAME, "{\"fruit\": \"Apple\",\"size\": \"Large\",\"color\": \"Red\"}"));

View File

@ -19,6 +19,7 @@
package org.sleuthkit.autopsy.test;
import java.util.logging.Level;
import org.apache.commons.codec.DecoderException;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.DataSourceIngestModuleAdapter;
@ -73,7 +74,7 @@ public class CustomArtifactsCreatorDataSourceIngestModule extends DataSourceInge
public ProcessResult process(Content dataSource, DataSourceIngestModuleProgress progressBar) {
try {
CustomArtifactType.createAndPostInstance(dataSource, context.getJobId());
} catch (TskCoreException | Blackboard.BlackboardException ex) {
} catch (TskCoreException | Blackboard.BlackboardException | DecoderException ex) {
logger.log(Level.SEVERE, String.format("Failed to process data source (obj_id = %d)", dataSource.getId()), ex);
return ProcessResult.ERROR;
}

View File

@ -19,6 +19,7 @@
package org.sleuthkit.autopsy.test;
import java.util.logging.Level;
import org.apache.commons.codec.DecoderException;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.FileIngestModuleAdapter;
@ -74,7 +75,7 @@ final class CustomArtifactsCreatorFileIngestModule extends FileIngestModuleAdapt
}
try {
CustomArtifactType.createAndPostInstance(file, context.getJobId());
} catch (TskCoreException | Blackboard.BlackboardException ex) {
} catch (TskCoreException | Blackboard.BlackboardException | DecoderException ex) {
logger.log(Level.SEVERE, String.format("Failed to process file (obj_id = %d)", file.getId()), ex);
return ProcessResult.ERROR;
}

View File

@ -25,10 +25,11 @@ import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TreeTableCell;
import javafx.scene.control.TreeTableColumn;
import javafx.scene.control.TreeTableView;
/**
* An abstract base class for Cell factories. This class provides the basic
* infrustructure for implementations to be able to create similar cells for
* infrastructure for implementations to be able to create similar cells for
* ListView, TableViews or TreeTableViews via the appropriate method call.
* Implementations need only implement the abstract configureCell method in the
* same spirit as IndexedCell.updateItem
@ -64,6 +65,12 @@ public abstract class AbstractFXCellFactory<X, Y> {
@Override
protected void updateItem(Y item, boolean empty) {
super.updateItem(item, empty);
// Due to a JavaFX issue in Java 10+,
// https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8231644
// the arrows to expand the tree were removed (FilterTable.css)
// and the following code was added to indent the subnodes.
TreeTableView<X> treeTableView = this.treeTableViewProperty().get();
this.setTranslateX(treeTableView.getTreeItemLevel(treeTableView.getTreeItem(getIndex())) << 4);
configureCell(this, item, empty, (() -> this.getTreeTableRow().getItem()));
}
}

View File

@ -662,6 +662,7 @@ final public class ViewFrame extends BorderPane {
: defaultTimeNavigationNodes);
//do further setup of new view.
ActionUtils.unconfigureButton(refreshButton);
ActionUtils.configureButton(new Refresh(), refreshButton);//configure new refresh action for new view
hostedView.refresh();
notificationPane.setContent(hostedView);

View File

@ -1,6 +1,6 @@
.guide-line{
-fx-opacity: .5;
-fx-stroke: red;
-fx-stroke: #FF0000;
-fx-stroke-dash-array: 5 5;
-fx-stroke-width: 3;
-fx-cursor: h-resize;

View File

@ -24,6 +24,7 @@ import javafx.beans.InvalidationListener;
import javafx.beans.binding.Bindings;
import javafx.collections.FXCollections;
import javafx.collections.ObservableMap;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Cell;
@ -35,6 +36,7 @@ import javafx.scene.control.TreeTableColumn;
import javafx.scene.control.TreeTableView;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.BorderPane;
import org.controlsfx.control.action.Action;
import org.controlsfx.control.action.ActionUtils;
@ -117,6 +119,8 @@ final public class FilterSetPanel extends BorderPane {
//type is the only filter expanded initialy
expansionMap.put(filteredEvents.getEventFilterState().getFilter(), true);
expansionMap.put(filteredEvents.getEventFilterState().getEventTypeFilterState().getFilter(), true);
expansionMap.put(filteredEvents.getEventFilterState().getDataSourcesFilterState().getFilter(), true);
expansionMap.put(filteredEvents.getEventFilterState().getFileTypesFilterState().getFilter(), true);
InvalidationListener applyFiltersListener = observable -> applyFilters();
@ -128,7 +132,7 @@ final public class FilterSetPanel extends BorderPane {
refreshFilterUI();
hiddenDescriptionsListView.setItems(controller.getQuickHideFilters());
hiddenDescriptionsListView.setCellFactory(listView -> getNewDiscriptionFilterListCell());
hiddenDescriptionsListView.setCellFactory(listView -> getNewDescriptionFilterListCell());
//show and hide the "hidden descriptions" panel depending on the current view mode
controller.viewModeProperty().addListener(observable -> {
@ -154,6 +158,14 @@ final public class FilterSetPanel extends BorderPane {
throw new UnsupportedOperationException("Unknown ViewMode: " + controller.getViewMode());
}
});
//Block the default treetable keyboard events.
filterTreeTable.addEventFilter(KeyEvent.ANY, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
event.consume();
}
});
}
public FilterSetPanel(TimeLineController controller) {
@ -173,7 +185,7 @@ final public class FilterSetPanel extends BorderPane {
});
}
private ListCell<DescriptionFilterState> getNewDiscriptionFilterListCell() {
private ListCell<DescriptionFilterState> getNewDescriptionFilterListCell() {
final ListCell<DescriptionFilterState> cell = new FilterCheckBoxCellFactory< DescriptionFilterState>().forList();
cell.itemProperty().addListener(itemProperty -> {
if (cell.getItem() == null) {

View File

@ -1,3 +1,16 @@
.column-header-background { visibility: hidden; -fx-padding: -1em; }
.tree-disclosure-node {
-fx-padding: 0px;
-fx-background-color: transparent;
}
.tree-disclosure-node .arrow {
-fx-background-color: -fx-mark-color;
-fx-padding: 0.0em;
}
.tree-table-row-cell {
-fx-table-cell-border-color: transparent;
}

View File

@ -44,8 +44,8 @@ class FilterTreeItem extends TreeItem<FilterState<?>> {
super(filterState);
//keep expanion map upto date if user expands/collapses filter
expandedProperty().addListener(expandedProperty -> expansionMap.put(filterState.getFilter(), isExpanded()));
setExpanded(expansionMap.getOrDefault(filterState.getFilter(), false));
expandedProperty().addListener(expandedProperty -> expansionMap.put(filterState.getFilter(), true));
setExpanded(true);
//if the filter is a compound filter, add its subfilters to the tree
if (filterState instanceof CompoundFilterState<?, ?>) {

View File

@ -14,7 +14,7 @@ import javafx.collections.ObservableList;
import javafx.collections.transformation.TransformationList;
/**
*
* Maps an observable list of type E to an observable list of type F.
*/
public class MappedList<E, F> extends TransformationList<E, F> {
private final Function<F, E> mapper;
@ -112,4 +112,9 @@ public class MappedList<E, F> extends TransformationList<E, F> {
});
}
@Override
public int getViewIndex(int index) {
return index;
}
}

View File

@ -1,13 +1,7 @@
<project name="NativeCoreLibs">
<target name="build-native-libs" description="build native library dependencies">
<!-- sigar: note, matching jar is pulled with ivy -->
<mkdir dir="${lib.dir}"/>
<unzip src="${thirdparty.dir}/sigar/1.6.4/sigar-native.zip" dest="${lib.dir}" >
<!-- get all, rely on jna to locate <patternset>
<include name="**/*.dylib"/>
</patternset> -->
</unzip>
</target>
</project>

View File

@ -1,13 +1,7 @@
<project name="NativeCoreLibs">
<target name="build-native-libs" description="build native library dependencies">
<!-- sigar: note, matching jar is pulled with ivy -->
<mkdir dir="${lib.dir}"/>
<unzip src="${thirdparty.dir}/sigar/1.6.4/sigar-native.zip" dest="${lib.dir}" >
<!-- get all, rely on jna to locate <patternset>
<include name="**/*.so"/>
</patternset> -->
</unzip>
</target>
</project>

View File

@ -1,13 +1,7 @@
<project name="NativeCoreLibs">
<target name="build-native-libs" description="build native library dependencies">
<!-- sigar: note, matching jar is pulled with ivy -->
<mkdir dir="${lib.dir}"/>
<unzip src="${thirdparty.dir}/sigar/1.6.4/sigar-native.zip" dest="${lib.dir}" >
<!-- get all, rely on jna to locate <patternset>
<include name="**/*.dll"/>
</patternset> -->
</unzip>
</target>
</project>

View File

@ -41,24 +41,25 @@
<dependency conf="autopsy_core->default" org="net.htmlparser.jericho" name="jericho-html" rev="3.4"/>
<dependency conf="autopsy_core->default" org="com.fasterxml.jackson.dataformat" name="jackson-dataformat-csv" rev="2.13.2"/>
<!-- process and system monitoring, note: matching native libs pulled from thirdparty -->
<dependency conf="autopsy_core->default" org="org.fusesource" name="sigar" rev="1.6.4" />
<!-- better image resizing -->
<dependency conf="autopsy_core->default" org="org.imgscalr" name="imgscalr-lib" rev="4.2" />
<!-- timeline and image analyzer -->
<!-- ControlsFX after version 9.0.0 has a bug that causes the Image Gallery GridView
to constantly reload images (JIRA-6724). Do not upgrade ControlsFX unless you can
confirm that the following issue is fixed.
https://github.com/controlsfx/controlsfx/issues/1241
-->
<dependency conf="autopsy_core->*" org="org.controlsfx" name="controlsfx" rev="11.1.2" />
<dependency conf="autopsy_core->default" org="joda-time" name="joda-time" rev="2.10.14" />
<!-- timeline -->
<!-- NOTE: the version of these dependencies appears to be tied to javafx / java version -->
<dependency conf="autopsy_core->default" org="org.controlsfx" name="controlsfx" rev="8.40.11" />
<dependency conf="autopsy_core->default" org="org.jfxtras" name="jfxtras-fxml" rev="8.0-r4" />
<dependency conf="autopsy_core->default" org="org.jfxtras" name="jfxtras-controls" rev="8.0-r4" />
<dependency conf="autopsy_core->default" org="org.jfxtras" name="jfxtras-common" rev="8.0-r4" />
<dependency conf="autopsy_core->default" org="org.jfxtras" name="jfxtras-fxml" rev="17-r1" />
<dependency conf="autopsy_core->default" org="org.jfxtras" name="jfxtras-controls" rev="17-r1" />
<dependency conf="autopsy_core->default" org="org.jfxtras" name="jfxtras-common" rev="17-r1" />
<!-- templateing engine used by timeline to generate its snapshot report -->
<dependency conf="autopsy_core->default" org="com.github.spullara.mustache.java" name="compiler" rev="0.9.10" />

View File

@ -26,7 +26,7 @@ file.reference.commons-text-1.9.jar=release/modules/ext/commons-text-1.9.jar
file.reference.commons-validator-1.7.jar=release/modules/ext/commons-validator-1.7.jar
file.reference.compiler-0.9.10.jar=release/modules/ext/compiler-0.9.10.jar
file.reference.conscrypt-openjdk-uber-2.5.1.jar=release/modules/ext/conscrypt-openjdk-uber-2.5.1.jar
file.reference.controlsfx-8.40.11.jar=release/modules/ext/controlsfx-8.40.11.jar
file.reference.controlsfx-11.1.2.jar=release/modules/ext/controlsfx-11.1.2.jar
file.reference.dd-plist-1.23.jar=release/modules/ext/dd-plist-1.23.jar
file.reference.error_prone_annotations-2.11.0.jar=release/modules/ext/error_prone_annotations-2.11.0.jar
file.reference.failureaccess-1.0.1.jar=release/modules/ext/failureaccess-1.0.1.jar
@ -85,9 +85,9 @@ file.reference.jackson-databind-2.13.2.jar=release/modules/ext/jackson-databind-
file.reference.jackson-dataformat-csv-2.13.2.jar=release/modules/ext/jackson-dataformat-csv-2.13.2.jar
file.reference.javax.annotation-api-1.3.2.jar=release/modules/ext/javax.annotation-api-1.3.2.jar
file.reference.jericho-html-3.4.jar=release/modules/ext/jericho-html-3.4.jar
file.reference.jfxtras-common-8.0-r4.jar=release/modules/ext/jfxtras-common-8.0-r4.jar
file.reference.jfxtras-controls-8.0-r4.jar=release/modules/ext/jfxtras-controls-8.0-r4.jar
file.reference.jfxtras-fxml-8.0-r4.jar=release/modules/ext/jfxtras-fxml-8.0-r4.jar
file.reference.jfxtras-common-17-r1.jar=release/modules/ext/jfxtras-common-17-r1.jar
file.reference.jfxtras-controls-17-r1.jar=release/modules/ext/jfxtras-controls-17-r1.jar
file.reference.jfxtras-fxml-17-r1.jar=release/modules/ext/jfxtras-fxml-17-r1.jar
file.reference.jna-5.13.0.jar=release/modules/ext/jna-5.13.0.jar
file.reference.jna-platform-5.13.0.jar=release/modules/ext/jna-platform-5.13.0.jar
file.reference.joda-time-2.10.14.jar=release/modules/ext/joda-time-2.10.14.jar
@ -96,7 +96,6 @@ file.reference.LGoodDatePicker-11.2.1.jar=release/modules/ext/LGoodDatePicker-11
file.reference.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar=release/modules/ext/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
file.reference.log4j-api-2.17.2.jar=release/modules/ext/log4j-api-2.17.2.jar
file.reference.log4j-core-2.17.2.jar=release/modules/ext/log4j-core-2.17.2.jar
file.reference.ooxml-schemas-1.4.jar=release/modules/ext/ooxml-schemas-1.4.jar
file.reference.opencensus-api-0.31.0.jar=release/modules/ext/opencensus-api-0.31.0.jar
file.reference.opencensus-contrib-http-util-0.31.0.jar=release/modules/ext/opencensus-contrib-http-util-0.31.0.jar
file.reference.opencensus-proto-0.2.0.jar=release/modules/ext/opencensus-proto-0.2.0.jar
@ -110,12 +109,10 @@ file.reference.protobuf-java-3.19.4.jar=release/modules/ext/protobuf-java-3.19.4
file.reference.protobuf-java-util-3.19.4.jar=release/modules/ext/protobuf-java-util-3.19.4.jar
file.reference.re2j-1.5.jar=release/modules/ext/re2j-1.5.jar
file.reference.reload4j-1.2.19.jar=release/modules/ext/reload4j-1.2.19.jar
file.reference.sigar-1.6.4.jar=release/modules/ext/sigar-1.6.4.jar
file.reference.slf4j-api-1.7.36.jar=release/modules/ext/slf4j-api-1.7.36.jar
file.reference.slf4j-reload4j-1.7.36.jar=release/modules/ext/slf4j-reload4j-1.7.36.jar
file.reference.threetenbp-1.5.2.jar=release/modules/ext/threetenbp-1.5.2.jar
file.reference.webp-imageio-sejda-0.1.0.jar=release/modules/ext/webp-imageio-sejda-0.1.0.jar
javac.source=1.8
javac.source=17
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true

View File

@ -11,7 +11,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.25.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -19,7 +19,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.4.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
@ -246,6 +246,19 @@
<package>javax.annotation</package>
<package>javax.annotation.concurrent</package>
<package>javax.annotation.meta</package>
<package>javax.jms</package>
<package>javax.mail</package>
<package>javax.mail.event</package>
<package>javax.mail.internet</package>
<package>javax.mail.search</package>
<package>javax.mail.util</package>
<package>javax.servlet</package>
<package>javax.servlet.http</package>
<package>javax.xml.parsers</package>
<package>javax.xml.transform</package>
<package>javax.xml.transform.dom</package>
<package>javax.xml.transform.sax</package>
<package>javax.xml.transform.stream</package>
<package>jfxtras.animation</package>
<package>jfxtras.css</package>
<package>jfxtras.css.converters</package>
@ -313,6 +326,16 @@
<package>org.apache.commons.lang3.tuple</package>
<package>org.apache.commons.logging</package>
<package>org.apache.commons.logging.impl</package>
<package>org.apache.log</package>
<package>org.apache.log.filter</package>
<package>org.apache.log.format</package>
<package>org.apache.log.output</package>
<package>org.apache.log.output.db</package>
<package>org.apache.log.output.io</package>
<package>org.apache.log.output.io.rotate</package>
<package>org.apache.log.output.jms</package>
<package>org.apache.log.output.net</package>
<package>org.apache.log.util</package>
<package>org.apache.commons.text</package>
<package>org.apache.commons.validator.routines</package>
<package>org.apache.commons.validator.routines.checkdigit</package>
@ -401,7 +424,6 @@
<package>org.controlsfx.control.action</package>
<package>org.controlsfx.control.cell</package>
<package>org.controlsfx.control.decoration</package>
<package>org.controlsfx.control.spreadsheet</package>
<package>org.controlsfx.control.table</package>
<package>org.controlsfx.control.table.model</package>
<package>org.controlsfx.control.textfield</package>
@ -423,17 +445,6 @@
<package>org.freedesktop.gstreamer.message</package>
<package>org.freedesktop.gstreamer.query</package>
<package>org.freedesktop.gstreamer.webrtc</package>
<package>org.hyperic.jni</package>
<package>org.hyperic.sigar</package>
<package>org.hyperic.sigar.cmd</package>
<package>org.hyperic.sigar.jmx</package>
<package>org.hyperic.sigar.pager</package>
<package>org.hyperic.sigar.ptql</package>
<package>org.hyperic.sigar.shell</package>
<package>org.hyperic.sigar.test</package>
<package>org.hyperic.sigar.util</package>
<package>org.hyperic.sigar.vmware</package>
<package>org.hyperic.sigar.win32</package>
<package>org.imgscalr</package>
<package>org.joda.time</package>
<package>org.joda.time.base</package>
@ -460,7 +471,7 @@
<package>org.slf4j.helpers</package>
<package>org.slf4j.spi</package>
</public-packages>
<class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/animal-sniffer-annotations-1.21.jar</runtime-relative-path>
<binary-origin>release/modules/ext/animal-sniffer-annotations-1.21.jar</binary-origin>
</class-path-extension>
@ -573,8 +584,8 @@
<binary-origin>release/modules/ext/conscrypt-openjdk-uber-2.5.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/controlsfx-8.40.11.jar</runtime-relative-path>
<binary-origin>release/modules/ext/controlsfx-8.40.11.jar</binary-origin>
<runtime-relative-path>ext/controlsfx-11.1.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/controlsfx-11.1.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/dd-plist-1.23.jar</runtime-relative-path>
@ -809,16 +820,16 @@
<binary-origin>release/modules/ext/jericho-html-3.4.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jfxtras-common-8.0-r4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-common-8.0-r4.jar</binary-origin>
<runtime-relative-path>ext/jfxtras-common-17-r1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-common-17-r1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jfxtras-controls-8.0-r4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-controls-8.0-r4.jar</binary-origin>
<runtime-relative-path>ext/jfxtras-controls-17-r1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-controls-17-r1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jfxtras-fxml-8.0-r4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-fxml-8.0-r4.jar</binary-origin>
<runtime-relative-path>ext/jfxtras-fxml-17-r1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jfxtras-fxml-17-r1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jna-5.13.0.jar</runtime-relative-path>
@ -852,10 +863,6 @@
<runtime-relative-path>ext/log4j-core-2.17.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/log4j-core-2.17.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/ooxml-schemas-1.4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/ooxml-schemas-1.4.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/opencensus-api-0.31.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/opencensus-api-0.31.0.jar</binary-origin>
@ -908,10 +915,6 @@
<runtime-relative-path>ext/reload4j-1.2.19.jar</runtime-relative-path>
<binary-origin>release/modules/ext/reload4j-1.2.19.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/sigar-1.6.4.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sigar-1.6.4.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/slf4j-api-1.7.36.jar</runtime-relative-path>
<binary-origin>release/modules/ext/slf4j-api-1.7.36.jar</binary-origin>

View File

@ -4,4 +4,3 @@ OpenIDE-Module-Long-Description=\
The libraries can also be imported by other modules.
OpenIDE-Module-Name=Autopsy-CoreLibs
OpenIDE-Module-Short-Description=Autopsy Core module external libraries
SigarLoader.linkErr.msg=Could not load sigar library for your environment (non-critical), OS-level metrics will be unavailable.

View File

@ -1,67 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2013 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.corelibs;
import com.sun.javafx.PlatformUtil;
import org.hyperic.sigar.Sigar;
import org.openide.util.NbBundle;
/**
* Wrapper over Sigar instrumentation class to facilitate dll loading. Our setup
* bypasses Sigar library loader which does not work well for netbeans
* environment We are responsible for loading the library ourselves.
*/
public class SigarLoader {
private static volatile Sigar sigar;
static {
//bypass the process of validation/loading of the library by sigar jar
System.setProperty("org.hyperic.sigar.path", "-");
//System.setProperty(org.hyperic.sigar.SigarLoader.PROP_SIGAR_JAR_NAME, "sigar-1.6.4.jar");
}
public static Sigar getSigar() {
if (sigar == null) {
synchronized (SigarLoader.class) {
if (sigar == null) {
try {
//rely on netbeans / jna to locate the lib variation for architecture/OS
if (PlatformUtil.isWindows()) {
System.loadLibrary("libsigar"); //NON-NLS
} else {
System.loadLibrary("sigar"); //NON-NLS
}
sigar = new Sigar();
sigar.enableLogging(false); //forces a test
} catch (UnsatisfiedLinkError ex) {
String msg = NbBundle.getMessage(SigarLoader.class, "SigarLoader.linkErr.msg");
System.out.println(msg + ex.toString());
} catch (Exception ex) {
String msg = NbBundle.getMessage(SigarLoader.class, "SigarLoader.linkErr.msg");
System.out.println(msg + ex.toString());
}
}
}
}
return sigar;
}
}

View File

@ -4,10 +4,10 @@
<conf name="coretestlibs"/>
</configurations>
<dependencies >
<dependency conf="coretestlibs->default" org="org.mockito" name="mockito-core" rev="3.5.7"/>
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy" rev="1.10.13"/>
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy-agent" rev="1.10.13"/>
<dependency conf="coretestlibs->default" org="org.objenesis" name="objenesis" rev="3.1"/>
<dependency conf="coretestlibs->default" org="org.mockito" name="mockito-core" rev="4.8.1"/>
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy" rev="1.12.18"/>
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy-agent" rev="1.12.18"/>
<dependency conf="coretestlibs->default" org="org.objenesis" name="objenesis" rev="3.3"/>
<dependency conf="coretestlibs->default" org="junit" name="junit" rev="4.13.2"/>
</dependencies>
</ivy-module>

View File

@ -2,7 +2,7 @@ file.reference.byte-buddy-1.10.13.jar=release/modules/ext/byte-buddy-1.10.13.jar
file.reference.byte-buddy-agent-1.10.13.jar=release/modules/ext/byte-buddy-agent-1.10.13.jar
file.reference.hamcrest-core-1.3.jar=release/modules/ext/hamcrest-core-1.3.jar
file.reference.junit-4.13.2.jar=release/modules/ext/junit-4.13.2.jar
file.reference.mockito-core-3.5.7.jar=release/modules/ext/mockito-core-3.5.7.jar
file.reference.mockito-core-4.8.1.jar=release/modules/ext/mockito-core-4.8.1.jar
file.reference.objenesis-3.1.jar=release/modules/ext/objenesis-3.1.jar
javac.source=1.8
javac.source=11
javac.compilerargs=-Xlint -Xlint:-serial

View File

@ -44,12 +44,12 @@
<package>org.junit.validator</package>
</public-packages>
<class-path-extension>
<runtime-relative-path>ext/byte-buddy-1.10.13.jar</runtime-relative-path>
<binary-origin>release/modules/ext/byte-buddy-1.10.13.jar</binary-origin>
<runtime-relative-path>ext/byte-buddy-1.12.18.jar</runtime-relative-path>
<binary-origin>release/modules/ext/byte-buddy-1.12.18.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/byte-buddy-agent-1.10.13.jar</runtime-relative-path>
<binary-origin>release/modules/ext/byte-buddy-agent-1.10.13.jar</binary-origin>
<runtime-relative-path>ext/byte-buddy-agent-1.12.18.jar</runtime-relative-path>
<binary-origin>release/modules/ext/byte-buddy-agent-1.12.18.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/hamcrest-core-1.3.jar</runtime-relative-path>
@ -60,12 +60,12 @@
<binary-origin>release/modules/ext/junit-4.13.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/mockito-core-3.5.7.jar</runtime-relative-path>
<binary-origin>release/modules/ext/mockito-core-3.5.7.jar</binary-origin>
<runtime-relative-path>ext/mockito-core-4.8.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/mockito-core-4.8.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/objenesis-3.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/objenesis-3.1.jar</binary-origin>
<runtime-relative-path>ext/objenesis-3.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/objenesis-3.3.jar</binary-origin>
</class-path-extension>
</data>
</configuration>

View File

@ -1,4 +1,4 @@
file.reference.jtidy-r938.jar=release/modules/ext/jtidy-r938.jar
javac.source=1.8
javac.source=17
javac.compilerargs=-Xlint -Xlint:-serial
spec.version.base=1.0

View File

@ -12,7 +12,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.47.1</specification-version>
<specification-version>1.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -21,7 +21,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.44.1</specification-version>
<specification-version>1.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -30,7 +30,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.49.1</specification-version>
<specification-version>1.66</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -38,7 +38,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.34.1</specification-version>
<specification-version>1.51</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -46,7 +46,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.65.1</specification-version>
<specification-version>7.85</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -54,7 +54,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.41.1</specification-version>
<specification-version>7.63</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -62,7 +62,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.62.1</specification-version>
<specification-version>6.79</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -70,7 +70,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.8.1</specification-version>
<specification-version>9.29</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -78,7 +78,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.63.2</specification-version>
<specification-version>7.87</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -86,7 +86,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.47.1</specification-version>
<specification-version>7.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -94,7 +94,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.45.1</specification-version>
<specification-version>7.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -102,7 +102,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.5.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -110,7 +110,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.32.1</specification-version>
<specification-version>8.51</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -118,7 +118,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.4.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -126,7 +126,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.74.1</specification-version>
<specification-version>6.94</specification-version>
</run-dependency>
</dependency>
<dependency>

View File

@ -80,6 +80,7 @@ import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import javax.swing.DefaultListModel;
import javax.swing.tree.TreeNode;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
@ -1322,10 +1323,10 @@ public final class FileExporterSettingsPanel extends JPanel {
*/
private TreePath findTreePathByRuleAndArtifactClauseName(String ruleName, String clauseName) {
@SuppressWarnings("unchecked")
Enumeration<DefaultMutableTreeNode> enumeration = rootNode.preorderEnumeration();
Enumeration<TreeNode> enumeration = rootNode.preorderEnumeration();
boolean insideRule = false;
while (enumeration.hasMoreElements()) {
DefaultMutableTreeNode node = enumeration.nextElement();
DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumeration.nextElement();
Item item = (Item) node.getUserObject();
if (item.getItemType() == ItemType.RULE) {
insideRule = node.toString().equalsIgnoreCase(ruleName);
@ -1349,9 +1350,9 @@ public final class FileExporterSettingsPanel extends JPanel {
*/
private TreePath findTreePathByRuleName(String ruleName) {
@SuppressWarnings("unchecked")
Enumeration<DefaultMutableTreeNode> enumeration = rootNode.depthFirstEnumeration();
Enumeration<TreeNode> enumeration = rootNode.depthFirstEnumeration();
while (enumeration.hasMoreElements()) {
DefaultMutableTreeNode node = enumeration.nextElement();
DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumeration.nextElement();
if (node.toString().equalsIgnoreCase(ruleName)) {
return new TreePath(node.getPath());
}

View File

@ -1,5 +1,5 @@
file.reference.sqlite-jdbc-3.36.0.3.jar=release/modules/ext/sqlite-jdbc-3.36.0.3.jar
javac.source=1.8
file.reference.sqlite-jdbc-3.42.0.0.jar=release/modules/ext/sqlite-jdbc-3.42.0.0.jar
javac.source=17
javac.compilerargs=-Xlint -Xlint:-serial
license.file=LICENSE-2.0.txt
nbm.homepage=http://www.sleuthkit.org/

View File

@ -12,7 +12,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.32.1</specification-version>
<specification-version>1.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -20,7 +20,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.46.1</specification-version>
<specification-version>1.64</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -28,7 +28,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.46.1</specification-version>
<specification-version>1.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -37,7 +37,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.31.2</specification-version>
<specification-version>1.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -46,7 +46,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.38.2</specification-version>
<specification-version>1.66</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -54,7 +54,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.55.1</specification-version>
<specification-version>7.85</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -62,7 +62,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.28.1</specification-version>
<specification-version>7.63</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -70,7 +70,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.50.3</specification-version>
<specification-version>6.79</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -78,7 +78,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.35.1</specification-version>
<specification-version>7.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -86,7 +86,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.33.2</specification-version>
<specification-version>7.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -94,7 +94,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.29.3</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -102,7 +102,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.19.1</specification-version>
<specification-version>8.51</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -110,7 +110,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.4.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -118,7 +118,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.60.1</specification-version>
<specification-version>6.94</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -142,8 +142,8 @@
</module-dependencies>
<public-packages/>
<class-path-extension>
<runtime-relative-path>ext/sqlite-jdbc-3.36.0.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sqlite-jdbc-3.36.0.3.jar</binary-origin>
<runtime-relative-path>ext/sqlite-jdbc-3.42.0.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/sqlite-jdbc-3.42.0.0.jar</binary-origin>
</class-path-extension>
</data>
</configuration>

View File

@ -240,7 +240,7 @@ public class GroupPane extends BorderPane {
*/
@ThreadConfined(type = ThreadType.JFX)
private final Map<Long, DrawableCell> cellMap = new HashMap<>();
private final InvalidationListener filesSyncListener = (observable) -> {
final String header = getHeaderString();
final List<Long> fileIds = getGroup().getFileIDs();
@ -658,40 +658,46 @@ public class GroupPane extends BorderPane {
}
}
private class DrawableCell extends GridCell<Long> {
private class DrawableCell extends GridCell<Long> implements AutoCloseable {
private final DrawableTile tile = new DrawableTile(GroupPane.this, controller);
/**
* This stores the last non-null file id. So that only new file ids for
* this item are tracked. This prevents an infinite render loop. See
* https://github.com/controlsfx/controlsfx/issues/1241 for more
* information
*/
private Long oldItem = null;
DrawableCell() {
itemProperty().addListener((ObservableValue<? extends Long> observable, Long oldValue, Long newValue) -> {
if (oldValue != null) {
cellMap.remove(oldValue, DrawableCell.this);
tile.setFile(null);
}
if (newValue != null) {
if (cellMap.containsKey(newValue)) {
if (tile != null) {
// Clear out the old value to prevent out-of-date listeners
// from activating.
cellMap.get(newValue).tile.setFile(null);
}
}
cellMap.put(newValue, DrawableCell.this);
}
});
setGraphic(tile);
}
@Override
protected void updateItem(Long item, boolean empty) {
super.updateItem(item, empty);
tile.setFile(item);
if (item != null && oldItem != item) {
tile.setFile(item);
}
if (item != null) {
cellMap.put(item, this);
oldItem = item;
} else if (oldItem != null) {
cellMap.remove(oldItem);
}
}
void resetItem() {
tile.setFile(null);
}
@Override
public void close() throws Exception {
resetItem();
}
}
/**

View File

@ -18,7 +18,8 @@
<dependency conf="solr-war->default" org="org.apache.solr" name="solr" rev="4.10.4" transitive="false" /> <!-- the war file for embedded Solr 4 -->
<dependency conf="solr-libs->default" name="solr-cell" rev="8.11.2" org="org.apache.solr"/>
<!-- https://mvnrepository.com/artifact/org.apache.lucene/lucene-core -->
<dependency conf="autopsy->default" org="org.apache.lucene" name="lucene-core" rev="8.11.2"/>
<!-- Autopsy -->
<dependency conf="autopsy->default" org="org.apache.solr" name="solr-solrj" rev="8.11.2"/>
<dependency conf="autopsy->default" org="com.optimaize.languagedetector" name="language-detector" rev="0.6"/>

View File

@ -6,6 +6,7 @@ file.reference.commons-math3-3.6.1.jar=release/modules/ext/commons-math3-3.6.1.j
file.reference.error_prone_annotations-2.11.0.jar=release/modules/ext/error_prone_annotations-2.11.0.jar
file.reference.failureaccess-1.0.1.jar=release/modules/ext/failureaccess-1.0.1.jar
file.reference.guava-31.1-jre.jar=release/modules/ext/guava-31.1-jre.jar
file.reference.hamcrest-core-1.3.jar=release/modules/ext/hamcrest-core-1.3.jar
file.reference.http2-client-9.4.44.v20210927.jar=release/modules/ext/http2-client-9.4.44.v20210927.jar
file.reference.http2-common-9.4.44.v20210927.jar=release/modules/ext/http2-common-9.4.44.v20210927.jar
file.reference.http2-hpack-9.4.44.v20210927.jar=release/modules/ext/http2-hpack-9.4.44.v20210927.jar
@ -24,6 +25,8 @@ file.reference.jetty-http-9.4.44.v20210927.jar=release/modules/ext/jetty-http-9.
file.reference.jetty-io-9.4.44.v20210927.jar=release/modules/ext/jetty-io-9.4.44.v20210927.jar
file.reference.jetty-util-9.4.44.v20210927.jar=release/modules/ext/jetty-util-9.4.44.v20210927.jar
file.reference.jsonic-1.2.11.jar=release/modules/ext/jsonic-1.2.11.jar
file.reference.jsr305-3.0.2.jar=release/modules/ext/jsr305-3.0.2.jar
file.reference.junit-4.13.2.jar=release/modules/ext/junit-4.13.2.jar
file.reference.language-detector-0.6.jar=release/modules/ext/language-detector-0.6.jar
file.reference.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar=release/modules/ext/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
file.reference.logback-classic-1.2.10.jar=release/modules/ext/logback-classic-1.2.10.jar
@ -38,13 +41,15 @@ file.reference.netty-tcnative-classes-2.0.48.Final.jar=release/modules/ext/netty
file.reference.netty-transport-4.1.68.Final.jar=release/modules/ext/netty-transport-4.1.68.Final.jar
file.reference.netty-transport-native-epoll-4.1.68.Final.jar=release/modules/ext/netty-transport-native-epoll-4.1.68.Final.jar
file.reference.netty-transport-native-unix-common-4.1.68.Final.jar=release/modules/ext/netty-transport-native-unix-common-4.1.68.Final.jar
file.reference.slf4j-api-1.7.36.jar=release/modules/ext/slf4j-api-1.7.36.jar
file.reference.snappy-java-1.1.7.6.jar=release/modules/ext/snappy-java-1.1.7.6.jar
file.reference.solr-solrj-8.11.2.jar=release/modules/ext/solr-solrj-8.11.2.jar
file.reference.stax2-api-4.2.1.jar=release/modules/ext/stax2-api-4.2.1.jar
file.reference.woodstox-core-6.2.4.jar=release/modules/ext/woodstox-core-6.2.4.jar
file.reference.zookeeper-3.8.0.jar=release/modules/ext/zookeeper-3.8.0.jar
file.reference.zookeeper-jute-3.8.0.jar=release/modules/ext/zookeeper-jute-3.8.0.jar
javac.source=1.8
file.reference.lucene-core-8.11.2.jar=release/modules/ext/lucene-core-8.11.2.jar
javac.source=17
javac.compilerargs=-Xlint -Xlint:-serial
license.file=../LICENSE-2.0.txt
nbm.homepage=http://www.sleuthkit.org/autopsy/

View File

@ -12,7 +12,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.24.1</specification-version>
<specification-version>1.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -20,7 +20,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.46.1</specification-version>
<specification-version>1.64</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -28,7 +28,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.46.1</specification-version>
<specification-version>1.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -37,7 +37,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.26.1</specification-version>
<specification-version>1.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -46,7 +46,7 @@
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.31.1</specification-version>
<specification-version>1.66</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -54,7 +54,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.31.1</specification-version>
<specification-version>7.85</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -62,7 +62,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.50.3</specification-version>
<specification-version>6.79</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -70,7 +70,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.23.1</specification-version>
<specification-version>7.65</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -78,7 +78,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.21.1</specification-version>
<specification-version>7.62</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -86,7 +86,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.15.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -94,7 +94,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.8.1</specification-version>
<specification-version>8.51</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -102,7 +102,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.4.1</specification-version>
<specification-version>9.25</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -110,7 +110,7 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.40.1</specification-version>
<specification-version>6.94</specification-version>
</run-dependency>
</dependency>
<dependency>
@ -266,6 +266,10 @@
<runtime-relative-path>ext/guava-31.1-jre.jar</runtime-relative-path>
<binary-origin>release/modules/ext/guava-31.1-jre.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/hamcrest-core-1.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/hamcrest-core-1.3.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/http2-client-9.4.44.v20210927.jar</runtime-relative-path>
<binary-origin>release/modules/ext/http2-client-9.4.44.v20210927.jar</binary-origin>
@ -338,6 +342,14 @@
<runtime-relative-path>ext/jsonic-1.2.11.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jsonic-1.2.11.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jsr305-3.0.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jsr305-3.0.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/junit-4.13.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/junit-4.13.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/language-detector-0.6.jar</runtime-relative-path>
<binary-origin>release/modules/ext/language-detector-0.6.jar</binary-origin>
@ -394,6 +406,10 @@
<runtime-relative-path>ext/netty-transport-native-unix-common-4.1.68.Final.jar</runtime-relative-path>
<binary-origin>release/modules/ext/netty-transport-native-unix-common-4.1.68.Final.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/slf4j-api-1.7.36.jar</runtime-relative-path>
<binary-origin>release/modules/ext/slf4j-api-1.7.36.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/snappy-java-1.1.7.6.jar</runtime-relative-path>
<binary-origin>release/modules/ext/snappy-java-1.1.7.6.jar</binary-origin>
@ -418,6 +434,10 @@
<runtime-relative-path>ext/zookeeper-jute-3.8.0.jar</runtime-relative-path>
<binary-origin>release/modules/ext/zookeeper-jute-3.8.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/lucene-core-8.11.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/lucene-core-8.11.2.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
</project>

View File

@ -1,4 +1,4 @@
@REM set JAVA_HOME=C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-1
@REM set JAVA_HOME=C:\Program Files\BellSoft\LibericaJDK-17-Full
@REM set SOLR_SERVER_DIR=C:\Bitnami\solr-8.2.0-2/apache-solr/server
set SOLR_PORT=8983
set STOP_PORT=8079

View File

@ -301,7 +301,7 @@
<autoCommit>
<maxTime>300000</maxTime>
<!-- maxDocs>15000</maxDocs -->
<openSearcher>true</openSearcher>
<openSearcher>false</openSearcher>
</autoCommit>
<!-- softAutoCommit is like autoCommit except it causes a

View File

@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException;
* and HighlightedText are very similar and could probably use some refactoring
* to reduce code duplication.
*/
class AccountsText implements IndexedText {
class AccountsText implements ExtractedText {
private static final Logger logger = Logger.getLogger(AccountsText.class.getName());
private static final boolean DEBUG = (Version.getBuildType() == Version.Type.DEVELOPMENT);
@ -312,7 +312,7 @@ class AccountsText implements IndexedText {
return "<html><pre>" + highlightedText + "</pre></html>"; //NON-NLS
} catch (Exception ex) {
logger.log(Level.SEVERE, "Error getting highlighted text for Solr doc id " + this.solrObjectId + ", chunkID " + this.currentPage, ex); //NON-NLS
return Bundle.IndexedText_errorMessage_errorGettingText();
return Bundle.ExtractedText_errorMessage_errorGettingText();
}
}

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