Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion impacket/krb5/asn1.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class KerberosString(char.GeneralString):
# TODO marc: I'm not sure how to express this constraint in the API.
# For now, we will be liberal in what we accept.
# subtypeSpec = constraint.PermittedAlphabetConstraint(char.IA5String())
pass
encoding = 'utf-8'

class Realm(KerberosString):
pass
Expand Down
4 changes: 2 additions & 2 deletions impacket/krb5/kerberosv5.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def getKerberosTGT(clientName, password, domain, lmhash, nthash, aesKey='', kdcH
except PyAsn1Error:
salt = ''

encryptionTypesData[etype2['etype']] = b(salt)
encryptionTypesData[etype2['etype']] = salt.encode('utf-8')
elif method['padata-type'] == constants.PreAuthenticationDataTypes.PA_ETYPE_INFO.value:
etypes = decoder.decode(method['padata-value'], asn1Spec = ETYPE_INFO())[0]
for etype in etypes:
Expand All @@ -245,7 +245,7 @@ def getKerberosTGT(clientName, password, domain, lmhash, nthash, aesKey='', kdcH
except PyAsn1Error:
salt = ''

encryptionTypesData[etype['etype']] = b(salt)
encryptionTypesData[etype['etype']] = salt.encode('utf-8')

enctype = supportedCiphers[0]

Expand Down