Ejemplo n.º 1
0
    def test_hLsarCreateSecret_hLsarOpenSecret(self):
        dce, rpctransport, policyHandle = self.connect()

        resp = lsad.hLsarCreateSecret(dce, policyHandle, 'MYSECRET')
        #resp.dump()

        resp0 = lsad.hLsarOpenSecret(dce, policyHandle, 'MYSECRET')
        #resp0.dump()

        try:
            resp = lsad.hLsarSetSecret(dce, resp0['SecretHandle'], 'A'*16, 'A'*16)
            #resp.dump()
        except: 
            pass

        resp = lsad.hLsarDeleteObject(dce,resp0['SecretHandle'])
Ejemplo n.º 2
0
    def test_hLsarCreateSecret_hLsarOpenSecret(self):
        dce, rpctransport, policyHandle = self.connect()

        resp = lsad.hLsarCreateSecret(dce, policyHandle, 'MYSECRET')
        resp.dump()

        resp0 = lsad.hLsarOpenSecret(dce, policyHandle, 'MYSECRET')
        resp0.dump()

        try:
            resp = lsad.hLsarSetSecret(dce, resp0['SecretHandle'], 'A'*16, 'A'*16)
            resp.dump()
        except: 
            pass

        resp = lsad.hLsarDeleteObject(dce,resp0['SecretHandle'])
        resp.dump()