Code Monkey home page Code Monkey logo

Comments (5)

mcw0 avatar mcw0 commented on July 17, 2024 1

Guess you might use very old Firmware, if so upgrade if you can,

You can see when connecting:
[BEGIN RECV (192.168.90.5)] <------------------1919------------------>
20000000|44484950|d710c601|02000000|2c000000|00000000|2c000000|00000000
{ "result": false, "id": 2, "params": null }
[ END RECV (192.168.90.5)] <------------------1919------------------>

Remote device return "false", and "params" are null.

Meaning remote device has no method called "userManager.getActiveUserInfoAll".

You could try to use: --logon old_3des (or simply comment out at https://github.com/mcw0/DahuaConsole/blob/master/net.py#L442
)

BTW,

  1. no need to use: --logon netkeyboard when you have credentials, as this option will bypass the need for --auth.
  2. --logon netkeyboard will not work with DVRIP (TCP/37777), works only with DHIP or HTTP/HTTPS

I also see the script trying to use DHIP on port 37777 "logon type "netkeyboard" with proto "dhip" at 192.168.90.5:37777" - will not work.

I would suggest you to try: ./Console.py --proto dvrip --rhost 192.168.90.5 --rport 37777 --auth admin:****** -d
Since you trying to connect on port TCP/37777

from dahuaconsole.

mcw0 avatar mcw0 commented on July 17, 2024 1

Working on to split the front end (Console.py) and the library, so the library could be used alone. So, yes, indeed I am taking this with me on that work.

from dahuaconsole.

smsalert-mobi avatar smsalert-mobi commented on July 17, 2024

The device does not communicate on dvrip, but dhip
As you can see above login works but just returns params "null", and that is not handled in the library.

Device firmware is the latest available, from 2019

For example in net.py if i do this

  •        if dh_data.get('params').get('users') is not None:
    
  •        if dh_data.get('params') is not None and dh_data.get('params').get('users') is not None:
    

Login works and get the menu of commands. I can even get some device details.
Doing actions like doorUnlock because list_service fails and RemoteServicesCache is not expected to be null.

Going further with this, i attached you a communication log debug from SmartAc PSS and dahua device at the end, and you will see
that system.listService is not working, but accessControl.listMethod instead results in a list of methods.

Login also is done like this, i can see DHIP in the headers.

login
login_response

export_packets.txt

from dahuaconsole.

mcw0 avatar mcw0 commented on July 17, 2024

Very interesting, one of my earlier questions was about "stochasticId", I have seen that in the FW and also noted that in "dahua_logon_modes.py" but not seen it before in any traffic - until now, in your first image.
FYI, DHIP isn't offical Dahua API, so I do expect some changes... "system.listService" was found to give whole list of methods and is quite handy to see what's "supported" (not everything is supported, despite it may be in the list), but in your device it seems being removed.
The "accessControl.listMethod " gives "only" a list of methods related to "accessControl".
Many thanks for sharing this, very interesting!

from dahuaconsole.

smsalert-mobi avatar smsalert-mobi commented on July 17, 2024

and can you help out with an update on the library in the future? i do not know python to update it and make changes, i mainly use PHP...

from dahuaconsole.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.