
使用脚本下载网页
发布时间:2006-03-15 16:48:29 来源:友佳学院(整理) 网友评论 0 条
/**
* Script: dlwebpage.js
* Purpose: Downloads the webpage specified by 'url'
* Author: Daren Thiel
* Date: 17 May 1999
*
* Note: Rename this script dlwebpage.js
* Web: http://www.winscripter.com
* Copyright 1999 Daren Thiel
**/
* Script: dlwebpage.js
* Purpose: Downloads the webpage specified by 'url'
* Author: Daren Thiel
* Date: 17 May 1999
*
* Note: Rename this script dlwebpage.js
* Web: http://www.winscripter.com
* Copyright 1999 Daren Thiel
**/
// The URL to download
var url = "http://www.aboutnt.com/default.htm"
// Create instance of Inet Control
inet = new ActiveXObject("InetCtls.Inet");
// Set the timeout property
inet.RequestTimeOut = 20;
// Set the URL property of the control
inet.Url = url;
// Actually download the file
var s = inet.OpenURL();
// Show the raw HTML to the user
WScript.Echo( s );
// Bonus - Find the title of the page
// Regular expression to find the string stored between
// the title tags.
rtitle = /<title>(.*)<//title>/i;
// Execute the regular expression on the raw HTML
var title = rtitle.exec( s );
// Display the result
WScript.Echo( RegExp.$1
推荐阅讯
- Cgi入门教程之:11 写文件
- 什么是CGI
- WEB服务CGI接口漏洞分析
- Cgi入门教程之:13 留言板CGI代码
- Cgi入门教程之:14 代码详解
- Perl操作Mysql数据库
- cgilib例
- Cgi入门教程之:15 读取log文件
- CGI计数器的编写方法
- Cgi入门教程之:9 BODY部分
阅读排行
- 1.什么是CGI
- 2.CGI计数器的编写方法
- 3.CGI动态创建图象
- 4.unix 下的文件属性
- 5.Cgi入门教程之:13 留言板CGI代码
- 6.Perl操作Mysql数据库
- 7.Cgi入门教程之:11 写文件
- 8.Cgi入门教程之:16 设置口令
- 9.Cgi入门教程之:1 Unix环境
- 10.Cgi入门教程之:12 建立log文件
专题教程
- 大话G游 专题:手机病毒揭密
- ARP攻击防范与解决方案 路由故障处理手册
- Picasa中文版_Picasa教程 专题:清除流氓软件
- Firefox专题 seo搜索引擎优化专区
- 重装Windows必知的事情 装机之必备软件大行动
病毒专杀栏
