第四十五课:解决bat一句话下载payload黑窗
Last updated
Was this helpful?
Last updated
Was this helpful?
实战中,需要用 bat 解决的事情总会碰到,而针对不同的环境,可能同一件事情需要不同的方案。
bat 内容:追加到bat.txt里。
Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c bat.bat"
oShell.Run strArgs, 0, false
CreateObject("Wscript.Shell").Run "bat.bat", 0, True
If WScript.Arguments.Count >= 1 Then
ReDim arr(WScript.Arguments.Count‐1)
For i = 0 To WScript.Arguments.Count‐1
Arg = WScript.Arguments(i)
If InStr(Arg, " ") > 0 Then Arg = """" & Arg & """"
arr(i) = Arg
Next
RunCmd = Join(arr)
CreateObject("Wscript.Shell").Run RunCmd, 0, True
End If
Micropoor
但是代码过长,需要追加写入。需要简化下代码。
如果需要在目标机上执行多个 bat,如果需要把代码中的 bat.bat 变成变量的话。