linux - How do I use a text file as input in Python? -


this may seem simple question first time have touched python bear me.

i created simple bash script smtp enumeration , have been trying convert python script. bash script was: enter image description here

and far python script have this:

enter image description here

but right now, have type in each username individually once , script closes. have created simple text file bunch of possible usernames , want able use usernames in file instead of typing them in individually 1 one not sure on how that.

with open('users.txt') users:     user in users:         s.send(...) 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -