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
8919795c
Commit
8919795c
authored
1 year ago
by
Ryan Eisma
Browse files
Options
Downloads
Patches
Plain Diff
CT-7152
PR #2844 tweaks to align with comments.
parent
68b18cae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
db_diff/tskdbdiff.py
+22
-4
22 additions, 4 deletions
db_diff/tskdbdiff.py
with
22 additions
and
4 deletions
db_diff/tskdbdiff.py
+
22
−
4
View file @
8919795c
...
@@ -292,9 +292,8 @@ def _dump_output_db_bb(db_file, bb_dump_file, isMultiUser, pgSettings, id_obj_pa
...
@@ -292,9 +292,8 @@ def _dump_output_db_bb(db_file, bb_dump_file, isMultiUser, pgSettings, id_obj_pa
if
attr
[
"
display_name
"
]
==
"
Associated Artifact
"
:
if
attr
[
"
display_name
"
]
==
"
Associated Artifact
"
:
attr_value_as_string
=
TskDbDiff
.
_get_associated_artifact_type
(
attribute_cursor
,
attr_value_as_string
,
isMultiUser
)
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
]
"
)
patrn
=
re
.
compile
(
"
[
\n\0\a\b\r\f
]
"
)
if
attr_value_as_string
==
None
:
if
attr_value_as_string
is
None
:
print
(
f
'
{
attr
[
"
value_type
"
]
}
'
)
print
(
f
'
Could not determine attribute value for value type:
{
attr
[
"
value_type
"
]
}
, display name:
{
attr
[
"
display_name
"
]
}
'
)
print
(
f
'
{
attr
[
"
display_name
"
]
}
'
)
attr_value_as_string
=
re
.
sub
(
patrn
,
'
'
,
attr_value_as_string
)
attr_value_as_string
=
re
.
sub
(
patrn
,
'
'
,
attr_value_as_string
)
if
attr
[
"
source
"
]
==
"
Keyword Search
"
and
attr
[
"
display_name
"
]
==
"
Keyword Preview
"
:
if
attr
[
"
source
"
]
==
"
Keyword Search
"
and
attr
[
"
display_name
"
]
==
"
Keyword Preview
"
:
...
@@ -659,7 +658,7 @@ def index_of(lst, search_item) -> int:
...
@@ -659,7 +658,7 @@ def index_of(lst, search_item) -> int:
Returns: The index in the list of the item or -1.
Returns: The index in the list of the item or -1.
"""
"""
if
lst
==
None
:
if
lst
is
None
:
return
-
1
return
-
1
for
idx
,
item
in
enumerate
(
lst
):
for
idx
,
item
in
enumerate
(
lst
):
...
@@ -1009,6 +1008,25 @@ def normalize_tsk_objects_path(guid_util: TskGuidUtils, objid: int,
...
@@ -1009,6 +1008,25 @@ def normalize_tsk_objects_path(guid_util: TskGuidUtils, objid: int,
path_parts
=
path_parts
[:
-
1
]
path_parts
=
path_parts
[:
-
1
]
if
path_parts
and
len
(
path_parts
)
>=
2
:
if
path_parts
and
len
(
path_parts
)
>=
2
:
is_leapp
=
False
for
leapp_module
in
[
'
aleapp
'
,
'
ileapp
'
]:
if
len
(
path_parts
)
>
0
and
path_parts
[
1
].
lower
()
==
leapp_module
and
\
path_parts
[
-
1
].
lower
()
==
'
index.html
'
:
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
\
path_parts
[
idx
+
1
].
lower
().
startswith
(
"
autopsytestcase html report
"
):
path_parts
=
[
"
Reports
"
,
"
AutopsyTestCase HTML Report
"
]
break
if
path_parts
[
idx
].
lower
()
==
"
reports
"
and
\
"
html report
"
in
path_parts
[
idx
+
1
].
lower
()
and
\
len
(
path_parts
)
>
idx
+
2
and
\
path_parts
[
idx
+
2
].
lower
().
endswith
(
"
report.html
"
):
path_parts
=
[
"
Reports
"
,
"
html-report.html
"
]
break
for
idx
in
range
(
0
,
len
(
path_parts
)
-
1
):
for
idx
in
range
(
0
,
len
(
path_parts
)
-
1
):
if
path_parts
[
idx
].
lower
()
==
"
reports
"
and
\
if
path_parts
[
idx
].
lower
()
==
"
reports
"
and
\
path_parts
[
idx
+
1
].
lower
().
startswith
(
"
autopsytestcase html report
"
):
path_parts
[
idx
+
1
].
lower
().
startswith
(
"
autopsytestcase html report
"
):
...
...
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