代码之家  ›  专栏  ›  技术社区  ›  Ray

向ps或who隐藏argv上的密码

  •  1
  • Ray  · 技术社区  · 17 年前

    所以我正在努力隐藏密码 ps -aux w

    我使用rlwrap和sqlplus,连接方式如下:

    rlwrap sqlplus user/pass@connect_identifier

    who 列表。

    有人知道我如何使其不显示密码吗?

    2 回复  |  直到 17 年前
        1
  •  2
  •   DaveR    17 年前

    (无耻地窃取答案 here )

    rlwrap sqlplus internal @/path/to/script
    

    /path/to/script 包含 connect user/pass@connect_identifier

        2
  •  1
  •   mark4o    17 年前

    ps 您可以使用一个通常称为 setproctitle() various other implementations 当然,如果你这样做,那么在你更改之前,还有一段时间其他用户可以看到原始参数。