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

"OverflowError: long int too large to convert to int" while parsing scan results #30

Closed
KDec opened this issue Jan 2, 2018 · 2 comments

Comments

@KDec
Copy link

KDec commented Jan 2, 2018

Background info:

  1. Disk: Seagate, Capacity 4T, one primary partition, NTFS file system in the partition. Windows Explorer shows no files in the file system, checking the drive capacity in Windows 10 shows that 80% of the drive is in use. The latter is true as I used the drive to store all my backups.
  2. I use Knoppix distribution (V7.6, 64bit), which I boot from a DVD Drive.
  3. Recuperabit was able to scan the complete 4T HDD (9 hours) and then successfully wrote the save file (16MB in size).
  4. Processing went ok but then ran into an error with the following message:
Traceback (most recent call last):
  File "./main.py", line 358, in <module>
    main()
  File "./main.py", line 340, in main
    parts.update(scanner.get_partitions())
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/fs/ntfs.py", line 833, in get_partitions
    part, address, most_likely
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/fs/ntfs.py", line 571, in find_boundary
    text_list, pattern_list, mft_address + delta, k=min_support
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/logic.py", line 152, in approximate_matching
    lookup = preprocess_pattern(pattern)
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/logic.py", line 128, in preprocess_pattern
    length = len(pattern)
OverflowError: long int too large to convert to int

Is there any way to change the environment to avoid the OverflowError? Fyi, I run main.py directly from the shell command line in the Knoppix terminal window, no pypy .

Thanks in advance for your support - would be great if there is a fix to this problem.

Complete log file (after completion of the scan):

INFO:root:First scan completed
INFO:root:Saving results to /media/sda2/RecSave.save
INFO:root:Parsing MFT entries
INFO:root:Parsing INDX records
INFO:root:Reading boot sectors
DEBUG:root:Dropping bogus NTFS partition with MFT position 16 generated by MFT mirror of partition at offset 0
DEBUG:root:Dropping bogus NTFS partition with MFT position 3503002718 generated by MFT mirror of partition at offset 3502997556
DEBUG:root:Dropping bogus NTFS partition with MFT position 586923218 generated by MFT mirror of partition at offset 586918056
DEBUG:root:Dropping bogus NTFS partition with MFT position 2422179350 generated by MFT mirror of partition at offset 2422174188
DEBUG:root:Dropping bogus NTFS partition with MFT position 2962857399 generated by MFT mirror of partition at offset 2952383055
DEBUG:root:Dropping bogus NTFS partition with MFT position 3161728710 generated by MFT mirror of partition at offset 3161723548
DEBUG:root:Dropping bogus NTFS partition with MFT position 35711538 generated by MFT mirror of partition at offset 35706376
DEBUG:root:Dropping bogus NTFS partition with MFT position 2017735986 generated by MFT mirror of partition at offset 2017730824
DEBUG:root:Dropping bogus NTFS partition with MFT position 2828974847 generated by MFT mirror of partition at offset 2818500503
DEBUG:root:Dropping bogus NTFS partition with MFT position 6919306178 generated by MFT mirror of partition at offset 6919301016
INFO:root:Finding partition geometry
INFO:root:Finalizing MFT reconstruction of partition at offset 0
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2952567047L, 2818684495L]) with weight 2 (100.0%)
INFO:root:Finalizing MFT reconstruction of partition at offset 3502997556
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2962118975L, 2828236423L]) with weight 15 (100.0%)
INFO:root:Finalizing MFT reconstruction of partition at offset 586918056
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2810326312L]) with weight 7 (87.5%)
INFO:root:Finalizing MFT reconstruction of partition at offset 2786705352
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2810329438L]) with weight 42 (22.4598930481%)
INFO:root:Finalizing MFT reconstruction of partition at offset 2786705358
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2793729611L]) with weight 42 (23.8636363636%)
INFO:root:Finalizing MFT reconstruction of partition at offset 2786705379
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2810584129L, 2810584815L]) with weight 2 (8.69565217391%)
DEBUG:root:Found MATCH in positions set([2952503119L, 2818620567L]) with weight 44 (93.6170212766%)
DEBUG:root:Found MATCH in positions set([2810415350L]) with weight 3 (12.5%)
INFO:root:Finalizing MFT reconstruction of partition at offset 2786706286
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2810826549L, 2810826551L]) with weight 2 (10.5263157895%)
DEBUG:root:Found MATCH in positions set([2797722264L]) with weight 2 (10.5263157895%)
INFO:root:Finalizing MFT reconstruction of partition at offset 2786705576
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2810877234L, 2810876533L]) with weight 2 (9.09090909091%)
DEBUG:root:Found MATCH in positions set([2811262072L, 2811261619L, 2811261847L]) with weight 2 (8.69565217391%)
DEBUG:root:Found MATCH in positions set([2809673534L]) with weight 3 (8.57142857143%)
INFO:root:Finalizing MFT reconstruction of partition at offset 2786706430
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2791335807L, 2791334710L, 2791335703L]) with weight 2 (1.8018018018%)
DEBUG:root:Found MATCH in positions set([2791668323L]) with weight 5 (9.09090909091%)
INFO:root:Finalizing MFT reconstruction of partition at offset 2786705435
INFO:root:Adding extra attributes from $ATTRIBUTE_LIST
INFO:root:Adding ghost entries from $INDEX_ALLOCATION
DEBUG:root:Found MATCH in positions set([2952501311L, 2818618759L]) with weight 82 (97.619047619%)
DEBUG:root:Found MATCH in positions set([2952476663L, 2818594111L]) with weight 65 (38.4615384615%)
Traceback (most recent call last):
  File "./main.py", line 358, in <module>
    main()
  File "./main.py", line 340, in main
    parts.update(scanner.get_partitions())
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/fs/ntfs.py", line 833, in get_partitions
    part, address, most_likely
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/fs/ntfs.py", line 571, in find_boundary
    text_list, pattern_list, mft_address + delta, k=min_support
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/logic.py", line 152, in approximate_matching
    lookup = preprocess_pattern(pattern)
  File "/home/knoppix/Downloads/RecuperaBit-1.1.1/recuperabit/logic.py", line 128, in preprocess_pattern
    length = len(pattern)
OverflowError: long int too large to convert to int
@Lazza
Copy link
Owner

Lazza commented Jan 2, 2018

OverflowError: long int too large to convert to int

This is due to a line that was forgotten when #1 was fixed.

@Lazza Lazza closed this as completed in f03f5e9 Jan 2, 2018
@KDec
Copy link
Author

KDec commented Jan 3, 2018

Tested the fix successfully. Scan results are now parsed successfully.

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

No branches or pull requests

2 participants