-1

I am testing tls renegotiation using this "for" loop and need to auto-answer with "R" for each iteration, I expected one of these permutations to work, neither of these is working, grateful for any suggestions

for ((i=0;i<10;i++)) 
do
"R" > echo `openssl s_client -connect 192.168.1.1:443`
done

for ((i=0;i<10;i++)) do echo openssl s_client -connect 192.168.1.1:443 < "R" done

ilkkachu
  • 138,973

1 Answers1

0

First will not work because bash expect R to be command

Seconds will work if you send this R to the command (not to the echo):

openssl s_client -connect 192.168.1.1:443 <<< "R"

This form < will not work because it expect on the right side to be file.

Romeo Ninov
  • 17,484