Skip to content

Instantly share code, notes, and snippets.

Avatar

Pilatus pilatuspc12ng

View GitHub Profile
@pilatuspc12ng
pilatuspc12ng / crypt.py
Last active Jan 29, 2021 — forked from ricardojba/crypt.py
Decrypt Laravel-encrypted value
View crypt.py
import base64
import json
from phpserialize import loads
import hashlib
import hmac
from Crypto.Cipher import AES
def decrypt(payload, key):
"""
Decrypt strings that have been encrypted using Laravel's encrypter (AES-256 encryption).