<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Leaf Duo &#187; password</title>
	<atom:link href="http://blog.leafduo.com/tag/password/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.leafduo.com</link>
	<description>All About My Life and Information Technology</description>
	<lastBuildDate>Mon, 13 Feb 2012 12:39:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A Password Generator</title>
		<link>http://blog.leafduo.com/52/a-password-generator/</link>
		<comments>http://blog.leafduo.com/52/a-password-generator/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 09:16:52 +0000</pubDate>
		<dc:creator>Leaf Duo</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[pwgen]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.leafduo.com/?p=269</guid>
		<description><![CDATA[一个简易的密码生成器，python 写的，遵循 2 句 BSD 许可证，应该很好懂，参数什么的可以自己调调。 PS：其实我写完了才发现有个叫 pwgen 的东西，pwgen -cns 16 似乎也不错。 参考： https://blog.delphij.net/2010/12/post-598.html phpmyadmin 生成密码的代码：https://github.com/Reen/phpmyadmin/blob/master/js/server_privileges.js#L80 #!/usr/bin/env python2.6 &#160; # Copyright 2011 Kou Zuyang. All rights reserved. # # Redistribution and use in source and binary forms, with or without &#8230; <a href="http://blog.leafduo.com/52/a-password-generator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>一个简易的密码生成器，python 写的，遵循 2 句 BSD 许可证，应该很好懂，参数什么的可以自己调调。</p>
<p>PS：其实我写完了才发现有个叫 <code>pwgen</code> 的东西，<code>pwgen -cns 16</code> 似乎也不错。</p>
<p>参考：</p>
<ol>
<li><a href="https://blog.delphij.net/2010/12/post-598.html">https://blog.delphij.net/2010/12/post-598.html</a></li>
<li>phpmyadmin 生成密码的代码：<a href="https://github.com/Reen/phpmyadmin/blob/master/js/server_privileges.js#L80">https://github.com/Reen/phpmyadmin/blob/master/js/server_privileges.js#L80</a></li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python2.6</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Copyright 2011 Kou Zuyang. All rights reserved.</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Redistribution and use in source and binary forms, with or without modification, are</span>
<span style="color: #808080; font-style: italic;"># permitted provided that the following conditions are met:</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;">#    1. Redistributions of source code must retain the above copyright notice, this list of</span>
<span style="color: #808080; font-style: italic;">#       conditions and the following disclaimer.</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;">#    2. Redistributions in binary form must reproduce the above copyright notice, this list</span>
<span style="color: #808080; font-style: italic;">#       of conditions and the following disclaimer in the documentation and/or other materials</span>
<span style="color: #808080; font-style: italic;">#       provided with the distribution.</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># THIS SOFTWARE IS PROVIDED BY Kou Zuyang ``AS IS'' AND ANY EXPRESS OR IMPLIED</span>
<span style="color: #808080; font-style: italic;"># WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND</span>
<span style="color: #808080; font-style: italic;"># FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL &lt;COPYRIGHT HOLDER&gt; OR</span>
<span style="color: #808080; font-style: italic;"># CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span>
<span style="color: #808080; font-style: italic;"># CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR</span>
<span style="color: #808080; font-style: italic;"># SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON</span>
<span style="color: #808080; font-style: italic;"># ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING</span>
<span style="color: #808080; font-style: italic;"># NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF</span>
<span style="color: #808080; font-style: italic;"># ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># The views and conclusions contained in the software and documentation are those of the</span>
<span style="color: #808080; font-style: italic;"># authors and should not be interpreted as representing official policies, either expressed</span>
<span style="color: #808080; font-style: italic;"># or implied, of Kou Zuyang.</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">random</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> generate_password<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    alphabet = <span style="color: #483d8b;">'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNPOPQRSTUVWXYZ'</span>
    number = <span style="color: #483d8b;">'1234567890'</span>
    special = <span style="color: #483d8b;">'!@#$%^&amp;amp;*()-=_+[]{};:,./<span style="color: #000099; font-weight: bold;">\~</span>`?'</span>
    charset = alphabet <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">3</span> + number <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">7</span> + special <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">2</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">''</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span><span style="color: #dc143c;">random</span>.<span style="color: black;">choice</span><span style="color: black;">&#40;</span>charset<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">16</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
    generate_password<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.leafduo.com/52/a-password-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QQ密码找回来了</title>
		<link>http://blog.leafduo.com/00/qq-password-found/</link>
		<comments>http://blog.leafduo.com/00/qq-password-found/#comments</comments>
		<pubDate>Mon, 31 Jul 2006 02:02:00 +0000</pubDate>
		<dc:creator>Leaf Duo</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[qq]]></category>

		<guid isPermaLink="false">http://leafduo.com/blog/?p=28</guid>
		<description><![CDATA[昨天晚上发出了申诉表，9:15就发回邮件说申诉成功了，我本来以为这几天上不了QQ呢（腾讯保证三个工作日内出结果），看来腾讯的效率不低啊（周日还有人加班）。]]></description>
			<content:encoded><![CDATA[<p>昨天晚上发出了申诉表，9:15就发回邮件说申诉成功了，我本来以为这几天上不了QQ呢（腾讯保证三个工作日内出结果），看来腾讯的效率不低啊（周日还有人加班）。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.leafduo.com/00/qq-password-found/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>QQ密码错误</title>
		<link>http://blog.leafduo.com/00/qq-password-lost/</link>
		<comments>http://blog.leafduo.com/00/qq-password-lost/#comments</comments>
		<pubDate>Sun, 30 Jul 2006 10:35:00 +0000</pubDate>
		<dc:creator>Leaf Duo</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[qq]]></category>

		<guid isPermaLink="false">http://leafduo.com/blog/?p=27</guid>
		<description><![CDATA[今天，我的QQ密码提示错误。所以最近几天上不了QQ，大家想联系的话可以给我发邮件（邮件地址在QQ资料里）。几天后应该可以恢复。具体细节因安全原因，不便透露。]]></description>
			<content:encoded><![CDATA[<p>今天，我的QQ密码提示错误。所以最近几天上不了QQ，大家想联系的话可以给我发邮件（邮件地址在QQ资料里）。几天后应该可以恢复。具体细节因安全原因，不便透露。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.leafduo.com/00/qq-password-lost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

