Coverage for /private/tmp/im/impacket/impacket/dcerpc/v5/sasec.py : 86%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved. # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: Alberto Solino (@agsolino) # # Description: # [MS-TSCH] SASec Interface implementation # # Best way to learn how to use these calls is to grab the protocol standard # so you understand what the call does, and then read the test case located # at https://github.com/SecureAuthCorp/impacket/tree/master/tests/SMB_RPC # # Some calls have helper functions, which makes it even easier to use. # They are located at the end of this file. # Helper functions start with "h"<name of the call>. # There are test cases for them too. #
key = self.error_code if key in hresult_errors.ERROR_MESSAGES: error_msg_short = hresult_errors.ERROR_MESSAGES[key][0] error_msg_verbose = hresult_errors.ERROR_MESSAGES[key][1] return 'TSCH SessionError: code: 0x%x - %s - %s' % (self.error_code, error_msg_short, error_msg_verbose) else: return 'TSCH SessionError: unknown error code: 0x%x' % self.error_code
################################################################################ # CONSTANTS ################################################################################
# 3.2.5.3.4 SASetAccountInformation (Opnum 0)
################################################################################ # STRUCTURES ################################################################################
################################################################################ # RPC CALLS ################################################################################ # 3.2.5.3.4 SASetAccountInformation (Opnum 0) ('Handle', PSASEC_HANDLE), ('pwszJobName', WSTR), ('pwszAccount', WSTR), ('pwszPassword', LPWSTR), ('dwJobFlags', DWORD), )
('ErrorCode',ULONG), )
# 3.2.5.3.5 SASetNSAccountInformation (Opnum 1) ('Handle', PSASEC_HANDLE), ('pwszAccount', LPWSTR), ('pwszPassword', LPWSTR), )
('ErrorCode',ULONG), )
# 3.2.5.3.6 SAGetNSAccountInformation (Opnum 2) ('Handle', PSASEC_HANDLE), ('ccBufferSize', DWORD), ('wszBuffer', WORD_ARRAY), )
('wszBuffer',WORD_ARRAY), ('ErrorCode',ULONG), )
# 3.2.5.3.7 SAGetAccountInformation (Opnum 3) ('Handle', PSASEC_HANDLE), ('pwszJobName', WSTR), ('ccBufferSize', DWORD), ('wszBuffer', WORD_ARRAY), )
('wszBuffer',WORD_ARRAY), ('ErrorCode',ULONG), ) ################################################################################ # OPNUMs and their corresponding structures ################################################################################ 0 : (SASetAccountInformation, SASetAccountInformationResponse), 1 : (SASetNSAccountInformation, SASetNSAccountInformationResponse), 2 : (SAGetNSAccountInformation, SAGetNSAccountInformationResponse), 3 : (SAGetAccountInformation, SAGetAccountInformationResponse), }
################################################################################ # HELPER FUNCTIONS ################################################################################ return string
else: return string
|