diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 52dd597..794df87 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,6 +6,8 @@ - Add a new class `Unisec::Bidi::Spoof` and CLI command `bidi spoof` to craft payloads for attack using BiDi code points like RtLO, for example, for spoofing a domain name or a file name - Add a new helper method: `Unisec::Utils::String.grapheme_reverse`: Reverse a string by graphemes (not by code points) +- Add an `--enc` option for `unisec hexdump` to output only in the specified encoding +- `unisec hexdump` can now read from STDIN if the input equals to `-` ## [0.0.3] diff --git a/docs/yard/Integer.html b/docs/yard/Integer.html index be4077e..80ab82b 100644 --- a/docs/yard/Integer.html +++ b/docs/yard/Integer.html @@ -304,7 +304,7 @@
-29 -30 -31+32 +33 +34 +35 +36 +37 +38 +39 +40
# File 'lib/unisec/cli/hexdump.rb', line 29 - -def call(input: nil, **) - puts Unisec::Hexdump.new(input).display +# File 'lib/unisec/cli/hexdump.rb', line 32 + +def call(input: nil, **options) + input = $stdin.read.chomp if input == '-' + if options[:enc].nil? + puts Unisec::Hexdump.new(input).display + else + # using send() is safe here thanks to the value whitelist + puts puts Unisec::Hexdump.send(options[:enc], input) + end end
Unisec::Bidi::Spoof
and CLI command bidi spoof
to craft payloads for attack using BiDi code points like RtLO, for example, for spoofing a domain name or a file nameUnisec::Utils::String.grapheme_reverse
: Reverse a string by graphemes (not by code points)--enc
option for unisec hexdump
to output only in the specified encodingunisec hexdump
can now read from STDIN if the input equals to -
Features
@@ -91,7 +93,7 @@