diff options
author | Joursoir <chat@joursoir.net> | 2021-03-01 11:09:38 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-03-01 11:09:38 +0000 |
commit | 5833a6c3cf690154c86f308943d29e7a16eb7a00 (patch) | |
tree | 816f180f3bcb0792def9ba7bb409b93047a7334d | |
parent | 791acae6546f6c366cb79a1beddf917a7a3d41c4 (diff) | |
download | lock-password-5833a6c3cf690154c86f308943d29e7a16eb7a00.tar.gz lock-password-5833a6c3cf690154c86f308943d29e7a16eb7a00.tar.bz2 lock-password-5833a6c3cf690154c86f308943d29e7a16eb7a00.zip |
update doc and makefilev1.1a
-rwxr-xr-x | Makefile | 2 | ||||
-rw-r--r-- | README.md | 145 | ||||
-rw-r--r-- | man/lpass.1 | 52 | ||||
-rw-r--r-- | src/constants.h | 4 | ||||
-rw-r--r-- | src/main.c | 2 |
5 files changed, 40 insertions, 165 deletions
@@ -24,7 +24,7 @@ $(EXECUTABLE): $(OBJECTS) install: all @echo installing files to $(PREFIX) - @install $(EXECUTABLE) $(PREFIX) && chmod 755 $(PREFIX)/$(EXECUTABLE) + @install -m 755 -v $(EXECUTABLE) $(PREFIX) @echo installing man page @cat $(MAN_SOURCES) | gzip > $(MAN_OBJECTS) @install $(MAN_OBJECTS) $(MAN_PATH) @@ -1,37 +1,30 @@ # LockPassword -a simple terminal password manager, using GnuPG to encrypt passwords. The application positions itself as open-source software. Distributed under the Unlicense license. +a simple terminal password manager, using GnuPG to encrypt passwords. Distributed under the GNU General Public License, version 3. ## Dependencies: -The following dependencies must be installed for work: -* tree -* gpg -* gcc - -P.S: these can be installed using the package manager such as `pacman`, `apt`, `yum` etc. +* GnuPG +* [GPGME](gnupg.org/software/gpgme/) - GnuPG high-level crypto API ## Installation: Run the next commands: ``` -git clone https://github.com/Joursoir/lockpassword make sudo make install ``` ## Synopsis: -lpass [command] [arguments] ... +lpass [command] [options] ## Commands: ### init *gpg-key* Initialize the password manager using the passed *gpg-key* as the encryption key. This command must be run first before you start working with LockPassword. ### insert [**-e, --echo**] [**-c, --copy**] [**-f, --force**] *passname* Add the specified *passname* to the password manager. The password will be read interactively using standard input, character display is hidden. The **-e, --echo** argument enable the show of characters when typing a password; **-c, --copy** write password to clipboard; **-f, --force** ignore exist of *passname*, overwrites it without prompt. -### edit [**-t, --text-editor=text-editor**] *passname* -Open the specified *passname* in a text editor, waiting for changes. Standard text editor - vim, argument **-t, --text-editor = text-editor** allow you to change it. ### generate [**-l, --length=pass-length**] [**-c, --copy**] [**-f, --force**] *passname* Generate a random password and write it in *passname*. The **-l, --length = pass-length** argument allow you to specify the desired password length. Without this argument, a 14 character password will be generated. **-c, --copy** write password to clipboard; **-f, --force** ignore exist of *passname*, overwrites it without prompt. -### mv/move [**-f, --force**] *old-path* *new-path* +### mv [**-f, --force**] *old-path* *new-path* Move/rename *old-path* to *new-path*. *old-path* must be an exist file, *new-path* can be a file/directory. The **-f, --force** argument ignore exist of *new-path* (if it's a file), overwrites it without prompt. -### rm/remove/delete *passname* +### rm *passname* Remove the *passname* you specified from the password manager. If the directories where your *passname* was nested became empty after deletion, then they are also deleted. ### help Print help information about commands and the application itself. @@ -41,19 +34,17 @@ Print information about the version, release date, and license of the applicatio ## Guide: * Initialize the password manager: ``` -[joursoir@archlin ~]$ lpass init joursoir@github.com -mkdir: created directory '/home/joursoir/.lock-password/' -LockPassword initialized successfully +$ lpass init joursoir@joursoir.net +LockPassword initialized for joursoir@joursoir.net ``` ``` -[joursoir@archlin ~]$ lpass init 3BC3B37774696574B0F1C7D47B411E35F4F03E49 -mkdir: created directory '/home/joursoir/.lock-password/' -LockPassword initialized successfully +$ lpass init 3BC3B37774696574B0F1C7D47B411E35F4F03E49 +LockPassword initialized for 3BC3B37774696574B0F1C7D47B411E35F4F03E49 ``` * Add password in the password manager: ``` -[joursoir@archlin ~]$ lpass insert games/chess/user +$ lpass insert games/chess/user Please type your new password: [invisible input] Please type your new password again: [invisible input] Password added successfully for games/chess/user @@ -61,7 +52,7 @@ Password added successfully for games/chess/user * Print a list of exists password: ``` -[joursoir@archlin ~]$ lpass +$ lpass Password Manager |-- banks | |-- abankpro @@ -76,7 +67,7 @@ Password Manager * Print a list of exists password in some directory: ``` -[joursoir@archlin ~]$ lpass banks +$ lpass banks Password Manager/banks |-- abankpro | `-- phone_number @@ -86,122 +77,18 @@ Password Manager/banks * Show password: ``` -[joursoir@archlin ~]$ lpass games/iko/LordOfNight +$ lpass games/iko/LordOfNight helloitismypassword123 ``` * Copy password to clipboard: ``` -[joursoir@archlin ~]$ lpass -c games/iko/LordOfNight +$ lpass -c games/iko/LordOfNight ``` * Generate password: ``` -[joursoir@archlin ~]$ lpass generate bank/sbank/phone_number +$ lpass generate bank/sbank/phone_number Generated password: NsNu:+^Re(cshW Password added successfully for bank/sbank/phone_number ``` - -# LockPassword - -простой терминальный менеджер паролей, использующий GnuPG для шифрования паролей. Приложение позиционирует себя, как открытое программное обеспечение. Распространяется под лицензией Unlicense. - -## Зависимости: -Для работы приложения необходимо установить следующие зависимости: -* tree -* gpg -* gcc - -P.S: их можно установить с помощью пакет менеджеров, таких как `pacman`, `apt`, `yum` и другие. - -## Установка: -Выполните следующие команды: -``` -git clone https://github.com/Joursoir/lockpassword -make -sudo make install -``` - -## Синтаксис: -lpass [command] [arguments] ... - -## Команды: -### init *gpg-key* -Инициализирует менеджер паролей, в качестве ключа шифрования использует переданный *gpg-key*. Это команда должна быть запущена самой первой, перед тем как вы начнете работу с LockPassword. -### insert [**-e, --echo**] [**-c, --copy**] [**-f, --force**] *passname* -Добавляет указанный *passname* в менеджер паролей. Пароль будет считан в интерактивном режиме, с помощью стандартного потока ввода данных, отображение символов скрыто. Аргумент **-e, --echo** позволяет включить отображение символов при вводе пароля; **-c, --copy** записывает пароль в буфер обмена; **-f, --force** игнорирует наличие существующего *passname*, перезаписывает его не спрашивая. -### edit [**-t, --text-editor=text-editor**] *passname* -Открывает указанный *passname* в текстовом редакторе, ожидая изменений. Стандартный текстовый редактор - vim, аргумент **-t, --text-editor=text-editor** позволяет сменить его. -### generate [**-l, --length=pass-length**] [**-c, --copy**] [**-f, --force**] *passname* -Генерирует случайный пароль и записывает его в *passname*. Аргумент **-l, --length=pass-length** позволяет указать желаемую длину пароля. Без данного аргумента будет сгенерирован пароль длиной 14 символов. Аргумент **-c, --copy** записывает пароль в буфер обмена; **-f, --force** игнорирует наличие существующего *passname*, перезаписывает его не спрашивая. -### mv/move [**-f, --force**] *old-path* *new-path* -Передвигает/переименовывает *old-path* в *new-path*. *old-path* обязательно должен быть существующим файлом, *new-path* может быть файлом/директорией. Аргумент **-f, --force** игнорирует наличие существующего *new-path* (если это файл), перезаписывает его не спрашивая. -### rm/remove/delete *passname* -Удаляет указанный вами *passname* из менеджера паролей. Если директории, куда был вложен ваш *passname* после удаления стали пусты, то они тоже удаляются. -### help -Выводит справочную информацию о командах и самом приложении. -### version -Выводит информацию о версии, дате выпуска и лицензии приложения. - -## Гайд: -* Инициализация менеджера паролей: -``` -[joursoir@archlin ~]$ lpass init joursoir@github.com -mkdir: created directory '/home/joursoir/.lock-password/' -LockPassword initialized successfully -``` -``` -[joursoir@archlin ~]$ lpass init 3BC3B37774696574B0F1C7D47B411E35F4F03E49 -mkdir: created directory '/home/joursoir/.lock-password/' -LockPassword initialized successfully -``` - -* Добавить пароль в менеджер паролей: -``` -[joursoir@archlin ~]$ lpass insert games/chess/user -Please type your new password: [невидимый ввод текста] -Please type your new password again: [невидимый ввод текста] -Password added successfully for games/chess/user -``` - -* Вывести список существующих паролей: -``` -[joursoir@archlin ~]$ lpass -Password Manager -|-- banks -| |-- abankpro -| | `-- phone_number -| `-- ubank -| `-- phone_number -`-- games - `-- chess - |-- site.com - `-- user -``` - -* Вывести список существующих паролей в какой-либо директории: -``` -[joursoir@archlin ~]$ lpass banks -Password Manager/banks -|-- abankpro -| `-- phone_number -`-- ubank - `-- phone_number -``` - -* Показать пароль: -``` -[joursoir@archlin ~]$ lpass games/iko/LordOfNight -helloitismypassword123 -``` - -* Скопировать пароль в буфер обмена: -``` -[joursoir@archlin ~]$ lpass -c games/iko/LordOfNight -``` - -* Сгенерировать пароль: -``` -[joursoir@archlin ~]$ lpass generate bank/sbank/phone_number -Generated password: NsNu:+^Re(cshW -Password added successfully for bank/sbank/phone_number -```
\ No newline at end of file diff --git a/man/lpass.1 b/man/lpass.1 index febc865..81d4237 100644 --- a/man/lpass.1 +++ b/man/lpass.1 @@ -1,13 +1,13 @@ -.TH "LPASS" "1" "14\ \&JANUARY\ \&2021" "LPASS v1.0c" "LockPassword" +.TH "LPASS" "1" "1\ \&MARCH\ \&2021" "LPASS v1.1a" "LockPassword" .SH "NAME" LockPassword - a password manager. .SH "SYNOPSIS" -\fBlpass\fR [\fBcommand\fR] [\fBarguments\fR] ... +\fBlpass\fR [command] [options] .SH "DESCRIPTION" -\fBlpass\fR \- a simple terminal password manager, using GnuPG to encrypt passwords. The application positions itself as open-source software. Distributed under the Unlicense license. +\fBlpass\fR - a simple terminal password manager, using GnuPG to encrypt passwords. .SH "COMMANDS" \fBinit \fIgpg-key\fR @@ -16,31 +16,25 @@ Initialize the password manager using the passed \fIgpg-key\fR as the encryption .RE .PP -\fBinsert\fR [\fB-e, --echo\fR] [\fB-c, --copy\fR] [\fB-f, --force\fR] \fIpassname\fR +\fBinsert\fR [-e, --echo] [-c, --copy] [-f, --force] \fIpassname\fR .RS 4 Add the specified \fIpassname\fR to the password manager. The password will be read interactively using standard input, character display is hidden. The \fB-e, --echo\fR argument enable the show of characters when typing a password; \fB-c, --copy\fR write password to clipboard; \fB-f, --force\fR ignore exist of \fIpassname\fR, overwrites it without prompt. .RE .PP -\fBedit\fR [\fB-t, --text-editor=text-editor\fR] \fIpassname\fR -.RS 4 -Open the specified \fIpassname\fR in a text editor, waiting for changes. Standard text editor - vim, argument \fB-t, --text-editor = text-editor\fR allow you to change it. -.RE -.PP - -\fBgenerate\fR [\fB-l, --length=pass-length\fB] [\fB-c, --copy\fR] [\fB-f, --force\fR] \fIpassname\fR +\fBgenerate\fR [-l, --length=pass-length] [-c, --copy] [-f, --force] \fIpassname\fR .RS 4 Generate a random password and write it in \fIpassname\fR. The \fB-l, --length = pass-length\fR argument allow you to specify the desired password length. Without this argument, a 14 character password will be generated. \fB-c, --copy\fR write password to clipboard; \fB-f, --force\fR ignore exist of \fIpassname\fR, overwrites it without prompt. .RE .PP -\fBmv/move\R [\fB-f, --force\fR] \fIold-path\R \fInew-path\fR +\fBmv\fR [-f, --force] \fIold-path new-path\fR .RS 4 Move/rename \fIold-path\fR to \fInew-path\fR. \fIold-path\fR must be an exist file, \fInew-path\fR can be a file/directory. The \fB-f, --force\fR argument ignore exist of \fInew-path\fR (if it's a file), overwrites it without prompt. .RE .PP -\fBrm/remove/delete \fIpassname\fR +\fBrm \fIpassname\fR .RS 4 Remove the \fIpassname\fR you specified from the password manager. If the directories where your \fIpassname\fR was nested became empty after deletion, then they are also deleted. .RE @@ -61,17 +55,16 @@ Print information about the version, release date, and license of the applicatio .SH "EXAMPLES" Initialize the password manager: .RS 4 -\fB[joursoir@archlin ~]$ lpass init joursoir@github.com\fR +\fB$ lpass init joursoir@joursoir.net\fR .br -mkdir: created directory '/home/joursoir/.lock-password/'R +LockPassword initialized for joursoir@joursoir.net .br -LockPassword initialized successfully .RE .PP Add password in the password manager: .RS 4 -\fB[joursoir@archlin ~]$ lpass insert games/chess/user\fR +\fB$ lpass insert games/chess/user\fR .br Please type your new password: [invisible input] .br @@ -83,7 +76,7 @@ Password added successfully for games/chess/user Print a list of exists password: .RS 4 -\fB[joursoir@archlin ~]$ lpass\fR +\fB$ lpass\fR .br Password Manager .br @@ -109,7 +102,7 @@ Password Manager Print a list of exists password in some directory: .RS 4 -\fB[joursoir@archlin ~]$ lpass banks\fR +\fB$ lpass banks\fR .br Password Manager/banks .br @@ -125,7 +118,7 @@ Password Manager/banks Show password: .RS 4 -\fB[joursoir@archlin ~]$ lpass games/iko/LordOfNight\fR +\fB$ lpass games/iko/LordOfNight\fR .br helloitismypassword123 .RE @@ -133,13 +126,13 @@ helloitismypassword123 Copy password to clipboard: .RS 4 -\fB[joursoir@archlin ~]$ lpass -c games/iko/LordOfNight +\fB$ lpass -c games/iko/LordOfNight .RE .PP Generate password: .RS 4 -\fB[joursoir@archlin ~]$ lpass generate bank/sbank/phone_number\fR +\fB$ lpass generate bank/sbank/phone_number\fR .br Generated password: NsNu:+^Re(cshW .br @@ -147,14 +140,9 @@ Password added successfully for bank/sbank/phone_number .RE .PP -.SH "AUTHOR" -Code was written by Joursoir - .SH "COPYING" -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. - -In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file +Copyright (C) 2020-2021 Aleksandr D. Goncharov (Joursoir) +.br +License: GNU GPL version 3 +.br +This is free software: you are free to change and redistribute it. This program comes with ABSOLUTELY NO WARRANTY. diff --git a/src/constants.h b/src/constants.h index 22c18c2..1df4898 100644 --- a/src/constants.h +++ b/src/constants.h @@ -19,8 +19,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ***/ -#define VERSION "1.0c" -#define DATE_RELEASE "14 January, 2021" +#define VERSION "1.1a" +#define DATE_RELEASE "1 March, 2021" #define LOCKPASS_DIR ".lock-password/" #define GPGKEY_FILE ".gpg-key" @@ -396,7 +396,7 @@ int cmd_version(int argc, char *argv[]) { printf("LockPassword v%s\n" "Release date: %s\n\n" - "Copyright (C) 2020-2021 Aleksandr D. Goncharov\n" + "Copyright (C) 2020-2021 Aleksandr D. Goncharov (Joursoir)\n" "License: GNU GPL version 3\n" "This is free software: you are free to change and redistribute it.\n" "This program comes with ABSOLUTELY NO WARRANTY.\n", |