This file contains hidden or 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 pandas as pd | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib.patches as mpatches | |
| import sys | |
| sys.path.append('.') | |
| from core import util | |
| def proxy_exposure_boxplot(): | |
| """ |
This file contains hidden or 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
| from Crypto.Cipher import AES | |
| import base64 | |
| def decrypt(ciphertext, key): | |
| ciphertext = base64.b64decode(ciphertext) | |
| cipher = AES.AESCipher(key, AES.MODE_ECB) | |
| plaintext = cipher.decrypt(ciphertext) | |
| return plaintext | |
| def main(): |
This file contains hidden or 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
| from Crypto.Cipher import AES | |
| import base64 | |
| def pad(msg, blocksize): | |
| padMsg = msg + " "*(blocksize-len(msg)) | |
| return padMsg[0:blocksize] | |
| def encrypt(msg, key): | |
| paddedMsg = pad(msg, 32); | |
| cipher = AES.AESCipher(key, AES.MODE_ECB) |