mirror of
https://github.com/sunknudsen/privacy-guides.git
synced 2025-02-23 09:13:56 +00:00
28 lines
419 B
Plaintext
28 lines
419 B
Plaintext
#!/usr/bin/expect
|
|
|
|
spawn qr-restore.sh --images $short_hash.jpg
|
|
|
|
expect {
|
|
-re {\[sudo\] password for pi:} {
|
|
test_send "$env(password)\r"
|
|
}
|
|
}
|
|
|
|
expect {
|
|
-re {Please type passphrase and press enter} {
|
|
test_send "$passphrase\r"
|
|
}
|
|
}
|
|
|
|
expect {
|
|
-re {Show secret \(y or n\)\?} {
|
|
test_send "y\r"
|
|
}
|
|
}
|
|
|
|
expect {
|
|
-re {Secret:\r\n((.|\r\n)+?)\r\nDone} {
|
|
set restored_secret $expect_out(1,string)
|
|
}
|
|
}
|