Answer the question
In order to leave comments, you need to log in
Why doesn't python go through each value of the outer loop?
usernames = open(args['u'].name)
passwords = open(args['p'].name)
#tagret = open(args['t'].name)
payloads_file = open('.\payloads.txt', 'w+')
i = 0
for user in usernames:
for password in passwords:
i = i + 1
payload = user + ':' + password
payload_encoded = str(base64.b64encode(payload.encode('utf_8')).decode('utf_8'))
#payloads_file.write(payload_encoded + '\n')
print (i)
payloads_file.close()
usernames.close()
passwords.close()
Answer the question
In order to leave comments, you need to log in
Indeed, an interesting case.
This loop reads the file line by line to the end, and when it re-enters the second iteration of the outer loop, it does not return a single line.
for line in file:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question