def test_hBackuprKey_BACKUPKEY_BACKUP_GUID_BACKUPKEY_RESTORE_GUID(self): dce, rpctransport = self.connect() resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_BACKUP_GUID, self.data_in) resp.dump() wrapped = bkrp.WRAPPED_SECRET() wrapped.fromString(b''.join(resp['ppDataOut'])) wrapped.dump() resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_RESTORE_GUID, b''.join(resp['ppDataOut'])) resp.dump() self.assertEqual(self.data_in, b''.join(resp['ppDataOut']))
def test_hBackuprKey_BACKUPKEY_BACKUP_GUID_BACKUPKEY_RESTORE_GUID(self): dce, rpctransport = self.connect() DataIn = "Huh? wait wait, let me, let me explain something to you. Uh, I am not Mr. Lebowski; " \ "you're Mr. Lebowski. I'm the Dude. So that's what you call me. You know, uh, That, or uh, " \ "his Dudeness, or uh Duder, or uh El Duderino, if, you know, you're not into the whole brevity thing--uh." resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_BACKUP_GUID, DataIn) resp.dump() wrapped = bkrp.WRAPPED_SECRET() wrapped.fromString(''.join(resp['ppDataOut'])) wrapped.dump() resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_RESTORE_GUID, ''.join(resp['ppDataOut'])) resp.dump() assert (DataIn == ''.join(resp['ppDataOut']))
def test_hBackuprKey_BACKUPKEY_BACKUP_GUID_BACKUPKEY_RESTORE_GUID(self): dce, rpctransport = self.connect() DataIn = b"Huh? wait wait, let me, let me explain something to you. Uh, I am not Mr. Lebowski; " \ b"you're Mr. Lebowski. I'm the Dude. So that's what you call me. You know, uh, That, or uh, " \ b"his Dudeness, or uh Duder, or uh El Duderino, if, you know, you're not into the whole brevity thing--uh." resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_BACKUP_GUID, DataIn) resp.dump() wrapped = bkrp.WRAPPED_SECRET() wrapped.fromString(b''.join(resp['ppDataOut'])) wrapped.dump() resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_RESTORE_GUID, b''.join(resp['ppDataOut'])) resp.dump() assert (DataIn == b''.join(resp['ppDataOut']))
def test_hBackuprKey_BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID(self): dce, rpctransport = self.connect() request = bkrp.BackuprKey() request['pguidActionAgent'] = bkrp.BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID request['pDataIn'] = NULL request['cbDataIn'] = 0 request['dwParam'] = 0 resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID, NULL) resp.dump() #print "LEN: %d" % len(''.join(resp['ppDataOut'])) #hexdump(''.join(resp['ppDataOut'])) cert = x509.load_der_x509_certificate(''.join(resp['ppDataOut']), default_backend()) print cert.subject print cert.issuer print cert.signature
def test_hBackuprKey_BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID(self): dce, rpctransport = self.connect() request = bkrp.BackuprKey() request['pguidActionAgent'] = bkrp.BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID request['pDataIn'] = NULL request['cbDataIn'] = 0 request['dwParam'] = 0 resp = bkrp.hBackuprKey(dce, bkrp.BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID, NULL) resp.dump() #print "LEN: %d" % len(''.join(resp['ppDataOut'])) #hexdump(''.join(resp['ppDataOut'])) cert = x509.load_der_x509_certificate(b''.join(resp['ppDataOut']), default_backend()) print(cert.subject) print(cert.issuer) print(cert.signature)