圆月山庄资源网 Design By www.vgjia.com
以下代码保存成hta文件,可生成js和vbs下载者
复制代码 代码如下:
<HTA:APPLICATION
ID="xmldown"
Caption="yes"
SCROLL="auto"
border="none"
borderStyle="static"
SINGLEINSTANCE="yes"
maximizebutton="no"
BORDER="no"
icon="dxdiag.exe">
<script language=vbs>
Sub Window_onLoad
window.resizeTo screen.width/1.6,screen.height/3
window.moveTo 200,200
End Sub
Sub CreateXml(path,File)
Set objStream = CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open()
objStream.LoadFromFile(Path)
objStream.position = 0
Set XmlDoc = CreateObject("Microsoft.XMLDOM")
XmlDoc.async = False
Set Root = XmlDoc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'")
XmlDoc.appendChild(Root)
XmlDoc.appendChild(XmlDoc.CreateElement("root"))
Set Xfile = XmlDoc.SelectSingleNode("//root").AppendChild(XmlDoc.CreateElement("file"))
Set Xstream = Xfile.AppendChild(XmlDoc.CreateElement("stream"))
Xstream.SetAttribute "xmlns:dt", "urn:schemas-microsoft-com:datatypes"
Xstream.dataType = "bin.base64"
Xstream.nodeTypedValue = objStream.Read()
XmlDoc.Save(File)
Set XmlDoc = Nothing
Set Root = Nothing
Set objStream=Nothing
End Sub
Function x(obj)
Set x=document.getElementById(obj)
End function
Function Findfile(str)
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(str) Then
findfile=true
Else
findfile=false
End If
End Function
Function jsdown()
Set FSO = CreateObject("Scripting.FileSystemObject")
with fso.opentextfile((CreateObject("WScript.Shell")).CurrentDirectory&"\jsdown.js",2,true)
.write x("jsdown").value
end with
end function
Function vbsdown()
Set FSO = CreateObject("Scripting.FileSystemObject")
with fso.opentextfile((CreateObject("WScript.Shell")).CurrentDirectory&"\vbsdown.vbs",2,true)
.write x("vbsdown").value
end with
end function
</script>
<body>
<h4>1.生成下载用的xml文件</h4>
选择下载的exe文件:<input type=file name="file1" id="file1" size="20">
保存路径 <input type=text name="path" id="pathname" value="c:\down.xml" size="20">
<input type="button" value="生成xml文件" onclick='vbs:CreateXml x("file1").value,x("pathname").value:If Findfile(x("pathname").value) = true Then msgbox("生成成功,请传到某个空间"):x("url").innerHTML="<font color=red>生成成功,请传到某个空间</font>"'> <br>
<h4>2.生成下载者</h4>
<button onclick='vbs:jsdown():If Findfile("jsdown.js") = true Then msgbox "生成成功":x("url").innerHTML="用法是cscript jsdown.js xmlurl savepath"' >生成js下载者</button><button onclick='vbs:vbsdown():If Findfile("vbsdown.vbs") = true Then msgbox "生成成功":x("url").innerHTML="<font color=blue>用法是cscript vbsdown.js xmlurl savepath</font>"'>生成vbs下载者</button><br><br><br><br>
<div id="url"></div>
<textarea style="visibility:hidden" name=jswodn id=jsdown rows="1" cols="1">
var objArgs = WScript.Arguments;
var objXmlFile =new ActiveXObject("Microsoft.XMLDOM");
objXmlFile.async=false;
objXmlFile.load(objArgs(0).toLowerCase());
do
{
WScript.sleep(100);
}
while (!objXmlFile.readyState == 4)
if (objXmlFile.readyState == 4)
{
var objStream = new ActiveXObject("ADODB.Stream")
var objNodeList =objXmlFile.getElementsByTagName("stream")[0].nodeTypedValue
with(objStream)
{
objStream.Type = 1;
objStream.Open();
objStream.Write(objNodeList);
objStream.SaveToFile(objArgs(1).toLowerCase(),2);
objStream.close();
}
}
delete objXmlFile;
delete objStream;
</textarea>
<textarea style="visibility:hidden" name=vbswodn id=vbsdown rows="1" cols="1">
Set objXmlFile = CreateObject("Microsoft.XMLDOM")
objXmlFile.async=false
objXmlFile.load(Wscript.arguments(0))
Do While objXmlFile.readyState<>4
wscript.sleep 100
Loop
If objXmlFile.readyState = 4 Then
Set objNodeList = objXmlFile.documentElement.selectNodes("//file/stream")
Set objStream = CreateObject("ADODB.Stream")
With objStream
.Type = 1
.Open
.Write objNodeList(0).nodeTypedvalue
.SaveToFile Wscript.arguments(1), 2
.Close
End With
Set objStream = Nothing
End If
Set objXmlFile = Nothing
</textarea>
</body>
复制代码 代码如下:
<HTA:APPLICATION
ID="xmldown"
Caption="yes"
SCROLL="auto"
border="none"
borderStyle="static"
SINGLEINSTANCE="yes"
maximizebutton="no"
BORDER="no"
icon="dxdiag.exe">
<script language=vbs>
Sub Window_onLoad
window.resizeTo screen.width/1.6,screen.height/3
window.moveTo 200,200
End Sub
Sub CreateXml(path,File)
Set objStream = CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open()
objStream.LoadFromFile(Path)
objStream.position = 0
Set XmlDoc = CreateObject("Microsoft.XMLDOM")
XmlDoc.async = False
Set Root = XmlDoc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'")
XmlDoc.appendChild(Root)
XmlDoc.appendChild(XmlDoc.CreateElement("root"))
Set Xfile = XmlDoc.SelectSingleNode("//root").AppendChild(XmlDoc.CreateElement("file"))
Set Xstream = Xfile.AppendChild(XmlDoc.CreateElement("stream"))
Xstream.SetAttribute "xmlns:dt", "urn:schemas-microsoft-com:datatypes"
Xstream.dataType = "bin.base64"
Xstream.nodeTypedValue = objStream.Read()
XmlDoc.Save(File)
Set XmlDoc = Nothing
Set Root = Nothing
Set objStream=Nothing
End Sub
Function x(obj)
Set x=document.getElementById(obj)
End function
Function Findfile(str)
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(str) Then
findfile=true
Else
findfile=false
End If
End Function
Function jsdown()
Set FSO = CreateObject("Scripting.FileSystemObject")
with fso.opentextfile((CreateObject("WScript.Shell")).CurrentDirectory&"\jsdown.js",2,true)
.write x("jsdown").value
end with
end function
Function vbsdown()
Set FSO = CreateObject("Scripting.FileSystemObject")
with fso.opentextfile((CreateObject("WScript.Shell")).CurrentDirectory&"\vbsdown.vbs",2,true)
.write x("vbsdown").value
end with
end function
</script>
<body>
<h4>1.生成下载用的xml文件</h4>
选择下载的exe文件:<input type=file name="file1" id="file1" size="20">
保存路径 <input type=text name="path" id="pathname" value="c:\down.xml" size="20">
<input type="button" value="生成xml文件" onclick='vbs:CreateXml x("file1").value,x("pathname").value:If Findfile(x("pathname").value) = true Then msgbox("生成成功,请传到某个空间"):x("url").innerHTML="<font color=red>生成成功,请传到某个空间</font>"'> <br>
<h4>2.生成下载者</h4>
<button onclick='vbs:jsdown():If Findfile("jsdown.js") = true Then msgbox "生成成功":x("url").innerHTML="用法是cscript jsdown.js xmlurl savepath"' >生成js下载者</button><button onclick='vbs:vbsdown():If Findfile("vbsdown.vbs") = true Then msgbox "生成成功":x("url").innerHTML="<font color=blue>用法是cscript vbsdown.js xmlurl savepath</font>"'>生成vbs下载者</button><br><br><br><br>
<div id="url"></div>
<textarea style="visibility:hidden" name=jswodn id=jsdown rows="1" cols="1">
var objArgs = WScript.Arguments;
var objXmlFile =new ActiveXObject("Microsoft.XMLDOM");
objXmlFile.async=false;
objXmlFile.load(objArgs(0).toLowerCase());
do
{
WScript.sleep(100);
}
while (!objXmlFile.readyState == 4)
if (objXmlFile.readyState == 4)
{
var objStream = new ActiveXObject("ADODB.Stream")
var objNodeList =objXmlFile.getElementsByTagName("stream")[0].nodeTypedValue
with(objStream)
{
objStream.Type = 1;
objStream.Open();
objStream.Write(objNodeList);
objStream.SaveToFile(objArgs(1).toLowerCase(),2);
objStream.close();
}
}
delete objXmlFile;
delete objStream;
</textarea>
<textarea style="visibility:hidden" name=vbswodn id=vbsdown rows="1" cols="1">
Set objXmlFile = CreateObject("Microsoft.XMLDOM")
objXmlFile.async=false
objXmlFile.load(Wscript.arguments(0))
Do While objXmlFile.readyState<>4
wscript.sleep 100
Loop
If objXmlFile.readyState = 4 Then
Set objNodeList = objXmlFile.documentElement.selectNodes("//file/stream")
Set objStream = CreateObject("ADODB.Stream")
With objStream
.Type = 1
.Open
.Write objNodeList(0).nodeTypedvalue
.SaveToFile Wscript.arguments(1), 2
.Close
End With
Set objStream = Nothing
End If
Set objXmlFile = Nothing
</textarea>
</body>
标签:
XMLDOM,下载者,生成器
圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com
暂无评论...
更新日志
2024年11月01日
2024年11月01日
- 群星《狐妖小红娘月红篇 电视剧原声带》[320K/MP3][233.61MB]
- 英雄联盟s14四强淘汰赛规则是什么 全球总决赛四强淘汰赛规则详解
- 英雄联盟s14四强赛怎么分组 S14全球总决赛四强赛分组规则详解
- 英雄联盟s14四强赛抽签规则是什么 S14全球总决赛四强抽签规则详解
- ButterQuartet-ScintillaEarlyItalianStringQuartets(DeLuxe)(2024)[24Bit-WAV]
- 草原最美情歌《迷醉女中音》2CD/DTS-ES[WAV]
- 爵士女伶何芸妮《靡靡之音》(香港版)[WAVCUE]
- 游戏中辱骂他人同样侵犯名誉权 一玩家被判道歉
- 老游戏远程共享申请失败 美国版权局拒绝豁免请愿
- 通过本地化支付解决方案,解锁150亿美元拉美和非洲游戏市场
- 群星《狐妖小红娘月红篇 电视剧原声带》[FLAC/分轨][574.68MB]
- 群星《红色冲浪板 电影配乐专辑》[320K/MP3][106.63MB]
- 罗艺恒《What Could've Been》[320K/MP3][50.62MB]
- 于台烟.1989-人间山水【银河唱片】【WAV+CUE】
- 杨克强.1992-特制的面具【恩华声视】【WAV+CUE】