Code Monkey home page Code Monkey logo

Comments (7)

mcw0 avatar mcw0 commented on July 17, 2024

Many thanks for the report, very useful!

"system.listService" do not give anything back, and reporting "InterfaceNotFound" w/ 'False'. My code do not expect 'False' and thats why it crashing when the code trying to check the size with 'len()'.

I will take this with me to the new update/rewrite I'm currently working on.

Best, bashis

from dahuaconsole.

luzik avatar luzik commented on July 17, 2024

It would be awesome to have some kind of test script, because I believe there are more errors with this half-dahua-api

[Console]# dhp2p
[+] [DH DMSS P2P]
    Enable: True, Status: (null), Detail: Online
Traceback (most recent call last):
  File "/home/msw/soft/DahuaConsole/Console.py", line 852, in <module>
    main()
  File "/home/msw/soft/DahuaConsole/Console.py", line 846, in main
    DebugConsole(dargs=dargs)
  File "/home/msw/soft/DahuaConsole/Console.py", line 28, in __init__
    self.main_console()
  File "/home/msw/soft/DahuaConsole/Console.py", line 239, in main_console
    exec(tmp)
  File "<string>", line 1, in <module>
  File "/home/msw/soft/DahuaConsole/dahua.py", line 1156, in get_remote_info
    tmp.get('ProxyAddr'),
AttributeError: 'NoneType' object has no attribute 'get'
[*] Closed connection to 192.168.124.196 port 80


[Console]# config all
[-] [config_members] Error: {'code': 268959743, 'message': 'Unknown error! error code was not set in service!'}



 --dump service
[*] [Dahua Debug Console 2019-2021 bashis <mcw noemail eu>]
[*] logon type "default" with proto "dhip" at 192.168.124.196:80
[+] Opening connection to 192.168.124.196 on port 80: Done
[+] Login: Success
[*] [Active Users]
    [email protected] since 2022-05-16 21:13:50 with "RemoteRPC" (Id: 1)
[*] Remote Model: IPC-A22E-B, Class: IPC, Time: 2022-05-16 21:13:50
Traceback (most recent call last):
  File "/home/msw/soft/DahuaConsole/Console.py", line 852, in <module>
    main()
  File "/home/msw/soft/DahuaConsole/Console.py", line 846, in main
    DebugConsole(dargs=dargs)
  File "/home/msw/soft/DahuaConsole/Console.py", line 25, in __init__
    self.dump()
  File "/home/msw/soft/DahuaConsole/Console.py", line 326, in dump
    self.dh.listService("{} {}".format("service", self.dargs.dump_argv if self.dargs.dump_argv else "all"))
AttributeError: 'DahuaFunctions' object has no attribute 'listService'
[*] Closed connection to 192.168.124.196 port 80


 --dump device
[*] [Dahua Debug Console 2019-2021 bashis <mcw noemail eu>]
[*] logon type "default" with proto "dhip" at 192.168.124.196:80
[+] Opening connection to 192.168.124.196 on port 80: Done
[+] Login: Success
[*] [Active Users]
    [email protected] since 2022-05-16 21:14:52 with "RemoteRPC" (Id: 1)
[*] Remote Model: IPC-A22E-B, Class: IPC, Time: 2022-05-16 21:14:52
Traceback (most recent call last):
  File "/home/msw/soft/DahuaConsole/Console.py", line 852, in <module>
    main()
  File "/home/msw/soft/DahuaConsole/Console.py", line 846, in main
    DebugConsole(dargs=dargs)
  File "/home/msw/soft/DahuaConsole/Console.py", line 25, in __init__
    self.dump()
  File "/home/msw/soft/DahuaConsole/Console.py", line 330, in dump
    self.dh.getRemoteInfo('device')
AttributeError: 'DahuaFunctions' object has no attribute 'getRemoteInfo'
[*] Closed connection to 192.168.124.196 port 80


 --dump discover
