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

Mention configuration options for the DS-2CD2035FWD-I in README.md #10

Open
synthead opened this issue Jul 17, 2021 · 1 comment
Open

Comments

@synthead
Copy link

The DS-2CD2035FWD-I sets a static IP of 192.168.1.64, and attempts the special handshake and TFTP server to be listening on 192.168.1.128. All of the instructions on the README.md can be followed verbatim, except for using 192.168.1.128 in place of 192.0.0.128.

In addition, this needed to be changed from 512 to 1024:

_DEFAULT_BLOCK_SIZE = 512

Otherwise, this exception is raised:

Traceback (most recent call last):
  File "./hikvision_tftpd.py", line 191, in <module>
    server.run_forever()
  File "./hikvision_tftpd.py", line 102, in run_forever
    self._iterate()
  File "./hikvision_tftpd.py", line 110, in _iterate
    self._tftp_read()
  File "./hikvision_tftpd.py", line 132, in _tftp_read
    self._check_total_block_limit()
  File "./hikvision_tftpd.py", line 85, in _check_total_block_limit
    % self._block_size)
__main__.Error: File is too big to serve with 512-byte blocks.

With these two changes made, the script worked fine, and I was able to recover a Hikvision DS-2CD2035FWD-I ❤️

@ethaniel
Copy link

Dear @scottlamb! Thank you for the amazing tool.
Yes, using the ip 192.168.1.128 did it for me as well. Just needed to make sure that 192.168.1.64 and 192.168.1.128 are not used on the network. Also, in my case, the default _DEFAULT_BLOCK_SIZE = 512 worked fine.

My commands:

sudo ip address add 192.168.1.128/24 dev eth0
sudo ./hikvision_tftpd.py --server-ip=192.168.1.128 --filename=digicap.dav

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