{"id":444,"date":"2009-03-08T22:07:12","date_gmt":"2009-03-08T13:07:12","guid":{"rendered":"http:\/\/randt.jp\/?p=444"},"modified":"2009-03-08T22:07:12","modified_gmt":"2009-03-08T13:07:12","slug":"received%e8%a7%a3%e6%9e%90-python%e3%81%a7","status":"publish","type":"post","link":"https:\/\/randt.jp\/?p=444","title":{"rendered":"Received\u89e3\u6790 python\u3067"},"content":{"rendered":"<p>python\u306e\u6b63\u898f\u8868\u73fe\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3001\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u5185\u306b\u3042\u308bReceived\u304b\u3089\u60c5\u5831\u3092\u53d6\u3063\u3066\u307f\u308b\u3002<\/p>\n<p>from &#8230;. by\u306e\u9593\u306b\u3001HELO\u3001\u9006\u5f15\u304d\u540d\u3001IP\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3067\u304d\u308b\u3002<\/p>\n<pre>\n$ python\nPython 2.5.2 (r252:60911, Oct  5 2008, 19:24:49)\n[GCC 4.3.2] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> f = open('.\/MAIL\/trash\/1189','rb')\n>>> data = f.read()\n>>> import email\n>>> import feedparser\n>>> import re\n>>> p = email.Parser.FeedParser(email.message.Message)\n>>> p.feed(data)\n>>> pc = p.close()\n>>> for item in pc.items():\n...     a = re.match(r'^from (.*)((.*)[(.*)].*', re.sub('n','',item[1]))\n...     if a != None:\n...             a.groups()\n...     a = re.match(r'^from (.*)(HELO (.*)).*((.*)).*', re.sub('n','',item[1]))\n...     if a != None:\n...             a.groups()\n...\n('10.236.62.152 (EHLO opEXCC02.tp.gk.corp.tepenet) ', '', '10.236.62.152')\n('OPEXCV08.tp.gk.corp.tepenet ', '', '10.236.62.25')\n<\/pre>\n<p>\u305d\u308c\u3089\u3057\u304d\u5024\u304c\u53d6\u308c\u3066\u3044\u308b\u3051\u3069\u3001\u3082\u3061\u3063\u3068\u8003\u3048\u306a\u3044\u3068\u4f7f\u3048\u306a\u3044\u3002\u4eca\u65e5\u306f\u3053\u3053\u307e\u3067\u3002\u3075\u3045\u3002<\/p>\n<p>\u53c2\u8003\u30b5\u30a4\u30c8<\/p>\n<ul>\n<li><a href=\"http:\/\/www.gabacho-net.jp\/whims\/whim0156.html\">Becky!\u3067\u30b9\u30d1\u30e0\u30e1\u30fc\u30eb\u3092\u81ea\u52d5\u7684\u306b90%\u4ee5\u4e0a\u6368\u3066\u308b\u65b9\u6cd5<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>python\u306e\u6b63\u898f\u8868\u73fe\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u3001\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u5185\u306b\u3042\u308bReceived\u304b\u3089\u60c5\u5831\u3092\u53d6\u3063\u3066\u307f\u308b\u3002 from &#8230;. by\u306e\u9593\u306b\u3001HELO\u3001\u9006\u5f15\u304d\u540d\u3001IP\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3067\u304d\u308b\u3002 $ python Python &#8230;<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/randt.jp\/?p=444\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,18,19],"tags":[],"class_list":["post-444","post","type-post","status-publish","format-standard","hentry","category-python","category-18","category-19"],"_links":{"self":[{"href":"https:\/\/randt.jp\/index.php?rest_route=\/wp\/v2\/posts\/444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randt.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randt.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randt.jp\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/randt.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=444"}],"version-history":[{"count":0,"href":"https:\/\/randt.jp\/index.php?rest_route=\/wp\/v2\/posts\/444\/revisions"}],"wp:attachment":[{"href":"https:\/\/randt.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randt.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randt.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}