【问题标题】:How to stop password visibile on ps while using curl如何在使用 curl 时停止在电脑上显示密码
【发布时间】:2015-03-19 23:45:34
【问题描述】:

我目前正在使用,

curl -u ${username}:${password} --output /dev/null ${url} 

我相信通过这种方法密码将在 ps 树中可见。有什么方法可以避免这种情况吗?

【问题讨论】:

  • 很遗憾,由于我无法分享的原因,我不应该使用 NETRC

标签: linux unix curl


【解决方案1】:

-u 的内容不能通过 ps 看到,但请记住你的历史文件。 一般来说,你应该避免在参数中使用密码!

如果您投反对票.. 最好说明原因:

运行 curl -u user:password nopaste.info/login

`--> ps 辅助 | grep 卷曲 t4c 30540 0.0 0.0 103516 2668 pts/5 S+ 13:12 0:00 curl -u nopaste.info/login

如您所见,没有附加 -u 输出。

【讨论】:

    猜你喜欢
    • 2016-05-08
    • 2012-05-17
    • 2018-05-02
    • 2013-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-03
    • 1970-01-01
    相关资源
    最近更新 更多