import MimeWriter, base64
#
# Writes a multipart mail message: text plus associated graphic
#
mfile = "multimsg.eml"
f = open(mfile, "w")
# Create a MimeWriter
mail = MimeWriter.MimeWriter(f)
mail.addheader("From", "Myeong-hun <mhbaek@kernel.tv")
mail.addheader("To", """My friend1 <linux@kernel.tv>,
My friend2 <mhbaek@korea.com>""")
mail.addheader("Subject", "The Python You Wanted")
mail.addheader("Received", """from thinker [64.134.121.94] by
mail.holdenweb.com
(SMTPD32-6.04) id A244C78500BA; Fri, 09 Mar 2001 07:33:38 -0500""")
# Mail will be multi-part: First part explains format
part1 = mail.startmultipartbody ("mixed")
part1.write("This is a MIME-encoded message, with attachments. "
"If you are seeing this message your mail program probably cannot "
"show you the attachments. Please try another program, or read 'Web "
"Programming in Python' to see the attached picture."
"""
안녕하세요.
이미지 파일 첨부 메일입니다.
""")
# Second part is intended to be read
part2 = mail.nextpart()
f = part2.startbody("text/plain")
f.write("Here we have a multipart message. This "
"means that the message body must be processed "
"as MIME-encoded content where possible [which "
"it clearly is in Outlook Express]."
"""
regards
Your Humble Author
""")
# Third part is a graphic, which we encode in base64
part3 = mail.nextpart()
part3.addheader("Content-Transfer-Encoding", "base64")
f = part3.startbody("image/gif", [["Name", "python.gif"]])
b64 = base64.encodestring(open("pythonwin.gif", "rb").read())
f.write(b64)
# Never forget to call lastpart!
mail.lastpart()
실용적인 디지털 포렌식 기법과 법률 이슈 정리. Linux, UNIX, Python, 임베디드 장치 개발 등의 강좌 수록. Blockchain, FinTech, IoT 등 최신 IT 트렌드와 관련된 취미 자료를 수집하고, 보안 인식 문화 개선을 위한 정보보호 관련 자료와 일상생활 팁들을 소개.
Reentrancy Attack: 블록체인 스마트 컨트랙트의 치명적인 취약점
블록체인 기술이 전 세계적으로 주목받으면서 스마트 컨트랙트(Smart Contract)의 사용이 급격히 증가하고 있습니다. 하지만 그만큼 보안 취약점도 함께 늘어나고 있는데, 그 중에서도 Reentrancy Attack(재진입 공격)은 매우 치명적이고...
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVoSf9jG9Tqh37erdszSR5UGvD95I2vJveHGDirDHYPCrsSxwUohRLDKwhyphenhyphen_LA7nEpIw3DveMT_zmqACnBmnebKTSS9KMRlL3hP3n_C6woK2V_brUXsQtxAOphBXtwyHtqSGIcJV21mGKZhU0KBeH-Rkvth6oJsRhyLtd2oMRV2BCfZ8luCXSTlXY6veK-/w320-h320/Reentrancy%20Attack%20%EB%B8%94%EB%A1%9D%EC%B2%B4%EC%9D%B8%20%EC%8A%A4%EB%A7%88%ED%8A%B8%20%EA%B3%84%EC%95%BD%EC%9D%98%20%EC%B9%98%EB%AA%85%EC%A0%81%20%EC%B7%A8%EC%95%BD%EC%A0%90.webp)
-
뉴스출처 : http://news.naver.com/main/read.nhn?mode=LSD&mid=sec&oid=023&aid=0002991158&sid1=001 내 배우자가 바람을 피우는 것이 확실할까. 심증...
-
PHPSCHOOL ( http://www.phpschool.com ) 국내 1위의 PHP 개발자 커뮤니티 사이트이다. PHP Builder ( http://www.phpbuilder.com ) PHP 최고 사이트라고 해도 과언이 아니며, 새로운 P...