daily pastebin goal
68%
SHARE
TWEET

decrypt_screen

a guest Apr 20th, 2018 220 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from Crypto.Cipher import AES
  2.  
  3. def main():
  4.     file = open("enc_screen", "rb")
  5.     enc_buffer = file.read()
  6.     file.close()
  7.    
  8.     file = open("key", "rb")
  9.     key = file.read()
  10.     file.close()
  11.    
  12.     iv = key
  13.     cipher = AES.new(key, AES.MODE_CBC, iv)
  14.     dec_buffer = cipher.decrypt(enc_buffer)
  15.    
  16.     file = open("dec_screen.jpeg", "wb")
  17.     file.write(dec_buffer)
  18.     file.close()
  19.  
  20. if __name__ == '__main__':
  21.     main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top