《http权威指南》读书笔记 五
2015-05-06 13:01
162 查看
系统环境cengos6.2,需要装expect
脚本如下:
#!/usr/bin/expect
set smtp smtp.qq.com
set user ******* #**代表QQ号吗经过base64加密过的值
set pass ******* #**代表密码经过base64加密过的值
set from 986870231@qq.com
set to 986870231@qq.com
set title think
set content fuck
spawn telnet $smtp 25
expect "220"
send "helo root\r"
expect "250"
send "auth login\r"
expect "334"
send "$user\r"
expect "334"
send "$pass\r"
expect "235"
send "MAIL FROM: <$from>\r"
expect "250"
send "RCPT TO: <$to>\r"
expect "250"
send "DATA\r"
expect "354"
send "TO: $to\r"
send "FROM: $from\r"
send "SUBJECT: $title\r"
send "\r"
send "$content\r"
send ".\r"
expect "250"
send "QUIT"
本文出自 “B0UNDLESS” 博客,请务必保留此出处http://b0undless.blog.51cto.com/7409864/1264152
脚本如下:
#!/usr/bin/expect
set smtp smtp.qq.com
set user ******* #**代表QQ号吗经过base64加密过的值
set pass ******* #**代表密码经过base64加密过的值
set from 986870231@qq.com
set to 986870231@qq.com
set title think
set content fuck
spawn telnet $smtp 25
expect "220"
send "helo root\r"
expect "250"
send "auth login\r"
expect "334"
send "$user\r"
expect "334"
send "$pass\r"
expect "235"
send "MAIL FROM: <$from>\r"
expect "250"
send "RCPT TO: <$to>\r"
expect "250"
send "DATA\r"
expect "354"
send "TO: $to\r"
send "FROM: $from\r"
send "SUBJECT: $title\r"
send "\r"
send "$content\r"
send ".\r"
expect "250"
send "QUIT"
本文出自 “B0UNDLESS” 博客,请务必保留此出处http://b0undless.blog.51cto.com/7409864/1264152
相关文章推荐
- 《HTTP权威指南》读书笔记:缓存
- 《HTTP权威指南》读书笔记-第1章
- 《HTTP权威指南》读书笔记(一)
- 《HTTP权威指南》读书笔记
- 读书笔记(HTTP权威指南)002 -- HTTP报文
- 《HTTP权威指南》读书笔记-前言
- 《HTTP权威指南》读书笔记---说明
- 《HTTP权威指南》读书笔记---集成点
- 《http权威指南》读书笔记 七
- IT-http-读书笔记--《http权威指南》
- 《http权威指南》读书笔记 四
- 《http权威指南》读书笔记 八
- 《HTTP权威指南》读书笔记---TCP/IP
- 《HTTP权威指南》读书笔记
- 【读书笔记】《HTTP权威指南》:Web Hosting
- <HTTP权威指南>读书笔记 ---- Web服务器