Hikvision Password Reset Utility

If you have ever locked yourself out of a Hikvision camera or NVR by forgetting the admin password, and had to beg Hikvision or anyone else for an unlock code, you will appreciate this. I present a small tool that lets you generate your own unlock codes which can be entered into SADP to reset the admin password on any of your Hikvision cameras. This tool is written in HTML/CSS/JavaScript so it runs in any modern web browser and you can view the complete source code easily.
Disclaimer: This tool may or may not work for your camera or NVR. Please follow the instructions very carefully and be precise in all your inputs into the tool. Some devices on newer firmware require a more secure password reset procedure which I can not help with. I think this tool will only work with cameras running firmware older than 5.3.0. I do not know what version is the cutoff for NVRs.
Update: Some Hikvision devices (perhaps only NVRs) show their model number appended to the beginning of their serial numbers. You must remove this from the serial number that you enter into the tool. For example, if the serial number shows as DS-7208HVI-ST0123456789AAWR987654321WCVU and the device's model number is DS-7208HVI-ST, then the true serial number is 0123456789AAWR987654321WCVU
This tool will generate a password reset code which you may use to reset a forgotten admin password for a Hikvision camera.
Enter your camera's complete CASE SENSITIVE serial number, as seen in the Hikvision SADP tool:
Important: The date you enter below much match with the camera's clock. Most likely it is not today's date! To find out what date your camera thinks it is, power cycle your camera, give it time to boot up, and then refresh your camera list in SADP and check the Start Time column.
Enter the 4 digit year the camera thinks it is started up:
Enter the 2 digit month the camera thinks it is started up:
Enter the 2 digit day the camera thinks it is started up:
Your password reset code will appear below.
The code must be entered into the Hikvision SADP tool in the Serial code box (called Security Code in later SADP versions). The camera will compare its internal date and time with the date and time you have entered above. The Serial Number and date much match perfectly or else the code will not work.