This is a script to exploit older Hikvision devices' weak password reset key generation. More details and a write-up can be found in this post.
This script requires Python 3.6+ and numpy:
$ pip install --user numpyGenerate a reset key using:
$ ./keygen.py <ip>You can then use the key to reset the admin password using Hikvision's Search Active Devices Protocol tool.