5 ms·
Is there no 'curl http://example.com/script.sh http://example.com/script.sh | sh' equivalent for windows? It's really popular among the typical js/ruby/mongodb
by lcswi 11y ago
Is there no 'curl http://example.com/script.sh http://example.com/script.sh | sh' equivalent for windows? It's really popular among the typical js/ruby/mongodb crowd so I guess it is safe and secure.
- jholman 11y agoYou might have been joking, or you might have been serious. If you were joking, my reply is for the benefit of readers other than yourself. Aside from the obvious risks of downloading and immediately executing internet code, which are indeed risks but of course we all accept them on a regular basis... ... and aside from the mildly more subtle risks that the HTTP server is doing something sinister, e.g. with browser-agent, and so you're not getting the code you think you're getting... ... even aside from these issues, curl-and-pipe-to-sh is dangerous because of its failure modes. https://www.seancassidy.me/dont-pipe-to-your-shell.html https://www.seancassidy.me/dont-pipe-to-your-shell.html
- lcswi 11y agoI was sarcastic, thanks for that great link!
- lmz 11y agoYou're joking, but of course there is such an equivalent. See instructions on https://chocolatey.org/ https://chocolatey.org/ for an example.
- mkup 11y agoThere's no curl in default Windows installation, but "bitsadmin.exe /transfer" can do pretty much the same, and the shell (cmd.exe) has been around since Windows 95. So, actually, yes, but unfortunately without a pipe.