windapsearch.py 文件源码

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

项目:windapsearch 作者: ropnop 项目源码 文件源码
def getAllComputers(self, attrs=''):
        if not attrs:
            attrs = ['cn', 'dNSHostName', 'operatingSystem', 'operatingSystemVersion', 'operatingSystemServicePack']

        objectFilter = '(objectClass=Computer)'
        base_dn = self.domainBase

        try:
            rawComputers = self.do_ldap_query(base_dn, ldap.SCOPE_SUBTREE, objectFilter, attrs)
        except LDAPError, e:
            print "[!] Error retrieving computers"
            print "[!] {}".format(e)
            sys.exit(1)

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


问题


面经


文章

微信
公众号

扫码关注公众号