postmodern / hexdump.rb Goto Github PK
View Code? Open in Web Editor NEWFully Featured and Fast hexdumping for Ruby.
License: MIT License
Fully Featured and Fast hexdumping for Ruby.
License: MIT License
Refactor the messy numeric formatting and character conversion code into Classes.
Also support dumping floats and doubles, to match the od
utility.
Add an option to skip N bytes before starting to read/hexdump the input data. Similar to zhexdum.
String#unpack
should be faster and provide more format options (such as floats). Segments will also have to be padded with \0
bytes.
Once 1.0.0 has been released, work on a Crystal port.
Some hex dumping utilities add one more line. It contains only the first offset part with the actual length of the data. Like this:
000003f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000400 00 00 00 00 |................|
00000404
It is helpful as it can be immediately seen how long the data is without needing to count the actually present bytes on the last line of the dump.
Just adding here as a suggestion.
Support decoding types:
char
uchar
uint8
/ byte
int8
uint16
int16
uint32
int32
uint64
int64
float32
float64
Stop reading input after N bytes. Similar to zhexdump.
Right now, hexdump uses STDOUT
instead of $stdout
. According to the documentation, $stddout
is the current output and STDOUT
is the standard output. IRuby updates $stdout to write all output to a 0mq socket, which gets sent to the user. But since hexdump writes to STDOUT
, its output is silently swallowed.
GNU hexdump adds an extra space in between eight columns.
00000000 23 20 68 65 78 64 75 6d 70 2e 72 62 0a 0a 5b 21 |# hexdump.rb..[!|
Add a grouping keyword argument to match GNU hexdump output.
Need screenshots of the ANSI examples.
It should be possible to configure the Hexdump object via a block.
Hexdump.hexdump(...) do |hexdump|
...
end
Also add attr_accessor
s to allow writing to certain settings.
I believe that the two occurrences of ascci in benchmarks/hexdump.rb
should read ascii.
[For my own education: what should happen in cases like this - should Hexdump.dump
or Dumper.initialize
check for unrecognised keys in the options hash and issue a warning, raise an exception, or what?]
Do a pre-release of 1.0.0.
Add the ability to post-process rows of a hexdump, similar to zhexdump.
Switch to using require_relative
to load other hexdump/
files to improve load-times.
Add support for ANSI styling hexdumps:
|
characters around the chars column)0x00 => :red
).Add an option to toggle off the omission of repeating rows.
Implement grouping of characters together, mainly to match the column grouping. Will only be possible when the encoding is ASCII and should disable the feature if the encoding is UTF-8. This would be similar to pwntool's phd
command:
https://twitter.com/ebeip90/status/1263255253337518080
Add a String#to_hexdump
method similar to zhexdump.
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.