windapsearch.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:windapsearch 作者: ropnop 项目源码 文件源码
def getAllUsers(self, attrs=''):
        if not attrs:
            attrs = ['cn', 'userPrincipalName']

        objectFilter = '(objectCategory=user)'
        base_dn = self.domainBase
        try:
            rawUsers = self.do_ldap_query(base_dn, ldap.SCOPE_SUBTREE, objectFilter, attrs)
        except LDAPError, e:
            print "[!] Error retrieving users"
            print "[!] {}".format(e)
            sys.exit(1)

        return (self.get_search_results(rawUsers), attrs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号