Skip to content

Instantly share code, notes, and snippets.

@yamanyar
Created April 7, 2012 05:07
Show Gist options
  • Save yamanyar/2325418 to your computer and use it in GitHub Desktop.
Save yamanyar/2325418 to your computer and use it in GitHub Desktop.
resolving in python
#!/usr/bin/python
# Rewrite URL Script for Secure Web Issue
# author: Kaan Yamanyar
from Crypto.Cipher import DES
from datetime import datetime, timedelta
import sys
import re
import base64
def parseToken(str):
cipher = DES.new('oldhouse',DES.MODE_CFB, 'houseold')
resolved=cipher.decrypt(base64.b64decode(str))
return resolved
#... code goes on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment