Advertisement
Guest User

Untitled

a guest
Sep 10th, 2008
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. # cat make_account.sh
  2.  
  3.  
  4. #!/bin/sh
  5.  
  6. # Similar to build-key, but protect the private key
  7. # with a password.
  8. export KEY_EXPIRE="365"
  9. export EASY_RSA="${EASY_RSA:-.}"
  10. "$EASY_RSA/pkitool"  --pass $*
  11.  
  12.  
  13.  # cat script.exp|grep -v \#
  14.  
  15. if {$force_conservative} {
  16.         set send_slow {1 .1}
  17.         proc send {ignore arg} {
  18.                 sleep .1
  19.                 exp_send -s -- $arg
  20.         }
  21. }
  22.  
  23.  
  24. set username [lrange $argv 0 0]
  25. set password [lrange $argv 1 1]
  26.  
  27. stty echo
  28.  
  29. set timeout -1
  30. spawn ./make_account.sh $username
  31. match_max 100000
  32. expect  "*rase*"
  33. send -- "$password\r"
  34. expect  "*rase*"
  35. send -- "$password\r"
  36. expect eof
  37.  
  38.  #
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement