@@ -2422,18 +2422,18 @@ def enum(self):
24222422 try :
24232423 domain_passwd = samr .DOMAIN_INFORMATION_CLASS .DomainPasswordInformation
24242424 result = samr .hSamrQueryInformationDomain2 (dce , domainHandle = domain_handle , domainInformationClass = domain_passwd )
2425- policy ["domain_password_information " ] = {}
2426- policy ["domain_password_information " ]["pw_history_length " ] = result ['Buffer' ]['Password' ]['PasswordHistoryLength' ] or "None"
2427- policy ["domain_password_information " ]["min_pw_length " ] = result ['Buffer' ]['Password' ]['MinPasswordLength' ] or "None"
2428- policy ["domain_password_information " ]["min_pw_age " ] = self .policy_to_human (int (result ['Buffer' ]['Password' ]['MinPasswordAge' ]['LowPart' ]), int (result ['Buffer' ]['Password' ]['MinPasswordAge' ]['HighPart' ]))
2429- policy ["domain_password_information " ]["max_pw_age " ] = self .policy_to_human (int (result ['Buffer' ]['Password' ]['MaxPasswordAge' ]['LowPart' ]), int (result ['Buffer' ]['Password' ]['MaxPasswordAge' ]['HighPart' ]))
2430- policy ["domain_password_information " ]["pw_properties " ] = []
2425+ policy ["Domain password information " ] = {}
2426+ policy ["Domain password information " ]["Password history length " ] = result ['Buffer' ]['Password' ]['PasswordHistoryLength' ] or "None"
2427+ policy ["Domain password information " ]["Minimum password length " ] = result ['Buffer' ]['Password' ]['MinPasswordLength' ] or "None"
2428+ policy ["Domain password information " ]["Maximum password age " ] = self .policy_to_human (int (result ['Buffer' ]['Password' ]['MinPasswordAge' ]['LowPart' ]), int (result ['Buffer' ]['Password' ]['MinPasswordAge' ]['HighPart' ]))
2429+ policy ["Domain password information " ]["Maximum password age " ] = self .policy_to_human (int (result ['Buffer' ]['Password' ]['MaxPasswordAge' ]['LowPart' ]), int (result ['Buffer' ]['Password' ]['MaxPasswordAge' ]['HighPart' ]))
2430+ policy ["Domain password information " ]["Password properties " ] = []
24312431 pw_prop = result ['Buffer' ]['Password' ]['PasswordProperties' ]
24322432 for bitmask in DOMAIN_FIELDS :
24332433 if pw_prop & bitmask == bitmask :
2434- policy ["domain_password_information " ]["pw_properties " ].append ({DOMAIN_FIELDS [bitmask ]:True })
2434+ policy ["Domain password information " ]["Password properties " ].append ({DOMAIN_FIELDS [bitmask ]:True })
24352435 else :
2436- policy ["domain_password_information " ]["pw_properties " ].append ({DOMAIN_FIELDS [bitmask ]:False })
2436+ policy ["Domain password information " ]["Password properties " ].append ({DOMAIN_FIELDS [bitmask ]:False })
24372437 except Exception as e :
24382438 nt_status_error = nt_status_error_filter (str (e ))
24392439 if nt_status_error :
@@ -2444,10 +2444,10 @@ def enum(self):
24442444 try :
24452445 domain_lockout = samr .DOMAIN_INFORMATION_CLASS .DomainLockoutInformation
24462446 result = samr .hSamrQueryInformationDomain2 (dce , domainHandle = domain_handle , domainInformationClass = domain_lockout )
2447- policy ["domain_lockout_information " ] = {}
2448- policy ["domain_lockout_information " ]["lockout_observation_window " ] = self .policy_to_human (0 , result ['Buffer' ]['Lockout' ]['LockoutObservationWindow' ], lockout = True )
2449- policy ["domain_lockout_information " ]["lockout_duration " ] = self .policy_to_human (0 , result ['Buffer' ]['Lockout' ]['LockoutDuration' ], lockout = True )
2450- policy ["domain_lockout_information " ]["lockout_threshold " ] = result ['Buffer' ]['Lockout' ]['LockoutThreshold' ] or "None"
2447+ policy ["Domain lockout information " ] = {}
2448+ policy ["Domain lockout information " ]["Lockout observation window " ] = self .policy_to_human (0 , result ['Buffer' ]['Lockout' ]['LockoutObservationWindow' ], lockout = True )
2449+ policy ["Domain lockout information " ]["Lockout duration " ] = self .policy_to_human (0 , result ['Buffer' ]['Lockout' ]['LockoutDuration' ], lockout = True )
2450+ policy ["Domain lockout information " ]["Lockout threshold " ] = result ['Buffer' ]['Lockout' ]['LockoutThreshold' ] or "None"
24512451 except Exception as e :
24522452 nt_status_error = nt_status_error_filter (str (e ))
24532453 if nt_status_error :
@@ -2458,8 +2458,8 @@ def enum(self):
24582458 try :
24592459 domain_logoff = samr .DOMAIN_INFORMATION_CLASS .DomainLogoffInformation
24602460 result = samr .hSamrQueryInformationDomain2 (dce , domainHandle = domain_handle , domainInformationClass = domain_logoff )
2461- policy ["domain_logoff_information " ] = {}
2462- policy ["domain_logoff_information " ]["force_logoff_time " ] = self .policy_to_human (result ['Buffer' ]['Logoff' ]['ForceLogoff' ]['LowPart' ], result ['Buffer' ]['Logoff' ]['ForceLogoff' ]['HighPart' ])
2461+ policy ["Domain logoff information " ] = {}
2462+ policy ["Domain logoff information " ]["Force logoff time " ] = self .policy_to_human (result ['Buffer' ]['Logoff' ]['ForceLogoff' ]['LowPart' ], result ['Buffer' ]['Logoff' ]['ForceLogoff' ]['HighPart' ])
24632463 except Exception as e :
24642464 nt_status_error = nt_status_error_filter (str (e ))
24652465 if nt_status_error :
0 commit comments