Skip to content

Commit

Permalink
encode string as utf8 unicode, not latin1
Browse files Browse the repository at this point in the history
  • Loading branch information
au committed Sep 14, 2024
1 parent e927f33 commit 0dbea8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nxc/protocols/smb/kerberos.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def kerberos_login_with_S4U(domain, hostname, username, password, nthash, lmhash
client_name = Principal(impersonate, type=constants.PrincipalNameType.NT_PRINCIPAL.value)

s4u_byte_array = struct.pack("<I", constants.PrincipalNameType.NT_PRINCIPAL.value)
s4u_byte_array += b(impersonate) + b(domain) + b"Kerberos"
s4u_byte_array += impersonate.encode() + b(domain) + b"Kerberos"

# Finally cksum is computed by calling the KERB_CHECKSUM_HMAC_MD5 hash
# with the following three parameters: the session key of the TGT of
Expand Down

0 comments on commit 0dbea8e

Please sign in to comment.