-
Which encryption method to choose when adding a user? Example: sending {'method': 'global.login', 'params': {'userName': 'admin', 'ipAddr': '127.0.0.1', 'loginType': 'Loopback', 'clientType': 'Local', 'authorityType': 'Default', 'passwordType': 'Plain', 'password': 'admin'}, 'session': 0, 'id': 1} no realm sending {'method': 'userManager.getAuthorityList', 'params': {}, 'session': 2147483573, 'id': 4} Try 1, encryption Default: realm = 'Login to {}'.format(serial) sending {'method': 'userManager.addUser', 'params': {'user': {'Name': 'new_user1', 'Password': 'DD2EF076AC26F3911B0BB59CA317FC55', 'Group': 'admin', 'AuthorityList': ['AuthUserMag', 'Monitor_01', 'Replay_01', 'AuthSysCfg', 'AuthSysInfo', 'AuthManuCtr', 'AuthBackup', 'AuthStoreCfg', 'AuthEventCfg', 'AuthNetCfg', 'AuthPeripheral', 'AuthAVParam', 'AuthSecurity', 'AuthMaintence'], 'Sharable': True, 'Reserved': False, 'Encryption': 'Default', 'Type': 'Normal', 'Memo': '', 'MacOnly': '', 'MaxMonitorChannels': 0}}, 'session': 2147483573, 'id': 5} try login: authorization failed Try 2, encryption Plain: sending {'method': 'userManager.addUser', 'params': {'user': {'Name': 'new_user2', 'Password': 'password', 'Group': 'admin', 'AuthorityList': ['AuthUserMag', 'Monitor_01', 'Replay_01', 'AuthSysCfg', 'AuthSysInfo', 'AuthManuCtr', 'AuthBackup', 'AuthStoreCfg', 'AuthEventCfg', 'AuthNetCfg', 'AuthPeripheral', 'AuthAVParam', 'AuthSecurity', 'AuthMaintence'], 'Sharable': True, 'Reserved': False, 'Encryption': 'Plain', 'Type': 'Normal', 'Memo': '', 'MacOnly': '', 'MaxMonitorChannels': 0}}, 'session': 2147483573, 'id': 6} try login: authorization failed Try 3, encryption Basic: auth_hash = base64.b64encode(username.encode('latin-1') + b':' + password.encode('latin-1')) sending {'method': 'userManager.addUser', 'params': {'user': {'Name': 'new_user3', 'Password': 'c3lzcTpUZXN0UGFyb2w4NzY=', 'Group': 'admin', 'AuthorityList': ['AuthUserMag', 'Monitor_01', 'Replay_01', 'AuthSysCfg', 'AuthSysInfo', 'AuthManuCtr', 'AuthBackup', 'AuthStoreCfg', 'AuthEventCfg', 'AuthNetCfg', 'AuthPeripheral', 'AuthAVParam', 'AuthSecurity', 'AuthMaintence'], 'Sharable': True, 'Reserved': False, 'Encryption': 'Basic', 'Type': 'Normal', 'Memo': '', 'MacOnly': '', 'MaxMonitorChannels': 0}}, 'session': 2147483573, 'id': 7} try login: authorization failed Try 4, encryption OldDigest: auth_hash = Dahua_Gen1_hash(password) sending {'method': 'userManager.addUser', 'params': {'user': {'Name': 'new_user4', 'Password': 'PakaXatZ', 'Group': 'admin', 'AuthorityList': ['AuthUserMag', 'Monitor_01', 'Replay_01', 'AuthSysCfg', 'AuthSysInfo', 'AuthManuCtr', 'AuthBackup', 'AuthStoreCfg', 'AuthEventCfg', 'AuthNetCfg', 'AuthPeripheral', 'AuthAVParam', 'AuthSecurity', 'AuthMaintence'], 'Sharable': True, 'Reserved': False, 'Encryption': 'OldDigest', 'Type': 'Normal', 'Memo': '', 'MacOnly': '', 'MaxMonitorChannels': 0}}, 'session': 2147483573, 'id': 8} try login: authorization failed |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
format-wise only try 1 looks like the password I can see on my cam. Maybe there is something wrong with the pattern for combining username, realm and password? |
Beta Was this translation helpful? Give feedback.
format-wise only try 1 looks like the password I can see on my cam. Maybe there is something wrong with the pattern for combining username, realm and password?