我有一个密码蛮力,它可以处理三个字母,但我必须分别输入所有三个字母。有没有办法让它成为可能,这样我就可以同时把这三个都放进去?我将单词转换为其ancii代码,并将1添加到测试变量中,该变量与密码进行比较。 我的守则如下:
def bruteforce(pw1, pw2, pw3):
test1 = 64
pwo1 = ord(pw1)
test2 = 64
pwo2 = ord(pw2)
test3 = 64
pwo3 = ord(pw3)
while(test1 != pwo1):
test1 += 1
while(test2 != pwo2):
test2 += 1
while(test3 != pwo3):
test3 += 1
print("The password is " + chr(pwo1) + chr(pwo2) + chr(pwo3))
我尝试的是将字符串转换为列表,并将“单词”拆分为字符。这对我不起作用,至少我无法在线找到解释如何将字符串中的字符输出到单个参数/变量中
这是一个简单的版本,我与颜色
相关问题 更多 >
编程相关推荐