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

trying to extract a dav file failed #5

Open
JacekKac opened this issue May 29, 2024 · 2 comments
Open

trying to extract a dav file failed #5

JacekKac opened this issue May 29, 2024 · 2 comments

Comments

@JacekKac
Copy link

python3 -m hiktools.fmod digicap.dav firmware
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pi/.local/lib/python3.9/site-packages/hiktools/fmod/main.py", line 37, in
with DigiCap(sys.argv[1]) as dcap:
File "/home/pi/.local/lib/python3.9/site-packages/hiktools/fmod/digicap.py", line 429, in enter
self.fparse()
File "/home/pi/.local/lib/python3.9/site-packages/hiktools/fmod/digicap.py", line 407, in fparse
raw_data = decode_xor16(
File "/home/pi/.local/lib/python3.9/site-packages/hiktools/fmod/digicap.py", line 263, in decode_xor16
result.append(key_byte ^ buf[index])
IndexError: index out of range

@MatrixEditor
Copy link
Owner

Hello @JacekKac,

the problem is either

  1. The firmware file is of a recent version and is therefore not supported by this library,
  2. or there's a flaw in the parsing logic (which I would have to verify)

If you are sure the latter one is causing the problem, it would be nice to share the file for investigation.

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

No branches or pull requests

2 participants