|
1 | | -# Protobuf Decoder |
| 1 | +# ProtoDecodeX |
2 | 2 |
|
3 | | -[](https://circleci.com/gh/pawitp/protobuf-decoder) |
4 | | -[](https://codecov.io/gh/pawitp/protobuf-decoder) |
5 | | -[](LICENSE) |
| 3 | +[](LICENSE) |
6 | 4 |
|
7 | | -Protobuf Decoder is a web application based on React to decode and visualize Protobuf data into prettified table layout. |
| 5 | +ProtoDecodeX is a React-based web app that decodes and visualizes Protobuf data in a readable table view. |
8 | 6 |
|
9 | 7 | > For live version, please visit: https://protobuf-decoder.netlify.app/ |
10 | 8 |
|
11 | 9 | ## Getting Started |
12 | | - |
13 | 10 | To start application locally, use `npm` to get the dependencies and start the application. |
14 | 11 |
|
15 | | -``` |
16 | | -$ npm install |
17 | | -$ npm start |
| 12 | +```bash |
| 13 | +npm install |
| 14 | +npm start |
18 | 15 | ``` |
19 | 16 |
|
20 | | -Once the application started, open http://localhost:5173 on web browser. |
| 17 | +Then open `http://localhost:3000`. |
21 | 18 |
|
22 | 19 | ## Supported Input Formats |
23 | 20 |
|
24 | | -The decoder supports multiple input formats commonly used in development: |
| 21 | +1. Hexadecimal bytes (with or without spaces) |
| 22 | +2. Base64 string |
| 23 | +3. Java decimal byte array (supports negative values) |
| 24 | +4. Java escaped string (for `ISO_8859_1`/byte dump style) |
25 | 25 |
|
26 | | -### 1. Hexadecimal Format |
27 | | -Traditional hex format with spaces or without spaces. |
28 | | -``` |
| 26 | +## Usage |
| 27 | + |
| 28 | +1. Paste data into the input box |
| 29 | +2. Decoder auto-detects input format |
| 30 | +3. Click `Decode` |
| 31 | +4. Inspect parsed fields in the result table |
| 32 | + |
| 33 | +## Example Data |
| 34 | + |
| 35 | +### 1) Hexadecimal Format |
| 36 | + |
| 37 | +```text |
29 | 38 | 0a 80 04 0a db 03 1a 2a 9f 2e 2a 2a 2a 2a 97 2e |
30 | 39 | ``` |
31 | 40 |
|
32 | | -### 2. Base64 Format |
33 | | -Base64 encoded protobuf data. |
34 | | -``` |
| 41 | +### 2) Base64 Format |
| 42 | + |
| 43 | +```text |
35 | 44 | CoCAEAq7Aw0aKp8uKioqKlcqni4qgiIK4isqgiInb19YRVpP |
36 | 45 | ``` |
37 | 46 |
|
38 | | -### 3. Java Decimal Array Format |
39 | | -Comma-separated decimal values (supports negative numbers). |
40 | | -``` |
41 | | -10, 96, 10, 43, 10, 16, 65, 67, 51, 49, 90, 69, 72, 52, 65, 72, 51, 78, 48, 54, 51, 51, 18, 23, 16, 1, 24, 1, 32, 0, 40, 1, 48, 8, 56, -124, 1, 64, -106, -90, 63, 74, 4, -122, -125, -112, 13, 16, 96, 24, 32, 32, 1, 40, 1, 64, -47, 1, 72, 2, 80, 43, 88, 1, 112, -88, -101, -84, 1, 120, -127, -90, 1, -128, 1, 3, -120, 1, 1, -62, 1, 16, 72, 74, 51, 49, 90, 68, 72, 52, 90, 70, 55, 50, 48, 48, 53, 57 |
42 | | -``` |
| 47 | +### 3) Hex stream (XOR / nested-message scenario) |
43 | 48 |
|
44 | | -### 4. Java Escape String Format |
45 | | -Java string with octal/hex escape sequences. |
| 49 | +```text |
| 50 | +0a 80 04 0a db 03 1a 2a 9f 2e 2a 2a 2a 2a 97 2e 4e 8e 97 96 f0 2e 2a 82 22 e2 2b 98 22 27 6f 5f 58 45 5a 4f 05 68 4f 58 46 43 44 92 22 2b bf 25 2a 2a ba 68 b7 25 2a 2a e2 68 ea 25 aa 34 da 25 99 04 d2 25 99 04 ba 3a 36 b2 3a 0b 8a 3a 0b 82 3a 0b 9f 3a 2a 2a ba 68 97 3a 2a 2a e2 68 ca 3a 99 04 c2 3a 99 04 da 3a 75 d2 3a 2a b2 3b 2b e2 3b 2a fa 3b 2a e7 3c 2a 2a 2a 2a fa 3c 2a cf 3d 6f 1a 02 6a c7 3d 02 d9 bc 97 e0 32 28 0a 2b 82 30 2a ff 31 c1 17 03 6a f2 36 9a 23 ca 36 cb 26 c2 36 29 da 36 aa 34 b7 0a 2a 2a 62 6e 8f 0a 2a 2a 62 6e 87 0a 2a 2a 2a 2a 9f 0a 2a 2a 2a 2a ea 0a 2b e2 0a 8a 2c ff 0f 2a 2a 12 e8 87 0c ad de 45 69 97 0c eb d8 6d 68 ef 0c 2a 2a 2a 2a f2 0c 2b b0 0d 2a 92 07 8a 2c e2 07 2a fa 07 2f f2 07 bb 64 9a 05 2b 90 05 2a ea 05 28 a0 1b 3e 3a 2b 30 3a 68 61 18 1b 70 6f 68 1b 69 6b 1b 1b 1a 18 1b 1a a8 17 3f 20 22 22 ba cf df ed 2c 3a 4e 20 23 22 ba d9 8b e4 2c 3a e2 2b a2 17 2a b8 17 2a 8a 17 2a 82 17 2b 9a 17 2a 92 17 2b ea 17 a8 ea db de 2d e2 17 8a 2c f2 17 2a ca 17 2a c2 17 9d 3b da 17 2b d2 17 2b af 14 2a 2a 2a 2a a7 14 2a 2a 2a 2a ba 14 4e b2 14 2b 8f 14 2c 6a d6 1d 87 14 93 8f 20 15 9f 14 ba ee 19 10 97 14 23 b6 19 17 ef 14 25 76 02 6a e7 14 0c f8 78 14 ff 14 2a 2a 2a 2a f7 14 2a 2a 2a aa cf 14 2a 2a 62 6e ff 61 2a 2a 2a 2a f7 61 2a 2a 2a 2a ca 61 2a da 65 2b aa 7a d6 3b a2 7a 9a 23 ba 7a 9a 23 b2 7a f6 21 8a 7a f6 21 82 7a 2b ca 7a 2a c0 7a 2a d8 7a 2a d0 7a 2a aa 7b 2a 92 77 8a 2c ea 77 2a e2 77 2a 10 02 18 20 20 01 28 01 30 01 38 03 40 fe 01 48 15 50 db 03 70 aa cc 8d 01 78 82 70 80 01 03 88 01 01 |
46 | 51 | ``` |
47 | | -\2605\006\027}\276\255\270\270\360\373\220\271 |
48 | | -``` |
49 | | - |
50 | | -## Usage |
51 | | - |
52 | | -1. Paste Protobuf data in any supported format |
53 | | -2. The decoder automatically detects the format and shows it with a colored label |
54 | | -3. Press **Decode** button to parse the data |
55 | | -4. View the decoded protobuf structure in a formatted table |
56 | | - |
57 | | -## Features |
58 | 52 |
|
59 | | -- **Multiple Input Formats**: Support for hex, base64, Java decimal arrays, and Java escape strings |
60 | | -- **Automatic Format Detection**: No need to specify the format manually |
61 | | -- **Smart Decode**: Conditional XOR decryption for encrypted protobuf data |
62 | | -- **Schema-Based Display**: Display decoded data using custom protobuf schemas |
63 | | -- **Performance Optimized**: Caching and memoization for better performance |
64 | | -- **Responsive UI**: Modern interface with expand/collapse functionality |
65 | | -- **File Upload**: Support for uploading binary files directly |
| 53 | +### 4) Multi-message stream |
66 | 54 |
|
67 | | -## Example Data |
| 55 | +```text |
| 56 | +0a 2f 0a 08 4a 6f 68 6e 20 44 6f 65 10 01 1a 10 6a 6f 68 6e 40 65 78 61 6d 70 6c 65 2e 63 6f 6d 22 0f 0a 0b 31 31 31 2d 32 32 32 2d 33 33 33 10 01 0a 1e 0a 08 4a 61 6e 65 20 44 6f 65 10 02 1a 10 6a 61 6e 65 40 65 78 61 6d 70 6c 65 2e 63 6f 6d |
| 57 | +``` |
68 | 58 |
|
69 | | -**Input (Hexadecimal)** |
| 59 | +### 5) Java decimal array |
70 | 60 |
|
71 | | -> 0a 2f 0a 08 4a 6f 68 6e 20 44 6f 65 10 01 1a 10 6a 6f 68 6e 40 65 78 61 6d 70 6c 65 2e 63 6f 6d 22 0f 0a 0b 31 31 31 2d 32 32 32 2d 33 33 33 10 01 0a 1e 0a 08 4a 61 6e 65 20 44 6f 65 10 02 1a 10 6a 61 6e 65 40 65 78 61 6d 70 6c 65 2e 63 6f 6d |
| 61 | +```text |
| 62 | +10, 96, 10, 43, 10, 16, 65, 67, 51, 49, 90, 69, 72, 52, 65, 72, 51, 78, 48, 54, 51, 51, 18, 23, 16, 1, 24, 1, 32, 0, 40, 1, 48, 8, 56, -124, 1, 64, -106, -90, 63, 74, 4, -122, -125, -112, 13, 16, 96, 24, 32, 32, 1, 40, 1, 64, -47, 1, 72, 2, 80, 43, 88, 1, 112, -88, -101, -84, 1, 120, -127, -90, 1, -128, 1, 3, -120, 1, 1, -62, 1, 16, 72, 74, 51, 49, 90, 68, 72, 52, 90, 70, 55, 50, 48, 48, 53, 57, 10, 96, 10, 43, 10, 16, 65, 67, 51, 49, 90, 69, 72, 52, 65, 72, 51, 78, 48, 54, 51, 51, 18, 23, 16, 1, 24, 1, 32, 0, 40, 1, 48, 8, 56, -124, 1, 64, -96, 71, -121, 0, 4, -122, -125, -112, 13, 16, 96, 24, 32, 32, 1, 40, 1, 64, -47, 1, 72, 2, 80, 43, 88, 1, 112, -61, -41, -85, 1, 120, -127, -90, 1, -128, 1, 3, -120, 1, 1, -62, 1, 16, 72, 74, 51, 49, 90, 68, 72, 52, 90, 70, 55, 50, 48, 48, 53, 57 |
| 63 | +``` |
72 | 64 |
|
73 | | -**Input (Java Decimal Array)** |
| 65 | +### 6) Java escaped string |
74 | 66 |
|
75 | | -> 10, 96, 10, 43, 10, 16, 65, 67, 51, 49, 90, 69, 72, 52, 65, 72, 51, 78, 48, 54, 51, 51, 18, 23, 16, 1, 24, 1, 32, 0, 40, 1, 48, 8, 56, -124, 1, 64, -106, -90, 63, 74, 4, -122, -125, -112, 13, 16, 96, 24, 32, 32, 1, 40, 1, 64, -47, 1, 72, 2, 80, 43, 88, 1, 112, -88, -101, -84, 1, 120, -127, -90, 1, -128, 1, 3, -120, 1, 1, -62, 1, 16, 72, 74, 51, 49, 90, 68, 72, 52, 90, 70, 55, 50, 48, 48, 53, 57 |
| 67 | +```text |
| 68 | +\2605\006\027}\276\255\270\270\360\373\220\271 |
| 69 | +``` |
76 | 70 |
|
77 | | -**Output** |
| 71 | +## Features |
78 | 72 |
|
79 | | -<img src="https://raw.githubusercontent.com/pugkung/protobuf-decoder/master/screenshot.jpg" alt="screenshot" width="500"/> |
| 73 | +- Multi-format input support |
| 74 | +- Automatic format detection |
| 75 | +- Smart decode (conditional XOR) |
| 76 | +- Schema-based display |
| 77 | +- Expand/collapse table interaction |
| 78 | +- File upload support |
80 | 79 |
|
81 | | -## Recent Updates |
| 80 | +## License |
82 | 81 |
|
83 | | -- ✅ Added support for Java decimal array format |
84 | | -- ✅ Added support for Java escape string format |
85 | | -- ✅ Automatic format detection with visual indicators |
86 | | -- ✅ Smart decode feature with conditional XOR decryption |
87 | | -- ✅ Schema-based display for custom protobuf definitions |
88 | | -- ✅ Performance optimizations and caching |
89 | | -- ✅ Improved UI with expand/collapse functionality |
90 | | -- ✅ Better error handling and user feedback |
| 82 | +MIT |
0 commit comments