def password_policy(con, args, db_obj, loggers): ppol = SAMRDump(con, args.debug, loggers['console']) ppol.dump(con.ip) if ppol.threshold: if ppol.threshold == "None": loggers['console'].status('Lockout threshold: None, setting threshold to 99 in database for {}'.format(con.domain)) db_obj.update_domain(con.domain, 99) else: loggers['console'].status('Lockout threshold detected, setting threshold to {} in database for {}'.format(ppol.threshold, con.domain)) db_obj.update_domain(con.domain, ppol.threshold) else: raise Exception('Enumerating password policy failed')
def password_policy(self): SAMRDump(self).dump(self.host)