encryption.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Veil 作者: Veil-Framework 项目源码 文件源码
def des_encryption(incoming_shellcode):
    # Generate a random key, create the cipher object
    # pad the shellcode, and encrypt the padded shellcode
    # return encrypted -> encoded shellcode and key
    random_des_key = helpers.randomKey(8)
    iv = helpers.randomString(8)
    des_cipher_object = DES.new(random_des_key, DES.MODE_CBC, iv)
    padded_shellcode = encryption_padding(incoming_shellcode)
    encrypted_shellcode = des_cipher_object.encrypt(padded_shellcode)
    encoded_ciphertext = base64.b64encode(encrypted_shellcode)
    return encoded_ciphertext, random_des_key, iv
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号