[*] [Dahua Debug Console 2019-2021 bashis <mcw noemail eu>]
[*] logon type "default" with proto "dhip" at 192.168.124.196:80
[+] Opening connection to 192.168.124.196 on port 80: Done
[+] Login: Success
[*] [Active Users]
    [email protected] since 2022-05-16 21:15:42 with "RemoteRPC" (Id: 1)
[*] Remote Model: IPC-A22E-B, Class: IPC, Time: 2022-05-16 21:15:42
Traceback (most recent call last):
  File "/home/msw/soft/DahuaConsole/Console.py", line 852, in <module>
    main()
  File "/home/msw/soft/DahuaConsole/Console.py", line 846, in main
    DebugConsole(dargs=dargs)
  File "/home/msw/soft/DahuaConsole/Console.py", line 25, in __init__
    self.dump()
  File "/home/msw/soft/DahuaConsole/Console.py", line 334, in dump
    self.dh.deviceDiscovery("{} {}".format("discover", self.dargs.dump_argv))
AttributeError: 'DahuaFunctions' object has no attribute 'deviceDiscovery'
[*] Closed connection to 192.168.124.196 port 80



--dump log
[*] [Dahua Debug Console 2019-2021 bashis <mcw noemail eu>]
[*] logon type "default" with proto "dhip" at 192.168.124.196:80
[+] Opening connection to 192.168.124.196 on port 80: Done
[+] Login: Success
[*] [Active Users]
    [email protected] since 2022-05-16 21:16:11 with "RemoteRPC" (Id: 1)
[*] Remote Model: IPC-A22E-B, Class: IPC, Time: 2022-05-16 21:16:11
[ERROR] No such dump: log
Traceback (most recent call last):
  File "/home/msw/soft/DahuaConsole/Console.py", line 852, in <module>
    main()
  File "/home/msw/soft/DahuaConsole/Console.py", line 846, in main
    DebugConsole(dargs=dargs)
  File "/home/msw/soft/DahuaConsole/Console.py", line 25, in __init__
    self.dump()
  File "/home/msw/soft/DahuaConsole/Console.py", line 346, in dump
    log.error('No such dump: {}'.format(self.dargs.dump))
  File "/home/msw/soft/DahuaConsole/env/lib/python3.9/site-packages/pwnlib/log.py", line 424, in error
    raise PwnlibException(message % args)
pwnlib.exception.PwnlibException: No such dump: log
[*] Closed connection to 192.168.124.196 port 80


from dahuaconsole.

luzik avatar luzik commented on July 17, 2024

Also please keep in mind that there is home assistant onvif service where PTZ and stream are working fine with this model. I do not know if this is part of this project. I am just using rroller/dahua and found your Console project. It would be awesome to have access to camera person and sound detectors somehow. I can provide my help with tests :)

from dahuaconsole.

mcw0 avatar mcw0 commented on July 17, 2024

Firstly, as Dahua says to me: IMOU isn't Dahua (still they are, IMOU is sub of Dahua)
Secondly, this version of script is 'Pre-alpha'.

Still, I do work on another version w/ more JSON returns and and not True/False/JSON.
Nevertheless, I really appreciate your reporting, and also gave me another reason for purchasing 'imou ranger 2c' :)

from dahuaconsole.

luzik avatar luzik commented on July 17, 2024

If you want to buy one, please note that 2MP version is better under low light conditions, and there are two versions on market
IPC-A22EP-A/B and IPC-A22EP-D. A/B is better because it have 1/2.7'' vs 1/2.9'' sensor size.

from dahuaconsole.

luzik avatar luzik commented on July 17, 2024

Damn it. There was mistake in issue topic!. Mine camera is range 2, not ranger 2c.

from dahuaconsole.

mcw0 avatar mcw0 commented on July 17, 2024

I've seen other similar issues here , some IMOU simply seems not to be fully Dahua - or at least lacking lots functionality, so this script will note work with them.

I have and had several IMOUs (for example: IMOU G42/G22/NVR1104HS), but they seems to be more at Dahua code as they work flawlessly

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.