-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bart Busscots
committed
May 19, 2015
1 parent
d296721
commit 81afbbc
Showing
1 changed file
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,52 @@ | ||
xkpasswd.pm | ||
=========== | ||
|
||
A Perl module for generating secure memorable passwords inspired by the fabulous XKCD web comic. This is the library that drives www.xkpasswd.net | ||
A Perl module for generating secure memorable passwords inspired by the Steve Gibson's Password Haystacks and the fabulous XKCD web comic. This is the library that drives www.xkpasswd.net | ||
|
||
* Project Home Page: [www.bartb.ie/xkpasswd](http://www.bartb.ie/xkpasswd) - **please consider making a donation here** | ||
* [Perl POD Documentation](http://bbusschots.github.io/xkpasswd.pm/pod.html) | ||
|
||
This library is provided entirely free of charge under a very liberal free | ||
licence. It has taken a signifficant amount of time to write, and continues to | ||
take time to maintain and update. If you'd like to contribute towards that time | ||
and efford please consider making a donation at the project's home page (linked above). | ||
and effort, please consider making a donation at the project's home page (linked above). | ||
|
||
Quick Install Guide | ||
------------------- | ||
|
||
This guide assumes a Linux/Unix OS (including OS X) with Perl and GIT installed (Mac users will need to install the free XCode developer tools available in the Mac App Store to install GIT) | ||
This module has been packaged for distribution on CPAN, but has not yet been published there. It will appear there shortly. | ||
|
||
$ cd /usr/local/ | ||
$ sudo git clone https://github.com/bbusschots/xkpasswd.pm.git | ||
In the mean time, it can be installed manually as follows (from the root of the GIT project as root): | ||
|
||
perl Build.PL | ||
./Build | ||
./Build test | ||
./Build install | ||
|
||
Perl One-liners | ||
--------------- | ||
|
||
These commands all assume XKPasswd was installed in `/usr/local/xkpasswd.pm/`, if you install it elsewhere, update the path within the commands. | ||
These commands all assume the module has been successfully installed. | ||
|
||
To see a list of defined presets use: | ||
|
||
perl -e 'use lib "/usr/local/xkpasswd.pm/";use XKPasswd; print join ", ", XKPasswd->defined_presets(); print"\n";' | ||
|
||
perl -MCrypt::HSXKPasswd -e 'print join ", ", Crypt::HSXKPasswd->defined_presets(); print"\n";' | ||
To see the details of a preset use a command of the form (replacing `WEB32` with which ever preset you want to view): | ||
|
||
perl -e 'use lib "/usr/local/xkpasswd.pm/";use XKPasswd; my $xkpasswd = XKPasswd->new("/usr/local/xkpasswd.pm/sample_dict.txt", "WEB32"); print $xkpasswd->status();' | ||
|
||
perl -MCrypt::HSXKPasswd -e 'print Crypt::HSXKPasswd->new(preset => "WEB32")->status()."\n";' | ||
To generate a password using a preset you can use a command of the form (replacing `WEB32` with which ever preset you want to view): | ||
|
||
perl -e 'use lib "/usr/local/xkpasswd.pm/";use XKPasswd; print xkpasswd("/usr/local/xkpasswd.pm/sample_dict.txt", "WEB32")."\n";' | ||
perl -MCrypt::HSXKPasswd -e 'print hsxkpasswd(preset => "WEB32")."\n";' | ||
|
||
Sample Perl File | ||
---------------- | ||
|
||
This sample file assumes XKPasswd has been installed in `/usr/local/xkpasswd.pm/`, if you install it elsewhere, update the paths in the script accordingly. | ||
This sample file assumes the module has been successfully installed. | ||
|
||
use lib '/usr/local/xkpasswd.pm/'; | ||
use XKPasswd; | ||
#!/usr/bin/perl | ||
|
||
use Crypt::HSXKPasswd; | ||
|
||
print xkpasswd('/usr/local/xkpasswd.pm/sample_dict.txt', 'WEB32')."\n"; | ||
print hsxkpasswd(preset => 'WEB32')."\n"; |