How to convert hex editor output of the form "0x00000040 20 66 6F 72 6D 2D 64 61 74 61 3B 20 6E 61 6D 65 form-data; name" to plain text?

0

I get output from visual studio as a string in the form of:

  0x00000000  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D    ----------------
  0x00000010  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  2D  37  64  34    -------------7d4
  0x00000020  32  38  39  33  32  38  30  36  37  30  0D  0A  43  6F  6E  74    2893280670..Cont
  0x00000030  65  6E  74  2D  44  69  73  70  6F  73  69  74  69  6F  6E  3A    ent-Disposition:
  0x00000040  20  66  6F  72  6D  2D  64  61  74  61  3B  20  6E  61  6D  65     form-data; name

This is from the response view window after sending a request from a web performance test. Unfortunately there is no option for changing the format of the view in visual studio. I just need to view this as plain text. Other than creating my own parser, is there a way to convert text of this format to just plain text?


Meta: This question has turned into a complete mess as it was poorly asked. I have reformulated the question entirely to hopefully be less misleading. Should I just have reasked it? I've kept the old question formulation below so as not to make the current answers and comments seem irrelevant.


Old formulation of question:

Edit 3: I have clearly not been able to explain my question properly. When I run a visual studio web performance test I can view the response in the format shown above. However I need to view it as just plain text which there is no option for in visual studio. So I need a way to convert from the format shown above to plain text.

Is this a standard output format? The "0x00000040" does not seem to be part of the actual data, but rather just the line number. The two following parts seems to be just the same thing twice, first as hexadecimals then as characters. I don't recognize this format, and attempting to search have only returned results on how to convert from hexadecimal to string. Are there parsers that can split this into 3 columns, or better yet just 3 strings (one for eah column). I really just need the character output.

I get this data when I view the response to requests when running web performance tests in visual studio. The actual response itself is not in this format, just the way visual studio presents it.

Edit: Added some clarification on where the data comes from. I'm really just trying to figure out if there is an easy way to convert away from this format to just plain text since there does not seem to be an option to view it as plain text in visual studio.

visual-studio
hex-editors
asked on Stack Overflow Mar 21, 2016 by EJS • edited Mar 21, 2016 by EJS

1 Answer

0

This is the standard view of a hex editor.

Left: The Address

Center: The Content of the file --> 16 Bytes starting at the left address

Right: The Content encoded as ASCII

To get the Bytes only try to read the file directly like this: https://msdn.microsoft.com/de-de/library/system.io.file.readallbytes%28v=vs.110%29.aspx

byte[] Content = File.ReadAllBytes(@"FILEPATH");

So you get only the bytes in the center.

To get the encoded content: https://msdn.microsoft.com/de-de/library/ms143368%28v=vs.110%29.aspx

string Content = File.ReadAllText(@"FILEPATH");
answered on Stack Overflow Mar 21, 2016 by Fruchtzwerg

User contributions licensed under CC BY-SA 3.0