I am facing an issue that my client have an attendance device ZKTeco K50 which is protected by communication password. Using rats/zkteco when I send request for connecting with device it connects but after that I am unable to get data from device and send data to device due to communication password protection.
I checked in package but there is no way to send communication password and also tried to alter the package but it did nothing.
Please answer if anyone know anything.
@KGG is correct. I will offer a few hints to get you started:
this is the best description of the ZKTeco protocol that I have found: https://github.com/adrobinoga/zk-protocol . Reading it is a good idea.
you will want to research the CMD_CONNECT message. When sending it gets a CMD_ACK_UNAUTH message in response, you need to fetch the comm key and compute the crazy ZKTeco secret
You send a CMD_AUTH message to the clock inserting the magical number computed in point 2. If it is good you will get a CMD_ACK_OK message
you will find a python library from the author of the protocol spec here: https://github.com/adrobinoga/pyzatt that looks pretty good to my eyes though I don't do python
And here https://github.com/fananimi/pyzk you will find the function make_comm_key which should get you started