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
064924e2
Unverified
Commit
064924e2
authored
1 year ago
by
Jayaram Sreevalsan
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2844 from ryandeisma/develop
CT-7152
parents
3bc97453
d8a5020f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
db_diff/tskdbdiff.py
+12
-3
12 additions, 3 deletions
db_diff/tskdbdiff.py
with
12 additions
and
3 deletions
db_diff/tskdbdiff.py
+
12
−
3
View file @
064924e2
...
...
@@ -272,6 +272,7 @@ def _dump_output_db_bb(db_file, bb_dump_file, isMultiUser, pgSettings, id_obj_pa
msg
=
"
There were inconsistent sources for artifact with id #
"
+
str
(
row
[
"
artifact_id
"
])
+
"
.
\n
"
try
:
attr_value_as_string
=
None
if
attr
[
"
value_type
"
]
==
0
:
attr_value_as_string
=
str
(
attr
[
"
value_text
"
])
elif
attr
[
"
value_type
"
]
==
1
:
...
...
@@ -285,10 +286,15 @@ def _dump_output_db_bb(db_file, bb_dump_file, isMultiUser, pgSettings, id_obj_pa
elif
attr
[
"
value_type
"
]
==
4
:
attr_value_as_string
=
"
bytes
"
elif
attr
[
"
value_type
"
]
==
5
:
attr_value_as_string
=
str
(
attr
[
"
value_int64
"
])
attr_value_as_string
=
str
(
attr
[
"
value_int64
"
])
elif
attr
[
"
value_type
"
]
==
6
:
attr_value_as_string
=
str
(
attr
[
"
value_text
"
])
if
attr
[
"
display_name
"
]
==
"
Associated Artifact
"
:
attr_value_as_string
=
TskDbDiff
.
_get_associated_artifact_type
(
attribute_cursor
,
attr_value_as_string
,
isMultiUser
)
patrn
=
re
.
compile
(
"
[
\n\0\a\b\r\f
]
"
)
if
attr_value_as_string
is
None
:
print
(
f
'
Could not determine attribute value for value type:
{
attr
[
"
value_type
"
]
}
, display name:
{
attr
[
"
display_name
"
]
}
'
)
attr_value_as_string
=
re
.
sub
(
patrn
,
'
'
,
attr_value_as_string
)
if
attr
[
"
source
"
]
==
"
Keyword Search
"
and
attr
[
"
display_name
"
]
==
"
Keyword Preview
"
:
attr_value_as_string
=
"
<Keyword Preview placeholder>
"
...
...
@@ -652,6 +658,9 @@ def index_of(lst, search_item) -> int:
Returns: The index in the list of the item or -1.
"""
if
lst
is
None
:
return
-
1
for
idx
,
item
in
enumerate
(
lst
):
if
item
==
search_item
:
return
idx
...
...
@@ -1006,7 +1015,6 @@ def normalize_tsk_objects_path(guid_util: TskGuidUtils, objid: int,
path_parts
=
[
'
ModuleOutput
'
,
leapp_module
,
'
index.html
'
]
is_leapp
=
True
break
if
not
is_leapp
:
for
idx
in
range
(
0
,
len
(
path_parts
)
-
1
):
if
path_parts
[
idx
].
lower
()
==
"
reports
"
and
\
...
...
@@ -1020,7 +1028,8 @@ def normalize_tsk_objects_path(guid_util: TskGuidUtils, objid: int,
path_parts
=
[
"
Reports
"
,
"
html-report.html
"
]
break
path
=
os
.
path
.
join
(
*
path_parts
)
if
len
(
path_parts
)
>
0
else
'
/
'
path
=
os
.
path
.
join
(
*
path_parts
)
if
(
path_parts
is
not
None
and
len
(
path_parts
)
>
0
)
else
'
/
'
return
path
...
...
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