4 ms·
This is powerful stuff, but I can't help feeling like it's adding unnecessary bloat to an already-enormously complicated command. What is the advantage of:
by oneeyedpigeon 2y ago
This is powerful stuff, but I can't help feeling like it's adding unnecessary bloat to an already-enormously complicated command. What is the advantage of:
curl --variable "pwd@secret;[0-31]" \
--expand-user daniel:{{pwd}} \
https://example.com/
over, e.g.
curl --user daniel:`command-to-fetch-password` \
https://example.com/
? That command may be as simple as an existing one, like cut.
- rubenv 2y agoThe latter one shows your password in the process listing.
- LetMeLogin 2y agoFirst one will show how to get it :D
- skywhopper 2y ago… which is not accessible to as many users as the process list is.
- b112 2y agoAnd can often be passed in bash via a filehandle, without a file.
- bandie91 2y ago`mount /proc -o hidepid=1` recommended :)
- skywhopper 2y agoNot all places you might run curl allow for shell tricks like process substitution or perhaps for subprocesses at all.
- djbsbdb 2y agoThe main benefit seems to be context dependent quoting which is tricky to get right and in most cases (like in your example) omitted completely