View rc4_dec.py
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
# This script can be used for malware samples that used Base64+RC4. | |
# python3 rc4_decrypt.py <key> <base64-ciphertext> | |
import codecs | |
import base64 | |
import sys | |
key = sys.argv[1] | |
c = base64.b64decode(sys.argv[2]) | |
def KSA(key): |