Fix Resolve crashes in Turbo Artifacts & Update Battery Saver LogicFixing modules turbo/artifacts#626
Open
ariefnr wants to merge 3 commits intoabrignoni:mainfrom
Open
Fix Resolve crashes in Turbo Artifacts & Update Battery Saver LogicFixing modules turbo/artifacts#626ariefnr wants to merge 3 commits intoabrignoni:mainfrom
ariefnr wants to merge 3 commits intoabrignoni:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello ALEAPP Team,
I hope you are doing well.
I encountered some issues while analyzing the Turbo_Battery and Turbo_Bluetooth artifacts using the 2022 CTF - Android-001.tar image (from Digital Corpora). The execution resulted in crashes due to AttributeError (when using Tar seeker) and NameError (undefined variables).
I have refactored deviceHealthServices_Battery.py to fix these crashes and updated the SQL logic based on the forensic data found in the image.
Here is the summary of changes:
AttributeError: 'FileSeekerTar' object has no attribute 'directory'seeker.directory, which does not exist when the seeker is processing a .tar file (FileSeekerTar).os.path.basename(file_found)to safely extract the filename regardless of the seeker type.NameError: name 'file_found' is not defined(in Turbo_Bluetooth)file_foundbefore it was defined.NameError: name 'time_offset' is not definedtime_offset = 'UTC'.Analysis: Based on the artifact analysis, the previous SQL CASE statement for battery_saver was inconsistent with the data.
Update: Adjusted the logic to:
0-> 'Enabled'2-> 'Disabled'Others -> Returned as is.
Traceback reference
Here's what the error looks like before and bug fixing after

Before
After

I have tested these changes against the CTF image, and the artifacts are now parsing correctly without errors.
Thank you for your hard work on this tool!
Best regards.