tacooper / tacooper.github.io Goto Github PK
View Code? Open in Web Editor NEWMy web page for games and tools
Home Page: https://tacooper.github.io/
My web page for games and tools
Home Page: https://tacooper.github.io/
The packet schema and raw packet input fields (as well as hex/bin format button) could be optionally populated when loading the webpage, based on URL parameters. For example:
https://tacooper.github.io/packet-decoder?packet_schema=1,2,3,4&raw_packet=abcd&format=hex
This would allow easy manipulation of each nibble in the raw packet input in order to achieve a desired output value, since there is no "packet encoder" tool. It would also help to "show work" for visualizing each step in the decoding process.
For example, 0x0123 hex input should display:
(Hex:) [ 0 ][ 1 ][ 2 ][ 3 ]
(Bin:) [ 0000 ][ 0001 ][ 0010 ][ 0011 ]
These new input (Hex:) and (Bin:) rows should be displayed above the existing decoded (Bin:) and (Hex:) rows.
Not really necessary, but more favorable IMHO. See comparison for more details.
The current -
separator may be confused with a general minus sign, especially since it is placed between numbers. Consider replacing with a more readable/distinct separator character.
This would include adding a group of "Big"/"Little" buttons to select byte order. No sanitizing is necessary upon switching order.
A switch button would allow toggling between specifying hex (default) and binary formats in the raw packet input field. Sanitizing the text should still be enforced, depending on the selected format.
Thanks for the suggestion from https://github.com/danielrayali.
For example, the following input parameters do not result in the expected decoded bit-fields:
6,1,4,3,4,3,5,3
0b900500
Actual: (bin:) 101110 - 0 - 1000 - 000 - 0001 - 010 - 00000 - 00 -
Expected: (bin:) 010111 - 0 - 0100 - 000 - 0000 - 101 - 00000 - 000 -
This failure condition occurs for any packet schema with less total bits than the raw packet length, since the bit-fields are aligned starting with the MSb moving right (as opposed to LSb moving left). Therefore, bit-fields must account for starting at MSb by left-padding when necessary, as follows:
3,6,1,4,3,4,3,5,3
0b900500
Actual: (bin:) 101 - 110010 - 0 - 0000 - 000 - 1010 - 000 - 0000 - -
Expected: (bin:) 000 - 010111 - 0 - 0100 - 000 - 0000 - 101 - 00000 - 000 -
The problem still persists because the raw packet is decoded starting with the LSb moving left, which does not match the packet schema direction.
This bug exists as of version 1.0.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.