Tutors,
I'm working on a script to verify whether a particular website supports
SSLv2 via the following:
--- BEGIN ---
#!/usr/bin/python
import os, re
checkssl_out = open('checkssl.txt','w')
website = 'somewebsitename'
sslv2 = 'Protocol : SSLv2'
print 'Checking:', website
checksslv2 = os.popen('openssl s_client -ssl2 -connect
somewebsitename:443').read().strip()
if re.search(sslv2, checksslv2) == None:
print >> checkssl_out, website, 'does NOT support SSLv2'
else:
print >> checkssl_out, website, 'supports: SSLv2'
checkssl_out.close()
--- END ---
It works, but the problem is that OpenSSL does not automatically
disconnect after end of input. I was curious if there's a way to send a
CTRL-C at the end of the command, so that it *does* capture the output, and
breaks after it. Any suggestions or help is appreciated!
K
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor