Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
1ffdfff1
Commit
1ffdfff1
authored
13 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
minor changes to db code in JNI
parent
6c35e2c3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/java/build.xml
+1
-1
1 addition, 1 deletion
bindings/java/build.xml
bindings/java/jni/dataModel_SleuthkitJNI.cpp
+9
-9
9 additions, 9 deletions
bindings/java/jni/dataModel_SleuthkitJNI.cpp
with
10 additions
and
10 deletions
bindings/java/build.xml
100644 → 100755
+
1
−
1
View file @
1ffdfff1
...
...
@@ -99,7 +99,7 @@
</javac>
</target>
<target
name=
"dist"
depends=
"
jni,
init-ivy"
<target
name=
"dist"
depends=
"init-ivy"
description=
"generate the distribution"
>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar
jarfile=
"${dist}/Tsk_DataModel.jar"
basedir=
"${build}"
/>
...
...
This diff is collapsed.
Click to expand it.
bindings/java/jni/dataModel_SleuthkitJNI.cpp
100644 → 100755
+
9
−
9
View file @
1ffdfff1
...
...
@@ -15,8 +15,8 @@
#include
<locale.h>
#include
<time.h>
TSK_HDB_INFO
*
m_NSRLDb
;
TSK_HDB_INFO
*
m_knownBadDb
;
static
TSK_HDB_INFO
*
m_NSRLDb
=
NULL
;
static
TSK_HDB_INFO
*
m_knownBadDb
=
NULL
;
/** Throw an TSK exception back up to the Java code with a specific message.
*/
...
...
@@ -251,18 +251,18 @@ JNIEXPORT void JNICALL
*/
JNIEXPORT
jint
JNICALL
Java_org_sleuthkit_datamodel_SleuthkitJNI_hashDBLookup
(
JNIEnv
*
env
,
jclass
obj
,
jstring
hash
){
jboolean
isCopy
;
const
char
*
md5
=
(
const
char
*
)
env
->
GetStringUTFChars
(
hash
,
&
isCopy
);
TSK_AUTO_CASE_KNOWN_FILE_ENUM
file_known
=
TSK_AUTO_CASE_FILE_KNOWN_UNKNOWN
;
if
(
m_NSRLDb
!=
NULL
)
{
int8_t
retval
=
tsk_hdb_lookup_str
(
m_NSRLDb
,
md5
,
TSK_HDB_FLAG_QUICK
,
NULL
,
NULL
);
if
(
retval
==
-
1
)
{
throwTskError
(
env
,
"error matching nsrl hashset"
);
throwTskError
(
env
);
}
else
if
(
retval
)
{
file_known
=
TSK_AUTO_CASE_FILE_KNOWN_KNOWN
;
}
...
...
@@ -270,15 +270,15 @@ JNIEXPORT jint JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_hashDBLookup
if
(
m_knownBadDb
!=
NULL
)
{
int8_t
retval
=
tsk_hdb_lookup_str
(
m_knownBadDb
,
md5
,
TSK_HDB_FLAG_QUICK
,
NULL
,
NULL
);
if
(
retval
==
-
1
)
{
throwTskError
(
env
,
"error matching known bad hashset"
);
throwTskError
(
env
);
}
else
if
(
retval
)
{
file_known
=
TSK_AUTO_CASE_FILE_KNOWN_BAD
;
}
}
env
->
ReleaseStringUTFChars
(
hash
,
(
const
char
*
)
md5
);
env
->
ReleaseStringUTFChars
(
hash
,
(
const
char
*
)
md5
);
return
(
int
)
file_known
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment