예제 #1
0
파일: encrypt.py 프로젝트: shivanshc/Server
def extract(stego_file, key, printoutput=False):
    # Decode from file (comment the first two lines to use the output from before)
    f = open(stego_file)
    out = string_to_binary(f.read())
    full = binary_to_string(decode(out))
    decrypted = decrypt_and_decompress(full.split('EOStegF')[0], key)
    if(printoutput):
        try:
            print decrypted
        except:
            output(decrypted, 'extracted.txt')
    return decrypted
예제 #2
0
파일: FiSi.py 프로젝트: ehennenfent/Server
def extract(stego_file, key, offset=0, printoutput=False):
    # Decode from file (comment the first two lines to use the output from before)
    f = open(stego_file)
    full = f.read()
    audio = full.split('EOMp3F')[0]
    hashy = md5.new()
    hashy.update(audio)
    hashy = hashy.digest()
    ciphertext = full.split(hashy)[1]
    decrypted = decrypt_and_decompress(ciphertext, key)
    if(printoutput):
        try:
            print decrypted
        except:
            output(decrypted, 'extracted.txt')
    return decrypted