Skip to content

Commit

Permalink
Added tool extracting secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Feb 12, 2024
1 parent 1e87dd0 commit efad487
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions user/workstation/user/home/.local/bin/get-secret.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# next, replace spaces with underscores
URL="${1// /_}"
# now, clean out anything that's not alphanumeric or an underscore
URL="${URL//[^a-zA-Z0-9_:/]/}"

SECRET="${2// /_}"
SECRET="${SECRET//[^A-Z0-9_]/}"

printf "url=${URL}\nusername=${SECRET}\n" | git-credential-keepassxc get --json | jq -r ".password"

0 comments on commit efad487

Please sign in to comment.