Advertisement
FlyFar

create_test_db.py

Oct 28th, 2023
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | Cybersecurity | 0 0
  1. from argparse import ArgumentParser
  2. from pysqlcipher import dbapi2 as sqlite
  3.  
  4. from hashlib import md5
  5.  
  6. db = 'EnMicroMsg.db'
  7.  
  8. key = '00001ef'
  9.  
  10. conn = sqlite.connect(db)
  11. c = conn.cursor()
  12. c.execute("PRAGMA key = '" + key + "';")
  13. c.execute("PRAGMA cipher_use_hmac = OFF;")
  14. c.execute("PRAGMA cipher_page_size = 1024;")
  15. c.execute("PRAGMA kdf_iter = 4000;")
  16.  
  17. c.execute("create table test_table (test_col text primary key)")
  18.  
  19. c.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement