예제 #1
0
파일: xor.py 프로젝트: mbisson7/CSC323
def msg_decrypt(hex_string):
    val = 0
    for val in range(256):
        res = string_xor(encoding.hex_to_ascii(hex_string), chr(val))
        #print res
        if ioc(res) == 0.7674065588930:
            print res
            print ioc(res)
            return 1
        # figure out frequency of characters
    return 0
예제 #2
0
파일: xor.py 프로젝트: mbisson7/CSC323
def msg_decrypt(hex_string):
    val = 0
    for val in range(256):
        res = string_xor(encoding.hex_to_ascii(hex_string), chr(val))
        #print res
        if ioc(res) == 0.7674065588930:
            print res
            print ioc(res)  
            return 1
        # figure out frequency of characters        
    return 0
예제 #3
0
def msg_decrypt(hex_string):
    val = 0
    for val in range(256):
        res = string_xor(encoding.hex_to_ascii(hex_string), chr(val))
        print res