Replaced leftover dicts

This commit is contained in:
Nex 2021-08-15 19:20:41 +02:00
parent e1e4476bee
commit ce6cc771b4
2 changed files with 8 additions and 8 deletions

View File

@ -55,7 +55,7 @@ class SMSAttachments(IOSExtraction):
names = [description[0] for description in cur.description]
for item in cur:
attachment = dict()
attachment = {}
for index, value in enumerate(item):
if (names[index] in ["user_info", "sticker_user_info", "attribution_info",
"ck_server_change_token_blob", "sr_ck_server_change_token_blob"]) and value:

View File

@ -61,14 +61,14 @@ class WebkitResourceLoadStatistics(IOSExtraction):
self.results[key] = []
for row in cur:
self.results[key].append(dict(
domain_id=row[0],
registrable_domain=row[1],
last_seen=row[2],
had_user_interaction=bool(row[3]),
self.results[key].append({
"domain_id": row[0],
"registrable_domain": row[1],
"last_seen": row[2],
"had_user_interaction": bool(row[3]),
# TODO: Fix isodate.
last_seen_isodate=convert_timestamp_to_iso(datetime.datetime.utcfromtimestamp(int(row[2]))),
))
"last_seen_isodate": convert_timestamp_to_iso(datetime.datetime.utcfromtimestamp(int(row[2]))),
})
if len(self.results[key]) > 0:
self.log.info("Extracted a total of %d records from %s", len(self.results[key]), db_path)