exe转换16进制的html保存的hta实现代码
作者:
用下面这个hta文件来转exe变成16进制的html保存了。这样也会方便一点。
复制代码 代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>package file v0.1</title>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<HTA:APPLICATION
ID="package file v0.1"
APPLICATIONNAME="package file v0.1"
VERSION="0.1"
SCROLL="no"
INNERBORDER="no"
CONTEXTMENU="yes"
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 onload="window.resizeTo 389,145 ">
请选择文件:<input type=file id="srcFile" style="width:260px;">[br][br]
<input type=button value=" 转换 " onclick="transfert"> <input type=button value=" 关闭 " onclick="window.close">
</body>
</html>
您可能感兴趣的文章:
- C# VB 实现10进制 16进制之间互相转换
- JavaScript中的16进制字符(改进)
- JavaScript中的16进制字符介绍
- php中将图片gif,jpg或mysql longblob或blob字段值转换成16进制字符串
- vbs sendKeys 16进制的结合使用(打开IE,静音,打开播放器等)
- VBS 16进制验证特定字符
- asp.net(c#)下各种进制间的轻松转换(2进制、8进制、10进制、16进制)
- vbscript语句中“&H”专用于16进制数表示
- C# 16进制与字符串、字节数组之间的转换
- 文本和16进制UltraEdit-32 v13.20+3 官方简体中文版+破解补丁 提供下载
- 16进制的转换之javascript运行时会自动转码
- c#实现16进制和字符串之间转换的代码
- 16进制显示字节流技巧分享