Skip to content

Instantly share code, notes, and snippets.

Cameron Clifford cclifford3

Block or report user

Report or block cclifford3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View encrypt.py
import ast
import base64
import sys
import Crypto
from Crypto import Random
from Crypto.PublicKey import RSA
from Crypto.Cipher import AES
import time
View decrypt.py
Python 3.5.2 (default, Oct 11 2016, 05:05:28)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib.parse
>>> import hashlib
>>> import base64
>>> from Crypto.Cipher import AES
>>> app_secret_token = b'ea068a28cbe16b01fc22c2151c9d00a9883d772e178a05daa6469d4b531200cf168b091c1f551282ab8863715f5f4af72c87799ba85c99d6184436858a390e1d'
View cookie_decrypt.rb
View secret_generation.rb
2.2.3 :001 > app_secret_token = 'ea068a28cbe16b01fc22c2151c9d00a9883d772e178a05daa6469d4b531200cf168b091c1f551282ab8863715f5f4af72c87799ba85c99d6184436858a390e1d'
=> "ea068a28cbe16b01fc22c2151c9d00a9883d772e178a05daa6469d4b531200cf168b091c1f551282ab8863715f5f4af72c87799ba85c99d6184436858a390e1d"
2.2.3 :002 > token_hashed = OpenSSL::PKCS5.pbkdf2_hmac_sha1(app_secret_token, 'encrypted cookie', 1000, 64)
=> "Tq\xD0\xA3ua\xFE:8\xA8\xC5\x16\xAD\xD2\x18\xCD\xAC\x10\a\xF9+V\xF2\xECs\xC1T\xA4xN\xB12\xA3vM\b\xE3G\fA\n\xA8$\v>60ji\x97(<4\x1Ej%\xF2\x87\xA9dv??)"
View stripped.cookie
View session.cookie
View config.token
SECRET_TOKEN: 'ea068a28cbe16b01fc22c2151c9d00a9883d772e178a05daa6469d4b531200cf1
68b091c1f551282ab8863715f5f4af72c87799ba85c99d6184436858a390e1d'
You can’t perform that action at this time.