📄 encryptedpw.sh
字号:
#!/bin/bash# Example "ex72.sh" modified to use encrypted password.# Note that this is still rather insecure,#+ since the decrypted password is sent in the clear.# Use something like "ssh" if this is a concern.E_BADARGS=65if [ -z "$1" ]then echo "Usage: `basename $0` filename" exit $E_BADARGSfi Username=bozo # Change to suit.pword=/home/bozo/secret/password_encrypted.file# File containing encrypted password.Filename=`basename $1` # Strips pathname out of file name.Server="XXX"Directory="YYY" # Change above to actual server name & directory.Password=`cruft <$pword` # Decrypt password.# Uses the author's own "cruft" file encryption package,#+ based on the classic "onetime pad" algorithm,#+ and obtainable from:#+ Primary-site: ftp://ibiblio.org/pub/Linux/utils/file#+ cruft-0.2.tar.gz [16k]ftp -n $Server <<End-Of-Sessionuser $Username $Passwordbinarybellcd $Directoryput $FilenamebyeEnd-Of-Session# -n option to "ftp" disables auto-logon.# Note that "bell" rings 'bell' after each file transfer.exit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -