theMace

Writing Base64 encoded data to file vith vbs script

Jul 19th, 2012
346
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit:
  2. Dim D, E, b, out
  3. 'Set the output filename:
  4. out = "c:\\out.exe"
  5. Set D = CreateObject("Microsoft.XMLDOM")
  6. Set E = D.createElement("tmp")
  7. E.DataType = "bin.base64"
  8. ' set the base64 encoded value to here:
  9. E.Text = "Q3VyaW9zaXR5IGlzIGEgcmVxdWlyZW1lbnQgZm9yIGEgaGFja2Vy"
  10. Set b = CreateObject("ADODB.Stream")
  11. b.Type = 1
  12. b.Open
  13. b.Write E.NodeTypedValue
  14. b.SaveToFile out, 2
RAW Paste Data