diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-03-23 16:30:05 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-03-29 02:37:29 +0200 |
commit | 493d886163e3691bf328953c6ae10de2ba7ee482 (patch) | |
tree | 249dbca2a88741db4cf750496174d8287c5a71e3 /librpc | |
parent | 43f52fc425d8b59596a1f3917ac41a0631477393 (diff) | |
download | samba-493d886163e3691bf328953c6ae10de2ba7ee482.tar.gz |
python: Add bindings for NTLMSSP
This is helpful for building NTLMv2 packets in python for testing against the SamLogon server
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/idl/ntlmssp.idl | 12 | ||||
-rw-r--r-- | librpc/wscript_build | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/librpc/idl/ntlmssp.idl b/librpc/idl/ntlmssp.idl index 6b228869f90..4799066d7c4 100644 --- a/librpc/idl/ntlmssp.idl +++ b/librpc/idl/ntlmssp.idl @@ -207,10 +207,10 @@ interface ntlmssp uint8 ChallengeFromClient[8]; } LMv2_RESPONSE; - typedef [nopython,nodiscriminant] union { + typedef [nodiscriminant] union { [case(24)] LM_RESPONSE v1; [default]; - } ntlmssp_LM_RESPONSE; + } ntlmssp_LM_RESPONSE_with_len; /* [MS-NLMP] 2.2.2.6 NTLM_RESPONSE */ @@ -238,11 +238,11 @@ interface ntlmssp NTLMv2_CLIENT_CHALLENGE Challenge; } NTLMv2_RESPONSE; - typedef [public,nopython,nodiscriminant] union { + typedef [public,nodiscriminant] union { [case(0)] ; [case(0x18)] NTLM_RESPONSE v1; [default] NTLMv2_RESPONSE v2; - } ntlmssp_NTLM_RESPONSE; + } ntlmssp_NTLM_RESPONSE_with_len; const int NTLMSSP_MIC_OFFSET = 72; const int NTLMSSP_MIC_SIZE = 16; @@ -258,10 +258,10 @@ interface ntlmssp [value(NtLmAuthenticate)] ntlmssp_MessageType MessageType; uint16 LmChallengeResponseLen; [value(LmChallengeResponseLen)] uint16 LmChallengeResponseMaxLen; - [relative] [subcontext(0),subcontext_size(LmChallengeResponseLen),switch_is(LmChallengeResponseLen)] ntlmssp_LM_RESPONSE *LmChallengeResponse; + [relative] [subcontext(0),subcontext_size(LmChallengeResponseLen),switch_is(LmChallengeResponseLen)] ntlmssp_LM_RESPONSE_with_len *LmChallengeResponse; uint16 NtChallengeResponseLen; [value(NtChallengeResponseLen)] uint16 NtChallengeResponseMaxLen; - [relative] [subcontext(0),subcontext_size(NtChallengeResponseMaxLen),switch_is(NtChallengeResponseLen)] ntlmssp_NTLM_RESPONSE *NtChallengeResponse; + [relative] [subcontext(0),subcontext_size(NtChallengeResponseMaxLen),switch_is(NtChallengeResponseLen)] ntlmssp_NTLM_RESPONSE_with_len *NtChallengeResponse; [value(ndr_ntlmssp_string_length(NegotiateFlags, DomainName))] uint16 DomainNameLen; [value(DomainNameLen)] uint16 DomainNameMaxLen; [relative] [subcontext(0),subcontext_size(DomainNameLen)] [flag(ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags))] string *DomainName; diff --git a/librpc/wscript_build b/librpc/wscript_build index 55a6f7ab684..c4b647c242d 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -515,6 +515,11 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_DRSBLOBS', public_deps='dcerpc-binding NDR_DRSBLOBS' ) +bld.SAMBA_SUBSYSTEM('RPC_NDR_NTLMSSP', + source='gen_ndr/ndr_ntlmssp_c.c', + public_deps='dcerpc-binding NDR_NTLMSSP' + ) + bld.SAMBA_SUBSYSTEM('RPC_NDR_POLICYAGENT', source='gen_ndr/ndr_policyagent_c.c', public_deps='dcerpc-binding NDR_POLICYAGENT' |