PM/Usage.pm

63 lines
1.6 KiB
Perl
Raw Permalink Normal View History

2014-05-12 15:41:05 +04:00
package Usage;
sub new {
my $class = shift;
my $self = {};
bless $self, $class;
return $self;
}
sub show() {
print STDERR << "EOF";
Simple password manager writed in Perl.
-s show password
-n [Name of resource] name of resource
2016-04-28 17:13:59 +03:00
-g [Group name] group name
2014-05-12 15:41:05 +04:00
-w store new password
-l [Link] link to resource
-u username
2014-05-12 17:16:10 +04:00
-c comment
2014-05-12 15:41:05 +04:00
-p [Password] password
if key not selected PM generate secure password
and copy it to xclipboard
2016-05-04 15:23:55 +03:00
-e [number] Password length(with length [number] if mentioned)
2014-05-12 15:41:05 +04:00
-r remove password
-i password ID
-o open link
2014-05-13 17:57:14 +04:00
-x [filename] export
2016-05-01 16:27:28 +03:00
-b [filename] import database
2014-05-12 15:41:05 +04:00
-h show this help screen and exit
-v show version info and exit
Examples:
Show all names and resources:
\tpm.pl -s -n all
2016-04-28 17:13:59 +03:00
Show all names in group:
\tpm.pl -s -g work
2014-05-12 15:41:05 +04:00
Copy password for resource:
\tpm.pl -s -n LOR
\tPassword copied to xclipboard.\n\t\tURI is http://linux.org.ru/
Copy password and open link:
\tpm.pl -s -n LOR -o
\tPassword copied to clipboard. Trying to open uri.
Store new password:
2014-05-12 17:16:10 +04:00
\tpm.pl -w -n PRON -l http://superpronsite.com/ -p my_secret_password -c 'Most viewed site'
2014-05-12 15:41:05 +04:00
\tPassword for resource PRON is stored into DB!
Remove password:
\tpm.pl -r -i 13
\tPassword was removed!
EOF
exit 1;
}
1;