GetFile.wsc
复制代码 代码如下:
<?xml version="1.0" encoding="gb2312"?>
<component>
<?component error="true" debug="true"?>
<public>
<property name="Referer" />
<property name="Content" />
<property name="Data" />
<method name="GetFile">
<parameter name="URL" />
</method>
<method name="Save">
<parameter name="Path" />
</method>
</public>
<implements type="Behavior">
<event name="ondowncomplete" />
</implements>
<object progid="Microsoft.XmlHttp" id="Http" />
<script language="javascript">
<![CDATA[
var Referer, Content, Data;
var Stream = new ActiveXObject("ADODB.Stream");
Stream.Type = 1;
function onReady()
{
if(Http.readyState == 4)
{
Content = Http.responseText;
Data = Http.responseBody;
fireEvent("ondowncomplete");
Http.abort();
}
}
function GetFile(URL)
{
Http.onreadystatechange = onReady;
Http.open("GET", URL, true, "", "");
if(Referer) Http.setRequestHeader("Referer", Referer);
Http.send(null);
}
function Save(Path)
{
Stream.Open();
Stream.Write(Data);
Stream.SaveToFile(Path, 2);
Stream.Close();
}
]]>
</script>
</component>
test.hta
复制代码 代码如下:
<html><head><script>
var Down = document.createElement("Comment");
document.lastChild.lastChild.appendChild(Down);
Down.style.behavior="url(GetFile.wsc)";
Down.ondowncomplete = function()
{
//document.write(Down.Content);
Down.Save(SaveTo.value);
Go.disabled=0;
alert("OK");
}
function GetFile()
{
Go.disabled = 1;
Down.Referer = Referer.value;
Down.GetFile(URL.value);
}
</script>
</head><body>
URL: <input id="URL" size="50" value="http://www.booksky.biz/SendFile.aspx?FileID=15531"><br>
Referer: <input name="Referer" size="40" value="http://www.booksky.biz"><br>
SaveTo: <input name="SaveTo" size="40" value="D:\Test.gif"><br>
<input id="Go" type=button value="下载" onclick="GetFile()">
</body></html>
复制代码 代码如下:
<?xml version="1.0" encoding="gb2312"?>
<component>
<?component error="true" debug="true"?>
<public>
<property name="Referer" />
<property name="Content" />
<property name="Data" />
<method name="GetFile">
<parameter name="URL" />
</method>
<method name="Save">
<parameter name="Path" />
</method>
</public>
<implements type="Behavior">
<event name="ondowncomplete" />
</implements>
<object progid="Microsoft.XmlHttp" id="Http" />
<script language="javascript">
<![CDATA[
var Referer, Content, Data;
var Stream = new ActiveXObject("ADODB.Stream");
Stream.Type = 1;
function onReady()
{
if(Http.readyState == 4)
{
Content = Http.responseText;
Data = Http.responseBody;
fireEvent("ondowncomplete");
Http.abort();
}
}
function GetFile(URL)
{
Http.onreadystatechange = onReady;
Http.open("GET", URL, true, "", "");
if(Referer) Http.setRequestHeader("Referer", Referer);
Http.send(null);
}
function Save(Path)
{
Stream.Open();
Stream.Write(Data);
Stream.SaveToFile(Path, 2);
Stream.Close();
}
]]>
</script>
</component>
test.hta
复制代码 代码如下:
<html><head><script>
var Down = document.createElement("Comment");
document.lastChild.lastChild.appendChild(Down);
Down.style.behavior="url(GetFile.wsc)";
Down.ondowncomplete = function()
{
//document.write(Down.Content);
Down.Save(SaveTo.value);
Go.disabled=0;
alert("OK");
}
function GetFile()
{
Go.disabled = 1;
Down.Referer = Referer.value;
Down.GetFile(URL.value);
}
</script>
</head><body>
URL: <input id="URL" size="50" value="http://www.booksky.biz/SendFile.aspx?FileID=15531"><br>
Referer: <input name="Referer" size="40" value="http://www.booksky.biz"><br>
SaveTo: <input name="SaveTo" size="40" value="D:\Test.gif"><br>
<input id="Go" type=button value="下载" onclick="GetFile()">
</body></html>
标签:
referer,下载文件
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“通过修改referer下载文件的方法”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。