Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
x.sockaddr.pdc_ip = '0.0.0.0'
x.nt_version = 5
x.lmnt_token = 0xffff
x.lm20_token = 0xffff
#print ndr.ndr_print(x)
y = ndr.ndr_pack(x)
attrs = [('netlogon', [ str(y) ])]
print binascii.hexlify(str(y))
result = ''
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultEntry(
objectName='',
attributes=attrs),
id=msgId))
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultDone(
resultCode=ldaperrors.Success.resultCode),
id=msgId))
return result
def _send(self, op, controls=None):
if not self.connected:
raise LDAPClientConnectionLostException()
msg = pureldap.LDAPMessage(op, controls=controls)
if self.debug:
log.msg('C->S %s' % repr(msg))
assert msg.id not in self.onwire
return msg
'1.2.840.113556.1.4.1339',
'1.2.840.113556.1.4.1340',
'1.2.840.113556.1.4.1413',
'1.2.840.113556.1.4.1341'
]))
attrs.append(('namingContexts', [
dc,
'CN=Configuration,' + dc,
'CN=Schema,CN=Configuration,' + dc,
'DC=DomainDnsZones,' + dc,
'DC=ForestDnsZones,' + dc
]))
attrs.append(('supportedSASLMechanisms', ['GSS-SPNEGO', 'GSSAPI', 'NTLM']))
result = ''
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultEntry(
objectName='',
attributes=attrs),
id=msgId))
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultDone(
resultCode=ldaperrors.Success.resultCode),
id=msgId))
return result
#x.user_name = ""
x.server_site = "Default-First-Site-Name"
x.client_site = "Default-First-Site-Name"
x.sockaddr_size = 0
x.sockaddr.pdc_ip = '0.0.0.0'
x.nt_version = 5
x.lmnt_token = 0xffff
x.lm20_token = 0xffff
#print ndr.ndr_print(x)
y = ndr.ndr_pack(x)
attrs = [('netlogon', [ str(y) ])]
print binascii.hexlify(str(y))
result = ''
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultEntry(
objectName='',
attributes=attrs),
id=msgId))
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultDone(
resultCode=ldaperrors.Success.resultCode),
id=msgId))
return result
def queue(self, id, op):
if not self.connected:
raise LDAPServerConnectionLostException()
msg = pureldap.LDAPMessage(op, id=id)
if self.debug:
log.msg('S->C %s' % repr(msg), debug=True)
self.transport.write(msg.toWire())
]))
attrs.append(('namingContexts', [
dc,
'CN=Configuration,' + dc,
'CN=Schema,CN=Configuration,' + dc,
'DC=DomainDnsZones,' + dc,
'DC=ForestDnsZones,' + dc
]))
attrs.append(('supportedSASLMechanisms', ['GSS-SPNEGO', 'GSSAPI', 'NTLM']))
result = ''
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultEntry(
objectName='',
attributes=attrs),
id=msgId))
result += str(pureldap.LDAPMessage(pureldap.LDAPSearchResultDone(
resultCode=ldaperrors.Success.resultCode),
id=msgId))
return result