You've already forked opencryptoki
mirror of
https://github.com/opencryptoki/opencryptoki.git
synced 2026-10-25 17:39:16 +03:00
60 lines
967 B
Bash
Executable File
60 lines
967 B
Bash
Executable File
#!/usr/bin/expect -f
|
|
|
|
set timeout 5
|
|
|
|
spawn pkcsconf -c [lindex $argv 0] -I
|
|
expect "Enter the SO PIN: "
|
|
sleep .1
|
|
send "87654321\r"
|
|
sleep .1
|
|
expect "label: "
|
|
sleep .1
|
|
send "ibmtest\r"
|
|
sleep .1
|
|
expect eof
|
|
|
|
spawn pkcsconf -c [lindex $argv 0] -P
|
|
expect "Enter the SO PIN: "
|
|
sleep .1
|
|
send "87654321\r"
|
|
sleep .1
|
|
expect "Enter the new SO PIN: "
|
|
sleep .1
|
|
send "76543210\r"
|
|
sleep .1
|
|
expect "Re-enter the new SO PIN: "
|
|
sleep .1
|
|
send "76543210\r"
|
|
sleep .1
|
|
expect eof
|
|
|
|
spawn pkcsconf -c [lindex $argv 0] -u
|
|
expect "Enter the SO PIN: "
|
|
sleep .1
|
|
send "76543210\r"
|
|
sleep .1
|
|
expect "Enter the new user PIN: "
|
|
sleep .1
|
|
send "12345678\r"
|
|
sleep .1
|
|
expect "Re-enter the new user PIN: "
|
|
sleep .1
|
|
send "12345678\r"
|
|
sleep .1
|
|
expect eof
|
|
|
|
spawn pkcsconf -c [lindex $argv 0] -p
|
|
expect "Enter user PIN: "
|
|
sleep .1
|
|
send "12345678\r"
|
|
sleep .1
|
|
expect "Enter the new user PIN: "
|
|
sleep .1
|
|
send "01234567\r"
|
|
sleep .1
|
|
expect "Re-enter the new user PIN: "
|
|
sleep .1
|
|
send "01234567\r"
|
|
sleep .1
|
|
expect eof
|