mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-04-26 10:39:08 -04:00
18 lines
340 B
Python
18 lines
340 B
Python
#!/usr/bin/env python
|
|
|
|
__author__ = "Mia Stein"
|
|
|
|
|
|
from Crypto.Cipher import DES
|
|
from Crypto import Random
|
|
|
|
iv = Random.get_random_bytes(8)
|
|
|
|
des1 = DES.new('01234567', DES.MODE_CFB, iv)
|
|
des2 = DES.new('01234567', DES.MODE_CFB, iv)
|
|
text = 'abcdefghijklmnop'
|
|
|
|
cipher_text = des1.encrypt(text)
|
|
print cipher_text
|
|
print des2.decrypt(cipher_text)
|