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
%20for a valid URL. By the way: Use your favorite www search engine withcertutil md5as search term and you can find pages describing how to use%SystemRoot%\System32\certutil.exeto get the MD5 sum for a file or a string. See also Stack Overflow certutil md5 search results.