username support. Start
This commit is contained in:
parent
1c26ccdcc3
commit
c2b787df8e
@ -91,7 +91,8 @@ sub create_base {
|
|||||||
my $dbh = DBI->connect( "dbi:SQLite:dbname=$first_sqlite", "", "" );
|
my $dbh = DBI->connect( "dbi:SQLite:dbname=$first_sqlite", "", "" );
|
||||||
print "Create database schema\n";
|
print "Create database schema\n";
|
||||||
my $q_table
|
my $q_table
|
||||||
= "create table passwords(name VARCHAR(32), resource TEXT, password TEXT)";
|
= "create table passwords(name VARCHAR(32), username VARCHAR(32),
|
||||||
|
resource TEXT, password TEXT)";
|
||||||
$dbh->do($q_table);
|
$dbh->do($q_table);
|
||||||
|
|
||||||
print "Encrypt database...\n";
|
print "Encrypt database...\n";
|
||||||
|
@ -62,6 +62,7 @@ sub save {
|
|||||||
my $resource = $store->{resource};
|
my $resource = $store->{resource};
|
||||||
my $password = $store->{password};
|
my $password = $store->{password};
|
||||||
my $generate = $store->{gen};
|
my $generate = $store->{gen};
|
||||||
|
# my $username = $store->{username};
|
||||||
|
|
||||||
if ( $generate == 1 ) {
|
if ( $generate == 1 ) {
|
||||||
$password = Password->generate();
|
$password = Password->generate();
|
||||||
|
12
README.md
12
README.md
@ -7,7 +7,7 @@ Simple password manager writed in perl.
|
|||||||
|
|
||||||
## Perl modules
|
## Perl modules
|
||||||
|
|
||||||
cpan install Module::Name.
|
cpan install Module::Name
|
||||||
|
|
||||||
Not recommended. Please use you package manager.
|
Not recommended. Please use you package manager.
|
||||||
|
|
||||||
@ -23,7 +23,15 @@ On Debian-based systems:
|
|||||||
apt-get install libtext-clip-perl class-dbi-sqlite-perl
|
apt-get install libtext-clip-perl class-dbi-sqlite-perl
|
||||||
|
|
||||||
|
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 0.0.1-alpha
|
||||||
|
|
||||||
|
* Small fix in GPG.pm
|
||||||
|
* PM is working.
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
* Username support
|
||||||
* Store decrypted DB into RAM not in /tmp/
|
* Store decrypted DB into RAM not in /tmp/
|
||||||
* Different keys selection
|
* Different keys selection
|
||||||
|
5
pm.pl
5
pm.pl
@ -17,6 +17,7 @@ Simple password manager writed in Perl.
|
|||||||
-n [Name of resource] name of resource
|
-n [Name of resource] name of resource
|
||||||
-w store new password
|
-w store new password
|
||||||
-l [Link] link to resource
|
-l [Link] link to resource
|
||||||
|
-u username
|
||||||
-p [Password] password
|
-p [Password] password
|
||||||
if key not selected PM generate secure password
|
if key not selected PM generate secure password
|
||||||
and copy it to xclipboard
|
and copy it to xclipboard
|
||||||
@ -44,11 +45,11 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub init() {
|
sub init() {
|
||||||
my $opt_string = 'swn:l:p:rhvo';
|
my $opt_string = 'swn:l:p:rhvou';
|
||||||
getopts("$opt_string") or usage();
|
getopts("$opt_string") or usage();
|
||||||
our (
|
our (
|
||||||
$opt_s, $opt_w, $opt_n, $opt_r, $opt_l,
|
$opt_s, $opt_w, $opt_n, $opt_r, $opt_l,
|
||||||
$opt_p, $opt_h, $opt_v, $opt_o
|
$opt_p, $opt_h, $opt_v, $opt_o, $opt_u
|
||||||
);
|
);
|
||||||
|
|
||||||
print "Simple password manager writed in Perl.\nVersion: "
|
print "Simple password manager writed in Perl.\nVersion: "
|
||||||
|
Loading…
Reference in New Issue
Block a user