두 개의 txt 파일에서 사용자 이름과 암호를 가져 오는 스크립트가 있습니다. 내 문제는 각 사용자에게 목록의 모든 암호를 시도하도록 지정하는 방법입니다. 내 스크립트는 지금까지 이와 같이 보입니다.사용자에게 여러 암호를 할당하는 방법
[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
이 내가 실현하려 노력하고 무엇 :
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
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 개의 암호를 모두 사용합니다. –