commit b4558607d3c50d45e129c92677b4e7415293776e Author: David Fifield david@bamsoftware.com Date: Tue Sep 11 00:19:17 2012 -0700
Add prototype flashproxy-reg-email. --- flashproxy-reg-email | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/flashproxy-reg-email b/flashproxy-reg-email new file mode 100755 index 0000000..09cd1ea --- /dev/null +++ b/flashproxy-reg-email @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +import re +import smtplib +import sys + +smtp = smtplib.SMTP("gmail-smtp-in.l.google.com.", 25, "[127.0.0.1]") +smtp.set_debuglevel(1) +smtp.starttls() + +# Grep the EHLO response for our public IP address. +smtp.ehlo() +m = re.search(r'at your service, [([0-9a-fA-F.:]+)]', smtp.ehlo_resp) +if not m: + print >> sys.stderr, "Could not determine external IP address." + sys.exit(1) +client_spec = m.group(1) + +smtp.sendmail("hoddwee@gmail.com", "hoddwee@gmail.com", """\ +From: hoddwee@gmail.com +To: hoddwee@gmail.com +Subject: Flash proxy client registration + +client=%s +""" % client_spec) +smtp.quit() + +print "Registered %s." % client_spec
tor-commits@lists.torproject.org