summaryrefslogtreecommitdiff
path: root/hib-dlagent
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2014-01-07 15:08:42 -0500
committerDevin J. Pohly <djpohly@gmail.com>2014-01-07 15:08:42 -0500
commit282668e4e8b810092294badc9a10ff34603522c2 (patch)
tree330dd453621aa74699062543cafca5d823110902 /hib-dlagent
parenta5381fae09a7d56d96839a3992a045aff64821ba (diff)
downloadhib-dlagent-282668e4e8b810092294badc9a10ff34603522c2.tar.gz
hib-dlagent-282668e4e8b810092294badc9a10ff34603522c2.zip
Give password to curl on stdin
Prevents password from appearing in `ps' output for curl.
Diffstat (limited to 'hib-dlagent')
-rwxr-xr-xhib-dlagent5
1 files 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() {