diff --git a/bindings/java/build-unix.xml b/bindings/java/build-unix.xml index 52e8df9caa6a6cb502f0dfa3f4d893247154949a..cd0ef4934b8d82b083ce704d08328bc3dcae072e 100644 --- a/bindings/java/build-unix.xml +++ b/bindings/java/build-unix.xml @@ -37,13 +37,26 @@ <property environment="env"/> <copy file="./jni/.libs/libtsk_jni.dylib" tofile="./libtsk_jni.jnilib"/> </target> + + <target name="copyMacLibs" depends="testTSKLibs" if="tsk_dylib.present"> + <property environment="env"/> + <property name="jni.dylib" location="${basedir}/jni/.libs/libtsk_jni.dylib" /> + <property name="jni.jnilib" value="libtsk_jni.jnilib" /> + <copy file="${jni.dylib}" tofile="${x86_64}/mac/${jni.jnilib}"/> + </target> <!-- Non-OS X --> <target name="copyTskLibs_so" depends="testTSKLibs" if="tsk_so.present"> <property environment="env"/> <copy file="./jni/.libs/libtsk_jni.so" tofile="./libtsk_jni.so"/> </target> + + <target name="copyUnixLibs" depends="testTSKLibs" if="tsk_so.present"> + <!-- does nothing for now --> + </target> + <target name="copyLibs" depends="copyUnixLibs,copyMacLibs" /> + <target name="copyTSKLibs" depends="copyTskLibs_so,copyTskLibs_dylib"> <!-- depends targets take care of the actual copying since the file differs on OS X and Linux --> <!-- This assumes that TSK, libewf, and zlib have been installed on the system and those libraries will be with normal loading approaches --> diff --git a/bindings/java/build-windows.xml b/bindings/java/build-windows.xml index f39120063a3df3a8f23e4c3c686b18e600e64727..375e389d1d67173be321c0eab94c39be7276f479 100644 --- a/bindings/java/build-windows.xml +++ b/bindings/java/build-windows.xml @@ -33,4 +33,63 @@ <sysproperty key="types" value="${test-types}"/> </java> </target> + + <target name="copyLibs" depends="copyWinLibs" description="Copy native libs to the correct folder" /> + + <target name="copyWinLibs" depends="copyWinLibs64,copyWinLibs32" description="Copy windows dlls to the correct location." /> + + <target name="checkLibDirs"> + <available property="win64.exists" type="dir" file="${basedir}/../../win32/x64/Release" /> + <available property="win32.exists" type="dir" file="${basedir}/../../win32/Release" /> + </target> + + <target name="copyWinLibs64" depends="checkLibDirs" if="win64.exists"> + <property name="win64dir" location="${basedir}/../../win32/x64/Release" /> + <fileset dir="${win64dir}" id="win64dlls"> + <include name="*.dll" /> + </fileset> + <copy todir="${amd64}/win"> + <fileset refid="win64dlls" /> + </copy> + <copy todir="${x86_64}/win"> + <fileset refid="win64dlls" /> + </copy> + <fileset dir="${crt}/win64" id="crt64dlls"> + <include name="*.dll" /> + </fileset> + <copy todir="${amd64}/win"> + <fileset refid="crt64dlls" /> + </copy> + <copy todir="${x86_64}/win"> + <fileset refid="crt64dlls" /> + </copy> + </target> + + <target name="copyWinLibs32" depends="checkLibDirs" if="win32.exists"> + <property name="win32dir" location="${basedir}/../../win32/Release" /> + <fileset dir="${win32dir}" id="win32dlls"> + <include name="*.dll" /> + </fileset> + <copy todir="${i386}/win"> + <fileset refid="win32dlls" /> + </copy> + <copy todir="${x86}/win"> + <fileset refid="win32dlls" /> + </copy> + <copy todir="${i586}/win"> + <fileset refid="win32dlls" /> + </copy> + <fileset dir="${crt}/win32" id="crt32dlls"> + <include name="*.dll" /> + </fileset> + <copy todir="${i386}/win"> + <fileset refid="crt32dlls" /> + </copy> + <copy todir="${x86}/win"> + <fileset refid="crt32dlls" /> + </copy> + <copy todir="${i586}/win"> + <fileset refid="crt32dlls" /> + </copy> + </target> </project> diff --git a/bindings/java/build.xml b/bindings/java/build.xml index a67598d31ac7301fcc68572978f260f9934c5c21..81c0ddef09f97edb027e45181c4b1acc903e9581 100755 --- a/bindings/java/build.xml +++ b/bindings/java/build.xml @@ -50,6 +50,7 @@ <mkdir dir="${x86}/win" /> <mkdir dir="${x86_64}" /> <mkdir dir="${x86_64}/win" /> + <mkdir dir="${x86_64}/mac" /> <mkdir dir="${i386}" /> <mkdir dir="${i386}/win" /> <mkdir dir="${i586}" /> @@ -64,7 +65,6 @@ <property name="ivy.jar.dir" value="${ivy.home}/lib" /> <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" /> - <target name="download-ivy" unless="offline"> <available file="${ivy.jar.file}" property="ivy.available"/> <antcall target="-download-ivy" /> @@ -112,64 +112,7 @@ pattern="lib/[artifact]-[revision](-[classifier]).[ext]" /> <jar jarfile="${dist}/Tsk_DataModel.jar" basedir="${build}"/> </target> - <target name="copyLibs" depends="copyWinLibs" description="Copy native libs to the correct folder" /> - - <target name="copyWinLibs" depends="copyWinLibs64,copyWinLibs32" description="Copy windows dlls to the correct location." /> - - <target name="checkLibDirs"> - <available property="win64.exists" type="dir" file="${basedir}/../../win32/x64/Release" /> - <available property="win32.exists" type="dir" file="${basedir}/../../win32/Release" /> - </target> - <target name="copyWinLibs64" depends="checkLibDirs" if="win64.exists"> - <property name="win64dir" location="${basedir}/../../win32/x64/Release" /> - <fileset dir="${win64dir}" id="win64dlls"> - <include name="*.dll" /> - </fileset> - <copy todir="${amd64}/win"> - <fileset refid="win64dlls" /> - </copy> - <copy todir="${x86_64}/win"> - <fileset refid="win64dlls" /> - </copy> - <fileset dir="${crt}/win64" id="crt64dlls"> - <include name="*.dll" /> - </fileset> - <copy todir="${amd64}/win"> - <fileset refid="crt64dlls" /> - </copy> - <copy todir="${x86_64}/win"> - <fileset refid="crt64dlls" /> - </copy> - </target> - - <target name="copyWinLibs32" depends="checkLibDirs" if="win32.exists"> - <property name="win32dir" location="${basedir}/../../win32/Release" /> - <fileset dir="${win32dir}" id="win32dlls"> - <include name="*.dll" /> - </fileset> - <copy todir="${i386}/win"> - <fileset refid="win32dlls" /> - </copy> - <copy todir="${x86}/win"> - <fileset refid="win32dlls" /> - </copy> - <copy todir="${i586}/win"> - <fileset refid="win32dlls" /> - </copy> - <fileset dir="${crt}/win32" id="crt32dlls"> - <include name="*.dll" /> - </fileset> - <copy todir="${i386}/win"> - <fileset refid="crt32dlls" /> - </copy> - <copy todir="${x86}/win"> - <fileset refid="crt32dlls" /> - </copy> - <copy todir="${i586}/win"> - <fileset refid="crt32dlls" /> - </copy> - </target> <target name="jni" depends="compile" description="make the jni.h file"> <javah classpath = "${build}" outputFile="jni/dataModel_SleuthkitJNI.h" force="yes"> diff --git a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java index bb76c4b9b7d16a55bb9024aaff7bea6a91740e58..8ba434f8a9cb208aa667e0a0d312f7041497de95 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java +++ b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java @@ -183,12 +183,11 @@ public enum ATTRIBUTE_TYPE { TSK_DATETIME_END(84, "TSK_DATETIME_END", "End Date/Time"), // end time of an event - call log, Calendar entry TSK_CALENDAR_ENTRY_TYPE(85, "TSK_CALENDAR_ENTRY_TYPE", "Calendar Entry Type"), // meeting, task, TSK_LOCATION(86, "TSK_LOCATION", "Location"), // Location string associated with an event - Conf Room Name, Address .... - TSK_DIAL_STRING(87, "TSK_DIAL_STRING", "Dial String"), // Short code or dial string for Speed dial, canned messages etc. - TSK_DEVICE_NAME(88, "TSK_DEVICE_NAME", "Device Name"), // device name + TSK_SHORTCUT(87, "TSK_SHORTCUT", "Short Cut"), // Short Cut string - short code or dial string for Speed dial, a URL short cut - e.g. bitly string, Windows Desktop Short cut name etc. + TSK_DEVICE_NAME(88, "TSK_DEVICE_NAME", "Device Name"), // device name - a user assigned (usually) device name - such as "Joe's computer", "bob_win8", "BT Headset" TSK_CATEGORY(89, "TSK_CATEGORY", "Category"), // category/type, possible value set varies by the artifact - TSK_MAILBOX_NAME(90, "TSK_MAILBOX_NAME", "Mailbox Name"), // mail box - TSK_EMAIL_REPLYTO(91, "TSK_EMAIL_REPLYTO", "ReplyTo Address"), // ReplyTo address - TSK_SERVER_NAME(92, "TSK_SERVER_NAME", "Server Name"), // server name + TSK_EMAIL_REPLYTO(90, "TSK_EMAIL_REPLYTO", "ReplyTo Address"), // ReplyTo address + TSK_SERVER_NAME(91, "TSK_SERVER_NAME", "Server Name"), // server name, e.g. a mail server name - "smtp.google.com", a DNS server name... diff --git a/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java b/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java index 875bfef6b0adac336e003b6ed713b48ff7372b53..6a258015bd226a181cf6b331e96b03fe90ef6648 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java +++ b/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java @@ -23,7 +23,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; -import java.nio.file.Files; /** * Collection of methods to load libraries embedded in the TSK Datamodel Jar file. @@ -85,8 +84,17 @@ public static String getPlatform() { public static boolean isWindows() { return System.getProperty("os.name").toLowerCase().contains("windows"); } - + /** + * Is the platform Mac? + * + * @return + */ + private static boolean isMac() { + return System.getProperty("os.name").toLowerCase().contains("mac"); + } + + /** * Attempt to extract and load the specified library. * * @param library @@ -98,7 +106,7 @@ public static void loadLibrary(Lib library) { path.append(getPlatform()); String libName = library.getLibName(); - if(library == Lib.TSK_JNI && isWindows()) { + if(library == Lib.TSK_JNI && (isWindows() || isMac())) { libName = "lib" + libName; } @@ -122,7 +130,7 @@ public static void loadLibrary(Lib library) { if(libTemp.exists()) { // Delete old file - Files.delete(libTemp.toPath()); + libTemp.delete(); } InputStream in = libraryURL.openStream(); diff --git a/framework/tsk/framework/services/TskBlackboard.cpp b/framework/tsk/framework/services/TskBlackboard.cpp index 266968085dae836c4a52bb0df99660c4614fb7b8..9b9a09097514fd8456bc4c5b2e72ab854a684d67 100755 --- a/framework/tsk/framework/services/TskBlackboard.cpp +++ b/framework/tsk/framework/services/TskBlackboard.cpp @@ -132,10 +132,9 @@ map<int, TskAttributeNames> initializeAttributeTypeMap(){ retval.insert(pair<int, TskAttributeNames>(TSK_DATETIME_END, TskAttributeNames("TSK_DATETIME_END", "End Date/Time"))); retval.insert(pair<int, TskAttributeNames>(TSK_CALENDAR_ENTRY_TYPE, TskAttributeNames("TSK_CALENDAR_ENTRY_TYPE", "Calendar Entry Type"))); retval.insert(pair<int, TskAttributeNames>(TSK_LOCATION, TskAttributeNames("TSK_LOCATION", "Location"))); - retval.insert(pair<int, TskAttributeNames>(TSK_DIAL_STRING, TskAttributeNames("TSK_DIAL_STRING", "Dial String"))); + retval.insert(pair<int, TskAttributeNames>(TSK_SHORTCUT, TskAttributeNames("TSK_SHORTCUT", "Short Cut"))); retval.insert(pair<int, TskAttributeNames>(TSK_DEVICE_NAME, TskAttributeNames("TSK_DEVICE_NAME", "Device Name"))); retval.insert(pair<int, TskAttributeNames>(TSK_CATEGORY, TskAttributeNames("TSK_CATEGORY", "Category"))); - retval.insert(pair<int, TskAttributeNames>(TSK_MAILBOX_NAME, TskAttributeNames("TSK_MAILBOX_NAME", "Mailbox Name"))); retval.insert(pair<int, TskAttributeNames>(TSK_EMAIL_REPLYTO, TskAttributeNames("TSK_EMAIL_REPLYTO", "ReplyTo Address"))); retval.insert(pair<int, TskAttributeNames>(TSK_SERVER_NAME, TskAttributeNames("TSK_SERVER_NAME", "Server Name"))); diff --git a/framework/tsk/framework/services/TskBlackboard.h b/framework/tsk/framework/services/TskBlackboard.h index 389012143d8b1316c575de72f32992dc8b5d124e..b21944872f136930a8a30435529fdd25f160dd43 100755 --- a/framework/tsk/framework/services/TskBlackboard.h +++ b/framework/tsk/framework/services/TskBlackboard.h @@ -183,12 +183,11 @@ enum TSK_ATTRIBUTE_TYPE { TSK_DATETIME_END = 84, ///< end time of an event - call log, Calendar entry TSK_CALENDAR_ENTRY_TYPE = 85, ///< calendar entry type: meeting, task, TSK_LOCATION = 86, // Location string associated with an event - Conf Room Name, Address .... - TSK_DIAL_STRING = 87, ///< Short code or dial string for Speed dial, canned messages etc. - TSK_DEVICE_NAME = 88, ///< device name + TSK_SHORTCUT = 87, ///< Short Cut string - short code or dial string for Speed dial, a URL short cut - e.g. bitly string, Windows Desktop Short cut name etc. + TSK_DEVICE_NAME = 88, ///< device name - a user assigned (usually) device name - such as "Joe's computer", "bob_win8", "BT Headset" TSK_CATEGORY = 89, ///< category/type, possible value set varies by the artifact - TSK_MAILBOX_NAME = 90, ///< mail box - TSK_EMAIL_REPLYTO = 91, ///< ReplyTo address - TSK_SERVER_NAME = 92, ///< server name + TSK_EMAIL_REPLYTO = 90, ///< ReplyTo address + TSK_SERVER_NAME = 91, ///< server name /* SEE ABOVE: * - KEEP JAVA CODE IN SYNC