Small fix

This commit is contained in:
Difrex(Denis Zheleztsov) 2014-04-28 16:43:00 +04:00
parent 167cad4b92
commit 7552e70081
3 changed files with 15 additions and 14 deletions

View File

@ -51,7 +51,7 @@ sub show {
my $q_hash = $db_class->mdo($mdo_q); my $q_hash = $db_class->mdo($mdo_q);
# Remove unencrypted file # Remove unencrypted file
@rm_cmd = ( "rm", "$dec_db_file" ); my @rm_cmd = ( "rm", "-f", "$dec_db_file" );
system(@rm_cmd) == 0 or die "Cannot remove unencrypted database! $!\n"; system(@rm_cmd) == 0 or die "Cannot remove unencrypted database! $!\n";
return $q_hash; return $q_hash;

25
pm.pl
View File

@ -3,7 +3,7 @@
use Password; use Password;
use Getopt::Std; use Getopt::Std;
our $VERSION = '0.0.0c'; our $VERSION = '0.0.0d';
# Debug # Debug
use Data::Dumper; use Data::Dumper;
@ -12,22 +12,23 @@ sub usage() {
print STDERR << "EOF"; print STDERR << "EOF";
Simple password manager writed in Perl. Simple password manager writed in Perl.
Usage: -s show password
-s -- Show password -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 -p [Password] password
-p [Password] -- Password if key not selected PM generate secure password
-r -- Remove password and copy it to xclipboard
-o -- Open link -r remove password
-h -- Show this help screen and exit -o open link
-v -- Show version info and exit -h show this help screen and exit
-v show version info and exit
Examples: Examples:
Show password for resource: Show password for resource:
\tpm.pl -s -n LOR \tpm.pl -s -n LOR
\tPassword copied to xclipboard.\n\t\tLink is http://linux.org.ru/ \tPassword copied to xclipboard.\n\t\tURI is http://linux.org.ru/
Store new password: Store new password:
\tpm.pl -w -n PRON -l http://superpronsite.com/ -p my_secret_password \tpm.pl -w -n PRON -l http://superpronsite.com/ -p my_secret_password