Skip to content
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

OSError: [Errno 22] Invalid argument #86

Closed
hippie-dude opened this issue Mar 14, 2021 · 1 comment
Closed

OSError: [Errno 22] Invalid argument #86

hippie-dude opened this issue Mar 14, 2021 · 1 comment
Labels

Comments

@hippie-dude
Copy link

hippie-dude commented Mar 14, 2021

I am attempting to recover files from a hard drive image, but I repeatedly receive the same error after completing the first scan.
I run:

py main.py -s SAVE -o D:\Recovery\Restored D:\Recovery\sdb.img

And after the scan completes, this is outputted to the command prompt:

INFO:root:First scan completed
INFO:root:Parsing MFT entries
Traceback (most recent call last):
File "D:\RecuperaBit-1.1.5\main.py", line 374, in
main()
File "D:\RecuperaBit-1.1.5\main.py", line 357, in main
parts.update(scanner.get_partitions())
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs.py", line 695, in get_partitions
parsed = parse_file_record(dump)
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs.py", line 151, in parse_file_record
attributes = _attributes_reader(entry, header['off_first'])
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs.py", line 110, in _attributes_reader
attr, name = parse_mft_attr(entry[offset:])
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs.py", line 91, in parse_mft_attr
data = unpack(content[:size], attr_types_fmt[name])
File "D:\RecuperaBit-1.1.5\recuperabit\utils.py", line 89, in unpack
result[label] = formatter(data[low:high+1])
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs_fmt.py", line 81, in index_root_parser
entries = index_entries(dump[offset:])
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs_fmt.py", line 58, in index_entries
parsed = unpack(dump[offset:], indx_dir_entry_fmt)
File "D:\RecuperaBit-1.1.5\recuperabit\utils.py", line 89, in unpack
result[label] = formatter(data[low:high+1])
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs_fmt.py", line 127, in try_filename
unpack(dump, attr_types_fmt['$FILE_NAME'])
File "D:\RecuperaBit-1.1.5\recuperabit\utils.py", line 89, in unpack
result[label] = formatter(data[low:high+1])
File "D:\RecuperaBit-1.1.5\recuperabit\fs\ntfs_fmt.py", line 47, in windows_time
converted = datetime.utcfromtimestamp(value/10.**7 - 11644473600)
OSError: [Errno 22] Invalid argument

I am using Python 3.9.2.

@Lazza Lazza added the bug label Mar 14, 2021
@Lazza Lazza closed this as completed in 0d3232f Mar 14, 2021
@Lazza
Copy link
Owner

Lazza commented Mar 14, 2021

Thank you for bringing this up. It seems that utcfromtimestamp can produce OSError on Windows.

Please try with the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants