hta和Html文件差不多,但是至今在网络上却没有一个可以加密hta格式文件的工具,请问批处理之家可否帮我编写下,在Dos。。。批处理论坛也没找到,不知道他们是因为太简单了没写还是没批处理之家的会员们资历高~
hta就是一个HTML应用程序(HTML Application),- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>package file v0.1</title>
- <meta http-equiv="Content-Type" c>
- <HTA:APPLICATION
- ID="package file v0.1"
- APPLICATI
- VERSION="0.1"
- SCROLL="no"
- INNERBORDER="no"
- C
- CAPTION="yes"
- ICON="no"
- SHOWINTASKBAR="yes"
- SINGLEINSTANCE="yes"
- SYSMENU="yes"
- MAXIMIZEBUTTON ="no"
- WINDOWSTATE="normal"
- NAVIGABLE="yes"
- />
- <SCRIPT LANGUAGE="VBScript">
- function transfert()
- dim filename
- filename = document.getElementById("srcFile").value
- if len(filename)>0 then
- dim oReq
- 'on error resume next
- '//创建XMLHTTP对象
- set oReq = CreateObject("MSXML2.XMLHTTP")
- oReq.open "get","file:\\" & filename,false
- oReq.send
- ff = oReq.responseBody
- dim u,s,kk
- u = lenb(ff)
- redim kk(u-1)
- for i=0 to u-1
- s = hex(ascb(midb(ff,i+1,1)))
- if len(s)<2 then
- s = "0" & s
- end if
- 'kk = kk & s
- kk(i) = s
- next
- make filename,join(kk,"")
- else
- document.getElementById("srcFile").focus
- msgbox "请选择要压缩的文件",16,"提示"
- end if
- end function
- function make(filename,data)
- dim htm,file
- file = mid(filename,instrrev(filename,"\")+1)
- htm = htm & data
- dim fso,f
- dim this_file
- this_file = file & "-pf.htm"
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set f = fso.OpenTextFile(this_file, 2, True)
- f.Write htm
- msgbox "生成文件" & this_file & "成功!",64,"生成"
- end function
- </SCRIPT>
- </head>
- <body marginleft=0 marginright=0 >
- 请选择文件:<input type=file id="srcFile" style="width:260px;">____
- <input type=button value=" 转换 " > <input type=button value=" 关闭 " >
- <div id="pageTable" class=pageContent></div>
- <div class="bottom">Code by <a href="http://home.51.com/zhuxiangtao1992" title="我的QQ:810458918 Email:179u@163.com
- ">[www.zhuxiangtao1992.51.com]</a></div>
- </body>
- </html>
复制代码
|