Beispiel #1
0
 def test_generate_1_max_domain(self):
     pg = PasswordGenerator(length=1,
                            numbers=True,
                            symbols=True,
                            lowercase=True,
                            uppercase=True)
     p = pg.generate()
     self.assertTrue(p in pg.getMaxDomain())
Beispiel #2
0
pgen4 = PasswordGenerator(
    length=1,
    symbols=False,
    numbers=True,
    uppercase=False,
    lowercase=False)

password = pgen4.generate()
#print(len(pgen4.NUMBERS+pgen4.LOWER_CASE+pgen4.UPPER_CASE+pgen4.SYMBOLS))
#print(pgen4.NUMBERS+pgen4.LOWER_CASE+pgen4.UPPER_CASE+pgen4.SYMBOLS)

print("password: "******""
found = False

print(pgen4.getStrength())

exit()

while found == False:
    # Max base is 92, the len of 5479231608oyjbwsqzimtalrfnvudgcxphkePGWUCZNXEOKVJYHAQMIDLTSFRB'?[^)&|:{/%@!`$}=,+;(]_\-#*."~
    for j in pgen4.getMaxDomain():
        if password == guess + j:
            print("Guessed it! : " + guess + j)
            found = True
    
#    done = time.time()
#    elapsed = done - start
#    print("{} : {}".format(i*j, elapsed))