From 7552e700817c84e0d4b69aaae8237b41cea1bc92 Mon Sep 17 00:00:00 2001 From: "Difrex(Denis Zheleztsov)" Date: Mon, 28 Apr 2014 16:43:00 +0400 Subject: [PATCH] Small fix --- AUTHORS | 2 +- Password.pm | 2 +- pm.pl | 25 +++++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/AUTHORS b/AUTHORS index ac56141..2789be8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,3 @@ Denis a.k.a Difrex Zheleztsov mailto://difrex.punk@gmail.com/ -copyleft 2014 \ No newline at end of file +copyleft 2014 diff --git a/Password.pm b/Password.pm index 0c6bc98..ca2216e 100644 --- a/Password.pm +++ b/Password.pm @@ -51,7 +51,7 @@ sub show { my $q_hash = $db_class->mdo($mdo_q); # 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"; return $q_hash; diff --git a/pm.pl b/pm.pl index 671168d..192f4a5 100755 --- a/pm.pl +++ b/pm.pl @@ -3,7 +3,7 @@ use Password; use Getopt::Std; -our $VERSION = '0.0.0c'; +our $VERSION = '0.0.0d'; # Debug use Data::Dumper; @@ -12,22 +12,23 @@ sub usage() { print STDERR << "EOF"; Simple password manager writed in Perl. -Usage: - -s -- Show password - -n [Name of resource] -- Name of resource - -w -- Store new password - -l [Link] -- Link to resource - -p [Password] -- Password - -r -- Remove password - -o -- Open link - -h -- Show this help screen and exit - -v -- Show version info and exit + -s show password + -n [Name of resource] name of resource + -w store new password + -l [Link] link to resource + -p [Password] password + if key not selected PM generate secure password + and copy it to xclipboard + -r remove password + -o open link + -h show this help screen and exit + -v show version info and exit Examples: Show password for resource: \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: \tpm.pl -w -n PRON -l http://superpronsite.com/ -p my_secret_password