Exemplo n.º 1
0
def detect_byteXOR(candidates, n=1, verbose=False):
    ngram = N_Gram(n)
    best = max((c for c in candidates),
               key=lambda x: crack_byteXOR(x, ngram)[1])
    if verbose:
        print crack_byteXOR(best, ngram)
    return best
def detect_byteXOR(candidates, n=1, verbose=False):
    ngram = N_Gram(n)
    best = max((c for c in candidates), key=lambda x: crack_byteXOR(x, ngram)[1])
    if verbose:
        print crack_byteXOR(best, ngram)
    return best