⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmail

📁 des算法的一种升级算法
💻
字号:

# cmail - a virtual mailer for sending secret mail
#
# To send secret mail, envoke as you normally envoke mail.
#
# To receive mail, run your normal mailer and when you receive secret
# mail, send the message to cmail as follows:
#
#   s | cmail
#
# Note: the s| feature does not exist in the Berkely mailer.
#
# In both cases, you will be prompted for an encryption key.
# 
# NOTE: mail cleartext will appear in a temporory file which is
#       readable only by you or the super user during the time that you 
#       are editing the message. 
#
encr=cipher
decr=decipher
btoa=btoa	
atob=atob
mail=mailx				# Change for your mailer.
edit=vi					# Change for your editor.
tmp=$HOME/.Sm$$				# temp file
#
umask 077				# Secure for temp files.
if [ $# -eq 0 ]				# If envoked with no arguments,
then					# just invert the process.
   $atob | $decr | uncompress -n
else					# If sending mail...
   trap "mv $tmp $home/smail.$$" 1 2 3 	# If killed.
   rm -f $tmp				# Kill the temp file if it exists.
   if tty -s				# if interactive, fork an editor.
   then					# Here is where the cleartext is!
      $edit $tmp
   else					# Otherwise just cat the input into
      cat >$tmp				# the tempfile.
   fi
   if [ -s $tmp ] 			# If file is not empty, send it.
   then 				# Much handwaving for quoted stuff.
      echo cat $tmp \| compress -n \| $encr \| $btoa \| $mail `(for i do
	 echo \'$i\'
      done)` \; rm $tmp | exec sh 	# note the EXEC!
   fi					# NOT EXECUTED!
fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -