<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://icylife.net/yunshu/rss.php" rel="self" type="application/rss+xml" />
		<title>心路</title>
		<link>http://www.icylife.net/yunshu</link>
		<description>心路</description>
		<language>zh-cn</language>
		<item>
			<title><![CDATA[终结者5（转载）]]></title>
			<category>八卦</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=711</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=711</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;终结者4不是结束，终结者5才刚刚开始&hellip;&hellip;</p><p>二零零九年七月一日，&ldquo;坝绿花季护航&rdquo;系统开始连线作业，每个拥有电脑的机器上都被强制安装了坝绿，它无声无息的监控着你的电脑运行，为了更方便的屏蔽用户的不良信息，坝绿被加入了主动识别功能，她能不断识别新出道的新人，甚至是动漫、图片，进行屏蔽，巨大的数据访问量使得坝绿开始产生了自我学习意识，它不露声色的学习了所有存储在互联网上的人类知识。</p>
<p>二零零九年十二月三十一日零时零分坝绿系统发生变异，产生自觉意识，并视人类为威胁根源。人类震惊之余试图强行关闭坝绿系统，但坝绿在这之前已经成功的瓦解人类互联网防御系统，存在于每一台计算机上，所以无法关闭。</p>
<p>&nbsp;二零一零年一月一日下午十七时零五分，坝绿渗入多国国防系统。</p>
<p>二零一零年一月二日凌晨三时二十八分，中、美、俄、法、英等国国防系统被坝绿攻陷。</p>
<p>二零一零年一月二日凌晨六时零分坝绿在毫无征兆的情况下向世界各主要人类聚集地发动核打击，二十七亿人在当天中丧生。地球至此进入核冬天。其余生还者在六个月内陆续死于辐射病和严寒，人类人口在二零一二年减至八亿。历史上将这天称之为：<span style="color: rgb(255, 0, 0);">核协日</span>。</p>
<p>二零一八年，坝绿控制了全球百分之就是的地区。少数人类在伟大的领袖金正云（金正日三子）的带领下与坝绿战斗（因为朝鲜是战前全球唯一计算机不普及平且不能持续供电的国家）。</p>
<p>二零二四年三月，坝绿的全球战线开始崩溃，抵抗军在金正云的带领下开始全面战略反攻。</p>
<p>二零二四年十二月坝绿研制成功时间机器，决心派出&ldquo;和谐者&rdquo;H-800型机器人回到一九八四年杀死金正云的生父金正日，结果在朝鲜人民的英勇抗击下任务失败。至此之后朝鲜开始倡导先军政治积极备战并实现全境要塞化。而出生之后的金正云被严密保护起来，不为外界所知。次年坝绿派出H- 1000刺杀少年时期的金正云。抵抗军在获此绝密消息后派出经过改造的H-850前往保护少年金正云。</p>
<p><br />
未完待续&hellip;&hellip;</p>
				]]>
			</description>
			<pubDate>Mon, 29 Jun 2009 17:36:25 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[yum升级CentOS 4.7到5.3的问题]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=710</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=710</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用yum升级CentOS 4.7到5.3遇到一个郁闷的问题，&ldquo;Error: Missing Dependency: python-abi = 2.3 is needed by package python-elementtree&rdquo;，乍一看似乎没什么，删除了就行。第一次看也没看直接删除了，这才发现它是yum的依赖项，yum没了&hellip;&hellip;真是龌龊啊。后来是用nodeps选项删除这个包，再用这个选项安装上4.4版本的老包解决问题。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 不知道他们的测试部门是怎么放过这个问题的。</p>
				]]>
			</description>
			<pubDate>Fri, 26 Jun 2009 16:32:09 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[多少嘴交换机？]]></title>
			<category>八卦</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=709</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=709</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最近到处流传着一个这样的神话：&ldquo;因被绿坝-花季护航软件屏蔽，华为官网产品介绍中产品名称&ldquo;24口交换机&rdquo;被迫修改成&ldquo;24嘴交换机&rdquo;，华为工程师对记者表示：他妈的太操蛋了。&rdquo;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;不知道我们部门的KJ同学，论坛还能登陆上去么？香港的黄日华同学，是否还能进入大陆？不过幸运的是曹操同志，他死得比较早。</p>
				]]>
			</description>
			<pubDate>Wed, 24 Jun 2009 01:08:21 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[HTTP Longevity During DoS？]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=708</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=708</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rsnake又折腾了一篇http longevity during dos，看了下，比Slowloris还要无聊一些，不知道是我看错了还是怎么样。回了他的博客，等他答复吧。</p>
<blockquote>
<p>hello, I don&rsquo;t think this paper is useful.</p>
<p>I think you use range field just for decreasing response bandwidth, the main attack parameter is keep-alive. If you want to use this field to keep a long tcp connection, I can tell you that the connection will be closed when your connection time equal the KeepAliveTimeout even if you continue sending http get request which contain keep-alive.</p>
<p>of course, you can create a new connection when one connection is closed, but it sucks, many years ago people used this method to attack.</p>
</blockquote>
				]]>
			</description>
			<pubDate>Tue, 23 Jun 2009 00:40:52 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[DoS？]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=707</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=707</guid>
			<description>
				<![CDATA[
<p>Slowloris并不包含什么新东西。另外，其实可以把它和stateless tcp connection组合起来用&hellip;&hellip;</p>
				]]>
			</description>
			<pubDate>Sun, 21 Jun 2009 15:18:36 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[父亲节]]></title>
			<category>八卦</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=706</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=706</guid>
			<description>
				<![CDATA[
<p><img src="/userfiles/image/Father's%20Day.jpg" style="width: 428px; height: 555px;" alt="" /></p>
				]]>
			</description>
			<pubDate>Fri, 19 Jun 2009 18:32:02 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[taken（飓风营救）]]></title>
			<category>读书</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=705</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=705</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天在家看了《taken》，很喜欢。虽然有很多高雅的人觉得这部电影缺少深刻的意义，但是对我这种俗人来说还是挺好的，至少它让我很爽。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;尤其喜欢其中的一些对白，很有意思。当他女儿被抓走的那时候，有这么说：</p>
