BaQs / pyEzviz

Python package for ezviz cameras
Apache License 2.0
102 stars 45 forks source link

Support for two way authentication #37

Open avol-io opened 3 years ago

avol-io commented 3 years ago

There is some trick to maintain two way authentication on ezviz account and this library? If not there is a plan to implement that in the future? Can i help in some way?

Thanks

RenierM26 commented 3 years ago

Short answer:

In the future yes.

Long answer:

I have one AJAX endpoint that I need to replace with the API endpoint. (To enable/disable Alarm notifications per camera.)

The API endpoint makes use of their CAS proxy and seems to make use of Chinese or binary character in the response. Really difficult to reverse engineer at the moment.

Once all the endpoint are via their API, I should be able to use tokens instead of username/password., then it will be possible for MFA to work. They have a modified oauth2 token system so I should be possible.

kklem0 commented 3 years ago

@RenierM26 is there a repo or something for the environment you're using for reverse engineering? I have some docs in Chinese and I speak Chinese and would like to help where possible and first would be cool to reproduce your result.

RenierM26 commented 2 years ago

Hi @avol-io,

Added MFA/Verification code in the latest release!

Hi @klem-everywhere,

I'm using mitmproxy and literally following the API calls from the android app. Some of the requests are more complex and require wireshark and some guessing on encryption schemes. (might also be due to latin-1 or utf-8 character support in mitmproxy

avol-io commented 2 years ago

great news! thank you!!!