Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/j/u/jug-HEAD/examples/decrypt/jugfile.py   jug(Download)
from jug import TaskGenerator
import numpy as np
from itertools import product, chain
from crypt import decode, letters, isgood, preprocess
 
        passwd = np.concatenate([prefix, suffix])
        text = decode(ciphertext, passwd)
        if isgood(text):
            passwd = "".join(map(chr, passwd))
            res.append( (passwd, text) )

src/j/u/jug-HEAD/examples/decrypt/brute.py   jug(Download)
import itertools
from crypt import decode, letters, isgood, preprocess
 
ciphertext = file('secret.msg').read()
ciphertext = preprocess(ciphertext)
 
for p in itertools.product(letters, repeat=5):
    text = decode(ciphertext, p)
    if isgood(text):