我有一個腳本正在從兩個txt文件中獲取用戶名和密碼。我的問題是我如何分配每個用戶來嘗試列表中的所有密碼。我的腳本看起來像這樣到目前爲止。如何爲用戶分配多個密碼
user = open ('users.txt' , 'r')
password = open ('password.txt' , 'r')
for file1, file2 in zip (user, password):
print ('{0}\t{1}'.format(file1.strip(), file2.strip()))
這是爲我的輸出:
[email protected] Password1
[email protected] Password2
[email protected] Password3
[email protected] Password4
[email protected] Password5
[email protected] Password6
[email protected] Password7
[email protected] Password8
[email protected] Password9
[email protected] Password10
這是我想才達到:
[email protected] "Password1
Password2
Password3
Password4
Password5
Password6
Password7
Password8
Password9
Password10"
[email protected] "Password1
Password2
Password3
Password4
Password5
Password6
Password7
Password8
Password9
Password10"
,並回到獲取用戶2,並得到所有10個密碼。
'我如何分配每個用戶來嘗試所有密碼'。用適當的英語,這意味着什麼? –
如何獲得[email protected]使用所有10個密碼。然後一旦完成,下一個用戶2使用所有10個密碼直到最後一個用戶。 –