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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -