mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 17:20:57 +01:00
Merge pull request #805 from dcooper16/client_sim_ssl2_server
Client simulation and SSLv2 servers
This commit is contained in:
commit
eeda1ef684
13
testssl.sh
13
testssl.sh
@ -3488,8 +3488,10 @@ client_simulation_sockets() {
|
|||||||
tls_hello_ascii=$(hexdump -v -e '16/1 "%02X"' "$SOCK_REPLY_FILE")
|
tls_hello_ascii=$(hexdump -v -e '16/1 "%02X"' "$SOCK_REPLY_FILE")
|
||||||
tls_hello_ascii="${tls_hello_ascii%%[!0-9A-F]*}"
|
tls_hello_ascii="${tls_hello_ascii%%[!0-9A-F]*}"
|
||||||
|
|
||||||
|
if [[ "${tls_hello_ascii:0:1}" != "8" ]]; then
|
||||||
check_tls_serverhellodone "$tls_hello_ascii"
|
check_tls_serverhellodone "$tls_hello_ascii"
|
||||||
hello_done=$?
|
hello_done=$?
|
||||||
|
fi
|
||||||
|
|
||||||
for(( 1 ; hello_done==1; 1 )); do
|
for(( 1 ; hello_done==1; 1 )); do
|
||||||
sock_reply_file2=${SOCK_REPLY_FILE}.2
|
sock_reply_file2=${SOCK_REPLY_FILE}.2
|
||||||
@ -3526,6 +3528,16 @@ client_simulation_sockets() {
|
|||||||
hexdump -C $SOCK_REPLY_FILE | head -6
|
hexdump -C $SOCK_REPLY_FILE | head -6
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
if [[ "${tls_hello_ascii:0:1}" == "8" ]]; then
|
||||||
|
parse_sslv2_serverhello "$SOCK_REPLY_FILE" "false"
|
||||||
|
if [[ $? -eq 3 ]] && [[ "$V2_HELLO_CIPHERSPEC_LENGTH" -ne 0 ]]; then
|
||||||
|
echo "Protocol : SSLv2" > "$TEMPDIR/$NODEIP.parse_tls_serverhello.txt"
|
||||||
|
DETECTED_TLS_VERSION="0200"
|
||||||
|
ret=0
|
||||||
|
else
|
||||||
|
ret=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
parse_tls_serverhello "$tls_hello_ascii" "ephemeralkey" "$cipher_list_2send"
|
parse_tls_serverhello "$tls_hello_ascii" "ephemeralkey" "$cipher_list_2send"
|
||||||
save=$?
|
save=$?
|
||||||
|
|
||||||
@ -3551,6 +3563,7 @@ client_simulation_sockets() {
|
|||||||
ret=0
|
ret=0
|
||||||
fi
|
fi
|
||||||
debugme tmln_out
|
debugme tmln_out
|
||||||
|
fi
|
||||||
|
|
||||||
close_socket
|
close_socket
|
||||||
TMPFILE=$SOCK_REPLY_FILE
|
TMPFILE=$SOCK_REPLY_FILE
|
||||||
|
Loading…
Reference in New Issue
Block a user