Advertisement
Guest User

Untitled

a guest
Mar 12th, 2019
909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. ### initial values ###
  2. db_sec_key = "R_EFY1hb236guS3jNq1aHyPcruXbjk7Ff-QwL6PMqJM="
  3. db_salt = "qIhAhRt3xq_dzIEqyJQFmWnymFbO1cZVhbQaTWA-v9Q="
  4. dba_hash = "utUU0jkamCZDmqFLOrAuPjFxL0zp8zWzISe5MF0GY/l8Silrmu3caqrtjaVjLQlvFFEgESGz"
  5.  
  6. ### what we know ###
  7. print "Current known dba hash: " + dba_hash
  8.  
  9. ### run pwd through pqencryptpassword ###
  10. user = "dba"
  11. password = "supersecret"
  12. pq_pwd = pqencryptpassword(password, user)
  13. print ""
  14. print "pq thingy: " + pq_pwd
  15.  
  16. ### test encrypt function ###
  17. print ""
  18. print "Testing encrypt process...."
  19. plaintext = pq_pwd
  20. key = "R_EFY1hb236guS3jNq1aHyPcruXbjk7F"
  21. new = encrypt(plaintext, key)
  22. print "before: " + plaintext + " :After: " + new
  23.  
  24. ### test decrypt function ###
  25. print ""
  26. print "Testing decrypt...."
  27. ciphertext = new
  28. print "Encrypted: " + ciphertext + " :decrypted: " + decrypt(ciphertext, key)
  29.  
  30. ### decrypt ###
  31. ciphertext = "utUU0jkamCZDmqFLOrAuPjFxL0zp8zWzISe5MF0GY/l8Silrmu3caqrtjaVjLQlvFFEgESGz"
  32. #ciphertext = "l8Silrmu3caqrtjaVjLQlvFFEgESGz"
  33. #ciphertext = "utUU0jkamCZDmqFLOrAuPjFxL0zp8zWzISe5MF0GY"
  34. print ""
  35. print "Actual...."
  36. print decrypt(ciphertext, key)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement