sign.sh 327 B

1234567891011121314
  1. #!/usr/bin/expect
  2. set key [lindex $argv 0]
  3. set from [lindex $argv 1]
  4. set to [lindex $argv 2]
  5. set alias [lindex $argv 3]
  6. set password [lindex $argv 4]
  7. set sign_in_path [lindex $argv 5]
  8. spawn "$sign_in_path" "$key" "$from" "$to" "$alias"
  9. expect "输入密钥库的口令短语: "
  10. set timeout 300
  11. send "${password}\n"
  12. interact