Skip to content

Instantly share code, notes, and snippets.

@AndyNovo AndyNovo/challenge.py Secret
Created Mar 22, 2019

Embed
What would you like to do?
from Crypto.Cipher import DES
import string
def super_encryption(plaintext, key):
ct = ""
cipher = DES.new(key)
for a_letter in plaintext:
ct += cipher.encrypt(a_letter*8)
return ct
from secret import key, flag
ciphertext1 = super_encryption(string.printable, key)
ciphertext2 = super_encryption(flag, key)
f=file('ciphertext1','w')
f.write(ciphertext1.encode('hex'))
f.close()
f=file('ciphertext2','w')
f.write(ciphertext2.encode('hex'))
f.close()
98c6f36ccd1a5f2a8a6356c1a7487e8c022dd314e656a3cab169a4faecf59a08ac9b3f105a1e52793499d52634a21827db97a68615eb84e623019e15fa1b35f73a46ea1e697c94de9fe335f77d63e6f27fda9d17c9a2e0fe2020acf205909652f9c2f8a269fe5dc37d1e6c0f23d0f0367e507c92b7e81335b7e881e76f27e47a6a3f00996107d23076c0f1ef838f2391ae2e1d36c2c70211c4f5249ec8b8a98a865df3566cf6516fd143bc5cbade97c2c9996328631a5bbd3ba927c52bcaa1f9efbff894cd681339252284d85551d47246b29240c5c5d0adaf6ebbcb20903a59ea60293507eb1e29c37355a42e7a16750b4a760a1138b00b9f4bbc2da84f8538ccaa01fae4bc6abe55799b067dd1a455ca9ae2f88a8d73b79eefeba6b515ccfe4b29dd758387592f796ab27b1b134e5b4b163fbff2dd57cee9c1086bc015433a2f8b7383b125260b0cc9d85fc9409fbe7ce74a7b614a0bfe71e585b27d875d2a48d7fab3067dd57a84f5619dd11b1855df305e37847c239ac085ac5a35307438162599ff2210206a2866e5f5cb40007af2426a552300f5e02db31c357bb05c076683f9e6b07e3aafec2e27f76ff05bf7f6b08b911b15a6de7f685029f04a2410497e506a5f151009d75aa42a14cc5d68b496c3d28ca4d45b57ff4089b679b517a37e59e8b9d4cdc7c3213ebfe71b6b23ab680815d6c84f318ff1a4641a464f70b08edfca31932b673b30ecec0527bf84444c81afb950d038155168efa4b254b3d9d83cb75a2847e076e0d74b52a8c85cbf46e0d49d9863b20ee281a399994a086c82ac3c3f69f6bda2d55aa5138079a94ed41eaf24b17692123b978887e61f5bc203927757512e5845cc924b2ab0f6702c6a4aa6b1c60ea9179abc42f27082018e5b852aa008707d76b7feb988858cba5f75664d2e6eb3a9275a279acd3dd06597b79b7affd3f3f0f51fc61078061bbc8cdd6bb9f5579c2c5ccfebfcf55c85cf1af298eaf92569374502419d9b2b8e4858ae81424a86af8439a90a067aba1d6b1b7128a9ff28f21207a876ad5bee2ac1a0aa8f4e5d08d0ff92c1f4f65bb8b680db2a06640aa78da47580b6bdb082462e444ec14d982fd187a2088a12244ece3c
3ba927c52bcaa1f9ae2e1d36c2c702113ba927c52bcaa1f9c4f5249ec8b8a98a7fda9d17c9a2e0fe58ae81424a86af84ccaa01fae4bc6abeac9b3f105a1e5279ea60293507eb1e291af298eaf9256937c37355a42e7a167576c0f1ef838f2391b169a4faecf59a081af298eaf9256937252284d85551d472af6ebbcb20903a59efbff894cd6813392020acf205909652d143bc5cbade97c2b169a4faecf59a08c9996328631a5bbd1af298eaf9256937e9c1086bc015433ab169a4faecf59a08f6b08b911b15a6de1af298eaf9256937efbff894cd681339af6ebbcb20903a591af298eaf92569372f8b7383b125260b4b163fbff2dd57ce796ab27b1b134e5b1b7128a9ff28f212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.