47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
Markdown
46 lines
1.2 KiB
Markdown
---
|
|
name: keepass_generate
|
|
kind: function
|
|
lang: bash
|
|
domain: infra
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "keepass_generate(entry: string, length?: int, username?: string, url?: string) -> string"
|
|
description: "Genera un password aleatorio (lower+upper+digits+special), lo almacena en una entry nueva y lo imprime a stdout. Length default 24."
|
|
tags: [keepass, keepassxc, secret, credential, generate, random, pendiente-usar]
|
|
uses_functions: []
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: "error_go_core"
|
|
imports: []
|
|
params:
|
|
- name: entry
|
|
desc: "path de la entry a crear"
|
|
- name: length
|
|
desc: "longitud del password (default 24)"
|
|
- name: username
|
|
desc: "username opcional"
|
|
- name: url
|
|
desc: "url opcional"
|
|
output: "password generado en texto plano"
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "bash/functions/infra/keepass_generate.sh"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```bash
|
|
source keepass_generate.sh
|
|
pwd=$(keepass_generate "Servers/new-vps" 32 "deploy" "https://vps.example.com")
|
|
echo "Generated: $pwd"
|
|
```
|
|
|
|
## Notas
|
|
|
|
- Genera con `keepassxc-cli generate -l -U -n -s` (lower, upper, numbers, special).
|
|
- Inserta con `keepassxc-cli add -p` reusando la misma sesion.
|
|
- El grupo padre debe existir.
|