From 282668e4e8b810092294badc9a10ff34603522c2 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Tue, 7 Jan 2014 15:08:42 -0500 Subject: Give password to curl on stdin Prevents password from appearing in `ps' output for curl. --- hib-dlagent | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hib-dlagent b/hib-dlagent index 1bc2c40..9e61ed2 100755 --- a/hib-dlagent +++ b/hib-dlagent @@ -19,8 +19,9 @@ login() { read -rsp 'Enter Humble account password: ' PASSWORD echo fi - curl -s --cookie-jar "$COOKIE_JAR" \ - --data-urlencode "username=$USERNAME" --data-urlencode "password=$PASSWORD" "$LOGIN_PAGE" + printf '%s' "$PASSWORD" | \ + curl -s --cookie-jar "$COOKIE_JAR" \ + --data-urlencode "username=$USERNAME" --data-urlencode password@- "$LOGIN_PAGE" } discover_url() { -- cgit v1.2.3-54-g00ecf