diff --git a/Database.pm b/Database.pm index 8744fe7..bc3ed2c 100644 --- a/Database.pm +++ b/Database.pm @@ -91,7 +91,8 @@ sub create_base { my $dbh = DBI->connect( "dbi:SQLite:dbname=$first_sqlite", "", "" ); print "Create database schema\n"; 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); print "Encrypt database...\n"; diff --git a/Password.pm b/Password.pm index b4570f0..bbfde36 100644 --- a/Password.pm +++ b/Password.pm @@ -62,6 +62,7 @@ sub save { my $resource = $store->{resource}; my $password = $store->{password}; my $generate = $store->{gen}; + # my $username = $store->{username}; if ( $generate == 1 ) { $password = Password->generate(); diff --git a/README.md b/README.md index c82c8ba..a1d7f7b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Simple password manager writed in perl. ## Perl modules - cpan install Module::Name. + cpan install Module::Name 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 +# Changelog + +## 0.0.1-alpha + +* Small fix in GPG.pm +* PM is working. + # TODO +* Username support * Store decrypted DB into RAM not in /tmp/ -* Different keys selection \ No newline at end of file +* Different keys selection diff --git a/pm.pl b/pm.pl index 01574a3..dd632a9 100755 --- a/pm.pl +++ b/pm.pl @@ -17,6 +17,7 @@ Simple password manager writed in Perl. -n [Name of resource] name of resource -w store new password -l [Link] link to resource + -u username -p [Password] password if key not selected PM generate secure password and copy it to xclipboard @@ -44,11 +45,11 @@ EOF } sub init() { - my $opt_string = 'swn:l:p:rhvo'; + my $opt_string = 'swn:l:p:rhvou'; getopts("$opt_string") or usage(); our ( $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: "