Alyssa

Apex Skype Lookup

Mar 29th, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. from datetime import datetime
  2. import sqlite3
  3. import string
  4. pa = set(string.printable)
  5. convos = []
  6. conn = sqlite3.connect("main.db")
  7. c = conn.cursor()
  8. c.execute("SELECT * FROM Messages WHERE author = \"kranxxitup\"")
  9. for t in c.fetchall():
  10.   if not t[2] in convos:
  11.     convos.append(t[2])
  12. cs = ""
  13. a = 0
  14. c.execute("SELECT * FROM Messages")
  15. output = ""
  16. for msg in c.fetchall():
  17.   if msg[2] in convos:
  18.     output += "\n----------"
  19.     output += "\n" + str(datetime.fromtimestamp(msg[9])) + " chat id " + str(msg[2])
  20.     output += "\n" + msg[5] + " (" + msg[4] + ")"
  21.     output += "\n" + (''.join(filter(lambda x: x in pa, str(msg[17])))).replace("'","'")
  22. with open("skype.txt","w") as f:
  23.   f.write(output)
Advertisement
Add Comment
Please, Sign In to add comment