khoanguyen-3fc / dh-p2p

A proof of concept implementation of RTSP over Dahua P2P protocol.
MIT License
27 stars 13 forks source link

Authntication issue #11

Open HassanRehman11 opened 5 days ago

HassanRehman11 commented 5 days ago

Hello, I am working on python implementation. Some of Dahua are working but some are not. If I give credentials than none of the camera works. Can you tell me what setting it is looking that it some time works without credentials and auth function is not working?

khoanguyen-3fc commented 3 days ago

As you can see in this snippet, there are two types of devices: the older one (dtype == 0) doesn't require authentication during the handshake, while the newer one (dtype > 0) does:

https://github.com/khoanguyen-3fc/dh-p2p/blob/f6478bfd013528783263e263b8aec40c7e1e9245/main.py#L66-L78

HassanRehman11 commented 3 days ago

Thanks for replying but I am accessing newer devices of Dahua and login system not working .On data.recv() it get timeout