Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- import gmail
- f = open("Bridges.txt", "a+")
- emails = {
- "email1@gmail.com":"password"
- "email2@gmail.com":"password",
- "email3@gmail.com":"password",
- "email4@gmail.com":"password",
- "email5@gmail.com":"password",
- "email6@gmail.com":"password",
- "email7@gmail.com":"password",
- }
- for gmail_user, gmail_password in emails.iteritems():
- sent_from = gmail_user
- to = ['bridges@bridges.torproject.org']
- subject = ''
- body = 'get transport obfs4'
- email_text = """\
- From: %s
- To: %s
- Subject: %s
- %s
- """ % (sent_from, ", ".join(to), subject, body)
- server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
- server.ehlo()
- server.login(gmail_user, gmail_password)
- server.sendmail(sent_from, to, email_text)
- server.close()
- g = gmail.login(gmail_user, gmail_password)
- email = g.inbox().mail(unread=True, sender="bridges@torproject.org")
- while len (email) < 1:
- email = g.inbox().mail(unread=True, sender="bridges@torproject.org")
- email = email[0]
- response = email.fetch()
- for item in str(response).split("Here are your bridges:")[1].split("To enter bridges into Tor Browser,")[0].split("\r\n"):
- f.write(item.strip() + "\r\n")
- email.read()
- g.logout()
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement