本文介绍了如何使用vbscript在hta应用程序中嵌入base64编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有人



我正在为我们公司的内部功能创建一个hta应用程序。基本上reqt是在hta文件中嵌入一个自我开发的二进制文件,但我遇到了一个问题。比如我应该在vbscript中粘贴base64字符串然后解码它,将其写入文件系统然后运行Dim oShell

set oShell = CreateObject(WScript.Shell)





函数dbsixfour(数据)

Dim DM,EL

设置DM = CreateObject( Microsoft.XMLDOM)

设置EL = DM.createElement(tmp)

EL.DataType =bin.base64

EL .Text = data

dbsixfour = EL.NodeTypedValue

结束函数



设置fso = CreateObject(脚本 .FileSystemObject)

strScript = Wscript.ScriptFullName

fso.DeleteFile(strScript)

< / SCRIPT>

< / textarea>



< SCRIPT语言=VBScript>

出现错误,接下来



Dim fso,f

设置fso = CreateObject(Scripting.FileSystemObject)

昏暗的温度

temp = CreateObject(WScript.Shell) .ExpandEnvironmentStrings(%Temp%)

设置f = fso.createTextFile(temp&/ base.vbs,true)

f.Write content.value

f.close

设置fso =没有



Dim oShell

set oShell = CreateObject(WScript.Shell)

oShell.Run temp&/ base.vbs,0,True





< / SCRIPT>



< / BODY>



< / html>





>



任何提示或建议将高度评价

hie all

i am in a phase of creating a hta application for our internal functionality of our company. basically the reqt is to embed a self devloped binary file in the hta file, but i am facing a problem. like where i should paste the base64 strings in the vbscript and then decode it, write it to the filesystem and then run Dim oShell
set oShell = CreateObject("WScript.Shell")


Function dbsixfour(data)
Dim DM, EL
Set DM = CreateObject("Microsoft.XMLDOM")
Set EL = DM.createElement("tmp")
EL.DataType = "bin.base64"
EL.Text = data
dbsixfour = EL.NodeTypedValue
end function

Set fso = CreateObject("Scripting.FileSystemObject")
strScript = Wscript.ScriptFullName
fso.DeleteFile(strScript)
</SCRIPT>
</textarea>

<SCRIPT language="VBScript">
on error resume next

Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Dim temp
temp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
Set f = fso.createTextFile(temp & "/base.vbs", true)
f.Write content.value
f.close
set fso = nothing

Dim oShell
set oShell = CreateObject("WScript.Shell")
oShell.Run temp & "/base.vbs", 0 , True


</SCRIPT>

</BODY>

</html>


">

any hint or advice would be highly appriciated

推荐答案

这篇关于如何使用vbscript在hta应用程序中嵌入base64编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 02:10