1

Is it possible to compile a SoapHexBinary back to an .exe

var str = new SoapHexBinary(File.ReadAllBytes(@"c:\test\test.exe")).ToString();
Console.WriteLine(str);
Corentin Pane
  • 4,794
  • 1
  • 12
  • 29
EZC404
  • 25
  • 1
  • 4
  • 1
    You might want to actually read the mouse-over info on the "compile" tag; "Compilation is the transformation of source text into some other form or representation." There is no source code involved in this. Text-format bytes do not equal source code. – Nyerguds Feb 10 '20 at 22:24

1 Answers1

1
byte[] bytes = SoapHexBinary.Parse(str).Value

Note that there's no "compile" here - it is just bytes that happen to be an exe; once you get the bytes back, they are still the same exe (if you'd sent a gif file, it would still be the same gif file, etc). If you want it as a file: write the bytes to the file system.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900