Skip to content
Snippets Groups Projects
Commit bfaaafac authored by Eamonn Saunders's avatar Eamonn Saunders
Browse files

Merge branch 'master' of github.com:sleuthkit/sleuthkit

parents 954cf3a9 9a1607af
Branches
Tags
No related merge requests found
......@@ -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 -->
......
......@@ -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>
......@@ -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">
......
......@@ -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...
......
......@@ -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();
......
......@@ -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")));
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment