[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Add prototype flashproxy-reg-email.



commit b4558607d3c50d45e129c92677b4e7415293776e
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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@xxxxxxxxx", "hoddwee@xxxxxxxxx", """\
+From: hoddwee@xxxxxxxxx
+To: hoddwee@xxxxxxxxx
+Subject: Flash proxy client registration
+
+client=%s
+""" % client_spec)
+smtp.quit()
+
+print "Registered %s." % client_spec



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits