<?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>肖建彬的博客 &#187; 加密</title>
	<atom:link href="http://www.xiaojb.com/archives/tag/%e5%8a%a0%e5%af%86/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xiaojb.com</link>
	<description>奋斗无止境 爱拼才会赢</description>
	<lastBuildDate>Sun, 16 Oct 2011 14:27:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>偷某站加密的Javascript进行解密</title>
		<link>http://www.xiaojb.com/archives/it/javascript-decode.shtml</link>
		<comments>http://www.xiaojb.com/archives/it/javascript-decode.shtml#comments</comments>
		<pubDate>Thu, 03 Apr 2008 11:27:29 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[解密]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[加密]]></category>

		<guid isPermaLink="false">http://www.xiaojb.com/?p=620</guid>
		<description><![CDATA[某站的javascript代码做了简单的编码，由于想偷这个功能，又懒得自己写。网上找了一下解决方法 从IE浏览器中输入这段代码 javascript:x=document.documentElement.outerHTML;document.write(&#8216;&#60;body&#62;&#60;/body&#62;&#8217;);document.body.innerText=x; 我试过，还是可以看到的。 变eval为document.write 或者 document.getElementById(&#8216;x&#8217;).innerText = 某些方法是将javascript代码编码后，在调用时解码，然后用eval执行，所以把eval改成document.write就能打印解开后的代码。 我在测试网页中创建了一个id为x的div。轻松在IE中看到了javascript代码。 我之前尝试了innerHTML，结果javascript中的html都被解释了，之后尝试innerText, 成功！ innerText在IE下才有效。 无论是什么javascript加密方法，如果用了eval，应该都可以用这种方法解密。 其他的方法网上太多，就不介绍了。]]></description>
			<content:encoded><![CDATA[<p>    某站的<a href="http://www.xiaojb.com/archives/tag/javascript">javascript</a>代码做了简单的编码，由于想偷这个功能，又懒得自己写。网上找了一下解决方法</p>
<ol>
<li>从IE浏览器中输入这段代码</li>
<p>javascript:x=document.documentElement.outerHTML;document.write(&#8216;&lt;body&gt;&lt;/body&gt;&#8217;);document.body.innerText=x;</p>
<p>我试过，还是可以看到的。</p>
<li><strong>变eval为document.write 或者 document.getElementById(&#8216;x&#8217;).innerText =</strong></li>
<p>某些方法是将<a href="http://www.xiaojb.com/archives/tag/javascript">javascript</a>代码编码后，在调用时解码，然后用eval执行，所以把eval改成document.write就能打印解开后的代码。<br />
我在测试网页中创建了一个id为x的div。轻松在IE中看到了<a href="http://www.xiaojb.com/archives/tag/javascript">javascript</a>代码。<br />
我之前尝试了innerHTML，结果javascript中的html都被解释了，之后尝试innerText, 成功！<br />
innerText在IE下才有效。</p>
<p>无论是什么<a href="http://www.xiaojb.com/archives/tag/javascript">javascript</a>加密方法，如果用了eval，应该都可以用这种方法解密。
</ol>
<p>其他的方法网上太多，就不介绍了。 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiaojb.com/archives/it/javascript-decode.shtml/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

