Esempio n. 1
0
def test_iteration():
    # xx, xy, xz, ya, yb
    spg = SantaPasswordGenerator("xx")
    assert "xy" == spg.iterate()
    assert "xz" == spg.iterate()
    assert "ya" == spg.iterate()
    assert "yb" == spg.iterate()

    spg = SantaPasswordGenerator("azz")
    assert "baa" == spg.iterate()
Esempio n. 2
0
from pswd import SantaPasswordGenerator, ElfPasswordCheck


spg = SantaPasswordGenerator("hepxcrrq")
while True:
    pwd = spg.iterate()
    if ElfPasswordCheck(pwd):
        print pwd, "VALID"
        break