This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os,sys | |
import pefile | |
import struct | |
import zipfile | |
import hashlib | |
import StringIO | |
from Crypto import Random | |
from Crypto.PublicKey import RSA | |
from Crypto.Cipher import PKCS1_v1_5,AES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE: HTTP SSL keys are all in PEM format (base64 encoded) | |
#From PEM format to DER | |
openssl x509 -in $1.crt -out $1.der -outform DER | |
#From DER format to PEM | |
openssl x509 -in $1.der -inform DER -out $1.pem -outform PEM | |
#Transforming RSA key to DER format | |
openssl rsa -in oberon.key -inform PEM -out oberon_key.der -outform DER |