You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to run DahuaConsole on a Debian12.8 system with python3.11.
Console seems to be able to login as usual, but unfortunately as soon as I issue a command it crashes:
root@ldap:/etc/DahuaConsole# /etc/DahuaConsole/bin/python3 Console.py --rhost 192.168.1.35 --rport 5000 --auth admin:passw --proto dhip
[*] [Dahua Debug Console 2019-2021 bashis <mcw noemail eu>]
[*] logon type "default" with proto "dhip" at 192.168.1.35:5000
[+] Opening connection to 192.168.1.35 on port 5000: Done
[+] Dahua Debug Console: Success
[+] Login: Success
[+] keepAlive thread: Started
[*] [Active Users]
[email protected] since 2024-11-24 10:30:01 with "Console" (Id: 21)
[*] Remote Model: VTH5221D, Class: VTH, Time: 2024-11-24 10:30:01
[Console]# config all
Traceback (most recent call last):
File "/etc/DahuaConsole/Console.py", line 888, in <module>
main()
File "/etc/DahuaConsole/Console.py", line 882, in main
DebugConsole(dargs=dargs)
File "/etc/DahuaConsole/Console.py", line 32, in __init__
self.main_console()
File "/etc/DahuaConsole/Console.py", line 223, in main_console
msg = sys.stdin.readline().strip().decode('ascii')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'decode'
[*] Closed connection to 192.168.1.35 port 5000
root@ldap:/etc/DahuaConsole#
Any idea why this happens?
BTW: Using Console to e.g. dump config with parameter "--dump config" works fine.
The text was updated successfully, but these errors were encountered:
check if there is extra space or tab beside the .readline()
or try replace your code with this, see if it helps
try:
self.prompt()
#msg = sys.stdin.readline().strip().decode('ascii')
msg = sys.stdin.readline()
if not self.dh or not self.dh.remote.connected():
log.failure('No available instance')
return False
cmd = msg.split()
Trying to run DahuaConsole on a Debian12.8 system with python3.11.
Console seems to be able to login as usual, but unfortunately as soon as I issue a command it crashes:
Any idea why this happens?
BTW: Using Console to e.g. dump config with parameter "--dump config" works fine.
The text was updated successfully, but these errors were encountered: