Monday, November 21, 2011

Random Passwort Generator

I would like to share my password generator with you:

Features:

  • set length
  • set possible caracters
    • lowercase
    • uppercase
    • digits
    • special
  • set frequency of different types
  • possibility to validate passwords
    • at least one lowercase letter included
    • at least one uppercase letter included
    • at least one digit included
    • at least one special caracter included
  • generates printable passwords
    • without: Il1oO0"'`
  • generates multiple passwords

Install:

The following commands should work at standard linux intallations:

$ sudo wget -P/usr/bin/ https://pool.umws.de/public/blog/passgen
$ sudo chmod +x passgen

The following commands should work at standard mac intallations:

$ sudo curl https://pool.umws.de/public/blog/passgen -o /opt/local/bin/passgen
$ sudo chmod +x /opt/local/bin/passgen

Otherwise you can download it manually: passgen

When you downloaded the file, you have to give execute permissions to it.

Usage:

Usage: passgen [-options]
where options include:

optiondefault
-N <number>number of generated passwords1
-L <length>length of generated passwords8
-P Falsenot printableTrue
-U <types>set types of possible caracters:
L = lowercase
U = uppercase
D = digit
S = special caracters
LUDS
-T <types>at least on caracter of these types will be included:
L = lowercase
U = uppercase
D = digit
S = special caracters
LUDS
-cL <multiplier>[1-9] multiply chance for lowercase caracters2
-cU <multiplier>[1-9] multiply chance for uppercase caracters2
-cD <multiplier>[1-9] multiply chance for digits2
-cS <multiplier>[1-9] multiply chance for special caracters1
In order to generate secure passwords, I would strongly recommend to change number and length options only!

Examples:

Use default settings:

$ passgen


1 password generated:
--------
fzU6r.qE
--------

Generate 5 passwords with 12 caracters:

$ passgen -L 12 -N 5


5 passwords generated:
------------
.B3Tcw4gGh@|
;X9$XGGkkc$E
7vxUC.5UcxES
T,Je.9_ZVQzA
qw<CJV6aJBmr
------------

Generate password without special caracters:

$ passgen -U LUD


1 password generated:
--------
Na84V5Wi
--------

License:

License: GPLv3

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Tuesday, May 17, 2011

Pure Css Rating

I was looking for a pure css rating template and couldn't find anything.

Here's my solution:

HTML:

<div class="rateBar">
    <a class="r5" href="/rate/5"></a>
    <a class="r4" href="/rate/4"></a>
    <a class="r3" href="/rate/3"></a>
    <a class="r2" href="/rate/2"></a>
    <a class="r1" href="/rate/1"></a>
</div>

CSS:

.rateBar {
    margin: 30px auto;
    width:260px; height:48px;
    background-image:url("rate_off_bg.png");
}

.rateBar a       { height:48px; position: absolute; }
.rateBar a:hover { background-image:url("rate_on.png"); }

.r1 { width: 48px; }
.r2 { width:101px; }
.r3 { width:154px; }
.r4 { width:207px; }
.r5 { width:260px; }

Images:

based on: Crystal Clear (crystal_clear), license: LGPL-2.1
based on: Crystal Clear (crystal_clear), license: LGPL-2.1