Lazza / RecuperaBit

A tool for forensic file system reconstruction.
GNU General Public License v3.0
517 stars 73 forks source link

Traceback when using saved scan file. #112

Open sigwx opened 1 year ago

sigwx commented 1 year ago

Encountered the following traceback when using a saved scan file (sorry, can't provide more data)

Traceback (most recent call last):
  File "/usr/local/bin/recuperabit", line 375, in <module>
    main()
  File "/usr/local/bin/recuperabit", line 372, in main
    interpret(cmd, arguments, parts, shorthands, args.outputdir)
  File "/usr/local/bin/recuperabit", line 182, in interpret
    logic.recursive_restore(myfile, part, partition_dir)
  File "/opt/RecuperaBit/recuperabit/logic.py", line 259, in recursive_restore
    recursive_restore(child, part, outputdir, make_dirs=False)
  File "/opt/RecuperaBit/recuperabit/logic.py", line 219, in recursive_restore
    content = node.get_content(part)
  File "/opt/RecuperaBit/recuperabit/fs/ntfs.py", line 381, in get_content
    dump = sectors(image, File.get_offset(self), FILE_size)
  File "/opt/RecuperaBit/recuperabit/utils.py", line 44, in sectors
    image.seek(offset * bsize)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

I put a check in to only use offset if not None, and worked around it.

Lazza commented 1 year ago

Could you please open a pull-request to include your fix?

Thank you.