Not able to get full output as need to give input GET / or enter in between command execution(interactive mode).
Output : New, TLSv1.2, Cipher is AES128-SHA256 Server public key is 2048 bit Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : AES128-SHA256 Session-ID: 5054E5886B691DDC3020D84F85F97E4A439AC51999141AB05FB22EC2F7EAA533 Session-ID-ctx: Master-Key: 5B13A9AEBBCA9C014D36E831C9319ABE0FF5009ED4CE584E8BFE3FAC18EAD1B49E4FF164826F06AA6323105B3B72BA20 PSK identity: None PSK identity hint: None SRP username: None Start Time: 1576061327 Timeout : 7200 (sec) Verify return code: 0 (ok)
Extended master secret: no
then need to give enter to get:
HTTP/1.1 301 Moved Permanently Connection: Close Location: http://192.168.1.110
http://192.168.1.110 ">
This page requires higher encryption. Please click here to continue
closed
cmd = r"openssl s_client -connect site.com:8080 -CAfile C:\\Users\\dbansal\\Desktop\\dad_hacks\\client_auth\\two_level_rootCA.pem
-cert client_1024.crt.pem -key client_1024.key.pem -cipher AES128-SHA256"
import subprocess
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
import time
time.sleep(4)
p.terminate()
out, err = p.communicate()
out = out.decode()