Simple password generator from terminal

Hello again.

I wanted to get several WPA passwords and test them by trying to hack them for educational purposes.

Since I didn`t want to use an online generator (because when you don`t have a connection they are useless) I though I should have them taken from terminal.

The procedure is simple and it worked. At least for me.

1st open your bash source file
gksudo ~/.bashrc

2nd add this small script

genpasswd() {
    local l=$1
           [ "$l" == "" ] && l=16
          tr -cd 'a-zA-Z0-9\<>!".;:$%&/()=?|@#[]}{'< /dev/urandom | head -c ${l} | xargs

3rd save and exit

4th source it
source ~/.bashrc

and that`s it.

try it by typing
genpasswd 10

to get a password with 10 characters

GL and HF


Popular posts from this blog

Ubuntu 11.04 - Process management (2/6)

Ubuntu 11.04 - Memory management (3/6)

Ubuntu 11.04 - File Systems (5/6)