Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- clip() {
- # sync clipboards
- xclip -o | xclip -sel clip
- # print to stdout
- xclip -o
- }
- audioSource() {
- # record 1 second of audio
- arecord -d 1 /tmp/rand.wav
- }
- hmac() {
- # hmac of audio with random key -> base64 32
- hmac256 --binary $(openssl rand --base64 32) /tmp/rand.wav | base64 | cut -c 1-32 | xclip
- }
- clean() {
- # cleanup
- rm /tmp/rand.wav
- }
- main() {
- audioSource
- hmac
- clip
- clean
- }
- main
Add Comment
Please, Sign In to add comment