addded bash pwd generator
This commit is contained in:
parent
240151ecee
commit
1ae2c4c40b
57
content/posts/2024/bash/password-generator.md
Normal file
57
content/posts/2024/bash/password-generator.md
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
title: "🔑 Генератор паролей в виде однострочника на Bash"
|
||||
date: 2024-08-17T22:33:12+03:00
|
||||
draft: false
|
||||
tags: [linux, tips, security]
|
||||
---
|
||||
|
||||
Пост [Cyrus](https://stackoverflow.com/a/44377013) на **SoF**.
|
||||
|
||||
Команда:
|
||||
|
||||
```sh
|
||||
tr -dc 'A-Za-z0-9!?%=' < /dev/urandom | head -c 20
|
||||
```
|
||||
|
||||
Выхлоп:
|
||||
|
||||
```text
|
||||
7sixuvfqbFRAj4g=3v7Y
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Другие варианты
|
||||
|
||||
### OpenSSL
|
||||
|
||||
Команда:
|
||||
|
||||
```sh
|
||||
openssl rand -base64 20
|
||||
```
|
||||
|
||||
Выхлоп:
|
||||
|
||||
```text
|
||||
c+EtG4VK/0JLR6tWrneAlP4bHmQ=
|
||||
```
|
||||
|
||||
|
||||
### Версия Cyrus с улучшенной энтопией
|
||||
|
||||
```sh
|
||||
for i in $(seq 1 5); do echo $(tr -dc 'A-Za-z0-9!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~' < /dev/urandom | head -c 20); done
|
||||
```
|
||||
|
||||
```text
|
||||
Q@2^u\U3.:%|{yGY@SMl
|
||||
T8WVte55AggJ{WxElqDi
|
||||
vG%+Gr"jp#x@f46YBj>m
|
||||
|>Wd,|S>w)jwe|:))eLU
|
||||
m`nSde+o,:vn\1JpJ1j3
|
||||
```
|
||||
|
||||
## Дополнительно
|
||||
|
||||
Пожалуй добавлю в `alias`.
|
Loading…
Reference in New Issue
Block a user