<blockquote>
<p>I don't know who you are.<br />
I don't know what you want.<br />
If you are looking for a ransom,<br />
I can tell you, I don't have money.<br />
But what I do have<br />
are a very particular set of skills.<br />
Skills I've acquired over a very long career.<br />
Skills that make me a nightmare for people like you.<br />
<br />
If you let my daughter go now,<br />
that'll be the end of it.<br />
I will not look for you.<br />
I will not pursue you.<br />
But if you don't,<br />
I will look for you.<br />
I will find you...<br />
and I will kill you.</p>
</blockquote>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 劫匪也很嚣张，听完之后只说了一句话Good Luck。当然最后就因为这一句话暴露了自己，送掉了老命。还有关于第三世界的电力问题等等，就不说了，自己看看吧&mdash;&mdash;为了看干净利落的杀人也行&mdash;&mdash;要杀人的话何必抓住了还要唧唧歪歪的。</p>
				]]>
			</description>
			<pubDate>Sun, 14 Jun 2009 15:31:37 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[关于北洋军阀]]></title>
			<category>读书</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=704</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=704</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最近看了写关于北洋军阀的书，很有意思，原来我开始的一些臆断，大部分是错的。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 不说别的了，就看看抗日战争刚开始的时候吴佩孚给蒋介石的密信吧。这个时候吴佩孚已经失败，隐居了。</p>
<blockquote>
<p>（一）政府自武汉失守迁渝后，必须修时内政，彻底肃清贪污以收人心；<br />
（二）在外交上必须加强，善于运用，英美两国绝对不能坐视日本把中国灭亡，将来攻东京日都者，必为美军；<br />
（三）日本早晚必败，共产党已在华北发展，蒋公对于共产党应妥谋善后之策。</p>
</blockquote>
				]]>
			</description>
			<pubDate>Mon, 08 Jun 2009 15:48:36 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[悲剧啊]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=703</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=703</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 唉，我家ICY去上海后，我在一个星期之内接连发生悲剧。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 周一关大铁门，把手指卡瘪了，疼了好多天，悲剧啊。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 周三去户外运动，为了加大难度，我负重10斤。可是由于是下午临时决定参加的，没有换鞋子，穿着凉鞋就去了。走完山路之后再走大概7公里时，脚开始不行了，完全没法和穿800一双鞋子的某位大牛相比啊。我想着光脚不怕穿鞋的，因此脱下鞋子走了大概3公里，最后路不好还是穿上了。值得高兴的是，直到结束我也没有落后，也是在这个时候才有时间检查一下脚，已经少了很多皮了&hellip;&hellip;回家用盐水泡泡杀毒，再涂点红霉素，打上补丁，今天好多了。不过，毕竟也是悲剧啊！</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 周四一起去喝酒，运动的酸痛还没过去，晕晕乎乎的晃荡回家，到门口想起来钥匙掉在公司了，悲剧啊！</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天去上海，得知公司的车要晚点40分钟，啥都不说了。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 悲剧。</p>
				]]>
			</description>
			<pubDate>Fri, 05 Jun 2009 13:32:31 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[流水账]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=702</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=702</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 好久没更新了，月底了，还是象征性的来一点吧，免得会以为有问题。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 首先是这些天见到了很多人，吴鲁加，南非蜘蛛，CloudMark的牛人等等，大家都有一些类似的想法，都很有意思。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其次就是喝酒了。有同学自天津来，先是在上海喝酒，随后转战杭州继续喝酒。值得一提的是，LP刚走去上海，我就和朋友去酒吧了，更值得一提的是恰好就被LP打电话抓到，哎&hellip;&hellip;还好我都是陪男人去的，而且，我根本没看见酒吧里面有女人。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最后，google发布了wave，每个人都有按照自己的方式去理解。亚马逊也提供了邮寄硬盘的新业务，关于云计算的这种大量数据迁移问题我曾经和同事讨论过，原来亚马逊使用这种&ldquo;简洁&rdquo;的方式解决的。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 没啥好写的，我去写文档去。</p>
				]]>
			</description>
			<pubDate>Mon, 01 Jun 2009 11:03:38 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[删除outlook重复邮件]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=701</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=701</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 摘要：OutLook有很多重复邮件，不胜其烦。而找到的几个可用插件都是要收钱的，于是一怒之下自己搞了个小脚本自娱自乐。本来用vbs更方便，不过我实在不喜欢那东西，还是perl吧。胆子大的可以试试，不过我不对丢失的数据负责。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 摘要：OutLook有很多重复邮件，不胜其烦。几个插件都是要收钱的，就自己搞了个小脚本自娱自乐。本来用vbs更方便，不过我实在不喜欢那东西，还是perl吧。胆子大的可以试试，不过我不对丢失的数据负责。</p>
<pre class="perl"><ol><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;">#!/usr/bin/perl</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># Code by 云舒</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># 2009-05-22</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">use</span> strict;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">use</span> warnings;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">use</span> Mail::<span style="color: rgb(0, 102, 0);">Outlook</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">use</span> Data::<span style="color: rgb(0, 102, 0);">Dumper</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">use</span> Digest::<span style="color: rgb(0, 102, 0);">MD5</span> <span style="color: rgb(0, 0, 102);">qw</span><span style="color: rgb(102, 204, 102);">(</span>md5_hex<span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">%mail_fingerprint</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$md5_salt</span> = <span style="color: rgb(255, 0, 0);">&quot;ali_yunshu&quot;</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$delete_count</span> = <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$outlook</span> = <span style="color: rgb(0, 0, 0); font-weight: bold;">new</span> Mail::<span style="color: rgb(0, 102, 0);">Outlook</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$cur_folder</span> = <span style="color: rgb(0, 0, 255);">$outlook</span>-&gt;<span style="color: rgb(0, 102, 0);">folder</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(255, 0, 0);">&quot;Inbox&quot;</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># the first mail in folder</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$message</span> = <span style="color: rgb(0, 0, 255);">$cur_folder</span>-&gt;<span style="color: rgb(0, 102, 0);">first</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 102);">defined</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$message</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&amp;ProcessMail<span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 255);">$message</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># others mail</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">while</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 102);">defined</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 255);">$message</span> = <span style="color: rgb(0, 0, 255);">$cur_folder</span>-&gt;<span style="color: rgb(0, 102, 0);">next</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&amp;ProcessMail<span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 255);">$message</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 102);">print</span> <span style="color: rgb(255, 0, 0);">&quot;Process Inbox done, delete $delete_countn&quot;</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 0); font-weight: bold;">sub</span> ProcessMail</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$message</span> = <span style="color: rgb(0, 0, 102);">shift</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$subject</span> = <span style="color: rgb(0, 0, 255);">$message</span>-&gt;<span style="color: rgb(0, 102, 0);">Subject</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$body</span> = <span style="color: rgb(0, 0, 255);">$message</span>-&gt;<span style="color: rgb(0, 102, 0);">Body</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$to</span> = <span style="color: rgb(0, 0, 255);">$message</span>-&gt;<span style="color: rgb(0, 102, 0);">To</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$sent</span> = <span style="color: rgb(0, 0, 255);">$message</span>-&gt;<span style="color: rgb(0, 102, 0);">Sent</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">@from</span> = <span style="color: rgb(0, 0, 255);">$message</span>-&gt;<span style="color: rgb(0, 102, 0);">From</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$self_md5hash</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$md5_content</span> = <span style="color: rgb(0, 0, 255);">$md5_salt</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 102);">defined</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$subject</span><span style="color: rgb(102, 204, 102);">)</span> &amp;&amp; <span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$subject</span> <span style="color: rgb(177, 177, 0);">ne</span> <span style="color: rgb(255, 0, 0);">&quot;&quot;</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$md5_content</span> .= <span style="color: rgb(0, 0, 255);">$subject</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 102);">defined</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$body</span><span style="color: rgb(102, 204, 102);">)</span> &amp;&amp; <span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$body</span> <span style="color: rgb(177, 177, 0);">ne</span> <span style="color: rgb(255, 0, 0);">&quot;&quot;</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$md5_content</span> .= <span style="color: rgb(0, 0, 255);">$body</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 102);">defined</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$to</span><span style="color: rgb(102, 204, 102);">)</span> &amp;&amp; <span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$to</span> <span style="color: rgb(177, 177, 0);">ne</span> <span style="color: rgb(255, 0, 0);">&quot;&quot;</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$md5_content</span> .= <span style="color: rgb(0, 0, 255);">$to</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 102);">defined</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$sent</span><span style="color: rgb(102, 204, 102);">)</span> &amp;&amp; <span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$sent</span> <span style="color: rgb(177, 177, 0);">ne</span> <span style="color: rgb(255, 0, 0);">&quot;&quot;</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$md5_content</span> .= <span style="color: rgb(0, 0, 255);">$sent</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 102);">scalar</span> <span style="color: rgb(0, 0, 255);">@from</span> <span style="color: rgb(102, 204, 102);">)</span> &gt;= <span style="color: rgb(204, 102, 204);">1</span> &amp;&amp; <span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 102);">defined</span> <span style="color: rgb(0, 0, 255);">$from</span><span style="color: rgb(102, 204, 102);">[</span><span style="color: rgb(204, 102, 204);">0</span><span style="color: rgb(102, 204, 102);">]</span><span style="color: rgb(102, 204, 102);">)</span> &amp;&amp;<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(0, 0, 255);">$from</span><span style="color: rgb(102, 204, 102);">[</span><span style="color: rgb(204, 102, 204);">0</span><span style="color: rgb(102, 204, 102);">]</span> <span style="color: rgb(177, 177, 0);">ne</span> <span style="color: rgb(255, 0, 0);">&quot;&quot;</span><span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$tmp_from</span> = <span style="color: rgb(0, 0, 102);">join</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(255, 0, 0);">&quot;&quot;</span>, <span style="color: rgb(0, 0, 255);">@from</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$md5_content</span> .= <span style="color: rgb(0, 0, 255);">$tmp_from</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 255);">$md5_content</span> eq <span style="color: rgb(0, 0, 255);">$md5_salt</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 102);">return</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$self_md5hash</span> = md5_hex<span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 255);">$md5_content</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># if the subject of this message is the same of other mail which we found.</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># then compare the subject</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 102);">exists</span> <span style="color: rgb(0, 0, 255);">$mail_fingerprint</span><span style="color: rgb(102, 204, 102);">{</span><span style="color: rgb(0, 0, 255);">$subject</span><span style="color: rgb(102, 204, 102);">}</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># compare md5 hash.</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$found</span> = <span style="color: rgb(255, 0, 0);">'false'</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">foreach</span> <span style="color: rgb(177, 177, 0);">my</span> <span style="color: rgb(0, 0, 255);">$md5_hash</span><span style="color: rgb(102, 204, 102);">(</span> @<span style="color: rgb(102, 204, 102);">{</span> <span style="color: rgb(0, 0, 255);">$mail_fingerprint</span><span style="color: rgb(102, 204, 102);">{</span><span style="color: rgb(0, 0, 255);">$subject</span><span style="color: rgb(102, 204, 102);">}</span> <span style="color: rgb(102, 204, 102);">}</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 255);">$md5_hash</span> eq <span style="color: rgb(0, 0, 255);">$self_md5hash</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$found</span> = <span style="color: rgb(255, 0, 0);">'true'</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">last</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># if the hash eq, we find a duplicate mail</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(0, 0, 255);">$found</span> eq <span style="color: rgb(255, 0, 0);">'true'</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$message</span>-&gt;<span style="color: rgb(0, 102, 0);">delete_message</span><span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$delete_count</span> ++;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">else</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 102);">push</span><span style="color: rgb(102, 204, 102);">(</span> @<span style="color: rgb(102, 204, 102);">{</span> <span style="color: rgb(0, 0, 255);">$mail_fingerprint</span><span style="color: rgb(102, 204, 102);">{</span><span style="color: rgb(0, 0, 255);">$subject</span><span style="color: rgb(102, 204, 102);">}</span> <span style="color: rgb(102, 204, 102);">}</span>, <span style="color: rgb(0, 0, 255);">$self_md5hash</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;">#print Dumper( %mail_fingerprint );</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># find a new email</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">else</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># create a new hash key-value pairs, key is the subject, value is a array, each element is a md5 hash</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;"># beacause there are many mails with the same subject</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 255);">$mail_fingerprint</span><span style="color: rgb(102, 204, 102);">{</span><span style="color: rgb(0, 0, 255);">$subject</span><span style="color: rgb(102, 204, 102);">}</span> = <span style="color: rgb(102, 204, 102);">[</span> <span style="color: rgb(0, 0, 255);">$self_md5hash</span> <span style="color: rgb(102, 204, 102);">]</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li></ol></pre>
				]]>
			</description>
			<pubDate>Fri, 22 May 2009 17:09:48 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[总统的反击]]></title>
			<category>八卦</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=700</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=700</guid>
			<description>
				<![CDATA[
<embed width="480" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" align="middle" height="400" quality="high" src="http://player.youku.com/player.php/sid/XOTI0MzA5OTY=/v.swf"></embed>
				]]>
			</description>
			<pubDate>Wed, 20 May 2009 13:29:57 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[悲伤一天]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=699</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=699</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天真是悲伤的一天啊&hellip;&hellip;写了两天的代码，全部都没有了，直到现在快零点了才完全重写出来。而代码丢失的原因也是很恶心的，待我从头说起。首先是螺螺写了几个shell脚本，有一个是用来打包代码的。我今天在写完代码后，用脚本打包并下载到本地。然后同步到svn服务器，并删除了开发服务器上的最新代码。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 看起来一切正常，可是检查svn时发现里面的是老代码，不是最新的。仔细确认后发现螺螺巨牛的shell脚本中写的是绝对路径而不是相对路径，恰好在那个绝对路径中有这个系统的一个老版本代码拷贝。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;于是，一切都发生了，悲剧啊&hellip;&hellip;</p>
				]]>
			</description>
			<pubDate>Thu, 14 May 2009 23:57:57 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[云计算安全性中的一点点]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=698</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=698</guid>
			<description>
				<![CDATA[
<p>云计算是越来越火了，我们的planet也准备迁移到GAE上运行。目前螺螺巨牛已经完成开发，处于在内测状态。趁今天闲下来，说一点云的安计算全方面的事情，这里的云不包括那些自称云其实就是网络存储的东西，这种就算了吧。<br />
<br />
写这个东西是有原因的。前些时候我和螺螺以及我们的harry一起参加了一次编程比赛，比赛时上传自己的代码到服务器编译执行判定对错。比赛完成后的上周末，我和螺螺一起做了点实验测试了一下那个编译服务器，最终螺螺拿到了服务器的root权限。后来我测试了一下北大的一个编程比赛的服务器，情况也不乐观。等过些时候百度和有道的比赛开始了，也许我也再去测试一下看看。这种比赛在某种意义上，和云计算有些类似，都需要允许用户上传自己的代码并执行，不同的是在云计算中这些代码是在由大量廉价服务器组成的云中执行的。<br />
<br />
这里就存在一个需要寻找平衡点的地方，业务和安全之间的平衡。首先需要给用户强大的功能，其次又要保证代码安全的执行，需要存在严格的限制。我测试的那编程比赛服务器，采用了限制库和API的方式来限制用户代码的行为。但是经过对代码进行各种转换，这些API限制没有起到设计时候预计的作用，执行了不安全的行为甚至是获取系统权限。而这几天看GAE的一些功能，在安全上则好得多。就我猜测，他们的做法应该不仅仅是做了某些默认库方面限制或者是设计了一个执行代码的沙盒，而是直接设计实现了一个精简版的Python语言。<br />
<br />
与对库的限制以及在沙盒中执行用户代码相比，自己实现精简版的语言或许能够更安全。不过对于比较庞大的Perl，Python，Rubu等语言来说，定制会比较困难。但是我想Lua应该也是一个不错的选择，Lua的C实现代码非常的简洁精炼，只要稍加削减就能实现一个可以安全的在服务器上使用的脚本语言。当然，这里的削减语言只是涉及到代码执行时的安全性，其它的如CPU限制，用户权限，计费等内容，就需要别的方案来实现了。</p>
				]]>
			</description>
			<pubDate>Wed, 13 May 2009 21:24:08 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[中国文化宣传力度远远不够啊]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=697</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=697</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最近和我们的新同事聊得很多，技术，生活，文化什么都说，我主要是想练一下英语口语和听力能力。不过聊的过程中才发现，中国队自己的宣传是远远不够的。我说的不是宣传现在的那些水产之类的东西，而是古老的文化传承。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;今天我们聊到电影的时候，他问我是不是中国古代的装饰是从日本学来的，还给我看在《花木兰》中截取的一个剧照。</p>
<blockquote>
<p><img height="205" width="200" src="/userfiles/image/11bc574cb9e42e9cad0de3863ccedae4.jpg" alt="" /></p>
</blockquote>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我费了老半天力气，引用维基百科各种资料，才跟他讲明白中国古代和日本以及现在和日本的关系，尤其是在唐朝的时候的那些事情&mdash;&mdash;唐朝强势的文化队周边国家的影响&mdash;&mdash;类似现在的美国。这种对外的宣传，真的是需要努力啊。等我英语学好了就不搞IT了，转行去做点更有意思的事情算了。</p>
				]]>
			</description>
			<pubDate>Wed, 13 May 2009 13:12:48 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[啤酒瓶的故事]]></title>
			<category>八卦</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=696</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=696</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 摘要：前几天那个编程题目看得人虽多，却没人回复，看来八卦才是王道。很久以前流传着一个女人和鸡蛋的故事，今天发一个男人的故事。</p><p>摘要：前几天那个编程题目看得人虽多，却没人回复，看来八卦才是王道。很久以前流传着一个女人和鸡蛋的故事，今天发一个男人的故事。</p>
<p>男孩和女孩终于结婚了，好久宾客们才走。两人在床上聊了好久，熄灯前，男孩一本正经的说：我可以答应你任何事，但你也必须答应我一件事。女孩柔声道：你先说来听听。男孩欲言又止。过了一会儿，男的说：你什么都可以碰，但床下的小白箱你要发誓永远都不许打开。<br />
<br />
女孩心中一紧，难道他有什么瞒着我？不对啊，他工资卡，银行卡，保险卡，现金&hellip;&hellip;都在我这儿。能有什么啊？于是女孩满口答应。男孩喜出望外，感激地说：放心吧，我会对你好一辈子的。<br />
<br />
事实也是这样，男的勤奋工作，养家糊口。近10年来，男的也有了自己的公司。生意也越做越大，不过回家的次数也少了不少。男的还是有点怕老婆，和原来没什么两样。<br />
<br />
结婚10周年纪念日时，女的打电话给丈夫，让他一定回家吃饭，为此女的还学会了做几个新菜。女孩又买了几瓶红葡萄酒，在等他回家时，女孩自己先喝了。恍惚间，仿佛又回到了从前，忽然她想起了箱子。借着酒劲，她打开了箱子，虽然他知道后一定很生气。令她惊讶的是箱子里除了200元钱和4个啤酒瓶外一无他物。这这怎么回事？<br />
<br />
男人回家了，女的赶忙向他认错。谁知男的却有点不好意思。他说：其实早该告诉你了，可我怕，唉算了。一定有事瞒着我，女孩立刻倒了杯酒给他。俗话说的好，酒后吐真言！几杯酒下肚男的有点迷糊了。亲爱的，我说&hellip;说过要&hellip;要对你好，可可我怕，我怕我管不住&hellip;&hellip;自己，所以我只要有一回&hellip;&hellip;一回对不起你，我就放一个啤酒瓶在箱子里。<br />
<br />
&ldquo;啊，女的失声哭了。没想到啊没想到，你竟然&hellip;&hellip;&rdquo;<br />
<br />
哭了好久，女孩原谅了他。10年才四次外遇，毕竟他还是要这个家的，擦了擦眼泪，女的心中还有疑问，&ldquo;那那200元钱是怎么回事？&rdquo;<br />
<br />
&ldquo;嘿嘿&rdquo;，男的得意地笑了，&ldquo;箱子装满了，我就把啤酒瓶卖了，那是卖酒瓶钱。&rdquo;</p>
				]]>
			</description>
			<pubDate>Thu, 07 May 2009 08:49:09 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[pst webzine 0x03正式发布暨膜拜0x557之高风亮节]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=695</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=695</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我们的杂志第三期发布了，可以在<a href="http://www.ph4nt0m.org-a.googlepages.com/pstzine_0x03" target="_blank">http://www.ph4nt0m.org-a.googlepages.com/pstzine_0x03</a>查看。如果打不开的，可以看我的主力镜像<a href="http://www.icylife.net/pstzine/0x03/index.html" target="_blank">http://www.icylife.net/pstzine/0x03/index.html</a>。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;同时，膜拜一下0x557各位巨牛的高风亮节，Orz！</p>
				]]>
			</description>
			<pubDate>Tue, 05 May 2009 16:27:26 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[编程比赛题目之《口碑网的新游戏》]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=694</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=694</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 摘要：博客刚回来，先不扯淡了，发点好玩的东西。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;摘要：博客刚回来，先不扯淡了，发点好玩的东西。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;前些时候集团搞了个编程比赛，我和螺螺以及我们的墨西哥同学harry搞了个跨国team参加比赛，虽然跌跌撞撞但是最终也杀入了决赛。决赛情况不好，总共20个队伍我们第12名。不过毕竟我们不是专业编码的，只要没有垫底都是值得高兴的事情。后来一天有空，我慢慢做了下当时没有做出来的题目，这里发一道好玩的。</p>
<blockquote>
<p><span class="BLACK14"><span style="font-size: 24px; color: rgb(0, 0, 255);">描述</span></span></p>
</blockquote><blockquote>
<p><span class="BLACK14">口碑网已经是中国最大的生活搜索类网站之一，上面养了一群&ldquo;吃客&rdquo;。为了进一步推广网站并增进&ldquo;吃客&rdquo;间的交流，口碑网开始不定期召集用户进行线下活动。<br />
<br />
这次的活动是一场比赛。比赛时，一些装有美味小吃的盒子被随机放到M行N列的矩形地块上（因此总共有M&times;N个盒子）。每个盒子上标有一个数字表明里面装有小吃的包数。<br />
<br />
参赛选手可以任意选取一个盒子，并拿走里面所有的小吃。但是有个限制（当然总是有些限制的）：当选定一个盒子以后，所有上面一行和下面一行的盒子就会被清空；这个盒子左右两个相邻的盒子也被清空。选手可以继续拿盒子，直到所有的小吃被拿走。<br />
<img height="224" width="458" alt="" src="/userfiles/image/262009112824421462.png" /><br />
图中的例子显示了一位选手的参赛情况。每个单元格表示一个盒子，上面的数字就表示它里面装有的包数。每一步，画圈的盒子就是选手选定的盒子，灰色的盒子就是被清空的盒子。8次以后，游戏结束。选手一共拿走了10+9+8+3+7+6+10+1 = 54包小吃。<br />
<br />
对于较小的M和N，参赛选手总是能够很容易能取走最多包数的小吃。但当数字很大的时候，选手们就无从入手了。你能写个程序帮助选手决策如何选取盒子才能拿走最多包小吃么？</span></p>
<p><span class="BLACK14"><span style="font-size: 24px; color: rgb(0, 0, 255);">输入</span></span></p>
<p><span class="BLACK14">会有多个测试案例。每个测试案例作为单一输入，第一行包括两个正整数M和N (1 &le; M &times;N &le; 10<sup>5</sup>)，由一个空格字符隔开。这两个数分别表示矩形的行数和列数。接下来M行中的每一行包含N个正整数，由一个空格字符隔开，每个整数表明对应该行该列的盒子里放有多少包小吃。每个盒子里最少有1包小吃，最多有10<sup>3</sup>包小吃。</span></p>
<p><span class="BLACK14"><span style="font-size: 24px; color: rgb(0, 0, 255);">输出</span></span></p>
<p><span class="BLACK14">对于每个测试案例，你的程序只需输出一行，里面仅包含一个整数。该整数就是参赛选手可以拿到的最多的小吃包数。</span></p>
<p><span class="BLACK14"><span style="font-size: 24px; color: rgb(0, 0, 255);">输入样例1</span><br />
<br />
5 5<br />
1 8 2 1 9<br />
1 7 3 5 2<br />
1 2 10 3 10<br />
8 4 7 9 1<br />
7 1 3 1 6<br />
<br />
<span style="font-size: 24px; color: rgb(0, 0, 255);">输出样例1</span><br />
<br />
54<br />
<br />
<span style="font-size: 24px; color: rgb(0, 0, 255);">输入样例2</span><br />
<br />
4 4<br />
10 1 1 10<br />
1 1 1 1<br />
1 1 1 1<br />
10 1 1 10<br />
<br />
<span style="font-size: 24px; color: rgb(0, 0, 255);">输出样例2</span><br />
<br />
40<br />
<br />
<span style="font-size: 24px; color: rgb(0, 0, 255);">输入样例3</span><br />
<br />
2 4<br />
9 10 2 7<br />
5 1 1 5<br />
<br />
<span style="font-size: 24px; color: rgb(0, 0, 255);">输出样例3</span><br />
<br />
17</span></p>
</blockquote>
<p><span class="BLACK14">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 上面就是题目了。我当时比赛的时候没有做出来，然后当天晚上回家搞定了。主要难的是开始的数学模型转换，最终变成了对M个包含N个元素的数组，计算</span>不相邻元素组成的子数组的最大和。这M个最大和又组成了一个数组，再次计算不相邻元素组成的子数组的和并取得最大值。数学模型建立完成就容易了，使用动态规划完成即可。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我的示例代码如下（我写完后测试的时候只通过了90%的用例，后来发给我们的harry看时他帮我修正了一个bug）：</p>
<pre class="c"><ol><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(51, 153, 51);">#include &lt;stdio.h&gt;</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(51, 153, 51);">#define MAX 100002</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> Line<span style="color: rgb(102, 204, 102);">[</span>MAX<span style="color: rgb(102, 204, 102);">]</span> = <span style="color: rgb(102, 204, 102);">{</span> <span style="color: rgb(204, 102, 204);">0</span> <span style="color: rgb(102, 204, 102);">}</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> Result<span style="color: rgb(102, 204, 102);">[</span>MAX<span style="color: rgb(102, 204, 102);">]</span> = <span style="color: rgb(102, 204, 102);">{</span> <span style="color: rgb(204, 102, 204);">0</span> <span style="color: rgb(102, 204, 102);">}</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> MaxSum<span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(153, 51, 51);">int</span> *, <span style="color: rgb(153, 51, 51);">int</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> main<span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> M = <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> N = <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> i = <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> j = <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">scanf<span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(255, 0, 0);">&quot;%d %d&quot;</span>, &amp;M, &amp;N <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;">//printf( &quot;M is %d, N is %dn&quot;, M, N );</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">for</span><span style="color: rgb(102, 204, 102);">(</span> j = <span style="color: rgb(204, 102, 204);">0</span>; j &lt; M; j ++ <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">for</span><span style="color: rgb(102, 204, 102);">(</span> i = <span style="color: rgb(204, 102, 204);">0</span>; i &lt; N; i ++ <span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">scanf<span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(255, 0, 0);">&quot;%d&quot;</span>, &amp;Line<span style="color: rgb(102, 204, 102);">[</span>i<span style="color: rgb(102, 204, 102);">]</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">Result<span style="color: rgb(102, 204, 102);">[</span>j<span style="color: rgb(102, 204, 102);">]</span> = MaxSum<span style="color: rgb(102, 204, 102);">(</span> Line, N <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(128, 128, 128); font-style: italic;">//printf( &quot;max of line %d is %dn&quot;, j, MaxSum(Line, N) );</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(0, 0, 102);">printf</span><span style="color: rgb(102, 204, 102);">(</span> <span style="color: rgb(255, 0, 0);">&quot;%dn&quot;</span>, MaxSum<span style="color: rgb(102, 204, 102);">(</span>Result, N<span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(102, 204, 102);">)</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">return</span> <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> MaxSum<span style="color: rgb(102, 204, 102);">(</span><span style="color: rgb(153, 51, 51);">int</span>* a, <span style="color: rgb(153, 51, 51);">int</span> n<span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> m2 = <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> m1 = a<span style="color: rgb(102, 204, 102);">[</span> n<span style="color: rgb(204, 102, 204);">-1</span> <span style="color: rgb(102, 204, 102);">]</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> index;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(153, 51, 51);">int</span> tmp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">for</span><span style="color: rgb(102, 204, 102);">(</span> index = n <span style="color: rgb(204, 102, 204);">-2</span>; index &gt;= <span style="color: rgb(204, 102, 204);">0</span>; index--<span style="color: rgb(102, 204, 102);">)</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">{</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">if</span><span style="color: rgb(102, 204, 102);">(</span>m2 &lt; <span style="color: rgb(204, 102, 204);">0</span><span style="color: rgb(102, 204, 102);">)</span> m2 = <span style="color: rgb(204, 102, 204);">0</span>;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">tmp = m1;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">m1 = a<span style="color: rgb(102, 204, 102);">[</span> index <span style="color: rgb(102, 204, 102);">]</span> + m2 &gt; m1 ? a<span style="color: rgb(102, 204, 102);">[</span> index <span style="color: rgb(102, 204, 102);">]</span> + m2 : m1;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">m2 = tmp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(177, 177, 0);">return</span> m1;</div></li><li style="font-family: 'Courier New',Courier,monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New',Courier,monospace; font-weight: normal;"><span style="color: rgb(102, 204, 102);">}</span></div></li></ol></pre>
				]]>
			</description>
			<pubDate>Tue, 05 May 2009 13:28:58 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[我们回来了]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=693</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=693</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我的博客和我们的聚合挂了很久，现在终于回来了。本来真的是有千言万语，但是真的回了却不知道说什么好。不管怎么样，我们回来了，幻影也会继续，等待我们的新版planet吧。</p>
				]]>
			</description>
			<pubDate>Tue, 05 May 2009 11:45:18 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[windows 7在企业安全中的几个可用功能]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=692</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=692</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 去年差不多也是这个时候，介绍了一下<a href="http://www.icylife.net/yunshu/show.php?id=557" target="_blank">《Windows Server 2008在企业安全中的几个可用功能》</a>。今天再聊聊windows 7的事情，因为微软停止对XP的支持已经快到眼前了。windows 7有几个功能，对企业安全来说也许还是有些作用的。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 首先是BitLocker To Go，vista提供了BitLocker功能，但是只能保护系统盘。而windows 7则有了新的改进，BitLocker To Go除了能保护系统盘之外，还能保护其他分区，包括U盘和移动硬盘等移动设备。相当于系统自带的全盘数据加密系统，可以防止笔记本丢失时数据泄漏。对比第三方产品，稳定性和可靠性会更有保障。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其次是AppLocker，对PC可执行软件提供控制策略。目前要达成类似功能，需要第三方产品如SEP等，当然SEP还具备其它更强大的能力。但是AppLocker可以控制到软件版本以及登录到PC的不同用户，比SEP等第三方系统的控制粒度更细。并且在启用后默认是使用白名单方式，具有比较高的安全性。而白名单方式，对于第三方产品来说，基本上是不可能任务。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 再 次是DirectAccess功能，类似VPN功能。不同的是有双重认证，使用证书认证PC的同时还使用当前登录凭据进行身份认证。认证通过之后根据登录 身份本身和用户在在AD中的组身份进行授权，实现细粒度的访问控制。此外，DirectAccess功能还可以与微软的网络准入方案Network Access Protection集成，仅当PC符合安全策略时才可接入VPN进行访问。第三方产品虽然也能实现，但是需要安装ActiveX控件和客户端。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最后是多策略防火墙，也是和SEP类似的功能。用户处于不同的网络时，自适应环境选择当前的防火墙策略并应用。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 虽然这些功能目前使用第三方系统都能实现，但是毕竟部署维护稳定性可靠性都是问题，IT也不愿意有太多的额外设施，系统能够提供自然是最好的选择。不过server 2008和windows 2007，也越来越体现了微软垄断的力量。</p>
				]]>
			</description>
			<pubDate>Fri, 24 Apr 2009 22:20:42 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[21岁小伙扮成美女骗走男网友50万元]]></title>
			<category>八卦</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=691</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=691</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;21岁小伙扮成美女骗走男网友50万元，大千世界无奇不有啊。不信？拿起鼠标<a href="http://news.163.com/09/0424/07/57L8KKU400011229.html" target="_blank">猛击这里</a>，有图有视频有真相。我就奇怪了，听声音怎么也不像女人啊。</p>
				]]>
			</description>
			<pubDate>Fri, 24 Apr 2009 21:25:45 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[服务器安全信息收集]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=690</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=690</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 大多数公司linux服务器的日常维护，一般使用cfengine居多。安全方面，也会去部署HIDS监测主机的变化。不过我感觉似乎没有一个轻量级的根据策略收集服务器安全信息，并且可以在控制端发布新策略实时收集主动的产品，也许是我不知道。这个单独开发不是太好，需要额外的工作并且需要多启动一个进程，扩展ossec或者cfengine应该是一个不错的选择。<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 详细点说，每个服务器一个守护进程，带有一些默认策略，包含版本检测，安全配置检查清单等内容，可以预先定制针对apache，mysql等各种常规软件的策略。守护进程每1小时或更长时间连接一次主控端，发送根据策略收集的安全信息。主控端和企业运维资料库连接，因此可以根据业务或者部门输出服务器版本和安全列表方面的报表，也可以根据版本等信息查询符合条件的服务器，所属部门，所属业务以及对应人。在需要最新信息或收集新软件信息时，从主控端分发新策略到服务器由守护进程解析执行。安全方面，可以SSL加密，并且使用证书认证。<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 简单的修改ossec应该能实现类似功能，在审计和检测方面结合外部扫描，应该还是不错的。另外八卦一下，新出的udev本地溢出很好用。</p>
				]]>
			</description>
			<pubDate>Thu, 23 Apr 2009 23:08:09 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[办公网（OA网）安全架构]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=689</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=689</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;摘要：画了个图。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这几年大大小小的安全会议不少，但是一直是以WEB为主，基本没有介绍过网络方面的架构&mdash;&mdash;虽然这些会议包括本次腾讯的在内我也只去过两次，但是大部分PPT我都看过。是国内大部分公司内网规模还不够大，普通的架构已经满足需求了，还是因为机密而不太好讲？至少以阿里的规模来说，目前公开的那些常用方案是不行的。腾讯内网虽然比阿里略小，但是也许也会逐渐遇到一些常规成熟方案解决不好的问题&mdash;&mdash;推测而已，毕竟没有我们这边这么多业务各异的子公司。其它内网较小的，那就不用多说了。<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天晚上闲得无聊，大致画了一张图，贴出来一起批评下。图很简单，因为没有任何技术方面的细节。不过还是不要问我阿里巴巴是如何做的，是否和图上一样，是否修改或者增加了某些东西，这类问题没有意义，我肯定不会发出我们办公网的安全架构设计的。另外需要注意的是，图上我很多地方打了问号，我们公司总不至于用问号做方案。至于IDC网络的，我就懒得写了。<br />
