Re:6.5 Million LinkedIn Password Hashes Leaked
by olifante on Wednesday June 06, 2012 @12:30PM
(#4074712)
Prefix the whole command with a space to avoid dumping your password into your bash history:
" grep `echo -n yourpassword | shasum | cut -c6-40` SHA1.txt"
[ Parent
| on HN ]
Re:6.5 Million LinkedIn Password Hashes Leaked
by prakashk on Wednesday June 06, 2012 @12:49PM
(#4074804)
Only if HISTCONTROL is assigned 'ignoreboth' or 'ignorespace'.
Re:6.5 Million LinkedIn Password Hashes Leaked
by unfletch on Wednesday June 06, 2012 @03:06PM
(#4075562)
Or prompt for it:
grep `read -sp "password: "; echo "$REPLY" | tr -d "\n" | shasum | cut -c6-40` hacked.txt
Re:6.5 Million LinkedIn Password Hashes Leaked
by rasengan on Wednesday June 06, 2012 @01:44PM
(#4075079)
I couldn't really find a good reason to use a .bash_history. I linked mine to /dev/null and never looked back. (heh)
Re:6.5 Million LinkedIn Password Hashes Leaked
by pbhjpbhj on Wednesday June 06, 2012 @03:57PM
(#4075852)
Ctrl+r history search? I'd tend to maintaining a complete history log so that when I've forgotten the one liner I used to rotate my videos 2 years ago I can easily recall it.
Re:6.5 Million LinkedIn Password Hashes Leaked
by verself on Wednesday June 06, 2012 @11:04PM
(#4077406)
2 years? Just how big is your history file?
I thought 16k entries might be reasonable but that doesn't even last 3 weeks for me. I think there might have been some issue with slow disk seeks so at some point I restricted it to that many.
I guess it probably it would be better to regularly backup the history file to deal with possible some accidental truncations and issues when running multiple shells concurrently, but probably the overall effort to set up such a system would outweight the benefits.
Re:6.5 Million LinkedIn Password Hashes Leaked
by uselessuseof on Wednesday June 06, 2012 @06:05PM
(#4076455)
export HISTSIZE=0
Re:6.5 Million LinkedIn Password Hashes Leaked
by peterwwillis on Wednesday June 06, 2012 @02:01PM
(#4075162)
Alternative and more dramatic method of preventing it being written to your bash history:
kill -9 $$
Re:6.5 Million LinkedIn Password Hashes Leaked
by bmnbug on Wednesday June 06, 2012 @04:03PM
(#4075890)
kill -9 -1 is better than kill -9 $$
Re:6.5 Million LinkedIn Password Hashes Leaked
by alanh on Thursday June 07, 2012 @12:19AM
(#4077585)
How so?
Re:6.5 Million LinkedIn Password Hashes Leaked
by mcpherrinm on Thursday June 07, 2012 @02:18AM
(#4077837)
That post was a troll. -1 is a special PID: It indicates that all processes that you can kill should be.
Kill -9 -1 as root is a surefire way to make a system stop doing anything, fast.