def read_chrome_logins(logins_db, tm_min=0, tm_max=10000000000000, domain=None):
command = "SELECT action_url, username_value, password_value, signon_realm, date_created, times_used, form_data FROM logins " \
+ "WHERE (date_created/10000000 > %s AND date_created/10000000 < %s);" % (tm_min, tm_max)
if domain:
command = command[:-1] + " AND (signon_realm LIKE '%s');" % domain
res = pull_from_db(logins_db, command)
data = init_data("chrome_scanner Logins", len(res)) + init_table_header("./templates/init_chrome_logins_html.html")
for row in res:
creation_date = dt.fromtimestamp(row[4]/10000000)
form_data = row[6].decode("ISO-8859-1")
line = "<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td>" % (creation_date, row[3], row[0], row[1]) \
+ "<td>%s</td><td>%s</td><td>%s</td></tr>" % (row[2].decode("ISO-8859-1"), row[5], form_data)
data += line
data += close_table_html()
saveResult("chrome_logins.html", data)
评论列表
文章目录