[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] * Adding TLS handshake script from anonymous contributor. :D
commit b31d3dbc2f72f46175466dfb5e7d7a94781e5a31
Author: Hackerberry Finn <hackerberry@xxxxx>
Date: Fri Nov 2 04:18:06 2012 +0000
* Adding TLS handshake script from anonymous contributor. :D
---
ooni/tls-handshake.py | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/ooni/tls-handshake.py b/ooni/tls-handshake.py
new file mode 100644
index 0000000..eba950e
--- /dev/null
+++ b/ooni/tls-handshake.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+import subprocess
+from subprocess import PIPE
+serverport = "129.21.124.215:443"
+# a subset of those from firefox
+ciphers = [
+ "ECDHE-ECDSA-AES256-SHA",
+ "ECDHE-RSA-AES256-SHA",
+ "DHE-RSA-CAMELLIA256-SHA",
+ "DHE-DSS-CAMELLIA256-SHA",
+ "DHE-RSA-AES256-SHA",
+ "DHE-DSS-AES256-SHA",
+ "ECDH-ECDSA-AES256-CBC-SHA",
+ "ECDH-RSA-AES256-CBC-SHA",
+ "CAMELLIA256-SHA",
+ "AES256-SHA",
+ "ECDHE-ECDSA-RC4-SHA",
+ "ECDHE-ECDSA-AES128-SHA",
+ "ECDHE-RSA-RC4-SHA",
+ "ECDHE-RSA-AES128-SHA",
+ "DHE-RSA-CAMELLIA128-SHA",
+ "DHE-DSS-CAMELLIA128-SHA"
+]
+def checkBridgeConnection(host, port)
+ cipher_arg = ":".join(ciphers)
+ cmd = ["openssl", "s_client", "-connect", "%s:%s" % (host,port)]
+ cmd += ["-cipher", cipher_arg]
+ proc = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE,stdin=PIPE)
+ out, error = proc.communicate()
+ success = "Cipher is DHE-RSA-AES256-SHA" in out
+ return success
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits