async def store_sd(self, sd): if sd['adsec'] is None: return jdsd = JackDawSD() jdsd.ad_id = self.ad_id jdsd.guid = sd['guid'] jdsd.sid = sd['sid'] jdsd.object_type = sd['object_type'] jdsd.sd = base64.b64encode(sd['adsec']).decode() jdsd.sd_hash = sha1(sd['adsec']).hexdigest() self.sd_file.write(jdsd.to_json().encode() + b'\r\n')
async def store_sd(self, sd): #secdesc = SECURITY_DESCRIPTOR.from_bytes(sd.nTSecurityDescriptor) # #print(str(sd)) if sd['adsec'] is None: return jdsd = JackDawSD() jdsd.ad_id = self.ad_id jdsd.guid = sd['guid'] jdsd.sid = sd['sid'] jdsd.object_type = sd['object_type'] jdsd.sd = base64.b64encode(sd['adsec']).decode() jdsd.sd_hash = sha1(sd['adsec']).hexdigest() self.sd_file.write(jdsd.to_json().encode() + b'\r\n')