Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display processed data in hex view #87

Open
cherue opened this issue Apr 20, 2019 · 1 comment
Open

Display processed data in hex view #87

cherue opened this issue Apr 20, 2019 · 1 comment

Comments

@cherue
Copy link

cherue commented Apr 20, 2019

The WebIDE should show the processed (not the original) data in the hex view.

Let's say we have this file.xor:

0000h: 58 4F 52 44 73 69 7A 65 34 00 00 00 2B 62 28 37  XORDsize4...+b(7 
0010h: 31 36 62 35 23 2C 2C 23 62 20 27 62 23 20 2E 27  16b5#,,#b 'b# .' 
0020h: 62 36 2D 62 30 27 23 26 62 36 2A 2B 31 62 2B 2C  b6-b0'#&b6*+1b+, 
0030h: 62 36 2A 27 62 2A 27 3A 62 34 2B 27 35 42 42 42  b6*'b*':b4+'5BBB 
0040h: 73 6F 6D 65 20 6D 6F 72 65 20 64 61 74 61 20 68  some more data h 
0050h: 65 72 65 20 6C 61 6C 61 6C 61                    ere lalala

The ksy could look something like this:

meta:
  id: xord
  file-extension: xor
  endian: le
seq:
  - id: magic
    contents: "XORD"
  - id: size_string
    contents: "size"
  - id: size
    type: u4
  - id: data
    size: size
    process: xor(0x42)
  - id: whatever
    type: whatever

The hex view should look like this:

0000h: 58 4F 52 44 73 69 7A 65 34 00 00 00 69 20 6A 75  XORDsize4...i ju 
0010h: 73 74 20 77 61 6E 6E 61 20 62 65 20 61 62 6C 65  st wanna be able 
0020h: 20 74 6F 20 72 65 61 64 20 74 68 69 73 20 69 6E   to read this in 
0030h: 20 74 68 65 20 68 65 78 20 76 69 65 77 00 00 00   the hex view... 
0040h: 73 6F 6D 65 20 6D 6F 72 65 20 64 61 74 61 20 68  some more data h 
0050h: 65 72 65 20 6C 61 6C 61 6C 61                    ere lalala

Or even better, split up into streams like this:

0000h: 58 4F 52 44 73 69 7A 65 34 00 00 00              XORDsize4...

0000h: 69 20 6A 75 73 74 20 77 61 6E 6E 61 20 62 65 20  i just wanna be  
0010h: 61 62 6C 65 20 74 6F 20 72 65 61 64 20 74 68 69  able to read thi 
0020h: 73 20 69 6E 20 74 68 65 20 68 65 78 20 76 69 65  s in the hex vie 
0030h: 77 00 00 00                                      w...

0040h: 73 6F 6D 65 20 6D 6F 72 65 20 64 61 74 61 20 68  some more data h 
0050h: 65 72 65 20 6C 61 6C 61 6C 61                    ere lalala

This would make it much easier to work with processed data.

@KOLANICH
Copy link

Or even better, split up into streams like this

👍 The UX of Visual Studio ctrl+click may be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants