Python impacket.dcerpc.v5.samr.hSamrRidToSid() Examples

The following are 11 code examples of impacket.dcerpc.v5.samr.hSamrRidToSid(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module impacket.dcerpc.v5.samr , or try the search function .
Example #1
Source File: secretsdump.py    From CVE-2017-7494 with GNU General Public License v3.0 5 votes vote down vote up
def ridToSid(self, rid):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])
        resp = samr.hSamrRidToSid(self.__samr, self.__domainHandle , rid)
        return resp['Sid'] 
Example #2
Source File: test_samr.py    From CVE-2017-7494 with GNU General Public License v3.0 5 votes vote down vote up
def test_hSamrRidToSid(self):
        dce, rpctransport, domainHandle  = self.connect()
        resp = samr.hSamrRidToSid(dce, domainHandle, samr.DOMAIN_USER_RID_ADMIN)
        resp.dump() 
Example #3
Source File: secretsdump.py    From cracke-dit with MIT License 5 votes vote down vote up
def ridToSid(self, rid):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])
        resp = samr.hSamrRidToSid(self.__samr, self.__domainHandle , rid)
        return resp['Sid'] 
Example #4
Source File: test_samr.py    From cracke-dit with MIT License 5 votes vote down vote up
def test_hSamrRidToSid(self):
        dce, rpctransport, domainHandle  = self.connect()
        resp = samr.hSamrRidToSid(dce, domainHandle, samr.DOMAIN_USER_RID_ADMIN)
        resp.dump() 
Example #5
Source File: dump.py    From Exchange2domain with MIT License 5 votes vote down vote up
def ridToSid(self, rid):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])
        resp = samr.hSamrRidToSid(self.__samr, self.__domainHandle , rid)
        return resp['Sid'] 
Example #6
Source File: secretsdump.py    From smbwrapper with GNU General Public License v3.0 5 votes vote down vote up
def ridToSid(self, rid):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])
        resp = samr.hSamrRidToSid(self.__samr, self.__domainHandle , rid)
        return resp['Sid'] 
Example #7
Source File: secretsdump.py    From Slackor with GNU General Public License v3.0 5 votes vote down vote up
def ridToSid(self, rid):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])
        resp = samr.hSamrRidToSid(self.__samr, self.__domainHandle , rid)
        return resp['Sid'] 
Example #8
Source File: test_samr.py    From Slackor with GNU General Public License v3.0 5 votes vote down vote up
def test_hSamrRidToSid(self):
        dce, rpctransport, domainHandle  = self.connect()
        resp = samr.hSamrRidToSid(dce, domainHandle, samr.DOMAIN_USER_RID_ADMIN)
        resp.dump() 
Example #9
Source File: dump.py    From CVE-2019-1040 with MIT License 5 votes vote down vote up
def ridToSid(self, rid):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])
        resp = samr.hSamrRidToSid(self.__samr, self.__domainHandle , rid)
        return resp['Sid'] 
Example #10
Source File: secretsdump.py    From PiBunny with MIT License 5 votes vote down vote up
def ridToSid(self, rid):
        if self.__samr is None:
            self.connectSamr(self.getMachineNameAndDomain()[1])
        resp = samr.hSamrRidToSid(self.__samr, self.__domainHandle , rid)
        return resp['Sid'] 
Example #11
Source File: test_samr.py    From PiBunny with MIT License 5 votes vote down vote up
def test_hSamrRidToSid(self):
        dce, rpctransport, domainHandle  = self.connect()
        resp = samr.hSamrRidToSid(dce, domainHandle, samr.DOMAIN_USER_RID_ADMIN)
        resp.dump()