mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Extract cipher suites from SSLv2 ClientHello
This commit is contained in:
parent
91927e0f59
commit
c370f2359b
18
testssl.sh
18
testssl.sh
@ -3446,12 +3446,18 @@ client_simulation_sockets() {
|
|||||||
for (( i=0; i < len; i=i+2 )); do
|
for (( i=0; i < len; i=i+2 )); do
|
||||||
data+=", ${clienthello:i:2}"
|
data+=", ${clienthello:i:2}"
|
||||||
done
|
done
|
||||||
# Extact list of cipher suites
|
if [[ "${1:0:4}" == "1603" ]]; then
|
||||||
sid_len=4*$(hex2dec "${data:174:2}")
|
# Extact list of cipher suites from SSLv3 or later ClientHello
|
||||||
offset1=178+$sid_len
|
sid_len=4*$(hex2dec "${data:174:2}")
|
||||||
offset2=182+$sid_len
|
offset1=178+$sid_len
|
||||||
len=4*$(hex2dec "${data:offset1:2}${data:offset2:2}")-2
|
offset2=182+$sid_len
|
||||||
offset1=186+$sid_len
|
len=4*$(hex2dec "${data:offset1:2}${data:offset2:2}")-2
|
||||||
|
offset1=186+$sid_len
|
||||||
|
else
|
||||||
|
# Extact list of cipher suites from SSLv2 ClientHello
|
||||||
|
offset1=46
|
||||||
|
len=4*$(hex2dec "${data:26:2}")-2
|
||||||
|
fi
|
||||||
code2network "$(tolower "${data:offset1:len}")" # convert CIPHER_SUITES to a "standardized" format
|
code2network "$(tolower "${data:offset1:len}")" # convert CIPHER_SUITES to a "standardized" format
|
||||||
cipher_list_2send="$NW_STR"
|
cipher_list_2send="$NW_STR"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user