#NEWLINE# def __init__( self , target , username , password , domain , hashes = None ) : #NEWLINE# #INDENT# self . __target = target #NEWLINE# self . __username = username #NEWLINE# self . __password = password #NEWLINE# self . __domain = domain #NEWLINE# self . __lmhash = '' #NEWLINE# self . __nthash = '' #NEWLINE# self . __outputBuffer = '' #NEWLINE# self . __retOutput = False #NEWLINE# if ( hashes is not None ) : #NEWLINE# #INDENT# if ( hashes . find ( ':' ) != ( - 1 ) ) : #NEWLINE# #INDENT# ( self . __lmhash , self . __nthash ) = hashes . split ( ':' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . __nthash = hashes #NEWLINE# #UNINDENT# #UNINDENT# if ( self . __password is None ) : #NEWLINE# #INDENT# self . __password = '' #NEWLINE# #UNINDENT# stringbinding = ( 'ncacn_np:%s[\\pipe\\atsvc]' % self . __target ) #NEWLINE# self . __rpctransport = transport . DCERPCTransportFactory ( stringbinding ) #NEWLINE# if hasattr ( self . __rpctransport , 'set_credentials' ) : #NEWLINE# #INDENT# self . __rpctransport . set_credentials ( self . __username , self . __password , self . __domain , self . __lmhash , self . __nthash )