News for hackers. Stuff that matters.
Re:LeakedIn by sjs on Wednesday June 06, 2012 @04:17PM (#4075964)
Or call shasum or sha1sum and input your password on stdin so your shell history doesn't contain your password in plain text.
Re:LeakedIn by corin_ on Wednesday June 06, 2012 @04:27PM (#4076019)
Just pop a space at the beginning and it won't go into shell history.
Re:LeakedIn by eridius on Wednesday June 06, 2012 @05:10PM (#4076246)
It does for me

  >  echo test
  test
  > history
  ...
  6730   echo test
  6731  history
Re:LeakedIn by corin_ on Wednesday June 06, 2012 @05:53PM (#4076407)
Set this in your .bashrc

  HISTCONTROL=ignorespace
Or even better, though unrelated to this topic... Also get it to ignore duplicates that come next to each other.

  HISTCONTROL=ignoredups:ignorespace
Re:LeakedIn by tomku on Wednesday June 06, 2012 @06:05PM (#4076454)
That's a bash-ism that's controlled by the $HISTCONTROL environment variable, not universally-applicable advice. $HISTCONTROL set to "ignorespace" or "ignoreboth" may or may not be the default, depending on your distribution.
Re:LeakedIn by corin_ on Wednesday June 06, 2012 @06:07PM (#4076460)
Yeah already replied below specifying that - I was under the impression that it's default to on in most distros, but don't actually have a clue which do/don't.
Re:LeakedIn by ibotty on Wednesday June 06, 2012 @06:12PM (#4076479)
it will still be in ps output for a short while...
Re:LeakedIn by sjs on Wednesday June 06, 2012 @08:03PM (#4076846)
Ultra paranoid. I like the way you think.
Re:LeakedIn by mhluongo on Thursday June 07, 2012 @12:20AM (#4077590)

    python -c 'import hashlib; from getpass import getpass; s = hashlib.sha1(); s.update(getpass()); print s.hexdigest()'
Re:LeakedIn by ibotty on Wednesday June 06, 2012 @06:11PM (#4076473)
how do you get rid of the carriage return as last char that way?
Re:LeakedIn by sjs on Wednesday June 06, 2012 @08:02PM (#4076839)
Use Ctrl-d to end input without hitting return and you shouldn't get a newline.
Re:LeakedIn by Peaker on Thursday June 07, 2012 @06:34AM (#4078311)
bash, at least, only handles Ctrl-d on its own line.
Re:LeakedIn by 1zq on Thursday June 07, 2012 @08:45AM (#4078689)
If you're not on a new line, you can type Ctrl-d twice.