-
Notifications
You must be signed in to change notification settings - Fork 147
Fix the problem of Master Node reading errors #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,7 +167,9 @@ def _set_file_perms(path, inode): | |
| verbose_log(_set_file_perms, 'perms:%s, owner: %s.%s, path: %s' % (inode['ino'].mode, inode['ino'].uid, inode['ino'].gid, path)) | ||
|
|
||
| def _set_file_timestamps(path, inode): | ||
| os.utime(path, (inode['ino'].atime_sec, inode['ino'].mtime_sec), follow_symlinks = False) | ||
| follow_symlinks = False | ||
| if os.name == 'nt': follow_symlinks = True | ||
| os.utime(path, (inode['ino'].atime_sec, inode['ino'].mtime_sec), follow_symlinks=follow_symlinks) | ||
|
Comment on lines
-170
to
+172
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change seems to be unrelated. Please put it in a dedicated commit with a description explaining why you need to follow symlinks on Windows.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, On Windows, this parameter to False will error with Python 3.12, while True will not.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted. Please put that in a dedicated commit. |
||
| verbose_log(_set_file_timestamps, 'timestamps: access: %s, modify: %s, path: %s' % (inode['ino'].atime_sec, inode['ino'].mtime_sec, path)) | ||
|
|
||
| def _write_reg_file(path, data): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would log that the CRC32 does not match:
I'd continue working even in the presence of corrupt master node, this way the tool still extracts something. It may not be the most recent, but at least one that is not corrupt.
What do you think ?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, masternodes are recorded in sequence. If a CRC failure occurs, there should be no normal ones afterwards. However, you can try continuing the scan. I'm not quite sure if the old data has been completely cleared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Objective is to be fault-tolerant since ubireader is used by unblob on a variety of weird firmware and image dumps.