Coverage for /private/tmp/im/impacket/impacket/dcerpc/v5/mgmt.py : 85%

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: # [C706] Remote Management 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. #
DCERPCException.__init__(self, error_string, error_code, packet)
key = self.error_code if key in nt_errors.ERROR_MESSAGES: error_msg_short = nt_errors.ERROR_MESSAGES[key][0] error_msg_verbose = nt_errors.ERROR_MESSAGES[key][1] return 'MGMT SessionError: code: 0x%x - %s - %s' % (self.error_code, error_msg_short, error_msg_verbose) else: return 'MGMT SessionError: unknown error code: 0x%x' % self.error_code
################################################################################ # CONSTANTS ################################################################################
('count',ULONG), ('if_id',rpc_if_id_p_t_array), ) ('count',ULONGLONG), ('if_id',rpc_if_id_p_t_array), )
('Data', rpc_if_id_vector_t), )
################################################################################ # STRUCTURES ################################################################################
################################################################################ # RPC CALLS ################################################################################ )
('if_id_vector', rpc_if_id_vector_p_t), ('status', error_status), )
('count', ULONG), )
('count', ULONG), ('statistics', DWORD_ARRAY), ('status', error_status), )
)
('status', error_status), )
)
('status', error_status), )
('authn_proto', ULONG), ('princ_name_size', ULONG), )
('princ_name', NDRUniConformantVaryingArray), ('status', error_status), )
################################################################################ # OPNUMs and their corresponding structures ################################################################################ 0 : (inq_if_ids, inq_if_idsResponse), 1 : (inq_stats, inq_statsResponse), 2 : (is_server_listening, is_server_listeningResponse), 3 : (stop_server_listening, stop_server_listeningResponse), 4 : (inq_princ_name, inq_princ_nameResponse), }
################################################################################ # HELPER FUNCTIONS ################################################################################
request = is_server_listening() return dce.request(request, checkError=False)
|