I need to send some data to SSL command (openssl.exe) used to calculate SHA1 code of a small string.
Well, if I use:
Code: Select all
echo MyStringToCheck|openssl sha1
In fact when I use the following code:
Code: Select all
local p
set the hideConsoleWindows to false
put "openssl.exe " into p
open process p for text update
write "sha1 myPassword" & linefeed to process p
read from process p until linefeed in 3 seconds
answer it
close process p
kill process p
mypassword: no such file or directory.
It seems openssl read myPassword as a file name (if you use openssl from command line, you need to supply a filename. For example: openssl.exe sha1 c:\myfilename.txt).
My problem is OPEN PROCESS seems to work differently from standard pipes and ECHO command: echo ..... | ......
Can you help me or give me some hints to solve this problem?
Thank you!