from random import shuffle
print('give me your password')
password = input()
def generator():
g = open('Desktop/COWRIE/passwords.txt', "r")
passwords = g.read().split("\n")
shuffle(passwords)
g.close()
txt = print ('YOUR HONEYPOT IS :','\n')
for i in range(1,20):
passwords[i]
print(passwords[i])
if __name__ == "__main__":
generator()
Did you mean that you wanted to mix the user entered password with another 19 from a file?
from random import shuffle
def generator():
password = input('give me your password: ')
with open('Desktop/COWRIE/passwords.txt', "r") as g:
passwords = g.read().split("\n")
shuffle(passwords)
passwords = passwords[:19]
passwords.append(password)
shuffle(passwords)
print ('YOUR HONEYPOT IS :\n')
for pw in passwords:
print(pw)
if __name__ == "__main__":
generator()