壹次网首页 | 工具源码首页 | 技术文章首页 | 文章分类 | | |

文章搜索: 分类 关键字
您的位置:首页网络编程JavaScript → win xp sp2中还有什么方法能用view-source吗?
win xp sp2中还有什么方法能用view-source吗?
添加日期:2006-9-13 8:28:29     [ ]
一个很实用的功能被屏蔽了,以前在浏览器里面输入view-source:http://www.yici.net就可以在不打开执行该页面的情况下查看这个页面的源代码,这对分析一个网页是否带病毒很有用,没必要先打开,中毒一次再从"查看"--"源代码"里去看代码.但XP SP2以后的版本包括WIN2003已经没有这个功能.

  在国内查过不少资料,没找到详细的,后来在一个国外站点上,看到了比较详细的解答.


--------------------------------------------------------------------------------

View Link Source for Internet Explorer makes it easier to VIEW the LINK SOURCE of a stream. When installed you can right-click on a link and then a View Link Source option is availabe in the context menu. It is also possible to select the text of the location (with or without http://)andright-clickontheselectiontoViewLinkSo ... himagesthathavealinktoafile. 

Installation instructions:

Open notepad and copy the following text into it:


                  
<script language="javascript" defer>
if (external.menuArguments) {
  var selectedtext = external.menuArguments.document.selection.createRange().text;
  if(selectedtext) {
    if(selectedtext.match("http://"))window.open('view-source:'+selectedtext); 
    else window.open('view-source:http://'+selectedtext); }
  else {
    var clickelement = external.menuArguments.event.srcElement;
    if ( clickelement.tagName == 'IMG' ) 
      window.open('view-source:' + clickelement.parentElement.href);
    else window.open('view-source:' + clickelement.href); }}
</script>


And save as viewsource.html in C:\WINDOWS\Web.

Clear notepad and copy into it:


                  
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\View Link Source]
@="C:\\windows\\web\\viewsource.html"
"contexts"=dword:00000032


Save as viewsource.reg in any folder. Double-click on viewsource.reg to add it to the registry. When Windows asks for a confirmation choose Yes.

When you want to remove the add-on, open viewsource.reg in notepad and change [HKEY to [-HKEY and save it. Double-click to remove the key from the registry. And delete viewsource.html in C:\WINDOWS\Web.

For more (technical) information about custom IE context menus go to www.siteexperts.com/tips/hj/ts01/index.asp

View Link Source Internet Explorer add-on is also available as a ZIP download in any of the files sections of Veblin Software. 


--------------------------------------------------------------------------------


  后来按他的方法试了下,还是不行,先把

<script language="javascript" defer>
if (external.menuArguments) {
  var selectedtext = external.menuArguments.document.selection.createRange().text;
  if(selectedtext) {
    if(selectedtext.match("http://"))window.open('view-source:'+selectedtext); 
    else window.open('view-source:http://'+selectedtext); }
  else {
    var clickelement = external.menuArguments.event.srcElement;
    if ( clickelement.tagName == 'IMG' ) 
      window.open('view-source:' + clickelement.parentElement.href);
    else window.open('view-source:' + clickelement.href); }}
</script>


保存为viewsource.html并复制到C:\WINDOWS\Web 

在把

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\View Link Source]
@="C:\\windows\\web\\viewsource.html"
"contexts"=dword:00000032


保存为viewsource.reg双击导入注册表.重起没效果,一样不能用.

  协议不支持,有人给出的建议是:用www.mozilla.org/products/firefox/做浏览器,这个浏览器支持这个协议,或者是用特殊的软件查看www.codelifter.com/.

  至于微软屏蔽这个功能的原因,是因为这个存在一个漏洞,可以让view-source读取某些恶意代码
出处:论坛转载 作者:佚名 点击:
 热点文章
·photoshop制作香烟、烟头、烟雾
·photoshop图片卷角、翻页效果的制作
·用U盘或移动硬盘装《深山红叶袖珍系统Win PE启动..
·photoshop经典恐怖片海报效果教程
·ghost.pif最新变种手动查杀,ARP欺骗挂马+KAV让..
·photoshop制作3D立体小人和字体
·photoshop水晶球质感表现 - 关于光影的细节
·关于zend解密的程序
·王晨昀:谁来拯救中小网站?
·photoshop泛黄、陈旧纸张效果的制作
 推荐文章
·如何彻底删除一个不需要的系统服务
·模仿QQ和MSN消息提示的效果
·CC攻击的思路及防范方法
·广告联盟的一些评价
Powered by yici.net
CopyRight (C) 2006-2012 版权所有   [ 依次网 ];未经授权,任何人不得抄袭、仿冒本站
ICP备案:苏ICP备05011771号 证书下载 ICP证号:苏ICP证040301
仪征广目网络信息服务有限公司 版权所有