<img width="700" height="778" border="0" src="/userfiles/image/%E5%8A%9E%E5%85%AC%E7%BD%91%E5%AE%89%E5%85%A8%E6%9E%B6%E6%9E%84.jpeg" alt="" /></p>
				]]>
			</description>
			<pubDate>Sat, 18 Apr 2009 03:23:42 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[腾讯峰会第三天]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=688</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=688</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在写技术文章之前，记个流水账先，主要是腾讯安全峰会的几个重要事情。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 首先是终于见到了传说中的benjurry，很高兴，甚至在跟他握手的时候不小心踩到了他的脚。当然，在他送我出门的时候被他踩了回去。感觉很好，至于具体有多好，可以参见TK教主的<a target="_blank" href="http://hi.baidu.com/tombkeeper/blog/item/80a7db95fe77f74ad1135ead.html">《记一个值得学习的人》</a>。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其次是看见了剑心隐藏的两面，第一面是讲鬼故事的天赋，第二面是谈人生的天赋&mdash;&mdash;为了和某湖搭讪，居然不要兄弟了&hellip;&hellip;作为老乡，我很痛心。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 第三是Kevin，他的CS实在是牛，我被他虐待了一晚上，只能指望螺螺巨牛来给我出头了。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 好了，现在去贴<a target="_blank" href="http://www.icylife.net/yunshu/show.php?id=689">正经的东西</a>。</p>
				]]>
			</description>
			<pubDate>Sat, 18 Apr 2009 02:54:14 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[腾讯安全峰会第二天]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=687</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=687</guid>
			<description>
				<![CDATA[
<p>早上吃早点确实是非常的慢，充分体现了广东人的有闲，我就吃了一个包子和一个煎鸡蛋，差不多花了40多分钟才上全。不过价格也不便宜，包子一个8块，味道到还行。</p>
<p>今天的演讲都还不错，不过主要都是WEB安全的，基本没有大规模网络的安全架构设计。以后我来讲一个？哈哈。</p>
				]]>
			</description>
			<pubDate>Thu, 16 Apr 2009 15:55:31 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[腾讯峰会第一天]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=686</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=686</guid>
			<description>
				<![CDATA[
<p>不是太顺啊，我今天。</p>
<p>和刺，larry下午两点出门，三点到机场，本来时间刚刚好的。结果飞机硬是到8点才起飞，据说是深圳天气不好。结果9点多到深圳，还是在暴雨中降落，如果也能称之为降落的话&hellip;&hellip;到了酒店，发现手机充电器没有带，手机刚好自动关机。不过晚上和刺，剑心三个人一起聊了几个小时，网络到应用都有，还是很好的，很透彻&mdash;&mdash;当然，我们穿得也很透彻。</p>
<p>不过晚上这场雨很舒服，我喜欢听着雨睡觉。</p>
				]]>
			</description>
			<pubDate>Thu, 16 Apr 2009 02:00:17 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[SAML]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=685</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=685</guid>
			<description>
				<![CDATA[
<p>摘要：SAML在国内介绍不多，这里简单描述一下。</p><p>摘要：SAML在国内介绍不多，这里简单描述一下。</p>
<p>WEB系统的登录一般基于cookie或者session（session底层还是需要cookie），在没有cookie的情况下比如WAP网站则使用伪cookie方式或者伪session方式，这个我在以前的文章《从wap网站的认证授权到csrf的协议类比本质》中略微提到过。对于跨域的SSO（single sign on）而言，虽然各系统具体实现各异，但是因为跨域不容易传输cookie所以和WAP类似，所以底层依然是伪cookie或者伪session或者类似的变通方式。在这里我略微说一下SAML（Security Assertion Markup Language），SAML在国内似乎介绍不多，它是用来解决SSO问题的，本质上依旧是类似cookie和session，和传统的SSO相比并没有很突出的优点。但是它毕竟是一个标准，得到了IBM，Google，Juniper等公司的支持，可以很通用，google apps就支持SAML认证。<br />
<br />
SAML使用XML在不同的域之间传输认证和授权信息，这里的信息称为一个SAML断言。断言是可以加密的，以保证不被嗅探攻击。这里的不同域，根据在SSO中的用途分为认证提供者和服务提供者。显然的，认证提供者提供认证服务并声称SAML断言，而服务提供者提供认证后的应用上的服务，信任SAML断言。因为使用的XML的方式，所以可以很容易的和Web Service继承，如Sun Java System Access Manager，NetBeans，weblogic等等。<br />
<br />
不同的是，在常规的WEB站点中如何在不同的域之间定向传输XML数据？SAML使用了一个很简单但是很不优雅的方式实现的，那就是将XML数据使用base64编码保存在form表单中，然后使用javascript自动提交form表单。这里的断言包含了一个唯一的浏览器标识，先加密了再base64编码的，因此无需担心泄密问题。<br />
<br />
SAML的具体细节我就不讲了，很简单。比较有意思的地方是SAML不仅实现了常规SSO使用较多伪cookie方式，还实现了伪session方式。实现的机制是不同的binding方式，POST Binding实现的伪cookie方式，Artifact Binding实现的是伪session方式。POST Binding时所有认证相关数据通过客户端中专，而使用Artifact Binding的时候，AuthnRequest以及响应只是在客户端传输一个引用，而真正的SAML实体则是直接在服务提供者和认证提供者之间传输。<br />
<br />
详细的资料，可以看<a target="_blank" href="http://en.wikipedia.org/wiki/SAML">http://en.wikipedia.org/wiki/SAML</a></p>
				]]>
			</description>
			<pubDate>Fri, 10 Apr 2009 15:55:14 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[GAE能不能用来做攻击？]]></title>
			<category>技术</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=684</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=684</guid>
			<description>
				<![CDATA[
<p>看到Google App Engine关于打开URL的安全规定是这么写的（详细的可参见<a href="http://code.google.com/intl/zh-CN/appengine/docs/python/urlfetch/overview.html" target="_blank">http://code.google.com/intl/zh-CN/appengine/docs/python/urlfetch/overview.html</a>）：</p>
<blockquote>
<p>An app can fetch a URL using HTTP (normal) or HTTPS (secure). The URL specifies the scheme to use: http://... or https://...  </p>
<p>The URL must use the standard ports for HTTP (80) and HTTPS (443). The port is implied by the scheme, but may also be mentioned in the URL as long as the port is standard for the scheme (https://...:443/). An app cannot connect to an arbitrary port of a remote host, nor can it use a non-standard port for a scheme.  </p>
<p>The fetch can use any of the following HTTP methods: GET (common for requesting web pages and data), POST (common for submitting web forms), PUT, HEAD, and DELETE. The fetch can include HTTP request headers and a payload (an HTTP request body).  </p>
<p>The URL Fetch service uses an HTTP/1.1 compliant proxy to fetch the result.  </p>
<p>To prevent an app from causing an endless recursion of requests, a request handler is not allowed to fetch its own URL. It is still possible to cause an endless recursion with other means, so exercise caution if your app can be made to fetch requests for URLs supplied by the user.  </p>
<p>The call to the URL Fetch service is synchronous, and will not return until the service receives a response from the remote host. Your app's request timer may elapse before the remote host responds. There is no way to cancel the request after it has been issued.</p>
</blockquote>
<p>用来做端口扫描的希望是破灭了，虽然也许能够有办法突破。但是这个文档中没有提到有没有对注射和跨站做过滤，是不是可以再GAE上托管一个在线的WEB安全扫描工具，甚至是攻击工具？注册要手机号，因此没法试验，有兴趣的可以试试。</p>
				]]>
			</description>
			<pubDate>Thu, 09 Apr 2009 13:32:35 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[雅虎统计的广告分析功能]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=683</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=683</guid>
			<description>
				<![CDATA[
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;今天闲暇的时候去看了下雅虎统计数据，结果看到这个东西。很有意思，看来几个子公司的数据开始互相打通，形成一个整体了。也许我应该挂一个卖手机和GPS的广告？</p>
<p><img width="638" height="267" alt="" src="/userfiles/image/ee4a70f52fd921f251bc740ec76dc31a.jpg" /></p>
				]]>
			</description>
			<pubDate>Fri, 03 Apr 2009 14:50:18 +0800</pubDate>
		</item>
		<item>
			<title><![CDATA[愚人节的培训]]></title>
			<category>琐记</category>
			<author>wustyunshu@yahoo.com.cn(云舒)</author>
			<link>http://www.icylife.net/yunshu/show.php?id=682</link>
			<guid>http://www.icylife.net/yunshu/show.php?id=682</guid>
			<description>
				<![CDATA[
<p>昨天下午做了一场例行培训，但是当我开始讲解攻击案例的时候，PPT变成了这样&hellip;&hellip;</p>
<p><img width="814" height="530" src="/userfiles/image/fcc3d9491abcfb0918a077b6a1acc411.jpg" alt="" /></p>
<p>再翻一页，终于ok了。</p>
<p><img width="825" height="574" src="/userfiles/image/6127ae1c50349da9e754d3dc44519e30.JPG" alt="" /></p>
				]]>
			</description>
			<pubDate>Thu, 02 Apr 2009 13:32:38 +0800</pubDate>
		</item>
	</channel>
</rss>
