use cURL to get an MD5 value of a string that I have previously passed (% STR%).
This works fine, but as soon as there are spaces in %STR%
, the code no longer works.
If I put the URL and %STR%
in "" nothing works anymore.
Can you help me?
set STR=anystr
set CURL=C:\curl\bin\curl.exe
set MD5URL=https://anyurl.com/md5.php?hash=%STR%
for /F %%I in ('%CURL% -s %MD5URL%') do set HASH=%%I
echo HASH
pause